victorprad / InfiniTAM

A Framework for the Volumetric Integration of Depth Images
http://www.infinitam.org
Other
918 stars 351 forks source link

cannot read images #162

Open iwander-all opened 3 years ago

iwander-all commented 3 years ago

when I run ./InfiniTAM, it shows:

initialising ...
using calibration file: /home/hurq2085/Downloads/bags/2021-03-09-20-19-00/calib.txt
using rgb images: /home/hurq2085/Downloads/bags/2021-03-09-20-19-00/Frames/%04i.ppm
using depth images: /home/hurq2085/Downloads/bags/2021-03-09-20-19-00/Frames/%04i.pgm
error reading file '/home/hurq2085/Downloads/bags/2021-03-09-20-19-00/Frames/0000.ppm'
error reading file '/home/hurq2085/Downloads/bags/2021-03-09-20-19-00/Frames/0000.pgm'
compiled without FFMPEG
trying OpenNI device: /home/hurq2085/Downloads/bags/2021-03-09-20-19-00/Frames/%04i.ppm - calibration: from file
compiled without OpenNI support
trying UVC device
compiled without LibUVC support
trying RealSense device
compiled without RealSense Windows support
trying RealSense device with SDK 2.X (librealsense2)
compiled without RealSense SDK 2.X support
trying MS Kinect 2 device
compiled without Kinect 2 support
trying PMD PicoFlexx device
compiled without LibRoyale support
failed to open any image stream

Then I try the methods in other issues like:

identify 0001.ppm
identify 0001.pgm

then the difference between Teddy and my images are:

0001.ppm PPM 640x480 640x480+0+0 8-bit sRGB 922KB 0.000u 0:00.000
0001.ppm PPM 1280x720 1280x720+0+0 8-bit sRGB 2.765MB 0.000u 0:00.020
0001.pgm PGM 640x480 640x480+0+0 16-bit Grayscale Gray 614KB 0.000u 0:00.000
0001.pgm PGM 1280x720 1280x720+0+0 8-bit Grayscale Gray 922KB 0.000u 0:00.000

Then I use: mogrify -depth 16 -format pgm *.pgm it shows: 0001.pgm PGM 1280x720 1280x720+0+0 16-bit Grayscale Gray 1.843MB 0.010u 0:00.030

But still cannot read images, could you please help, thanks

sgolodetz commented 3 years ago

Are your files numbered from 0 or 1? It can't find 0000.ppm etc., but you run identify on 0001.ppm. Are you sure that 0000.ppm is there?

iwander-all commented 3 years ago

0000.ppm is also under the same action of mogrify. Then I moved 0000.ppm and .pgm out of the dir, it can not run as well.

sgolodetz commented 3 years ago

Are you happy to share the sequence with me (e.g. WeTransfer me a .zip)? I can try it locally to double-check that the files are in the right format.

iwander-all commented 3 years ago

I update 10 pairs on https://github.com/iwander-all/image_.git , these images I did mogrify -resize 50% * because I previously guessed maybe the images are too big. the info is

0000.ppm PPM 640x360 640x360+0+0 8-bit sRGB 691KB 0.000u 0:00.000
0000.pgm PGM 640x360 640x360+0+0 16-bit Grayscale Gray 461KB 0.000u 0:00.000

If the images without 50% resize are more expected, I will share then. Thanks for the help

sgolodetz commented 3 years ago

Ok they work fine for me, nothing seriously wrong with the images (besides e.g. the colour images being BGR rather than RGB, etc.). Are the images in the same directory as the calib.txt by any chance? They are in the repository you provided. If so, you might need to delete the Frames subdirectory in the paths you're providing on the command line.

image

sgolodetz commented 3 years ago

By the way, the last line in your calib.txt file looks a little odd to me:

0.0 0.0

For comparison, I have things like this in mine:

affine 0.001 0

The Teddy sequence one is slightly different, but it doesn't have zeros:

1135.09 0.0819141

The details of what those mean can be found in ITMDisparityCalib.h and ITMViewBuilder_Shared.h (it's been a while since I looked at them), but I would have a look to check.

iwander-all commented 3 years ago

Thanks for the help. I use Ubuntu to do the job, but it still does not work, the dir I wrote is correct, thanks for the help anyway.

sgolodetz commented 3 years ago

Ok one last suggestion - try the infinitam_v3.5 branch and build with OpenCV enabled (i.e. WITH_OPENCV on in CMake). I'm on that branch, so maybe that's why it works for me but not for you. The OpenCV loading/saving was added in v3.5, so that might help.

iwander-all commented 3 years ago

where I can find v3.5, thanks

sgolodetz commented 3 years ago

https://github.com/victorprad/InfiniTAM/tree/infinitam_v3.5

jizhu1023 commented 1 year ago

mark