openMVG / openMVG

open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion.
Mozilla Public License 2.0
5.67k stars 1.67k forks source link

Error generating dense point cloud #2068

Open lzl050 opened 2 years ago

lzl050 commented 2 years ago

PS D:\3d> .\DensifyPointCloud.exe scene.mvs 09:30:30 [App ] Build date: Dec 16 2021, 11:34:21 09:30:30 [App ] CPU: Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz (8 cores) 09:30:30 [App ] RAM: 7.85GB Physical Memory 128.00TB Virtual Memory 09:30:30 [App ] OS: Windows 8 x64 09:30:30 [App ] SSE & AVX compatible CPU & OS detected 09:30:30 [App ] Command line: scene.mvs 09:30:31 [App ] CUDA device 0 initialized: GeForce MX250 (compute capability 6.1; memory 2.00GB) 09:30:31 [App ] Camera model loaded: platform 0; camera 0; f 1.055x1.055; poses 11 09:30:31 [App ] Scene loaded from interface format (6ms): 11 images (11 calibrated) with a total of 63.22 MPixels (5.75 MPixels/image) 3536 points, 0 vertices, 0 faces 09:30:31 [App ] Preparing images for dense reconstruction completed: 11 images (138ms) 09:30:31 [App ] error: reference image 9 has no good images in view 09:30:31 [App ] error: reference image 10 has no good images in view 09:30:31 [App ] error: reference image 0 has no good images in view 09:30:31 [App ] error: reference image 7 has no good images in view 09:30:31 [App ] error: reference image 5 has no good images in view 09:30:31 [App ] error: reference image 1 has no good images in view 09:30:31 [App ] error: reference image 4 has no good images in view 09:30:31 [App ] error: reference image 8 has no good images in view 09:30:31 [App ] error: reference image 6 has no good images in view 09:30:31 [App ] Selecting images for dense reconstruction completed: 2 images (3ms)

pmoulon commented 2 years ago

Please consider give context about your dataset for the community. a. I will assume that you are using the Sceaux Castle image dataset since you have 11 images b. Can you show us what the scene looks like and the output of the SfM stage?

lzl050 commented 2 years ago

a.yes.I use the Sceaux Castle image dataset I can output the sparse point cloud normally and visualize it, but I get an error when generating the dense point cloud c.When I use the latest version, I get a lot of errors.(I have modified the camera parameters)

pmoulon commented 2 years ago

Are you using OpenMVG your compiled yourself or a precompiled package?

Please share the entire log and the command line you use from A to Z. With this dataset you should not have to modify the camera parameters

lzl050 commented 2 years ago

I use the precompiled package.

D:\Anaconda\python.exe "D:/3d reconstruction/tutorial_demo.py"
Using input dir  :  D:\3d reconstruction\ImageDataset_SceauxCastle\images
      output_dir :  D:\3d reconstruction\tutorial_out
1. Intrinsics analysis
INFO: [main_SfMInit_ImageListing.cpp:197]  You called : ./openMVG_main_SfMInit_ImageListing
--imageDirectory D:\3d reconstruction\ImageDataset_SceauxCastle\images
--sensorWidthDatabase ./sensor_width_database\sensor_width_camera_database.txt
--outputDirectory D:\3d reconstruction\tutorial_out\matches
--focal 3398.4
--intrinsics 
--camera_model 3
--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 -] 20%
INFO: [loggerprogress.hpp:79] [- Listing images -] 40%
INFO: [loggerprogress.hpp:79] [- Listing images -] 60%
INFO: [loggerprogress.hpp:79] [- Listing images -] 80%
2. Compute features
INFO: [loggerprogress.hpp:79] [- Listing images -] 100%
WARNING: [main_SfMInit_ImageListing.cpp:458] Warning & Error messages:
K.txt: Unkown image file format.
Readme.txt: Unkown image file format.

INFO: [main_SfMInit_ImageListing.cpp:478] SfMInit_ImageListing report:
listed #File(s): 15
usable #File(s) listed in sfm_data: 13
usable #Intrinsic(s) listed in sfm_data: 1
INFO: [main_ComputeFeatures.cpp:121]  You called : 
./openMVG_main_ComputeFeatures
--input_file D:\3d reconstruction\tutorial_out\matches/sfm_data.json
--outdir D:\3d reconstruction\tutorial_out\matches
--describerMethod SIFT
--upright 0
--describerPreset NORMAL
--force 1
--numThreads 0

INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 100%
INFO: [main_ComputeFeatures.cpp:344] Task done in (s): 27
2. Compute matches
INFO: [main_ComputeMatches.cpp:114]  You called : 
./openMVG_main_ComputeMatches
--input_file D:\3d reconstruction\tutorial_out\matches/sfm_data.json
--output_file D:\3d reconstruction\tutorial_out\matches/matches.putative.bin
--pair_list 
Optional parameters:
--force 1
--ratio 0.8
--nearest_matching_method ANNL2
--cache_size unlimited
--preemptive_feature_used/count 0 / 200
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 100%
INFO: [main_ComputeMatches.cpp:217]  - PUTATIVE MATCHES - 
INFO: [main_ComputeMatches.cpp:280] Using ANN_L2 matcher
INFO: [main_ComputeMatches.cpp:307] No input pair file set. Use exhaustive match by default.
INFO: [main_ComputeMatches.cpp:317] Running matching on #pairs: 78
INFO: [Matcher_Regions.cpp:41] Using the OPENMP thread interface
INFO: [loggerprogress.hpp:79] [- Matching -] 10%
INFO: [loggerprogress.hpp:79] [- Matching -] 40%
INFO: [loggerprogress.hpp:79] [- Matching -] 50%
INFO: [loggerprogress.hpp:79] [- Matching -] 60%
INFO: [loggerprogress.hpp:79] [- Matching -] 90%
INFO: [loggerprogress.hpp:79] [- Matching -] 100%
INFO: [main_ComputeMatches.cpp:363] Task (Regions Matching) done in (s): 6
INFO: [main_ComputeMatches.cpp:366] #Putative pairs: 78
INFO: [graph_stats.hpp:53] Graph statistics:
    #nodes: 13
    #cc: 1
    #singleton: 0
    Node degree statistics: min: 12, max: 12, mean: 12, median: 12
'neato' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���
2. Filter matches
INFO: [main_GeometricFilter.cpp:130]  You called : 
./openMVG_main_GeometricFilter
--input_file:        D:\3d reconstruction\tutorial_out\matches/sfm_data.json
--matches:           D:\3d reconstruction\tutorial_out\matches/matches.putative.bin
--output_file:       D:\3d reconstruction\tutorial_out\matches/matches.e.bin
Optional parameters: 
--input_pairs        
--output_pairs       
--force              false
--geometric_model    f
--guided_matching    0
--cache_size         unlimited
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 100%
3. Do Incremental/Sequential reconstruction
INFO: [main_SfM.cpp:135] 
-----------------------------------------------------------
 Structure from Motion:
-----------------------------------------------------------
5. Colorize Structure
INFO: [loggerprogress.hpp:79] [- Features Loading -] 100%
ERROR: [main_SfM.cpp:409] Cannot load the match file.
4. Structure from Known Poses (robust triangulation)
ERROR: [main_ComputeSfM_DataColor.cpp:69] The input SfM_Data file "D:\3d reconstruction\tutorial_out\reconstruction_sequential/sfm_data.bin" cannot be read.
INFO: [main_ComputeStructureFromKnownPoses.cpp:57] Compute Structure from the provided poses
ERROR: [main_ComputeStructureFromKnownPoses.cpp:132] The input SfM_Data file "D:\3d reconstruction\tutorial_out\reconstruction_sequential/sfm_data.bin" cannot be read.
INFO: [main_GeometricFilter.cpp:130]  You called : 
./openMVG_main_GeometricFilter
--input_file:        D:\3d reconstruction\tutorial_out\matches/sfm_data.json
--matches:           D:\3d reconstruction\tutorial_out\matches/matches.putative.bin
--output_file:       D:\3d reconstruction\tutorial_out\matches/matches.e.bin
Optional parameters: 
--input_pairs        
--output_pairs       
--force              false
--geometric_model    e
--guided_matching    0
--cache_size         unlimited
2. Filter matches (for the global SfM Pipeline)
INFO: [loggerprogress.hpp:79] [- Regions Loading -] 100%
INFO: [main_SfM.cpp:135] 
-----------------------------------------------------------
 Structure from Motion:
-----------------------------------------------------------
3. Do Global reconstruction
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: D:\3d reconstruction\ImageDataset_SceauxCastle\images\100_7101.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: D:\3d reconstruction\ImageDataset_SceauxCastle\images\100_7100.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: D:\3d reconstruction\ImageDataset_SceauxCastle\images\100_7102.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: D:\3d reconstruction\ImageDataset_SceauxCastle\images\100_7103.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: D:\3d reconstruction\ImageDataset_SceauxCastle\images\100_7104.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: D:\3d reconstruction\ImageDataset_SceauxCastle\images\100_7106.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: D:\3d reconstruction\ImageDataset_SceauxCastle\images\100_7107.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: D:\3d reconstruction\ImageDataset_SceauxCastle\images\100_7105.JPG
ERROR: [main_SfM.cpp:395] Cannot load view corresponding features in directory: .
ERROR: [main_ComputeSfM_DataColor.cpp:69] The input SfM_Data file "D:\3d reconstruction\tutorial_out\reconstruction_global/sfm_data.bin" cannot be read.
INFO: [main_ComputeStructureFromKnownPoses.cpp:57] Compute Structure from the provided poses
ERROR: [main_ComputeStructureFromKnownPoses.cpp:132] The input SfM_Data file "D:\3d reconstruction\tutorial_out\reconstruction_global/sfm_data.bin" cannot be read.
5. Colorize Structure
4. Structure from Known Poses (robust triangulation)

Process finished with exit code 0
pmoulon commented 2 years ago

There are multiple strange things: Sceaux castle should have 11 images but I can read usable #File(s) listed in sfm_data: 13 https://github.com/openMVG/ImageDataset_SceauxCastle/tree/master/images

Same later I read

INFO: [graph_stats.hpp:53] Graph statistics:
    #nodes: 13

but we should have #nodes: 11

Which precompiled package did you use?

It seems that you python file is not running the code we expect

If you run with Fundamental matrix filter as we read here: --geometric_model f We should have a matches.f.bin and not a e.bin as we can read --output_file: D:\3d reconstruction\tutorial_out\matches/matches.e.bin