Code Monkey home page Code Monkey logo

Comments (2)

pmoulon avatar pmoulon commented on June 16, 2024 1

Hi. We don't have native support for descriptor of length 256. But you can match the point yourself and export the feature index as a ascii match file for each image pair and OpenMVG can digest that for ransac filtering.

from openmvg.

saatvikmah avatar saatvikmah commented on June 16, 2024

@pmoulon I'll explain what I'm trying to achieve. I have run Superpoint and Sphereglue (feature matching for spherical images) on my dataset and I have saved my matches file in the format of OpenMVG's matches.putative.txt file which is -

idx idx
num_matches 
x y
x y
...

for the same dataset I've initialized the sfm_data.json file with the command -
openMVG_main_SfMInit_ImageListing -i <dataset_in> -o <matches_dir> -f 1 -c 7
After this when I try to run Geometric Filtering on the matches.putative.txt, following is my log -

INFO: [main_GeometricFilter.cpp:131]  You called : 
openMVG_main_GeometricFilter
--input_file:        building/matches/sfm_data.json
--matches:           building/matches/matches.putative.txt
--output_file:       building/matches/matches.f.txt
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: 385
        #cc: 366
        #singleton: 364
        Node degree statistics: min: 1, max: 18, mean: 1, median: 1
INFO: [main_GeometricFilter.cpp:383] Task done in (s): 0
INFO: [main_GeometricFilter.cpp:386] 
 Export Adjacency Matrix of the pairwise's geometric matches
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: [sequential_SfM.cpp:278] Track building
INFO: [sequential_SfM.cpp:281] Track filtering
INFO: [sequential_SfM.cpp:283] Track export to internal struct
INFO: [sequential_SfM.cpp:309] 
------------------
-- Tracks Stats --
 Tracks number: 95
 Images Id: 
37, 48, 62, 65, 66, 67, 68, 69, 106, 125, 165, 186, 190, 213, 218, 219, 221, 239, 272, 326, 345, 
------------------
TrackLength, Occurrence
        2       25
        3       4
        4       9
        5       8
        6       10
        7       9
        8       6
        9       8
        10      6
        11      8
        13      1
        14      1

INFO: [loggerprogress.hpp:79] [Selection of an initial pair] 100%
INFO: [sequential_SfM.cpp:495] Putative starting pair info:
index:(65,67)
view basename:(frame-0066,frame-0068)
INFO: [sequential_SfM.cpp:538] Relative pose a-contrario upper_bound residual is: 0.703406
INFO: [sfm_data_BA_ceres.cpp:513] 
Bundle Adjustment statistics (approximated RMSE):
 #views: 2
 #poses: 2
 #intrinsics: 1
 #tracks: 28
 #residuals: 112
 Initial RMSE: 32.8775
 Final RMSE: 30.5582
 Time (s): 0.0407901 
--
 Used motion prior: 0
INFO: [sequential_SfM.cpp:648] 
=========================
 MSE Residual InitialPair Inlier:

INFO: [sequential_SfM.cpp:495] Putative starting pair info:
index:(67,68)
view basename:(frame-0068,frame-0069)
INFO: [sequential_SfM.cpp:538] Relative pose a-contrario upper_bound residual is: 0.628547
INFO: [sfm_data_BA_ceres.cpp:513] 
Bundle Adjustment statistics (approximated RMSE):
 #views: 2
 #poses: 2
 #intrinsics: 1
 #tracks: 20
 #residuals: 80
 Initial RMSE: 21.1544
 Final RMSE: 0.221932
 Time (s): 0.0121849 
--
 Used motion prior: 0
INFO: [sequential_SfM.cpp:648] 
=========================
 MSE Residual InitialPair Inlier:

