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

[softwares/SfM] Invalid -f input for SfM binaries -> Ceres local_parameterization check failed #727

Closed
nils-hamel opened this issue Jan 11, 2017 · 12 comments

Comments

@nils-hamel
Copy link

Hi @pmoulon,

I've compiled the v1.1 and made some verifications using the Sceaux Castle dataset. I got the following error (linked to ceres I assume) using both incremental and global pipelines :

local_parameterization.cc:103 Check failed: constant_parameters.size() < size Number of parameters held constant should be less than the size of the parameter block. If you wish to hold the entire parameter block constant, then a efficient way is to directly mark it as constant instead of using a LocalParameterization to do so.

Using the global pipeline, the error occurs after starting bundle adjustment. Using the incremental pipeline, the error also occurs during bundle adjustment as it refines the complete model (the resection ply file contains all the cameras which appears well placed).

Any idea what's going wrong there ?

OpenMVG 1.1 on Ubuntu 16.04

@pmoulon
Copy link
Member

pmoulon commented Jan 11, 2017

Hi,
Can you please show me the last line of the cmake log, the ones that show the libraries that are used (internal,external)?

I would like to understand if you are using the internal ceres version or an external one.
Since I did not meet this error on my computers we will need to investigate.

@nils-hamel
Copy link
Author

Which file do you need ? I'm not sure where to get this information ...

Is it the Makefile.cmake file ?

@pmoulon
Copy link
Member

pmoulon commented Jan 12, 2017

It's the log output when you run cmake

@nils-hamel
Copy link
Author

Here's the output :

** OpenMVG version: 1.1.0
** Build Shared libs: OFF
** Build OpenMVG tests: OFF
** Build OpenMVG documentation: ON
** Build OpenMVG samples applications: ON
** Build OpenMVG openGL examples: OFF
** Enable code coverage generation: OFF
** Enable OpenMP parallelization: ON
** Build OpenCV+OpenMVG samples programs: OFF
** Use OpenCV SIFT features: OFF


-- EIGEN: 3.2.8 (internal)
-- CERES: 1.11.0 (internal)
-- FLANN: 1.8.4 (internal)
-- LIBTIFF: 4.0.6 (external)
-- LIBPNG: 1.2.54 (external)
-- LIBJPEG (external)
-- CLP: 1.15.11 (internal)
-- COINUTILS: 2.9.3 (internal)
-- OSI: 0.106.10 (internal)
-- LEMON: 1.3 (internal)

@pmoulon
Copy link
Member

pmoulon commented Jan 13, 2017

Did you run the experiments by running the binary manually or by using the provided python scripts?

@pmoulon
Copy link
Member

pmoulon commented Jan 13, 2017

I would suggest also to run the unit test to check what is going on on your computer
Please add to cmake -DOpenMVG_BUILD_TEST=ON and then run make. make test

@nils-hamel
Copy link
Author

nils-hamel commented Jan 13, 2017

I've a series of bash scripts that are calling directly the binaries. I use them also to manage a large data structure.

I've recompiled the code with the test flag. Here's the output of make test :

Running tests...
Test project /.../openMVG_Build
      Start  1: openMVG_test_Camera_IO
 1/66 Test  #1: openMVG_test_Camera_IO ...................................   Passed    0.00 sec
      Start  2: openMVG_test_Camera_Pinhole_Radial
 2/66 Test  #2: openMVG_test_Camera_Pinhole_Radial .......................   Passed    0.00 sec
      Start  3: openMVG_test_Camera_Pinhole_Brown
 3/66 Test  #3: openMVG_test_Camera_Pinhole_Brown ........................   Passed    0.00 sec
      Start  4: openMVG_test_Camera_Pinhole_Fisheye
 4/66 Test  #4: openMVG_test_Camera_Pinhole_Fisheye ......................   Passed    0.00 sec
      Start  5: openMVG_test_Camera_Subset_Parametrization
 5/66 Test  #5: openMVG_test_Camera_Subset_Parametrization ...............   Passed    0.00 sec
      Start  6: openMVG_test_exif_IO
 6/66 Test  #6: openMVG_test_exif_IO .....................................   Passed    0.00 sec
      Start  7: openMVG_test_ParseDatabase
 7/66 Test  #7: openMVG_test_ParseDatabase ...............................   Passed    0.03 sec
      Start  8: openMVG_test_features
 8/66 Test  #8: openMVG_test_features ....................................   Passed    0.00 sec
      Start  9: openMVG_test_mser
 9/66 Test  #9: openMVG_test_mser ........................................   Passed    0.20 sec
      Start 10: openMVG_test_tbmr
