优化筛选逻辑
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),则计入覆盖
|
// 如果夹角小于45度(cos(45°) ≈ 0.7071),则计入覆盖
|
||||||
float fAngleThreshold1 = 0.671; // 0.7071f
|
float fAngleThreshold1 = 0.6071; // 0.7071f
|
||||||
float fAngleThreshold2 = 0.8071; // 0.7071f
|
float fAngleThreshold2 = 0.7071; // 0.7071f
|
||||||
|
|
||||||
// 初始化数据结构
|
// 初始化数据结构
|
||||||
std::vector<bool> processedFaces(faces.size(), false);
|
std::vector<bool> processedFaces(faces.size(), false);
|
||||||
@@ -5801,12 +5801,12 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
|||||||
{
|
{
|
||||||
coverageCount++;
|
coverageCount++;
|
||||||
|
|
||||||
// viewData.faceToIndexMap[idxFace] = idxFace;
|
viewData.faceToIndexMap[idxFace] = idxFace;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cosAngle > fAngleThreshold1)
|
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];
|
const Image& imageData = images[viewIdx];
|
||||||
std::string strPath = imageData.name;
|
std::string strPath = imageData.name;
|
||||||
std::string strName = MeshTexture::GetFileNameWithoutExtension(strPath);
|
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())
|
if (viewData.faceToIndexMap.find(virtualFaceCenterFaceID) != viewData.faceToIndexMap.end())
|
||||||
{
|
{
|
||||||
@@ -6056,8 +6059,8 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
|||||||
filteredCams.push_back(viewIdx);
|
filteredCams.push_back(viewIdx);
|
||||||
++nHit;
|
++nHit;
|
||||||
|
|
||||||
// if (nHit>=nHitMax)
|
if (nHit>=nHitMax)
|
||||||
// break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user