ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How publish an "YUV422 packed" image, aravis + basler

asked 2013-04-02 03:51:08 -0500

updated 2014-01-28 17:16:00 -0500

ngrennan gravatar image


I am using aravis driver+ basler camera + Camara_aravis node. My camera can only give images with format: -ARV_PIXEL_FORMAT_YUV_422_PACKED -ARV_PIXEL_FORMAT_YUV_422_YUYV_PACKED -ARV_PIXEL_FORMAT_BAYER_BG_8 -ARV_PIXEL_FORMAT_BAYER_BG_12

I have changed Camara_aravis node

msg.encoding = sensor_msgs::image_encodings::YUV422 ;
msg.step = g_width*2;

But when I subscribe the image: rosrun image_view image_view image:=/cam1/image_raw theora

I get an image with wrong colors (blue is yellow, blue is orange...).

I think that the problems comes from ARV_PIXEL_FORMAT_YUV_422_PACKED format which is different of sensor_msgs::image_encodings::YUV422.

How can I fix this?

If I use ARV_PIXEL_FORMAT_BAYER_BG_8 with sensor_msgs::image_encodings::BAYER_BGGR8. I get a crash:

terminate called after throwing an instance of 'cv_bridge::Exception' what(): Unsupported conversion from [bayer_bggr8] to [rgb8] Aborted (core dumped)

What is the best way to publish images of this format?

My regards,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-04-02 10:58:07 -0500

Ok... My faults. It is solved.

I should use and also run rosrun image_view image_view image:=/cam1/image_raw theora (without theora)


edit flag offensive delete link more

Question Tools

1 follower


Asked: 2013-04-02 03:51:08 -0500

Seen: 1,666 times

Last updated: Apr 02 '13