Comments (9)
@LiliMeng You may supply png images to InfiniTAM directly.
In order to get InfiniTAM running on the TUM Dataset I had to scale the depth values by a scalar factor of (1/5000).
In InfiniTAM you may specify the transformation to apply to the depth values directly in the calibration file.
For instance, on the "freiburg1" sequences you may supply the following calibration file to InfiniTAM:
640 480
591.123473 590.076012
331.038659 234.047543
640 480
517.306408 516.469215
318.643040 255.313989
1 0 0 0
0 1 0 0
0 0 1 0
affine 0.0002 0.0
from infinitam.
Although it has been years, I put the answer hereto run TUM rgbd dataset here in case people want to run exactly as the demo
1: Download TUM rgbd dataset, generate data that has the same format as the original demo dataset. I use Matlab script as the following
%rgb
root_dir_rgb = '/home/zhaozhong/dataset/tum/rgbd_dataset_freiburg1_desk/rgb/';
root_dir_depth = '/home/zhaozhong/dataset/tum/rgbd_dataset_freiburg1_desk/depth/';
target_dir_rgb = '/home/zhaozhong/dataset/tum/rgbd_dataset_freiburg1_desk/ppm_rgb/';
target_dir_depth = '/home/zhaozhong/dataset/tum/rgbd_dataset_freiburg1_desk/pgm_depth/';
imagefiles_rgb = dir(strcat(root_dir_rgb,'*.png'));
imagefiles_depth = dir(strcat(root_dir_depth,'*.png'));
nfiles_rgb = length(imagefiles_rgb); % Number of files found
nfiles_depth = length(imagefiles_depth);
for ii=1:nfiles_rgb
currentfilename = imagefiles_rgb(ii).name;
output_name = '';
if ii > 1000
output_name = sprintf('%d.ppm', ii-1);
elseif ii>100
output_name = strcat('0',sprintf('%d.ppm', ii-1));
elseif ii>10
output_name = strcat('00',sprintf('%d.ppm', ii-1));
elseif ii>0
output_name = strcat('000',sprintf('%d.ppm', ii-1));
end
display(ii);
currentimage = imread(strcat(root_dir_rgb,currentfilename));
imwrite(currentimage, strcat(target_dir_rgb,output_name));
end
for ii=1:nfiles_depth
currentfilename = imagefiles_depth(ii).name;
display(ii);
if ii > 1000
output_name = sprintf('%d.pgm', ii-1);
elseif ii>100
output_name = strcat('0',sprintf('%d.pgm', ii-1));
elseif ii>10
output_name = strcat('00',sprintf('%d.pgm', ii-1));
elseif ii>0
output_name = strcat('000',sprintf('%d.pgm', ii-1));
end
currentimage = imread(strcat(root_dir_depth,currentfilename));
imwrite(currentimage, strcat(target_dir_depth,output_name));
end
Change the directory to the place you store and output ppm pgm image
2: If you use TUM dataset freburgh1 as @mikesapi answer, simply use the following as the calib file
640 480
591.123473 590.076012
331.038659 234.047543
640 480
517.306408 516.469215
318.643040 255.313989
1 0 0 0
0 1 0 0
0 0 1 0
affine 0.0002 0.0
Note the rgb and the depth has been aligned so we have an identity matrix in the above file.
What's more, the meaning of affine 0.0002 0.0
can be seen in question #143 sgolodetz's answer. In short, the scale used by TUM is 5000, then we need to use 1/5000 = 0.0002
after affine.
3: Run! At where you put the executable file, using the following commands to run, just replace the path to where you put the rgb and depth.
./InfiniTAM/InfiniTAM /home/zhaozhong/dataset/tum/rgbd_dataset_freiburg1_desk/calib.txt /home/zhaozhong/dataset/tum/rgbd_dataset_freiburg1_desk/ppm_rgb/%04i.ppm /home/zhaozhong/dataset/tum/rgbd_dataset_freiburg1_desk/pgm_depth/%04i.pgm
from infinitam.
Looks like the intensities for the depth values are flipped, so the depth being read by InfiniTAM is the inverse of the correct depth image.
I am working on a reader that would use the association files that can be created for the TUM datasets, I'm not sure if thats something upstream would want but I think it could be useful.
from infinitam.
@connerbrooks Thanks a lot, could you send me a copy of that reader when it works for TUM dataset? Thanks again!
from infinitam.
Excuse me, I have encountered a similar problem, any updates?
from infinitam.
I have written the majority of a reader for the TUM data sets which can be found here (requires libpng and zlib); this reader uses an association file. The issue is that the depth images are scaled meter values as described here, and I have not been able to change these values to what InfiniTAM expects.
To change how each uchar
from the depth image is read into the ITMShortImage edit this line (this will also need a more generic approach that works for all image sources). Let me know if you have any ideas.
from infinitam.
@connerbrooks I have cloned your feature/tumReader branch. I modified line 35 of the file InfiniTAM.cpp as: imageSource = new TUMFileReader(calibFile, filename1, filename2);
I download the TUM data rgbd_dataset_freiburg1_desk and created the associate.txt file. I used the calibration as @mikesapi suggested. I run the program using:
./InfiniTAM ~/Documents/data/rgbd_dataset_freiburg1_desk/calib.txt ~/Documents/data/rgbd_dataset_freiburg1_desk/associate.txt ~/Documents/data/rgbd_dataset_freiburg1_desk
But only the RGB images are show, Could you please let me know how to make it work?
Thank you.
from infinitam.
hi, @mikesapi , Can you give your reader code or detail step about TUM Dataset?
from infinitam.
@LiliMeng @connerbrooks @sgolodetz we were trying infiniTAM on RGBD dataset as well, we weren't successful and also tried methods mentioned above in this thread. Do you have any pointers to get it running?
from infinitam.
Related Issues (20)
- Supporting iPhone Depth Data
- from rgb to depth HOT 10
- Show nothing when running InfiniTAM.exe with files in Teddy HOT 5
- Multi-camera Application HOT 1
- FileBasedTracker doesnโt fuse the scene HOT 2
- How big is the voxel grid? HOT 1
- Saving 3D Reconstruction
- Python bindings HOT 6
- Azure Kinect Support HOT 1
- C1083 Cannot open include file: 'GL/glut.h': No such file or directory HOT 5
- Extracting the current VoxelGrid for an additional processing step HOT 1
- iterations algorithm HOT 1
- Python Buffer access to ITMLocalVBA HOT 1
- Cannot access the voxel blocks on device using Nsight VSE Debugger HOT 1
- ITMLocalVBA alone extractable as 3D Reconstruction? HOT 1
- cannot read images HOT 11
- Which version is the newest HOT 1
- Project doesn't build
- Does InfiniTAM support for MS Azure Kinect (soon)?
- Blensor Scans
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from infinitam.