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]);