From 1d3df169e565dd3f751ccb94b2a20d42f566f813 Mon Sep 17 00:00:00 2001 From: Jing Zhao <1125078229@qq.com> Date: Wed, 12 Oct 2022 18:22:07 +0800 Subject: [PATCH] texture: fix data costs in TRWS energy (#880) --- libs/MVS/SceneTexture.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/MVS/SceneTexture.cpp b/libs/MVS/SceneTexture.cpp index c15cabf70..3dc36ffae 100644 --- a/libs/MVS/SceneTexture.cpp +++ b/libs/MVS/SceneTexture.cpp @@ -943,7 +943,9 @@ bool MeshTexture::FaceViewSelection(float fOutlierThreshold, float fRatioDataSmo TRWSInference& inference = inferences[components[f]]; if (inference.IsEmpty()) continue; - D.MemsetValue(MaxEnergy); + // invisible faces are given a data cost 3 times the edge costs + // 3 as each face can have at most 3 edges + D.MemsetValue(MaxEnergy * 3); const FaceDataArr& faceDatas = facesDatas[f]; FOREACHPTR(pFaceData, faceDatas) { const FaceData& faceData = *pFaceData;