Making sense of 16-bit jpeg compressed data from Intel RealSense D435i camera
Hello,
I recorded some data from an Intel RealSense D435i with the /camera/aligned_depth_to_color/image_raw/compressed
topic; I use image transport to subscribe to it (in C++), and do the following:
cv_bridge::CvImageConstPtr cv_ptrD;
try {
cv_ptrD = cv_bridge::toCvShare(msgD) ;
} catch (cv_bridge::Exception& e) {
ROS_ERROR("cv_bridge exception: %s", e.what());
return;
}
EDIT: I forgot to mention that this gives me the error: [ERROR] : cv_bridge exception: Image is wrongly formed: step < width * byte_depth * num_channels or 848 != 848 * 2 * 1
On running rostopic echo /camera/aligned_depth_to_color/image_raw/compressed/format
I get the output: "16UC1; jpeg compressed "
. My understanding is that jpeg compression works only for 8 bit data, and the png compression should be used for 16-bit.
Does this then mean that the data from this topic is useless since the raw data was compressed with the wrong compression format or is there some other way to make sense of the data? Relevant issue in the realsense-ros github: https://github.com/IntelRealSense/rea...