Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

from rgb to depth #148

Open
rastinrastini opened this issue May 16, 2020 · 10 comments
Open

from rgb to depth #148

rastinrastini opened this issue May 16, 2020 · 10 comments

Comments

@rastinrastini
Copy link

Dear,
i want to reconstruct environment from video that captured from camera.
for first step want to create depth from image. had used monodepth on teddy dataset and generated depth images.
convert them to pgm with imagemagic.
but cant run code with these images and get error.
error reading file 'Teddy/estimate_depth/0000.pgm'

any way that can do this?

@sgolodetz
Copy link
Collaborator

Have you tried specifying the full path to the sequence directory? (Failing which, what's your working directory?)

@rastinrastini
Copy link
Author

this is my command: ./build/Apps/InfiniTAM/InfiniTAM /media/rastin/projects_drive/ai/autonomous_uav/datasets/Teddy/calib.txt /media/rastin/projects_drive/ai/autonomous_uav/datasets/Teddy/estimate_depth/%04i.ppm /media/rastin/projects_drive/ai/autonomous_uav/datasets/Teddy/estimate_depth/%04i.pgm

this is an sample of pgm https://imgur.com/a/p7b6g0N

@sgolodetz
Copy link
Collaborator

Ok fair enough. What's the file format? When I run ImageMagick's identify tool on one of the Teddy sequence images, I get this:

0000.pgm PGM 640x480 640x480+0+0 16-bit Grayscale Gray 614417B 0.000u 0:00.002

What do you get with your files?

@rastinrastini
Copy link
Author

identify teddy_frames/0000.pgm:

PGM 640x480 640x480+0+0 16-bit Grayscale Gray 614417B 0.000u 0:00.010

identify estimated_frame/0000.pgm:

PGM 640x480 640x480+0+0 8-bit Grayscale Gray 307215B 0.010u 0:00.010

@rastinrastini
Copy link
Author

rastinrastini commented May 16, 2020

when i use

mogrify -depth 16 -format pgm *.png

image convert to 16-bit and infinitam work. but dont reconstruct anything and screen is black
image of app:
https://imgur.com/a/TLdIGO4

identify now:
identify teddy_frames/0001.pgm:

PGM 640x480 640x480+0+0 16-bit Grayscale Gray 614417B 0.000u 0:00.010

identify estimated_frame/0001.pgm:

PGM 640x480 640x480+0+0 16-bit Grayscale Gray 614417B 0.000u 0:00.009

@rastinrastini
Copy link
Author

anyone has any idea how correct it?

@victorprad
Copy link
Owner

are there any comments in the pgm? the infinitam reader does not support comments in the file

@sgolodetz
Copy link
Collaborator

Also, is the scale of the depth values reasonable? If you can load the depth images but you get a black screen when you try to do the reconstruction, that might be worth double-checking.

@rastinrastini
Copy link
Author

rastinrastini commented May 17, 2020

how can know is comment there? one sample of it is uploaded. https://gofile.io/d/uRwR5b
what must be scale of depth? i only convert it by command show above.
when i use command

mogrify -depth 16 -format pgm -compress none *.png

and open one of pgm files with text editor, in top of that is:

P2
640 480
65535

and dont see any comment

@rastinrastini
Copy link
Author

any scale or characteristics needed for pgm files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants