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

YUYV/YUV422 in image_transport

asked 2011-04-09 00:29:30 -0600

updated 2014-01-28 17:09:30 -0600

ngrennan gravatar image

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...

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?

edit retag flag offensive close merge delete

Comments

Most used cameras and their encodings: PS3 Eye - YUV422 only, Logitech Quickcam Pro 9000 - YUV422 (plus MJPEG, RGB3, BGR3, YU12, YV12), Logitech C910 - YUV422 (plus MJPEG). I see YUV422 is the only and right choice. Those are best and cheap webcams for robotics.
Tõnu Samuel gravatar image Tõnu Samuel  ( 2011-04-09 21:22:47 -0600 )edit
I think I do not wait until others make decicion but write new node. This node attach V4L2 camera, read YUYV image and publish it as three monochrome images on ROS. So anyone can subscribe to BW topic only or take colour channels too. This is fast, efficient and elegant.
Tõnu Samuel gravatar image Tõnu Samuel  ( 2011-04-10 02:39:39 -0600 )edit
I see now related work in camera_umd repository file uvc_cam.cpp. So all we need is standardize YUV422 in ROS. Hey people from WillowGarage, are you listening?
Tõnu Samuel gravatar image Tõnu Samuel  ( 2011-04-10 04:53:38 -0600 )edit
To do this sort of thing someone needs to put it through the REP process. The best people to do this are people who have an unmet use case. http://www.ros.org/reps/rep-0000.html I suggest you take a look, it's not too hard to write a REP and you'll get lots of feedback on the list.
tfoote gravatar image tfoote  ( 2011-04-10 23:55:18 -0600 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2011-04-09 05:58:27 -0600

Eric Perko gravatar image

updated 2011-04-09 15:20:02 -0600

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).

edit flag offensive delete link more

Comments

Seems YUV422 is only one we need.
Tõnu Samuel gravatar image Tõnu Samuel  ( 2011-04-09 21:29:33 -0600 )edit
I'm in favor. Also PrimeSense devices produce YUV422, so we already have some conversion code in the openni_kinect driver that should go into OpenCV instead. As Tully said, someone needs to draft an REP stating exactly what the new encodings are, and how they should be supported in e.g. cv_bridge.
Patrick Mihelich gravatar image Patrick Mihelich  ( 2011-04-13 13:03:05 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2011-04-09 00:29:30 -0600

Seen: 5,123 times

Last updated: Apr 09 '11