OpenNi: save /came/depth/image_raw to PGM 11 bit? [closed]

asked 2012-09-26 01:57:49 -0600

liborw gravatar image

Hi,

I need to save image from kinect topic /camera/depth/image_raw to PGM. I use cv_bridge to convert the message to OpenCV image. However, if I try to show or save the image I see just black screen. This is because the PGM file is saved as 16 bit but the kinect data are just 11 bit. So the PGM header is "P5 640 480 65535" but I need "P5 640 480 2048". If I change it manually the image is displayed fine, but I need this to be done automatically?

edit retag flag offensive reopen merge delete

Closed for the following reason OpenCV Question: THe OpenCV community prefers to answer questions at: http://answers.opencv.org/questions/ by tfoote
close date 2015-06-30 19:01:24.449975

Comments

This sounds more like an OpenCV question about file formats; maybe ask it over on the OpenCV answers site? http://answers.opencv.org/questions/

ahendrix gravatar imageahendrix ( 2012-09-26 12:36:13 -0600 )edit

Thanks, I will try.

liborw gravatar imageliborw ( 2012-10-10 02:03:41 -0600 )edit

I have the same question. Do you know the answer now? Thanks.

DiogoCorrea gravatar imageDiogoCorrea ( 2012-12-10 09:56:15 -0600 )edit