0
$\begingroup$

Rosanswers logo

Hello,

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,


Originally posted by Filipe Santos on ROS Answers with karma: 346 on 2013-04-02

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Ok... My faults. It is solved.

I should use http://www.ros.org/wiki/image_proc and also run rosrun image_view image_view image:=/cam1/image_raw theora (without theora)

regards


Originally posted by Filipe Santos with karma: 346 on 2013-04-02

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.