cdcseacave / openMVS

open Multi-View Stereo reconstruction library
http://cdcseacave.github.io
GNU Affero General Public License v3.0
3.3k stars 906 forks source link

[v2.0] When --fusion-mode -1 parameter is used, DensifyPointCloud crashes #721

Closed longhuan2018 closed 2 years ago

longhuan2018 commented 2 years ago

OS : windows 10

Use scene.mvs in openMVS_sample to reproduce the problem

F:\DTM\openmvs>F:\DTM\reconstruct\Bin\DensifyPointCloud F:\DTM\openmvs\scene.mvs -w F:\DTM\openmvs --fusion-mode -1
16:19:40 [App     ] Build date: Dec  7 2021, 15:52:44
16:19:40 [App     ] CPU: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (12 cores)                                             
16:19:40 [App     ] RAM: 15.91GB Physical Memory 128.00TB Virtual Memory                                                
16:19:40 [App     ] OS: Windows 8 x64                                                                                   
16:19:40 [App     ] SSE & AVX compatible CPU & OS detected                                                              
16:19:40 [App     ] Command line: F:\DTM\openmvs\scene.mvs -w F:\DTM\openmvs --fusion-mode -1                           
16:19:40 [App     ] CUDA device 0 initialized: GeForce GTX 1060 6GB (compute capability 6.1; memory 6.00GB)             
16:19:40 [App     ] Camera model loaded: platform 0; camera  0; f 1.054x1.054; poses 11                                 
16:19:41 [App     ] Scene loaded from interface format (8ms):                                                                   
11 images (11 calibrated) with a total of 63.22 MPixels (5.75 MPixels/image)                                            
12683 points, 0 vertices, 0 faces                                                                               
16:19:41 [App     ] Preparing images for dense reconstruction completed: 11 images (123ms)                              
16:19:41 [App     ] Selecting images for dense reconstruction completed: 11 images (5ms)                                
Estimated depth-maps 11 (100%, 3m52s862ms)                                                                              
Geometric-consistent estimated depth-maps 11 (100%, 583ms)                                                              
Geometric-consistent estimated depth-maps 11 (100%, 899ms)  
longhuan2018 commented 2 years ago

I found that the DenseReconstructionFilter function caused a crash. depthData.confMap is used in DepthMapsData::FilterDepthMap(DepthData& depthDataRef, const IIndexArr& idxNeighbors, bool bAdjust) , but it is empty.

cdcseacave commented 2 years ago

fixed in latest master