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

Command line issue when running MVS in COLMAP #49

Closed
gesong1982 opened this issue Dec 9, 2016 · 1 comment
Closed

Command line issue when running MVS in COLMAP #49

gesong1982 opened this issue Dec 9, 2016 · 1 comment

Comments

@gesong1982
Copy link

Hi @ahojnnes,

I try to run whole COLMAP pipeline by command line shown in the document, SFM part works, but MVS part has a problem. The details show below:

database dir: /home/ubuntu/colmap_test/test/colmap.db
image_dir: /home/ubuntu/colmap_test/test/image (11 images (1.jpg, … , 11.jpg) dimension: 2832 × 2128)
sparse output dir: /home/ubuntu/colmap_test/test/sparse
dense output dir: /home/ubuntu/colmap_test/test/dense

Command line:

./database_creator --General.database_path /home/ubuntu/colmap_test/test/colmap.db

./feature_extractor --General.database_path /home/ubuntu/colmap_test/test/colmap.db --General.image_path /home/ubuntu/colmap_test/test/image --use_gpu 0

./exhaustive_matcher --General.database_path /home/ubuntu/colmap_test/test/colmap.db

./mapper --General.database_path /home/ubuntu/colmap_test/test/colmap.db --General.image_path /home/ubuntu/colmap_test/test/image --export_path /home/ubuntu/colmap_test/test/sparse

./model_converter --input_path /home/ubuntu/colmap_test/test/sparse/0 --output_path /home/ubuntu/colmap_test/test/sparse/points.ply --output_type PLY

./image_undistorter --General.image_path /home/ubuntu/colmap_test/test/image --input_path /home/ubuntu/colmap_test/test/sparse/0 --output_path /home/ubuntu/colmap_test/test/dense --output_type COLMAP --max_image_size 2000

./dense_mapper --workspace_path home/ubuntu/colmap_test/test/dense --workspace_format COLMAP --DenseMapperOptions.max_image_size 0 --DenseMapperOptions.patch_match_filter false --DenseMapperOptions.patch_match_geom_consistency false --DenseMapperOptions.patch_match_num_iterations 4

./dense_fuser --workspace_path /home/ubuntu/colmap_test/test/dense --workspace_format COLMAP --input_type geometric --output_path /home/ubuntu/colmap_test/test/dense/point-cloud.ply

./dense_mesher --input_path /home/ubuntu/colmap_test/test/dense/point-cloud.ply --output_path /home/ubuntu/colmap_test/test/dense/mesh.ply

SFM part works well, I obtain the ply outputs. Only thing is under the ~/sparse folder, there is a subfolder named 0 which includes SFM outputs: cameras.txt images.txt points3D.txt

For MVS part dense_mapper works, got the outputs in ~/dense: dense-reconstruction.sh images sparse stereo. And in ~/dense/stereo/depth_maps: 10.jpg.photometric.bin 1.jpg.photometric.bin 3.jpg.photometric.bin 5.jpg.photometric.bin 7.jpg.photometric.bin 9.jpg.photometric.bin
11.jpg.photometric.bin 2.jpg.photometric.bin 4.jpg.photometric.bin 6.jpg.photometric.bin 8.jpg.photometric.bin

But dense_fuser has problem with the error:


StereoFusion::Options

min_num_pixels: 3
max_num_pixels: 1000
max_traversal_depth: 100
max_reproj_error: 2
max_depth_error: 0.01
max_normal_error: 10

Reading model...
Reading configuration...
Loading image 8.jpgF1207 23:32:15.494607 5177 mat.h:130] Check failed: text_file.is_open() /home/ubuntu/colmap_test/test/dense/stereo/depth_maps/8.jpg.geometric.bin

I check the folder and make sure /home/ubuntu/colmap_test/test/dense/stereo/depth_maps/8.jpg.geometric.bin exists. So could you please help what this error means? Also I try to make sure I used command line with parameters in the correct way.

Thanks

@ahojnnes
Copy link
Contributor

ahojnnes commented Dec 12, 2016

You only ran the dense_mapper once and you specified patch_match_geom_consistency false, but you set --input_type geometric. You have two options:

  1. Run the dense_fuser with --input_type photometric (this should work, but it will give sub-optimal results, since you did not filter the depth maps with --DenseMapperOptions.patch_match_filter true in the dense_mapper command).

  2. Run the dense_mapper another time with --DenseMapperOptions.patch_match_filter true --DenseMapperOptions.patch_match_geom_consistency true again and then run the dense_fuser with --input_type geometric.

Let me know if you have additional questions and feel free to reopen this issue.

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

2 participants