Ask Your Question
0

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

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

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

ngrennan gravatar image

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,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

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

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

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 1,121 times

Last updated: Apr 02 '13