From efce2f6ada79ebab928b8cbf05527f9f0623982f Mon Sep 17 00:00:00 2001 From: cDc Date: Mon, 23 Sep 2024 13:25:43 +0300 Subject: [PATCH] dense: unify confidence between [0,1] for FilterDepthMap() too (cherry picked from commit a4b0802450cff65dbedd044aa54158ca4eb43a32) --- libs/MVS/SceneDensify.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/MVS/SceneDensify.cpp b/libs/MVS/SceneDensify.cpp index f137feebc..8a6a84622 100644 --- a/libs/MVS/SceneDensify.cpp +++ b/libs/MVS/SceneDensify.cpp @@ -1069,7 +1069,7 @@ bool DepthMapsData::FilterDepthMap(DepthData& depthDataRef, const IIndexArr& idx if (nPosViews >= nMinViewsAdjust && posConf > negConf && ISINSIDE(avgDepth/=posConf, depthDataRef.dMin, depthDataRef.dMax)) { // consider this pixel an inlier newDepthMap(xRef) = avgDepth; - newConfMap(xRef) = posConf - negConf; + newConfMap(xRef) = 1.f - MINF(((negConf+0.2f) * nPosViews) / (posConf * MAXF(nNegViews,1u)), 1.f); } else { // consider this pixel an outlier DiscardDepth: