victorprad / InfiniTAM

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

Teddy/Frames/%04i.ppm Teddy/Frames/%04i.pgm #27

Closed LiliMeng closed 7 years ago

LiliMeng commented 8 years ago

Thanks a lot for the code!

What kind of files 04i.ppm and 04i.pgm are? As I put some rgb images(changed name to 1c.png, 2c.png...) and depth images(changed name to 1d.png, 2d.png...) in the Teddy folder from TUM RGBD dataset, it displayed: initialising ... using calibration file: Teddy/calib.txt using rgb images: Teddy/1c.png using depth images: Teddy/1d.png error reading file 'Teddy/1c.png' error reading file 'Teddy/1d.png'

Thanks a lot!

egoist-sx commented 8 years ago

ppm and pgm are "raw" image file for color and gray image respectively. You should not simply rename it for format conversion, it will not work. Use tools like imagemagick if you really want to convert between different format.

LiliMeng commented 8 years ago

Thanks a lot! Using the matlab functions it could convert many png to ppm/pgm very efficiently for i = 1 :100 I = imread(sprintf('%d.png', i)); imwrite(I, sprintf('%d.ppm', i)); end

but it displayed: initialising ... using calibration file: Teddy/calib.txt using rgb images: Teddy/1.ppm using depth images: Teddy/111.pgm error reading file 'Teddy/1.ppm' error reading file 'Teddy/111.pgm' Segmentation fault (core dumped)

egoist-sx commented 8 years ago

Are you sure you start depth images with 111.pgm? Could you please check if the images actually exist at the specified path? If everything fails, try to download data I have just uploaded here

LiliMeng commented 8 years ago

Thanks a lot @Thunderbolt-sx ! Your Teddy dataset works really great!( https://www.youtube.com/watch?v=XPsw8efq6eU). It's a little bit wired by using the rgbd_dataset_freiburg2_large_with_loop from (http://vision.in.tum.de/data/datasets/rgbd-dataset/download). And the original png format rgb photos are converted to ppm format, the png format depth photos are converted to pgm format by using matlab tool(https://github.com/LiliMeng/matlabForComputerVisionTools/blob/master/fromPNGtoPPM.m). The video for RGBDdataset is here(https://www.youtube.com/watch?v=mXt8AYPDwq4)

What's wrong with this RGBDdataset testing? Is that because too few depth information?

Thanks again!

egoist-sx commented 8 years ago

The depth format is obviously wrong. We use either "raw" depth data with calibration, or short depth in mm unit.

connerbrooks commented 8 years ago

The depth images are scaled by a factor of 5000, i.e., a pixel value of 5000 in the depth image corresponds to a distance of 1 meter from the camera, 10000 to 2 meter distance, etc. A pixel value of 0 means missing value/no data.

TUM file format descriptions

You have to covert to the format that InfiniTAM expects.

LiliMeng commented 8 years ago

@connerbrooks Thanks a lot! How to convert the format? thanks again!:)

connerbrooks commented 8 years ago

I'm not entirely sure, I am trying to work that out. Converting to mm:

depth_m = data[i] / 5000; // data[i] is a ushort and InfiniTAM expects a signed short
depth_mm = depth_m * 1000;

which still does not work correctly in InfiniTAM.

drinkingcoder commented 7 years ago

Can I find the ppm and pgm files to implement the video demo anywhere? It's so strange that the folder 'Teddy' contains only a calib file without frames data.

sgolodetz commented 7 years ago

@drinkingcoder: See the download page here:

http://www.robots.ox.ac.uk/~victor/infinitam/download.html

In particular, the link is:

http://www.robots.ox.ac.uk/~victor/infinitam/files/teddy_20141003.zip

The reason it's not in the repository is because it's big, and not everyone needs it.

drinkingcoder commented 7 years ago

@sgolodetz :Get it. Thanks!

xiaoyaozhuzi commented 5 years ago

mark

renhaofan commented 5 years ago

Are you sure you start depth images with 111.pgm? Could you please check if the images actually exist at the specified path? If everything fails, try to download data I have just uploaded here

Thanks again

jizhu1023 commented 1 year ago

mark