Most of USB webcams used in hobby robotics support YUYV coding natively. Currently both OpenCV and ROS by default convert this image to BGR format and this is not most efficient decicion for most problems. I wrote about it also into OpenCV list:
http://opencv-users.1802565.n2.nabble.com/HSV-image-input-YUYV-image-transport-td6246826.html
Is there are options to keep YUYV image somehow "raw" in image_transport or can new imaeg encoding added to ROS? What is your opinion?
I'd think adding the most standard YUV encodings (how many YUV encodings are there?) to sensor_msgs so that they could be used for the "encoding" field of sensor_msgs/Image would be good. That should let you essentially "pass-through" the YUYV image to another node while maintaining encoding information.
This wouldn't help with code that operates on BGR images (aka basically all of OpenCV) or likely things like image_view, so any inclusion of YUYV into sensor_msgs as a valid encoding might also want to include conversion functions between YUV encoding and BGR encoding (conversion helpers might be better placed somewhere in the image_pipeline).
Asked: Apr 09 '11
Seen: 445 times
Last updated: Apr 09 '11
ROS Answers is licensed under Creative Commons Attribution 3.0 Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.