cdcseacave / openMVS

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

fuse depth maps in .png? / visualize .dmap #580

Open hemath1001 opened 4 years ago

hemath1001 commented 4 years ago

Hi @cdcseacave :-D I'm wondering if it is feasible to do "fusion" part based on depth maps in format PNG (or other fomats like .pfm, but png is the most readable) ?

Snipaste_2020-06-17_01-21-45

I have read your previous answers, but I am still confused about how to transform other formats into the format (.dmap) supported by OpenMVS.

I'm also interested in visualize the depth maps that openMVS estimates, and the format .dmap stops me T_T

(your previous answers in issue #578 that I have read↓)

There is nothing special you need to do, sply export the depth maps in the format supported by OpenMVS, and next call densification as usual. See:

https://github.com/cdcseacave/openMVS/blob/122397e1af32ac5660a31a61e3a0c9c0091355a3/libs/MVS/DepthMap.cpp#L1699

By doing this the fusion step inside OpenMVS will be used, however if the poses of the individual depth-maps are not correct OpenMVS can not correct them, you should do that before.

The neighbors are computed automatically if not available. All you need to do is to store the depth-maps in files called depth0xxx.dmap and call ./DensifyPointCloud scene.mvs

Really looking forward to your suggestion and appreciate any feedback!

cdcseacave commented 4 years ago

I will add DMAP visualization support to OpenMVS viewer app, that will be easy. However I will not support any other dmap format, as the one in OpenMVS is created to be easy to use and export from other applications. Not really sure what seems difficult for you.

cdcseacave commented 4 years ago

Viewer now supports DMAPs. Pls see https://github.com/cdcseacave/openMVS/wiki/Usage for more details.