INFO: [sequential_SfM.cpp:495] Putative starting pair info:
index:(67,219)
view basename:(frame-0068,frame-0220)
ERROR: [sequential_SfM.cpp:534]  /!\ Robust estimation failed to compute E for this pair: {67,219}
INFO: [sequential_SfM.cpp:495] Putative starting pair info:
index:(37,67)
view basename:(frame-0038,frame-0068)
ERROR: [sequential_SfM.cpp:534]  /!\ Robust estimation failed to compute E for this pair: {67,37}
INFO: [sequential_SfM.cpp:495] Putative starting pair info:
index:(67,69)
view basename:(frame-0068,frame-0070)
ERROR: [sequential_SfM.cpp:534]  /!\ Robust estimation failed to compute E for this pair: {67,69}
INFO: [sequential_SfM.cpp:495] Putative starting pair info:
index:(66,67)
view basename:(frame-0067,frame-0068)
INFO: [sequential_SfM.cpp:538] Relative pose a-contrario upper_bound residual is: 0.357432
WARNING: Logging before InitGoogleLogging() is written to STDERR
W0503 18:29:01.802279 1204707 levenberg_marquardt_strategy.cc:115] Linear solver failure. Failed to compute a step: Eigen failure. Unable to perform dense Cholesky factorization.
INFO: [sfm_data_BA_ceres.cpp:513] 
Bundle Adjustment statistics (approximated RMSE):
 #views: 2
 #poses: 2
 #intrinsics: 1
 #tracks: 18
 #residuals: 72
 Initial RMSE: 1.55235
 Final RMSE: 0.382708
 Time (s): 0.0111651 
--
 Used motion prior: 0
INFO: [sequential_SfM.cpp:648] 
=========================
 MSE Residual InitialPair Inlier:

INFO: [sequential_SfM.cpp:495] Putative starting pair info:
index:(67,272)
view basename:(frame-0068,frame-0273)
ERROR: [sequential_SfM.cpp:534]  /!\ Robust estimation failed to compute E for this pair: {67,272}
INFO: [sequential_SfM.cpp:495] Putative starting pair info:
index:(67,218)
view basename:(frame-0068,frame-0219)
ERROR: [sequential_SfM.cpp:534]  /!\ Robust estimation failed to compute E for this pair: {67,218}
INFO: [sequential_SfM.cpp:495] Putative starting pair info:
index:(165,186)
view basename:(frame-0166,frame-0187)
INFO: [sequential_SfM.cpp:538] Relative pose a-contrario upper_bound residual is: 1.98633
INFO: [sfm_data_BA_ceres.cpp:513] 
Bundle Adjustment statistics (approximated RMSE):
 #views: 2
 #poses: 2
 #intrinsics: 1
 #tracks: 16
 #residuals: 64
 Initial RMSE: 89.2958
 Final RMSE: 45.4725
 Time (s): 0.009269 
--
 Used motion prior: 0
INFO: [sequential_SfM.cpp:648] 
=========================
 MSE Residual InitialPair Inlier:

INFO: [sequential_SfM.cpp:495] Putative starting pair info:
index:(67,221)
view basename:(frame-0068,frame-0222)
INFO: [sequential_SfM.cpp:538] Relative pose a-contrario upper_bound residual is: 1.81115
INFO: [sfm_data_BA_ceres.cpp:513] 
Bundle Adjustment statistics (approximated RMSE):
 #views: 2
 #poses: 2
 #intrinsics: 1
 #tracks: 20
 #residuals: 80
 Initial RMSE: 96.1378
 Final RMSE: 75.8202
 Time (s): 0.0112369 
--
 Used motion prior: 0
INFO: [sequential_SfM.cpp:648] 
=========================
 MSE Residual InitialPair Inlier:

INFO: [sequential_SfM.cpp:495] Putative starting pair info:
index:(67,326)
view basename:(frame-0068,frame-0327)
INFO: [sequential_SfM.cpp:538] Relative pose a-contrario upper_bound residual is: 2.01414
INFO: [sfm_data_BA_ceres.cpp:513] 
Bundle Adjustment statistics (approximated RMSE):
 #views: 2
 #poses: 2
 #intrinsics: 1
 #tracks: 6
 #residuals: 24
 Initial RMSE: 90.5349
 Final RMSE: 2.74927
 Time (s): 0.00549197 
--
 Used motion prior: 0
INFO: [sequential_SfM.cpp:648] 
=========================
 MSE Residual InitialPair Inlier:

INFO: [sequential_SfM.cpp:733] 
SequentialSfMReconstructionEngine::ComputeResidualsMSE.
        -- #Tracks:     1
        -- Residual min:        0.0129674
        -- Residual median:     0.457047
        -- Residual max:         0.640964
        -- Residual mean:        0.28509
