ros-perception / image_common

Common code for working with images in ROS
http://www.ros.org/wiki/image_common
124 stars 219 forks source link

yuv422_yuy2 incorrectly (de)compressed #293

Open StefanFabian opened 7 months ago

StefanFabian commented 7 months ago

Hey, using usb_cam and my webcam, the image is published as yuv422_yuy2. The compressed topic has the encoding yuv422_yuy2; jpeg compressed mono8 (which sounds like it doesn't really support compressing yuv and compresses the data as mono8). When I receive this image with image_transport, I get the original encoding but the step size is incorrect. YUV has a bit depth of 16bits but the step size of the decompressed image is equal to the width of the image not 2 * the width like it should be and the uncompressed image is.

emrekuru97 commented 6 months ago

Hey, same situation here, exaclty with the encoding yuv422_yuy2 and plus the encoding yuv422 in compressed image. I don't know where this is done in code, bu a fix would be nice. But I have no problem with the raw_image.