From 3f4decc2feb84f9076411f8598b244f26e2b7453 Mon Sep 17 00:00:00 2001 From: hesuicong Date: Fri, 6 Mar 2026 10:20:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=A1=E6=9C=89=E9=AB=98=E6=96=AF=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E7=9A=84=E6=97=B6=E5=80=99=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/MVS/SceneTexture.cpp | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/libs/MVS/SceneTexture.cpp b/libs/MVS/SceneTexture.cpp index 10e12a3..a488ebd 100644 --- a/libs/MVS/SceneTexture.cpp +++ b/libs/MVS/SceneTexture.cpp @@ -1274,14 +1274,19 @@ bool MeshTexture::ListCameraFaces(FaceDataViewArr& facesDatas, float fOutlierThr int faceCount = 0; for (unsigned int faceId : regionFaces) { // 修改为 unsigned int - if (faceId < faceColorsGaussian.size()) { - Mesh::Color gaussianColor = faceColorsGaussian[faceId]; + printf("faceId=%d, faceColorsGaussian.size=%d\n", faceCount, faceColorsGaussian.size()); + // if (faceId < faceColorsGaussian.size()) + { + // Mesh::Color gaussianColor = faceColorsGaussian[faceId]; + Mesh::Color gaussianColor = Mesh::Color(0.0,0.0,0.0,1.0); sumR += gaussianColor.r; sumG += gaussianColor.g; sumB += gaussianColor.b; faceCount++; } } + + printf("faceCount=%d\n", faceCount); if (faceCount > 0) { MeshColor avgColor( @@ -1664,9 +1669,10 @@ bool MeshTexture::ListCameraFaces(FaceDataViewArr& facesDatas, float fOutlierThr //*/ //* - if (idxFace0.4f) + continue; + //*/ #ifdef TEST bool bFilter = (colorDistance > threshold) ? true : false; @@ -1735,7 +1748,7 @@ bool MeshTexture::ListCameraFaces(FaceDataViewArr& facesDatas, float fOutlierThr if (g_colorComparisonFace) { testFacePixelsByView[idxView][idxFace].push_back(cv::Point(i, j)); - printf("testFacePixels imageView(%s), idxFace(%d) push_back (%d, %d)\n", filename.c_str(), idxFace, i, j); + // printf("testFacePixels imageView(%s), idxFace(%d) push_back (%d, %d)\n", filename.c_str(), idxFace, i, j); } } @@ -10351,7 +10364,8 @@ void MeshTexture::GenerateTexture(bool bGlobalSeamLeveling, bool bLocalSeamLevel std::vector> contours = {trianglePoints}; // cv::fillPoly(patch, contours, cv::Scalar(0, 0, 0)); - Mesh::Color gaussianColor = faceColorsGaussian[idxFace]; + // Mesh::Color gaussianColor = faceColorsGaussian[idxFace]; + Mesh::Color gaussianColor = Mesh::Color(0.0,0.0,0.0,1.0); // printf("idxFace(%d) gaussianColor:%d, %d, %d\n", idxFace, gaussianColor[0], gaussianColor[1], gaussianColor[2]); Mesh::Color originalColor= faceOriginalColors[idxFace]; // printf("idxFace(%d) originalColor:%d, %d, %d\n", idxFace, originalColor[0], originalColor[1], originalColor[2]);