Code Monkey home page Code Monkey logo

Comments (6)

ajabri avatar ajabri commented on July 17, 2024

I'm trying to do a reconstruction with ~6300 images. I get many inlier matches, yet, the SFM reconstruction always seems to terminate very quickly, with only 6 points/features triangulated. Is the problem the initialization pair? Is there a way to try more than one (without doing it manually)?

If I recall correctly in tools like VSFM more than one pair is tried?

from mve.

ajabri avatar ajabri commented on July 17, 2024

This happens even when I chose an initialization pair:

Using initial pair (4242,4259).
SSE2 accelerated matching is enabled.
SSE3 accelerated matching is disabled.
Initializing scene with 6313 views...
Initialized 6313 views (max ID is 6312), took 476989ms.
Loading pre-bundle from file...
Cleanup: Released 0 embeddings in 0 of 6313 views.
Computing feature tracks...
Propagating track IDs...
Removing tracks with conflicts... deleted 13559 tracks.
Colorizing tracks...
Created a total of 185597 tracks.
Using views 4242 and 4259 as initial pair.
Triangulated 0 new tracks, rejected 120 bad tracks.
  Rejected 120 tracks with unstable angle.
Running full bundle adjustment...
PBA: CPU double-precision solver; 40 cores.
Camera 4242, focal length: 640 -> 640, distortion: 0
Camera 4259, focal length: 640 -> 640, distortion: 0
SfM reconstruction finished.
SfM reconstruction took 5615 ms.
Creating bundle data structure...
Writing bundle (6313 cameras, 0 features): scenes/spelman.filt/synth_0.out...
Saving MVE view scenes/spelman.filt/views/view_4242.mve
Saving MVE view scenes/spelman.filt/views/view_4259.mve
Saving MVE view scenes/spelman.filt/views/view_5676.mve
Saving MVE view scenes/spelman.filt/views/view_6006.mve

from mve.

simonfuhrmann avatar simonfuhrmann commented on July 17, 2024

Automatic selection of the initial pair is still not properly solved. Right now, MVE will not try multiple initial pairs. But there are several parameters you can tweak so that it might succeed.

Increase the homography threshold:
https://github.com/simonfuhrmann/mve/blob/master/apps/sfmrecon/sfmrecon.cc#L213

Reduce homography inlier percentage:
https://github.com/simonfuhrmann/mve/blob/master/apps/sfmrecon/sfmrecon.cc#L215

Reduce the triangulation angle (this is why your tracks get rejected):
https://github.com/simonfuhrmann/mve/blob/master/apps/sfmrecon/sfmrecon.cc#L253

You might also want to try to switch to MVE2 (the "mve2" branch) but note that you have to convert your dataset and a backup is recommended.

from mve.

ajabri avatar ajabri commented on July 17, 2024

Okay, I see, I will try what you suggested. One thing is that I did not have any EXIF metadata for focal length included. Could a bad focal length estimate cause the reconstruction to fail?

from mve.

simonfuhrmann avatar simonfuhrmann commented on July 17, 2024

Yes. If no focal length estimate can be obtained, it falls back to a default:
https://github.com/simonfuhrmann/mve/blob/mve2/libs/sfm/extract_focal_length.cc#L48

The default is 1.0 and is equivalent to a 35mm lens on a 35mm sensor, i.e., 35mm / 35mm = 1.0. You can change the global default there, or you can provide a better default for each view in the camera.focal_length field in meta.ini, in combination with the --intrinsics-from-views option for sfmrecon. Note that this gets overwritten once sfmrecon saves the views.

from mve.

simonfuhrmann avatar simonfuhrmann commented on July 17, 2024

Initial pair search has been improved (commit 10c68eb) by considering the track triangulation angle.

from mve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.