cdcseacave / openMVS

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

Looks like a bug #884

Open oradzhabov opened 1 year ago

oradzhabov commented 1 year ago

Here is line https://github.com/cdcseacave/openMVS/blob/1d3df169e565dd3f751ccb94b2a20d42f566f813/libs/MVS/SceneRefine.cpp#L717

probably should be:

 if (depth <= 0 || ABS(depth-z) > MESHOPT_DEPTHCONSTBIAS)
cdcseacave commented 1 year ago

I see your point, but I still think the functionality is correct (even though the function name should not be IsDepthSimilar but IsDepthValid) as one mesh projected in two views can not generate the case z < depth - MESHOPT_DEPTHCONSTBIAS

But I might be wrong, so pls give me an example when the above is true.