|
|
|
|
@ -5798,7 +5798,7 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
@@ -5798,7 +5798,7 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
|
|
|
|
const Normal& faceNormal = scene.mesh.faceNormals[idxFace]; |
|
|
|
|
const float cosAngle = cameraForward.dot(Point3f(faceNormal.x, faceNormal.y, faceNormal.z)); |
|
|
|
|
|
|
|
|
|
if (cosAngle > fAngleThreshold2) |
|
|
|
|
if (cosAngle > fAngleThreshold2) |
|
|
|
|
{ |
|
|
|
|
coverageCount++; |
|
|
|
|
|
|
|
|
|
@ -6068,7 +6068,7 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
@@ -6068,7 +6068,7 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
|
|
|
|
std::string strPath = imageData.name; |
|
|
|
|
std::string strName = MeshTexture::GetFileNameWithoutExtension(strPath); |
|
|
|
|
// printf("strName=%s\n", strName.c_str());
|
|
|
|
|
// if (strName!="63_2")
|
|
|
|
|
// if (strName!="94_2")
|
|
|
|
|
// continue;
|
|
|
|
|
|
|
|
|
|
if (viewData.faceToIndexMap.find(virtualFaceCenterFaceID) != viewData.faceToIndexMap.end()) |
|
|
|
|
@ -6102,13 +6102,13 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
@@ -6102,13 +6102,13 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
++nViewCoverage; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//*/
|
|
|
|
|
|
|
|
|
|
nViewCoverage = 0; |
|
|
|
|
nViewCoverageMax = 200; |
|
|
|
|
nHit = 0; |
|
|
|
|
nHitMax = 6; |
|
|
|
|
nHitMax = 1; |
|
|
|
|
for (size_t i = 0; i < sortedCams2.size(); ++i) |
|
|
|
|
{ |
|
|
|
|
if (nViewCoverage>=nViewCoverageMax) |
|
|
|
|
@ -6125,6 +6125,9 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
@@ -6125,6 +6125,9 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
|
|
|
|
std::string strPath = imageData.name; |
|
|
|
|
std::string strName = MeshTexture::GetFileNameWithoutExtension(strPath); |
|
|
|
|
|
|
|
|
|
// if (strName!="94_2")
|
|
|
|
|
// continue;
|
|
|
|
|
|
|
|
|
|
// if (!scene.is_face_delete_edge2(strName, virtualFaceCenterFaceID))
|
|
|
|
|
{ |
|
|
|
|
filteredCams.push_back(viewIdx); |
|
|
|
|
@ -6140,6 +6143,15 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
@@ -6140,6 +6143,15 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
|
|
|
|
if (filteredCams.empty()) { |
|
|
|
|
size_t count = std::min(sortedCams.size(), static_cast<size_t>(3)); |
|
|
|
|
for (size_t i = 0; i < count; ++i) { |
|
|
|
|
|
|
|
|
|
// IIndex viewIdx = sortedCams[i].first;
|
|
|
|
|
// float val = sortedCams[i].second;
|
|
|
|
|
// const Image& imageData = images[viewIdx];
|
|
|
|
|
// std::string strPath = imageData.name;
|
|
|
|
|
// std::string strName = MeshTexture::GetFileNameWithoutExtension(strPath);
|
|
|
|
|
// if (strName!="94_2")
|
|
|
|
|
// continue;
|
|
|
|
|
|
|
|
|
|
filteredCams.push_back(sortedCams[i].first); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -6150,8 +6162,8 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
@@ -6150,8 +6162,8 @@ bool MeshTexture::CreateVirtualFaces64(FaceDataViewArr& facesDatas, FaceDataView
|
|
|
|
|
// 处理所有视图都被过滤的情况...
|
|
|
|
|
// DEBUG_EXTRA("Warning: All views filtered for virtual face due to angle condition.");
|
|
|
|
|
|
|
|
|
|
// selectedCams = SelectBestView(centerFaceDatas, virtualFaceCenterFaceID, minCommonCameras, ratioAngleToQuality);
|
|
|
|
|
selectedCams = filteredCams; |
|
|
|
|
selectedCams = SelectBestView(centerFaceDatas, virtualFaceCenterFaceID, minCommonCameras, ratioAngleToQuality); |
|
|
|
|
// selectedCams = filteredCams;
|
|
|
|
|
isVirtualFace[virtualFaceCenterFaceID] = false; |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|