colmap / colmap

COLMAP - Structure-from-Motion and Multi-View Stereo
https://colmap.github.io/
Other
7.54k stars 1.5k forks source link

automatic_reconstructor fails with "WARNING: Could not fuse any points." #236

Closed 10110111 closed 6 years ago

10110111 commented 6 years ago

I'm new to SfM in general and to colmap in particular. I'm trying to reconstruct a model from two images (download). To get at least some results I was trying to use automatic_reconstructor so as to at least see what is possible with colmap. But for some reason it fails. Here's my command line:

automatic_reconstructor --workspace_path ~/sfm/workspace/ \
  --image_path ~/sfm/src-images/ --quality medium

Full output can be seen here. What concerns me is this part:

Fusing image [1/2] in 0.112s (0 points)
Fusing image [2/2] in 0.136s (0 points)
WARNING: Could not fuse any points. This is likely caused by incorrect settings - filtering must be enabled for the last call to patch match stereo.
Number of fused points: 0

I'm not sure what filtering should be enabled and where. It seems filtering for PatchMatch is already enabled (although I'm not really sure what these numbers do, but they are the defaults):

PatchMatch::Options
-------------------
...
filter: 1
filter_min_ncc: 0.1
filter_min_triangulation_angle: 3
filter_min_num_consistent: 2
filter_geom_consistency_max_cost: 1

What am I doing wrong?

ahojnnes commented 6 years ago

You are in theory doing everything right. In general, COLMAP works best with more images and two is the minimal case for SFM. You should get good results starting with at least 3 images. The automatic reconstructor currently has predefined thresholds that assume at least 3 input images, which is why you didn't see any points reconstructed. With this fix in the dev branch you should also see results with two images https://github.com/colmap/colmap/commit/b01d86dd8353284ea67a0e257bf383de810fd9a1 (note that this is on the dev and not the master branch and you have to recompile).

Thanks for the feedback. Closing this as resolved, but feel free to reopen and ask other questions.