cdcseacave / openMVS

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

Usage of the RefineMesh ? #991

Open lin-name opened 1 year ago

lin-name commented 1 year ago

Hello, professor. This is not a bug but a consultation.

I use the OpenMVS 1.1 on Wins 10 with VS 2019 compiled by myself, and it can successfully execute and get right output while using your example data: RefineMesh.exe scene_mesh.mvs

I want to execute the OpenMVS RefineMesh module of my own data.

I can generate mesh (include vertices and faces), images(the source color images from my sensor) , and poses of each image in the images(first frame's pose is a identity matrix, and all pose is relative to the first image , like: pose[0]: identity matrix, pose[1]: 1-> 0 pose[2]: 2->0 ,etal) in my own project,

then i set the "platforms", "images" and "mesh" structure respectively, and most importantly,the poses is R|C (C=-R.t()*T ) rather than R|T, the opt paras use the default as yours.

However, the RefineMesh failed becaues of the mapPairs.size()=0 refine.IsValid()=1 in SceneRefine.cpp like below: 111

So, what does the mapPairs means? and what's the relationship between idxImage and mapPairs, and how to get the right mapPairs in the new EVTSelectNeighbors(idxImage, mapPairs, nMaxViews)

Any suggestion will be useful!Looking forward for your reply.

Thank you very much!

cdcseacave commented 1 year ago

pls send the data and comand line you used so that I can debug