Skip to content

Commit 1d3df16

Browse files
authored
texture: fix data costs in TRWS energy (#880)
1 parent 75b4d80 commit 1d3df16

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libs/MVS/SceneTexture.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,9 @@ bool MeshTexture::FaceViewSelection(float fOutlierThreshold, float fRatioDataSmo
943943
TRWSInference& inference = inferences[components[f]];
944944
if (inference.IsEmpty())
945945
continue;
946-
D.MemsetValue(MaxEnergy);
946+
// invisible faces are given a data cost 3 times the edge costs
947+
// 3 as each face can have at most 3 edges
948+
D.MemsetValue(MaxEnergy * 3);
947949
const FaceDataArr& faceDatas = facesDatas[f];
948950
FOREACHPTR(pFaceData, faceDatas) {
949951
const FaceData& faceData = *pFaceData;

0 commit comments

Comments
 (0)