10/66 Test #10: openMVG_test_tbmr ........................................   Passed    0.06 sec
      Start 11: openMVG_test_sift
11/66 Test #11: openMVG_test_sift ........................................   Passed    0.19 sec
      Start 12: openMVG_graph_test_connectedComponent
12/66 Test #12: openMVG_graph_test_connectedComponent ....................   Passed    0.00 sec
      Start 13: openMVG_graph_test_triplet_finder
13/66 Test #13: openMVG_graph_test_triplet_finder ........................   Passed    0.00 sec
      Start 14: openMVG_test_image
14/66 Test #14: openMVG_test_image .......................................   Passed    0.00 sec
      Start 15: openMVG_test_image_drawing
15/66 Test #15: openMVG_test_image_drawing ...............................   Passed    0.00 sec
      Start 16: openMVG_test_image_io
16/66 Test #16: openMVG_test_image_io ....................................   Passed    0.01 sec
      Start 17: openMVG_test_image_filtering
17/66 Test #17: openMVG_test_image_filtering .............................   Passed    0.03 sec
      Start 18: openMVG_test_image_resampling
18/66 Test #18: openMVG_test_image_resampling ............................   Passed    3.15 sec
      Start 19: openMVG_linearProgramming_test_linearProgramming
19/66 Test #19: openMVG_linearProgramming_test_linearProgramming .........   Passed    0.00 sec
      Start 20: openMVG_lInftyCV_test_triangulation
20/66 Test #20: openMVG_lInftyCV_test_triangulation ......................   Passed    0.05 sec
      Start 21: openMVG_lInftyCV_test_resection
21/66 Test #21: openMVG_lInftyCV_test_resection ..........................   Passed    0.01 sec
      Start 22: openMVG_lInftyCV_test_resection_robust
22/66 Test #22: openMVG_lInftyCV_test_resection_robust ...................   Passed    1.46 sec
      Start 23: openMVG_lInftyCV_test_global_translations_fromTriplets
23/66 Test #23: openMVG_lInftyCV_test_global_translations_fromTriplets ...   Passed    0.00 sec
      Start 24: openMVG_lInftyCV_test_global_translations_fromTij
24/66 Test #24: openMVG_lInftyCV_test_global_translations_fromTij ........   Passed    0.00 sec
      Start 25: openMVG_lInftyCV_test_tijsAndXis
25/66 Test #25: openMVG_lInftyCV_test_tijsAndXis .........................   Passed    0.04 sec
      Start 26: openMVG_lInftyCV_test_tijsAndXis_outlier
26/66 Test #26: openMVG_lInftyCV_test_tijsAndXis_outlier .................   Passed    0.03 sec
      Start 27: openMVG_geodesy_test_geodesy
27/66 Test #27: openMVG_geodesy_test_geodesy .............................   Passed    0.00 sec
      Start 28: openMVG_test_rigid_transformation3D_srt
28/66 Test #28: openMVG_test_rigid_transformation3D_srt ..................   Passed    0.00 sec
      Start 29: openMVG_test_half_space_intersection
29/66 Test #29: openMVG_test_half_space_intersection .....................   Passed    0.00 sec
      Start 30: openMVG_test_frustum_intersection
