cdcseacave / openMVS

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

How to get the neighbors of each scene image or pointViews of each pointcloud ? #1000

Open lin-name opened 1 year ago

lin-name commented 1 year ago

Dear professor, I have 10 image pairs(color&depth), almost synchronous,that is, the camera get the colors first, and after 10ms the camera get the depth,and the corresponding camera poses of each pais. And i can get the pointcloud points from the depth, by: S[px,py,1].t=K[Xc,Yc,Zc].t . but how to compute the pointViews of each pointcloud or neighbors of each scene image? I know we can get the neighbors of each scene image by scene.SelectNeighborViews(image.id,points,...) in Scene.h, and conversely, can use the neighbors of each scene image to get pointViews of each point. But how can i get any one of these two? The source scene.mvs has the neighbors of each scene image(when Scene::LoadInterface() ). So it should get from the OpenMVG, could you please tell how to get the neighbors of the color images, which steps or executable file in OpenMVG(version 2.0 &1.6)?

Thank you very much. Looking forward for your reply!

cdcseacave commented 1 year ago

the simplest way is to simply store the depth-maps you have in MVS format (see Interface.h), and just run DensifyPointcloud to fuse them only (check the params, but the stored depth-maps are used automatically if they match the desired resolution selected in command line). You will get a dense point cloud in MVS fromat with automatically computed views per point and neighbors. You can directly use that farther, or you can convert it to interface format (just run DensifyPointcloud scene_dense.mvs --atchive-type -1) and rerun DensifyPointcloud after deleting your depth maps. That will recompute the depth-maps starting from your depth-maps.