diff --git a/libs/MVS/SceneTexture.cpp b/libs/MVS/SceneTexture.cpp index b488aa7..849b2a8 100644 --- a/libs/MVS/SceneTexture.cpp +++ b/libs/MVS/SceneTexture.cpp @@ -6799,7 +6799,22 @@ bool MeshTexture::CreateVirtualFaces65(FaceDataViewArr& facesDatas, FaceDataView printf("----------------\n"); // 选择 Top-K 个视图(例如 K=5) - const int kMaxViews = 16; + int highScoreCount1 = 0; + int highScoreCount2 = 0; + for (const auto& s : scores) { + if (s.score > 1.3f) highScoreCount1++; // 阈值改为0.8 + if (s.score > 0.8f) highScoreCount2++; // 阈值改为0.8 + } + + // 动态调整 kMaxViews + int kMaxViews = 32; + if (highScoreCount1 >= 1) { + kMaxViews = 1; // 高分视图多 + } else if (highScoreCount2 >= 3) { + kMaxViews = 5; + } + + kMaxViews = 32; for (int i = 0; i < kMaxViews && i < scores.size(); ++i) { int index = scores[i].viewIdx; float score = scores[i].score; @@ -6818,7 +6833,7 @@ bool MeshTexture::CreateVirtualFaces65(FaceDataViewArr& facesDatas, FaceDataView if (viewData.faceToIndexMap.find(virtualFaceCenterFaceID) == viewData.faceToIndexMap.end()) continue; - if (score < 0.8f) + if (score < 1.0f) continue; filteredCams.push_back(index);