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

Revision history [back]

click to hide/show revision 1
initial version

JPG does not support 16 bit images and with OpenCV you apparently need to convert your images explicitly to 8-bit before saving (information will be lost!)

You have commented out code that does almost that. It needs to be:

ir_img_ptr->image.convertTo(ir_img[ir_image_count],CV_8UC1,(double)(1.0/256), 0);

Notice the last parameter. Look here for convertTo for details.