Hi,
I am playing a bag of 16 bits-per-pixel depth and 8 bit rgb images. While playing the bag, I can extract both the rgb and the depth images into files (verifying that the data is ok) (I used the thread here to create and extract the depth images)
The way the depth image is stored in the bag is by using a python script that uses the PIL package to read a pgm image from file into a PIL object, serialize the object data into byte array (using io.BytesIO()), and save the byte array in PPM format.
In rviz I can view the rgb image, but I cannot view the depth image.
rviz issues an error message:
[ WARN] [1548110467.614542827]: OGRE EXCEPTION(2:InvalidParametersException): Stream size does not match calculated image size in Image::loadRawData at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreImage.cpp (line 283)
[ERROR] [1548110467.614620078]: Error loading image: OGRE EXCEPTION(2:InvalidParametersException): Stream size does not match calculated image size in Image::loadRawData at /build/ogre-1.9-B6QkmW/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreImage.cpp (line 283)
The transport Hint in rviz is set to "raw" and I cannot change it.
Thanks,
Avner
Originally posted by Avner on ROS Answers with karma: 96 on 2019-01-21
Post score: 1
Original comments
Comment by gvdhoorn on 2019-01-24:
I would actually recommend to post your edit1
as an answer and then accept your own answer (by clicking the checkmark to the left of it).
That would much more clearly show that your question was answered.
Comment by Avner on 2019-01-29:
Done. Thanks for your comment.