30/66 Test #30: openMVG_test_frustum_intersection ........................   Passed    0.02 sec
      Start 31: openMVG_test_frustum_box_intersection
31/66 Test #31: openMVG_test_frustum_box_intersection ....................   Passed    0.01 sec
      Start 32: openMVG_test_matching
32/66 Test #32: openMVG_test_matching ....................................   Passed    0.00 sec
      Start 33: openMVG_test_matching_filters
33/66 Test #33: openMVG_test_matching_filters ............................   Passed    0.00 sec
      Start 34: openMVG_test_indMatch
34/66 Test #34: openMVG_test_indMatch ....................................   Passed    0.00 sec
      Start 35: openMVG_test_metric
35/66 Test #35: openMVG_test_metric ......................................   Passed    0.00 sec
      Start 36: openMVG_test_Pair_Builder
36/66 Test #36: openMVG_test_Pair_Builder ................................   Passed    0.00 sec
      Start 37: openMVG_test_triangulation
37/66 Test #37: openMVG_test_triangulation ...............................   Passed    0.00 sec
      Start 38: openMVG_test_triangulation_nview
38/66 Test #38: openMVG_test_triangulation_nview .........................   Passed    0.00 sec
      Start 39: openMVG_test_solver_affine
39/66 Test #39: openMVG_test_solver_affine ...............................   Passed    0.00 sec
      Start 40: openMVG_test_solver_fundamental_kernel
40/66 Test #40: openMVG_test_solver_fundamental_kernel ...................   Passed    0.00 sec
      Start 41: openMVG_test_solver_essential_kernel
41/66 Test #41: openMVG_test_solver_essential_kernel .....................   Passed    0.00 sec
      Start 42: openMVG_test_solver_homography_kernel
42/66 Test #42: openMVG_test_solver_homography_kernel ....................   Passed    0.00 sec
      Start 43: openMVG_test_solver_essential_five_point
43/66 Test #43: openMVG_test_solver_essential_five_point .................   Passed    0.00 sec
      Start 44: openMVG_test_solver_resection_kernel
44/66 Test #44: openMVG_test_solver_resection_kernel .....................   Passed    0.00 sec
      Start 45: openMVG_test_solver_translation_knownRotation_kernel
45/66 Test #45: openMVG_test_solver_translation_knownRotation_kernel .....   Passed    0.00 sec
      Start 46: openMVG_test_rotation_averaging
46/66 Test #46: openMVG_test_rotation_averaging ..........................   Passed    0.01 sec
      Start 47: openMVG_test_translation_averaging
47/66 Test #47: openMVG_test_translation_averaging .......................   Passed    0.01 sec
      Start 48: openMVG_test_numeric
48/66 Test #48: openMVG_test_numeric .....................................   Passed    0.00 sec
      Start 49: openMVG_test_poly
49/66 Test #49: openMVG_test_poly ........................................   Passed    0.00 sec
      Start 50: openMVG_test_lm
50/66 Test #50: openMVG_test_lm ..........................................   Passed    0.00 sec
      Start 51: openMVG_test_l1_solver
51/66 Test #51: openMVG_test_l1_solver ...................................   Passed    0.20 sec
      Start 52: openMVG_test_rand_sampling
52/66 Test #52: openMVG_test_rand_sampling ...............................   Passed    0.00 sec
      Start 53: openMVG_test_robust_estimator_lineKernel
53/66 Test #53: openMVG_test_robust_estimator_lineKernel .................   Passed    0.00 sec
      Start 54: openMVG_test_robust_estimator_MaxConsensus
54/66 Test #54: openMVG_test_robust_estimator_MaxConsensus ...............   Passed    0.01 sec
      Start 55: openMVG_test_robust_estimator_Ransac
55/66 Test #55: openMVG_test_robust_estimator_Ransac .....................   Passed    0.00 sec
      Start 56: openMVG_test_robust_estimator_ACRansac
56/66 Test #56: openMVG_test_robust_estimator_ACRansac ...................   Passed    0.04 sec
      Start 57: openMVG_test_tracks
57/66 Test #57: openMVG_test_tracks ......................................   Passed    0.00 sec
      Start 58: openMVG_test_global_quantile_gain_offset_alignment
58/66 Test #58: openMVG_test_global_quantile_gain_offset_alignment .......   Passed    0.00 sec
      Start 59: openMVG_test_sfm_data_io
59/66 Test #59: openMVG_test_sfm_data_io .................................   Passed    0.01 sec
      Start 60: openMVG_test_sfm_data_BA
60/66 Test #60: openMVG_test_sfm_data_BA .................................   Passed    0.11 sec
      Start 61: openMVG_test_sfm_data_utils
61/66 Test #61: openMVG_test_sfm_data_utils ..............................   Passed    0.00 sec
      Start 62: openMVG_test_sfm_data_filters
62/66 Test #62: openMVG_test_sfm_data_filters ............................   Passed    0.00 sec
      Start 63: openMVG_test_sequential_SfM
63/66 Test #63: openMVG_test_sequential_SfM ..............................   Passed    0.17 sec
      Start 64: openMVG_test_global_SfM
64/66 Test #64: openMVG_test_global_SfM ..................................   Passed    1.19 sec
      Start 65: openMVG_test_split
65/66 Test #65: openMVG_test_split .......................................   Passed    0.00 sec
      Start 66: openMVG_test_dynamic_bitset
66/66 Test #66: openMVG_test_dynamic_bitset ..............................   Passed    0.00 sec

100% tests passed, 0 tests failed out of 66

Total Test time (real) =   7.12 sec

By the way (I'm not sure if it's relevant of useful), I've got many times the following warnings during compilation :

/.../openMVG/src/third_party/eigen/Eigen/src/Core/Functors.h:977:28: warning: ‘template<class _Operation> class std::binder1st’ is deprecated [-Wdeprecated-declarations]

and

/.../openMVG/src/third_party/eigen/Eigen/src/Core/Functors.h:973:28: warning: ‘template<class _Operation> class std::binder2nd’ is deprecated [-Wdeprecated-declarations]

@pmoulon
Copy link
Member

pmoulon commented Jan 13, 2017

Test are ok, so I think the problem can perhaps comes from a special usage your are doing.

I'm aware of the binder1st and binder2nd compilation warning and it is not related to your problem

@pmoulon
Copy link
Member

pmoulon commented Jan 17, 2017

Seems like the error is due to a wrong configuration of the BA refinement settings inside the SfM_Global/Incremental binaries.

Did you check the parameter -f you are using for the SfM tools?

Now, we are using STRING based parameter, I think you are using the old configuration (that was using a boolean). Just removed the -f X option and I think everything will run fine

@pmoulon pmoulon changed the title Ceres local_parameterization check failed [softwares] Invalid -f input for SfM binaries -> Ceres local_parameterization check failed Jan 18, 2017
@pmoulon pmoulon changed the title [softwares] Invalid -f input for SfM binaries -> Ceres local_parameterization check failed [softwares/SfM] Invalid -f input for SfM binaries -> Ceres local_parameterization check failed Jan 18, 2017
pmoulon added a commit that referenced this issue Jan 18, 2017
@pmoulon
Copy link
Member

pmoulon commented Jan 18, 2017

@nils-hamel
The problem must not longer appear on the develop branch.
I have added a check for unsupported parameter for the -f option and so an error message is not displayed if a wrong keyword is used ;-)

@nils-hamel
Copy link
Author

@pmoulon

It was the problem ! I was still using the option of release 0.9.

The two incremental and global pipelines works fine after passing the new -f parameter.

So, problem solved ! Thanks for your help !

@pmoulon
Copy link
Member

pmoulon commented Jan 18, 2017

Thank you for your feedback.

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