Code Monkey home page Code Monkey logo

Comments (2)

pmoulon avatar pmoulon commented on June 29, 2024

Hello, OpenMVG can take Spherical image as input.
All OpenMVG camera information are saved in a file called sfm_data.json first and then sfm_data.bin.
You can convert the sfm_data.bin to json using the openMVG_main_ConvertSfM_DataFormat binary.

See here for how to run the pipeline https://github.com/openMVG/Image_datasets/tree/main/360_dataset (I need to update the command line there -> openMVG_main_ComputeMatches is not taking -g a but adding the binary openMVG_main_GeometricFilter will take it)

from openmvg.

SiminKoux avatar SiminKoux commented on June 29, 2024

Thank you very much! I could get the camera parameters following your instructions. But there are other two questions.

  1. What is the default mode of "Structure-from-Motion specific methods"? I mean there are three patterns in OpenMVG: INCREMENTAL, INCREMENTALV2, and GLOBAL (except the "from known poses").

  2. Could the GLOBAL method not apply to the spherical images?
    I could get results "sfm_data.bin" when using default mode and INCREMENTAL. However, when I use GLOBAL mode, I get errors, and I will show the log as follows.

1. Initialize the scene (spherical camera model)
--focal 1
--intrinsics
--camera_model 7
--group_camera_model 1
--use_pose_prior 0
--prior_weights 1.0;1.0;1.0
--gps_to_xyz_method 0
INFO: [loggerprogress.hpp:79] [- Listing images -] 10%
INFO: [loggerprogress.hpp:79] [- Listing images -] 20%
INFO: [loggerprogress.hpp:79] [- Listing images -] 30%
INFO: [loggerprogress.hpp:79] [- Listing images -] 40%
INFO: [loggerprogress.hpp:79] [- Listing images -] 50%
INFO: [loggerprogress.hpp:79] [- Listing images -] 60%
INFO: [loggerprogress.hpp:79] [- Listing images -] 70%
INFO: [loggerprogress.hpp:79] [- Listing images -] 80%
INFO: [loggerprogress.hpp:79] [- Listing images -] 90%
INFO: [loggerprogress.hpp:79] [- Listing images -] 100%
INFO: [main_SfMInit_ImageListing.cpp:478] SfMInit_ImageListing report:
listed #File(s): 100
usable #File(s) listed in sfm_data: 100
usable #Intrinsic(s) listed in sfm_data: 1

2. Compute features
--describerMethod SIFT
--upright 0
--describerPreset NORMAL
--force 0
--numThreads 0

INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 10%
INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 20%
INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 30%
INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 40%
INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 50%
INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 60%
INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 70%
INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 80%
INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 90%
INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 100%
INFO: [main_ComputeFeatures.cpp:343] Task done in (s): 36

3. Compute matching pairs
Optional parameters
--pair_mode : EXHAUSTIVE
--contiguous_count : -1

Loading scene.Computing pairs.
Saving pairs.

4. Compute image matches
Optional parameters:
--force 0
--ratio 0.8
--nearest_matching_method AUTO
--cache_size unlimited
--preemptive_feature_used/count 0 / 200
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 10%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 20%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 30%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 40%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 50%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 60%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 70%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 80%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 90%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 100%
INFO: [main_ComputeMatches.cpp:216] - PUTATIVE MATCHES -
INFO: [main_ComputeMatches.cpp:237] Using FAST_CASCADE_HASHING_L2 matcher
INFO: [main_ComputeMatches.cpp:316] Running matching on #pairs: 4950
INFO: [Cascade_Hashing_Matcher_Regions.cpp:238] Using the OPENMP thread interface
INFO: [loggerprogress.hpp:79] [- Matching -] 0%
INFO: [loggerprogress.hpp:79] [- Matching -] 10%
INFO: [loggerprogress.hpp:79] [- Matching -] 20%
INFO: [loggerprogress.hpp:79] [- Matching -] 30%
INFO: [loggerprogress.hpp:79] [- Matching -] 40%
INFO: [loggerprogress.hpp:79] [- Matching -] 50%
INFO: [loggerprogress.hpp:79] [- Matching -] 60%
INFO: [loggerprogress.hpp:79] [- Matching -] 70%
INFO: [loggerprogress.hpp:79] [- Matching -] 80%
INFO: [loggerprogress.hpp:79] [- Matching -] 90%
INFO: [loggerprogress.hpp:79] [- Matching -] 100%
INFO: [main_ComputeMatches.cpp:362] Task (Regions Matching) done in (s): 3
INFO: [main_ComputeMatches.cpp:365] #Putative pairs: 4950
INFO: [graph_stats.hpp:53] Graph statistics:
#nodes: 100
#cc: 1
#singleton: 0
Node degree statistics: min: 99, max: 99, mean: 99, median: 99

