cdcseacave / openMVS

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

Holes in Point cloud and mesh using PolyCam export #1105

Open trvawgagne opened 4 months ago

trvawgagne commented 4 months ago

I'm following the Polycam example and am using an export of a stairwell room. After running the interface and Densify point clound, i still seem to be missing a lot of points. this is causing the meshes and textures to be incomplete compared to that of Polycam. Thisis the case for a few other scans i've run.

Could you help me understand what steps i can take to fill in more points and get us closer to the polycam result?

I've tried:

Sample Dataset is here on GDrive - stairwell-poly.zip. Inside it there is a folder called working/job which has the logs and all the work done for the particular scan shown below.

Here is the GLB file exported from polycam to show the result (We will be doing obj, but gltb is free:) )

Command flow i typically use

InterfacePolycam -i keyframes
DensifyPointCloud -i scene.mvs -o 02_dense_scene.mvs --resolution-level 0 --max-resolution 256 --tower-mode 0 --number-views 32
ReconstructMesh -i 02_dense_scene.mvs -o 03_reconstruct_mesh.mvs
RefineMesh -i 03_reconstruct_mesh.mvs -o 04_refine_mesh.mvs
TextureMesh -i 04_refine_mesh.mvs -o 05_textured_mesh.mvs
TransformScene -i 05_textured_mesh.mvs -o 06_transformed_mesh.mvs --export-type obj --transfer-texture-file 05_textured_mesh.ply

Although this is the full flow, my assumption is the issue is closer to the DensifyPointCloud and i am missing a flag or additional workflow?

Comparison This is a comparison of what openmvs produces to polycam when using the pipeline above...

openmvs-to-poly-compare

Please let me know if i should try something different or if something stands out so that we can get closer to the Polycam result.

Thanks!

trv-awgagne commented 4 months ago

Yesterday I attempted to rerun the DensifyPointCloud and included --postprocess-dmaps 2. As i ran it over and over, more points were added to the point cloud, but only in the same areas shown above in the original image. i went from 42K points oto 56K points, and in the PLY file, no point goes farther than the original bounds of the image above.

DensifyPointCloud -i scene.mvs -o 02_dense_scene.mvs --resolution-level 0 --max-resolution 256 --tower-mode 0 --postprocess-dmaps 2

Other things I've tried:

cdcseacave commented 4 months ago

I've looked at the dataset and I think the problem here is the camera poses. The raw version are too noisy, while the corrected ones are wrong. So in order to improve this dense reconstruction you need first to estimate correct poses. Try COLMAP or OpenMVG, however the images and the acquisition pattern are very difficult, so I do not have high hopes. Try capturing better photos appropriate for photogrammetry (tons of tutorials online)