cdcseacave / openMVS

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

DensifyPointCloud produces lot of noise at edges. Mostly the floor color. #221

Open bassamarshad opened 7 years ago

bassamarshad commented 7 years ago

Specifications like the version of the project, operating system, and hardware

Ubuntu 16.04

Steps to reproduce the problem

DensifyPointCloud seems to produce a point cloud that has a lot of noise specially at the edges and for some reason, the floor color is "reflected off". I have tried all the options this executable provides, varied resolution-level=3,4 and the number of views fuse to 4,5 . Still never seem to avoid that noise.

Any advice ?

screenshot from 2017-06-02 15-16-18 screenshot from 2017-06-02 15-16-30 screenshot from 2017-06-02 15-17-15

cdcseacave commented 7 years ago

OpenMVS was designed to produce an accurate mesh as the final output. The dense point-cloud is only an intermediate step on this road, and the noise you are seeing here will be filtered out during the next steps. If however you really need the point-cloud (though hard to imagine a case where it is preferred over the mesh), there are several things you can try. Usually this kind of noise is produced by lack of texture or reflective/glossy surfaces. I think this is also you case; please share the photos if you can, to have a closer look. If your case allows, the simplest way is to take "good" photos for MVS. If not, Densification module supports a lot more options than those provided by the command line, which are accessed though a configuration file; have a look at DepthMap.cpp. As an example, you can try to increase fDescriptorMinMagnitudeThreshold and nMinViewsFuse.

bassamarshad commented 7 years ago

Thanks for your detailed reply! In my current application I am looking towards the 3D recon of objects in a known space, with the ultimate goal of segmenting out an object of interest, putting a bounding box over it and getting its dimensions. A dense point cloud should suffice for that. I use OpenSfM for the initial phase and get the scene.mvs exported. The sparse cloud OpenSfM produces is quite useless for my application.

Sure, I will try and tweak more params ! Another thing I feel is the speed, I am running on a 32 thread server machine, yet the DensifyPointCloud takes quite a bit of time! I have observed just the RefineMesh method has a cuda/gpu variant (which unfortunately results in a Segmentation Fault for me). Any leads on quickening up the process will be very much appreciated!

cdcseacave commented 7 years ago

OpenSfM has a dense point cloud module as well. As for OpenMVS, for what you need you can run desnsification at lower resolution (3,4,5 depending on the original resolution) to speed it up a lot. And for sure you do not need mesh refinement, so forget about cuda.

UannaFF commented 5 years ago

@bassamarshad hey! Did you find a way to work around this problem? I'm having a lot of noise after performing the densification when there are plastic bottles in my photos and my application in the end is similar to yours, I want to place bounding boxes around objects. But actually I think the noise is not the most problematic, the thing is openmvs has trouble finiding points in the most transparent, glossy parts, like in the following photo:

image

that represents this part of a photo:

image

cdcseacave commented 5 years ago

@UannaFF the plastic is not the issue here, the problem is transparent or glossy surfaces, there is no MVS algorithm that can reconstruct that yet

@bassamarshad In the latest develop there is now a visibility filtering you can try to remove the background outliers; enable it with --filter-point-cloud -1 as a DensifyPointCloud post processing