INFO: [sequential_SfM.cpp:495] Putative starting pair info:
index:(67,326)
view basename:(frame-0068,frame-0327)
INFO: [sequential_SfM.cpp:538] Relative pose a-contrario upper_bound residual is: 2.01414
INFO: [sfm_data_BA_ceres.cpp:513] 
Bundle Adjustment statistics (approximated RMSE):
 #views: 2
 #poses: 2
 #intrinsics: 1
 #tracks: 6
 #residuals: 24
 Initial RMSE: 90.5349
 Final RMSE: 2.73924
 Time (s): 0.00519514 
--
 Used motion prior: 0
INFO: [sequential_SfM.cpp:648] 
=========================
 MSE Residual InitialPair Inlier:

INFO: [sequential_SfM.cpp:733] 
SequentialSfMReconstructionEngine::ComputeResidualsMSE.
        -- #Tracks:     1
        -- Residual min:        0.0312753
        -- Residual median:     0.463654
        -- Residual max:         0.589377
        -- Residual mean:        0.285574
INFO: [sequential_SfM.cpp:932] -- Trying robust Resection of view: 218
INFO: [SfM_Localizer.cpp:333] 
-------------------------------
-- Robust Resection statistics: 
-- Resection status: 0
-- #Points used for Resection: 1
-- #Points validated by robust Resection: 0
-- Threshold: 0
-------------------------------
INFO: [sequential_SfM.cpp:733] 
SequentialSfMReconstructionEngine::ComputeResidualsMSE.
        -- #Tracks:     1
        -- Residual min:        0.0312753
        -- Residual median:     0.463654
        -- Residual max:         0.589377
        -- Residual mean:        0.285574
INFO: [sequential_SfM.cpp:235] 
-------------------------------
-- Structure from Motion (statistics):
-- #Camera calibrated: 8 from 385 input images.
-- #Tracks, #3D points: 1
-------------------------------

Histogram of residuals:
0       |       2
0.0558  |       0
0.112   |       0
0.167   |       0
0.223   |       0
0.279   |       0
0.335   |       0
0.391   |       1
0.446   |       0
0.502   |       1
0.589

INFO: [main_SfM.cpp:618]  Total Sfm took (s): 0
INFO: [main_SfM.cpp:620] ...Generating SfM_Report.html
INFO: [main_SfM.cpp:625] ...Export SfM_Data to disk.
INFO: [loggerprogress.hpp:79] [- Compute scene structure color -] 100%

I can't seem to get a point cloud generated after SfM has run for some reason. The matches file is the same as the one used by in-built feature matching.

My current hunch is that either the 256 vector length descriptor when used by SfM in the following code block is creating issues

switch(scene_initializer_enum)
  {
  case ESfMSceneInitializer::INITIALIZE_AUTO_PAIR:
    OPENMVG_LOG_ERROR << "Not yet implemented.";
    return EXIT_FAILURE;
    break;
  case ESfMSceneInitializer::INITIALIZE_MAX_PAIR:
    scene_initializer.reset(new SfMSceneInitializerMaxPair(sfm_data,
                                 feats_provider.get(),
                                 matches_provider.get()));
    break;
  case ESfMSceneInitializer::INITIALIZE_EXISTING_POSES:
    scene_initializer.reset(new SfMSceneInitializer(sfm_data,
                            feats_provider.get(),
                            matches_provider.get()));
    break;
  case ESfMSceneInitializer::INITIALIZE_STELLAR:
    scene_initializer.reset(new SfMSceneInitializerStellar(sfm_data,
                                 feats_provider.get(),
                                 matches_provider.get()));
    break;
  default:
    OPENMVG_LOG_ERROR << "Unknown SFM Scene initializer method";
    return EXIT_FAILURE;
  }

Also I noticed that there's no image_describer.json isn't being created when running custom methods, but its present when running SIFT. Is this file necessary for SfM to run successfully?

Another thing I noticed was that geometric filtering reduces the matched points from 9k-ish down to 500 which is a massive reduction. There is a high threshold set for super point already so its highly unlikely that these points are noise. Can we bypass the geometric filtering?

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.