5. Filter matches
Optional parameters:
--input_pairs
--output_pairs
--force false
--geometric_model a
--guided_matching 0
--cache_size unlimited
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 10%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 20%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 30%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 40%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 50%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 60%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 70%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 80%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 90%
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 100%
INFO: [loggerprogress.hpp:79] [- Geometric filtering -] 0%
INFO: [loggerprogress.hpp:79] [- Geometric filtering -] 10%
INFO: [loggerprogress.hpp:79] [- Geometric filtering -] 20%
INFO: [loggerprogress.hpp:79] [- Geometric filtering -] 30%
INFO: [loggerprogress.hpp:79] [- Geometric filtering -] 40%
INFO: [loggerprogress.hpp:79] [- Geometric filtering -] 50%
INFO: [loggerprogress.hpp:79] [- Geometric filtering -] 60%
INFO: [loggerprogress.hpp:79] [- Geometric filtering -] 70%
INFO: [loggerprogress.hpp:79] [- Geometric filtering -] 80%
INFO: [loggerprogress.hpp:79] [- Geometric filtering -] 90%
INFO: [loggerprogress.hpp:79] [- Geometric filtering -] 100%
INFO: [graph_stats.hpp:53] Graph statistics:
#nodes: 100
#cc: 1
#singleton: 0
Node degree statistics: min: 71, max: 98, mean: 88, median: 89
INFO: [main_GeometricFilter.cpp:383] Task done in (s): 1
INFO: [main_GeometricFilter.cpp:386]
Export Adjacency Matrix of the pairwise's geometric matches

6. Compute camera motion and structure of the scene
INFO: [main_SfM.cpp:157]
Structure from Motion:
INFO: [loggerprogress.hpp:79] [- Features Loading -] 10%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 20%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 30%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 40%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 50%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 60%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 70%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 80%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 90%
INFO: [loggerprogress.hpp:79] [- Features Loading -] 100%
INFO: [connectedComponent.hpp:99] CleanGraph_KeepLargestBiEdge_Nodes():: => connected Component: 1
INFO: [connectedComponent.hpp:118] Connected component of size: 100
INFO: [loggerprogress.hpp:79] [- Relative pose computation -] 10%
INFO: [loggerprogress.hpp:79] [- Relative pose computation -] 20%
INFO: [loggerprogress.hpp:79] [- Relative pose computation -] 30%
INFO: [loggerprogress.hpp:79] [- Relative pose computation -] 40%
INFO: [loggerprogress.hpp:79] [- Relative pose computation -] 50%
INFO: [loggerprogress.hpp:79] [- Relative pose computation -] 60%
INFO: [loggerprogress.hpp:79] [- Relative pose computation -] 70%
INFO: [loggerprogress.hpp:79] [- Relative pose computation -] 80%
INFO: [loggerprogress.hpp:79] [- Relative pose computation -] 90%
INFO: [loggerprogress.hpp:79] [- Relative pose computation -] 100%
INFO: [relative_pose_engine.cpp:224] Relative motion computation took: 11 (s)
INFO: [sfm_global_engine_relative_motions.cpp:195]

Global rotations computation:
#relative rotations: 4057
#global rotations: 100
INFO: [GlobalSfM_rotation_averaging.cpp:245] Statistics about rotation triplets:
min: 0.0362165
mean: 8.51812
median: 7.05981
max: 31.4766
0 | 12645
1.57 | 11781
3.15 | 9255
4.72 | 7888
6.3 | 7098
7.87 | 6429
9.44 | 5848
11 | 5279
12.6 | 4705
14.2 | 4329
15.7 | 3822
17.3 | 3402
18.9 | 2749
20.5 | 1885
22 | 1322
23.6 | 884
25.2 | 436
26.8 | 232
28.3 | 153
29.9 | 88
31.5

