优化筛选逻辑
This commit is contained in:
1 parent
9ab39219b1
commit
4048de2dc4
1 file changed
+9
-6
@@ -5714,8 +5714,8 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
||||
}
|
||||
|
||||
// 如果夹角小于45度(cos(45°) ≈ 0.7071),则计入覆盖
|
||||
float fAngleThreshold1 = 0.671; // 0.7071f
|
||||
float fAngleThreshold2 = 0.8071; // 0.7071f
|
||||
float fAngleThreshold1 = 0.6071; // 0.7071f
|
||||
float fAngleThreshold2 = 0.7071; // 0.7071f
|
||||
|
||||
// 初始化数据结构
|
||||
std::vector<bool> processedFaces(faces.size(), false);
|
||||
@@ -5801,12 +5801,12 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
||||
{
|
||||
coverageCount++;
|
||||
|
||||
// viewData.faceToIndexMap[idxFace] = idxFace;
|
||||
viewData.faceToIndexMap[idxFace] = idxFace;
|
||||
}
|
||||
|
||||
if (cosAngle > fAngleThreshold1)
|
||||
{
|
||||
viewData.faceToIndexMap[idxFace] = idxFace;
|
||||
// viewData.faceToIndexMap[idxFace] = idxFace;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6031,6 +6031,9 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
||||
const Image& imageData = images[viewIdx];
|
||||
std::string strPath = imageData.name;
|
||||
std::string strName = MeshTexture::GetFileNameWithoutExtension(strPath);
|
||||
// printf("strName=%s\n", strName.c_str());
|
||||
// if (strName!="63_2")
|
||||
// continue;
|
||||
|
||||
if (viewData.faceToIndexMap.find(virtualFaceCenterFaceID) != viewData.faceToIndexMap.end())
|
||||
{
|
||||
@@ -6056,8 +6059,8 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
||||
filteredCams.push_back(viewIdx);
|
||||
++nHit;
|
||||
|
||||
// if (nHit>=nHitMax)
|
||||
// break;
|
||||
if (nHit>=nHitMax)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user