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

openMVG_main_ComputeMatches Segmentation fault #1406

Closed
williamlai3a opened this issue Oct 5, 2018 · 9 comments
Closed

openMVG_main_ComputeMatches Segmentation fault #1406

williamlai3a opened this issue Oct 5, 2018 · 9 comments

Comments

@williamlai3a
Copy link

Hi,
I am trying to learn openMVG from building the sample Sceaux Castle dataset.
I have successfully built openMVG, and "make test" shows all passes.

However, when I run:
$ python SfM_SequentialPipeline.py /media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/images/ /media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/output/

Segmentation fault (core dumped) happened on openMVG_main_ComputeMatches:
('Using input dir : ', '/media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/images/')
(' output_dir : ', '/media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/output/')

  1. Intrinsics analysis
    You called :
    /media/william/E/openMVG_workspace/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_SfMInit_ImageListing
    --imageDirectory /media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/images/
    --sensorWidthDatabase /media/william/E/openMVG_workspace/openMVG/src/software/SfM/../../openMVG/exif/sensor_width_database/sensor_width_camera_database.txt
    --outputDirectory /media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/output/matches
    --focal -1
    --intrinsics
    --camera_model 3
    --group_camera_model 1
  • Image listing -
    0% 10 20 30 40 50 60 70 80 90 100%
    |----|----|----|----|----|----|----|----|----|----|

Warning & Error messages:
K.txt: Unkown image file format.
Readme.txt: Unkown image file format.

SfMInit_ImageListing report:
listed #File(s): 13
usable #File(s) listed in sfm_data: 11
usable #Intrinsic(s) listed in sfm_data: 1
2. Compute features
You called :
/media/william/E/openMVG_workspace/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_ComputeFeatures
--input_file /media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/output/matches/sfm_data.json
--outdir /media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/output/matches
--describerMethod SIFT
--upright 0
--describerPreset NORMAL
--force 0
--numThreads 0

  • EXTRACT FEATURES -
    0% 10 20 30 40 50 60 70 80 90 100%
    |----|----|----|----|----|----|----|----|----|----|

Task done in (s): 0
3. Compute matches
You called :
/media/william/E/openMVG_workspace/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_ComputeMatches
--input_file /media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/output/matches/sfm_data.json
--out_dir /media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/output/matches
Optional parameters:
--force 0
--ratio 0.8
--geometric_model f
--video_mode_matching -1
--pair_list
--nearest_matching_method AUTO
--guided_matching 0
--cache_size unlimited

  • Regions Loading -
    0% 10 20 30 40 50 60 70 80 90 100%
    |----|----|----|----|----|----|----|----|----|----|

  • PUTATIVE MATCHES -
    Use: exhaustive pairwise matching
    Using FAST_CASCADE_HASHING_L2 matcher
    Using the OPENMP thread interface

  • Matching -
    0% 10 20 30 40 50 60 70 80 90 100%
    |----|----|----|----|----|----|----|----|----|----|

  1. Do Sequential/Incremental reconstruction
    Sequential/Incremental reconstruction
    Perform incremental SfM (Initial Pair Essential + Resection).
  • Features Loading -
    0% 10 20 30 40 50 60 70 80 90 100%
    |----|----|----|----|----|----|----|----|----|----|

Invalid matches file.
5. Colorize Structure

The input SfM_Data file "/media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/output/reconstruction_sequential/sfm_data.bin" cannot be read.
6. Structure from Known Poses (robust triangulation)
Compute Structure from the provided poses

The input SfM_Data file "/media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/output/reconstruction_sequential/sfm_data.bin" cannot be read.

The input SfM_Data file "/media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/output/reconstruction_sequential/robust.bin" cannot be read.

if I run computeMatched independently
$ openMVG_main_ComputeMatches -i /media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/output/matches/sfm_data.json -o /media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/output/matches

It shows:
You called :
/media/william/E/openMVG_workspace/openMVG_Build/Linux-x86_64-RELEASE/openMVG_main_ComputeMatches
--input_file /media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/output/matches/sfm_data.json
--out_dir /media/william/E/openMVS_workspace/ImageDataset_SceauxCastle/output/matches
Optional parameters:
--force 0
--ratio 0.8
--geometric_model f
--video_mode_matching -1
--pair_list
--nearest_matching_method AUTO
--guided_matching 0
--cache_size unlimited

  • Regions Loading -
    0% 10 20 30 40 50 60 70 80 90 100%
    |----|----|----|----|----|----|----|----|----|----|

  • PUTATIVE MATCHES -
    Use: exhaustive pairwise matching
    Using FAST_CASCADE_HASHING_L2 matcher
    Using the OPENMP thread interface

  • Matching -
    0% 10 20 30 40 50 60 70 80 90 100%
    |----|----|----|----|----|----|----|----|----|----|
    Segmentation fault (core dumped)

my nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85

Please advise how I can know what is wrong?
Thanks!

William

@pmoulon
Copy link
Member

pmoulon commented Oct 7, 2018

Can you try to rerun with the option -f 1 -n ANNL2?

@williamlai3a
Copy link
Author

Can you try to rerun with the option -f 1 -n ANNL2?

Oh yea! It works with the ANNL2 algo. Any ideas on what happens to FAST_CASCADE_HASHING_L2 matcher?
Thanks!

@pmoulon
Copy link
Member

pmoulon commented Oct 9, 2018

Could be a SIMD error (trying to use an intrinsic function that your CPU does not support).
Can you try to run the unit test?

@williamlai3a
Copy link
Author

Hi, I have ran the test, all passed:

Running tests...
Test project /media/william/E/openMVG_workspace/openMVG_Build
Start 1: openMVG_test_Camera_Pinhole
1/80 Test #1: openMVG_test_Camera_Pinhole .............................. Passed 0.15 sec
Start 2: openMVG_test_Camera_Pinhole_Radial
2/80 Test #2: openMVG_test_Camera_Pinhole_Radial ....................... Passed 1.16 sec
Start 3: openMVG_test_Camera_Pinhole_Brown
3/80 Test #3: openMVG_test_Camera_Pinhole_Brown ........................ Passed 0.33 sec
Start 4: openMVG_test_Camera_Pinhole_Fisheye
4/80 Test #4: openMVG_test_Camera_Pinhole_Fisheye ...................... Passed 0.48 sec
Start 5: openMVG_test_Camera_Spherical
5/80 Test #5: openMVG_test_Camera_Spherical ............................ Passed 0.43 sec
Start 6: openMVG_test_Camera_Subset_Parametrization
6/80 Test #6: openMVG_test_Camera_Subset_Parametrization ............... Passed 0.01 sec
Start 7: openMVG_test_Camera_IO
7/80 Test #7: openMVG_test_Camera_IO ................................... Passed 0.03 sec
Start 8: openMVG_test_exif_IO
8/80 Test #8: openMVG_test_exif_IO ..................................... Passed 0.08 sec
Start 9: openMVG_test_ParseDatabase
9/80 Test #9: openMVG_test_ParseDatabase ............................... Passed 0.07 sec
Start 10: openMVG_test_features
10/80 Test #10: openMVG_test_features .................................... Passed 0.03 sec
Start 11: openMVG_test_image_describer
11/80 Test #11: openMVG_test_image_describer ............................. Passed 0.04 sec
Start 12: openMVG_test_akaze
12/80 Test #12: openMVG_test_akaze ....................................... Passed 1.24 sec
Start 13: openMVG_test_mser
13/80 Test #13: openMVG_test_mser ........................................ Passed 0.18 sec
Start 14: openMVG_test_sift
14/80 Test #14: openMVG_test_sift ........................................ Passed 0.19 sec
Start 15: openMVG_test_tbmr
15/80 Test #15: openMVG_test_tbmr ........................................ Passed 0.12 sec
Start 16: openMVG_graph_test_connectedComponent
16/80 Test #16: openMVG_graph_test_connectedComponent .................... Passed 0.04 sec
Start 17: openMVG_graph_test_triplet_finder
17/80 Test #17: openMVG_graph_test_triplet_finder ........................ Passed 0.01 sec
Start 18: openMVG_test_image
18/80 Test #18: openMVG_test_image ....................................... Passed 0.02 sec
Start 19: openMVG_test_image_drawing
19/80 Test #19: openMVG_test_image_drawing ............................... Passed 0.04 sec
Start 20: openMVG_test_image_integral
20/80 Test #20: openMVG_test_image_integral .............................. Passed 0.01 sec
Start 21: openMVG_test_image_io
21/80 Test #21: openMVG_test_image_io .................................... Passed 0.03 sec
Start 22: openMVG_test_image_filtering
22/80 Test #22: openMVG_test_image_filtering ............................. Passed 0.11 sec
Start 23: openMVG_test_image_resampling
23/80 Test #23: openMVG_test_image_resampling ............................ Passed 2.39 sec
Start 24: openMVG_test_linearProgramming
24/80 Test #24: openMVG_test_linearProgramming ........................... Passed 0.08 sec
Start 25: openMVG_lInftyCV_test_triangulation
25/80 Test #25: openMVG_lInftyCV_test_triangulation ...................... Passed 0.14 sec
Start 26: openMVG_lInftyCV_test_resection
26/80 Test #26: openMVG_lInftyCV_test_resection .......................... Passed 0.09 sec
Start 27: openMVG_lInftyCV_test_resection_robust
27/80 Test #27: openMVG_lInftyCV_test_resection_robust ................... Passed 1.23 sec
Start 28: openMVG_lInftyCV_test_global_translations_fromTriplets
28/80 Test #28: openMVG_lInftyCV_test_global_translations_fromTriplets ... Passed 0.06 sec
Start 29: openMVG_lInftyCV_test_global_translations_fromTij
29/80 Test #29: openMVG_lInftyCV_test_global_translations_fromTij ........ Passed 0.05 sec
Start 30: openMVG_lInftyCV_test_tijsAndXis
30/80 Test #30: openMVG_lInftyCV_test_tijsAndXis ......................... Passed 0.10 sec
Start 31: openMVG_lInftyCV_test_tijsAndXis_outlier
31/80 Test #31: openMVG_lInftyCV_test_tijsAndXis_outlier ................. Passed 0.09 sec
Start 32: openMVG_geodesy_test_geodesy
32/80 Test #32: openMVG_geodesy_test_geodesy ............................. Passed 0.01 sec
Start 33: openMVG_test_convex_hull
33/80 Test #33: openMVG_test_convex_hull ................................. Passed 0.01 sec
Start 34: openMVG_test_rigid_transformation3D_srt
34/80 Test #34: openMVG_test_rigid_transformation3D_srt .................. Passed 0.01 sec
Start 35: openMVG_test_plane_estimation_kernel
35/80 Test #35: openMVG_test_plane_estimation_kernel ..................... Passed 0.03 sec
Start 36: openMVG_test_half_space_intersection
36/80 Test #36: openMVG_test_half_space_intersection ..................... Passed 0.07 sec
Start 37: openMVG_test_frustum_intersection
37/80 Test #37: openMVG_test_frustum_intersection ........................ Passed 0.08 sec
Start 38: openMVG_test_frustum_box_intersection
38/80 Test #38: openMVG_test_frustum_box_intersection .................... Passed 0.10 sec
Start 39: openMVG_test_matching
39/80 Test #39: openMVG_test_matching .................................... Passed 0.05 sec
Start 40: openMVG_test_matching_filters
40/80 Test #40: openMVG_test_matching_filters ............................ Passed 0.01 sec
Start 41: openMVG_test_indMatch
41/80 Test #41: openMVG_test_indMatch .................................... Passed 0.01 sec
Start 42: openMVG_test_metric
42/80 Test #42: openMVG_test_metric ...................................... Passed 0.01 sec
Start 43: openMVG_test_Pair_Builder
43/80 Test #43: openMVG_test_Pair_Builder ................................ Passed 0.01 sec
Start 44: openMVG_test_triangulation
44/80 Test #44: openMVG_test_triangulation ............................... Passed 0.01 sec
Start 45: openMVG_test_triangulation_nview
45/80 Test #45: openMVG_test_triangulation_nview ......................... Passed 0.01 sec
Start 46: openMVG_test_solver_affine
46/80 Test #46: openMVG_test_solver_affine ............................... Passed 0.01 sec
Start 47: openMVG_test_solver_essential_eight_point
47/80 Test #47: openMVG_test_solver_essential_eight_point ................ Passed 0.01 sec
Start 48: openMVG_test_solver_essential_five_point
48/80 Test #48: openMVG_test_solver_essential_five_point ................. Passed 0.01 sec
Start 49: openMVG_test_solver_essential_three_point
49/80 Test #49: openMVG_test_solver_essential_three_point ................ Passed 0.01 sec
Start 50: openMVG_test_solver_fundamental_kernel
50/80 Test #50: openMVG_test_solver_fundamental_kernel ................... Passed 0.01 sec
Start 51: openMVG_test_solver_homography_kernel
51/80 Test #51: openMVG_test_solver_homography_kernel .................... Passed 0.01 sec
Start 52: openMVG_test_solver_resection_kernel
52/80 Test #52: openMVG_test_solver_resection_kernel ..................... Passed 0.01 sec
Start 53: openMVG_test_solver_translation_knownRotation_kernel
53/80 Test #53: openMVG_test_solver_translation_knownRotation_kernel ..... Passed 0.01 sec
Start 54: openMVG_test_rotation_averaging
54/80 Test #54: openMVG_test_rotation_averaging .......................... Passed 0.06 sec
Start 55: openMVG_test_translation_averaging
55/80 Test #55: openMVG_test_translation_averaging ....................... Passed 0.07 sec
Start 56: openMVG_test_extract_columns
56/80 Test #56: openMVG_test_extract_columns ............................. Passed 0.01 sec
Start 57: openMVG_test_numeric
57/80 Test #57: openMVG_test_numeric ..................................... Passed 0.01 sec
Start 58: openMVG_test_poly
58/80 Test #58: openMVG_test_poly ........................................ Passed 0.01 sec
Start 59: openMVG_test_lm
59/80 Test #59: openMVG_test_lm .......................................... Passed 0.01 sec
Start 60: openMVG_test_l1_solver
60/80 Test #60: openMVG_test_l1_solver ................................... Passed 0.07 sec
Start 61: openMVG_test_rand_sampling
61/80 Test #61: openMVG_test_rand_sampling ............................... Passed 0.01 sec
Start 62: openMVG_test_robust_estimator_lineKernel
62/80 Test #62: openMVG_test_robust_estimator_lineKernel ................. Passed 0.01 sec
Start 63: openMVG_test_robust_estimator_MaxConsensus
63/80 Test #63: openMVG_test_robust_estimator_MaxConsensus ............... Passed 0.01 sec
Start 64: openMVG_test_robust_estimator_Ransac
64/80 Test #64: openMVG_test_robust_estimator_Ransac ..................... Passed 0.01 sec
Start 65: openMVG_test_robust_estimator_ACRansac
65/80 Test #65: openMVG_test_robust_estimator_ACRansac ................... Passed 0.09 sec
Start 66: openMVG_test_gms_filter
66/80 Test #66: openMVG_test_gms_filter .................................. Passed 0.02 sec
Start 67: openMVG_test_tracks
67/80 Test #67: openMVG_test_tracks ...................................... Passed 0.01 sec
Start 68: openMVG_test_global_quantile_gain_offset_alignment
68/80 Test #68: openMVG_test_global_quantile_gain_offset_alignment ....... Passed 0.08 sec
Start 69: openMVG_test_progress
69/80 Test #69: openMVG_test_progress .................................... Passed 0.09 sec
Start 70: openMVG_test_sfm_data_io
70/80 Test #70: openMVG_test_sfm_data_io ................................. Passed 0.03 sec
Start 71: openMVG_test_sfm_data_BA
71/80 Test #71: openMVG_test_sfm_data_BA ................................. Passed 0.13 sec
Start 72: openMVG_test_sfm_data_utils
72/80 Test #72: openMVG_test_sfm_data_utils .............................. Passed 0.01 sec
Start 73: openMVG_test_sfm_data_filters
73/80 Test #73: openMVG_test_sfm_data_filters ............................ Passed 0.01 sec
Start 74: openMVG_test_sfm_data_graph_utils
74/80 Test #74: openMVG_test_sfm_data_graph_utils ........................ Passed 0.00 sec
Start 75: openMVG_test_global_SfM
75/80 Test #75: openMVG_test_global_SfM .................................. Passed 1.04 sec
Start 76: openMVG_test_sequential_SfM
76/80 Test #76: openMVG_test_sequential_SfM .............................. Passed 0.26 sec
Start 77: openMVG_test_sequential_SfM2
77/80 Test #77: openMVG_test_sequential_SfM2 ............................. Passed 0.26 sec
Start 78: openMVG_test_stellar_SfM
78/80 Test #78: openMVG_test_stellar_SfM ................................. Passed 0.11 sec
Start 79: openMVG_test_split
79/80 Test #79: openMVG_test_split ....................................... Passed 0.01 sec
Start 80: openMVG_test_dynamic_bitset
80/80 Test #80: openMVG_test_dynamic_bitset .............................. Passed 0.01 sec

100% tests passed, 0 tests failed out of 80

Total Test time (real) = 13.29 sec

@pmoulon
Copy link
Member

pmoulon commented Oct 11, 2018

Thx, this is strange.
Would you mind compile in debug and run again with the default setting the matcher in order to see where it crashed?
(remove the putative matches file on disk first or use -f 1)

@pmoulon
Copy link
Member

pmoulon commented Nov 5, 2018

Any update?

@pmoulon
Copy link
Member

pmoulon commented Jan 6, 2019

Closing since no update.

@pmoulon pmoulon closed this as completed Jan 6, 2019
@Freeverc
Copy link

I've experienced the same error!Thanks a lot for " -f 1 -n ANNL2"

@nguyengiang41
Copy link
Contributor

I have experienced this error also on Ubuntu, but it's not happening all the time, like 99% of dataset passed, sometimes 1 gives this error.

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

4 participants