Triplets filtering based on unit cycle rotation composition error:
#Triplets before: 90230
#Triplets after: 35122
INFO: [GlobalSfM_rotation_averaging.cpp:251]
#Edges removed by triplet inference: 0
INFO: [connectedComponent.hpp:99] CleanGraph_KeepLargestBiEdge_Nodes():: => connected Component: 1
INFO: [connectedComponent.hpp:118] Connected component of size: 100
INFO: [sfm_global_engine_relative_motions.cpp:212] Found #global_rotations: 100
Timing: 0 seconds
INFO: [sfm_global_engine_relative_motions.cpp:241]
Relative/Global degree rotations residual errors {0,3.27187}:
0 | 1058
0.164 | 1799
0.327 | 724
0.491 | 245
0.654 | 104
0.818 | 52
0.982 | 23
1.15 | 17
1.31 | 11
1.47 | 6
1.64 | 4
1.8 | 5
1.96 | 3
2.13 | 1
2.29 | 1
2.45 | 2
2.62 | 0
2.78 | 0
2.94 | 0
3.11 | 2
3.27

INFO: [sfm_global_engine_relative_motions.cpp:247]
Relative/Global degree rotations residual errors {0,5}:
0 | 2135
0.25 | 1468
0.5 | 297
0.75 | 83
1 | 33
1.25 | 17
1.5 | 10
1.75 | 5
2 | 4
2.25 | 2
2.5 | 1
2.75 | 0
3 | 1
3.25 | 1
3.5 | 0
3.75 | 0
4 | 0
4.25 | 0
4.5 | 0
4.75 | 0
5

INFO: [sfm_global_engine_relative_motions.cpp:254]
Statistics about global rotation evaluation:
min: 0.0120378
mean: 0.29551
median: 0.241442
max: 3.27187

INFO: [GlobalSfM_translation_averaging.cpp:348]
Relative translations computation:
INFO: [GlobalSfM_translation_averaging.cpp:407] #Triplets: 116713
INFO: [loggerprogress.hpp:79] [Relative translations computation (edge coverage algorithm)] 10%
INFO: [loggerprogress.hpp:79] [Relative translations computation (edge coverage algorithm)] 20%
INFO: [loggerprogress.hpp:79] [Relative translations computation (edge coverage algorithm)] 30%
INFO: [loggerprogress.hpp:79] [Relative translations computation (edge coverage algorithm)] 40%
INFO: [loggerprogress.hpp:79] [Relative translations computation (edge coverage algorithm)] 50%
INFO: [loggerprogress.hpp:79] [Relative translations computation (edge coverage algorithm)] 60%
INFO: [loggerprogress.hpp:79] [Relative translations computation (edge coverage algorithm)] 70%
INFO: [loggerprogress.hpp:79] [Relative translations computation (edge coverage algorithm)] 80%
INFO: [loggerprogress.hpp:79] [Relative translations computation (edge coverage algorithm)] 90%
INFO: [loggerprogress.hpp:79] [Relative translations computation (edge coverage algorithm)] 100%
INFO: [GlobalSfM_translation_averaging.cpp:624] TRIPLET COVERAGE TIMING:

-- #Relative triplet of translations estimates: 0 computed from 116713 triplets.
-- resulting in 0 translations estimation.
-- time to compute triplets of relative translations: 28 seconds.

INFO: [connectedComponent.hpp:99] CleanGraph_KeepLargestBiEdge_Nodes():: => connected Component: 0
INFO: [GlobalSfM_translation_averaging.cpp:150]

Global translations computation:

  • Ready to compute 0 global translations.
    from #relative translations: 0
    ERROR: [GlobalSfM_translation_averaging.cpp:157] Motion averaging is not possible. The image graph is not BiEdge compatible.
    ERROR: [sfm_global_engine_relative_motions.cpp:141] GlobalSfM:: Translation Averaging failure!

from openmvg.

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.