How publish an "YUV422 packed" image, aravis + basler
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,