|
|
|
|
@ -1147,13 +1147,13 @@ bool MeshTexture::ListCameraFaces(FaceDataViewArr& facesDatas, float fOutlierThr
@@ -1147,13 +1147,13 @@ bool MeshTexture::ListCameraFaces(FaceDataViewArr& facesDatas, float fOutlierThr
|
|
|
|
|
const Pixel8U& pixel = imageData.image(j, i); |
|
|
|
|
// 假设是8位图像,RGB三个通道任一超过250即视为过曝
|
|
|
|
|
if (pixel.r > 250 || pixel.g > 250 || pixel.b > 250) { |
|
|
|
|
continue; |
|
|
|
|
// continue;
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
float brightnessPerceptual = (0.299f * pixel.r + 0.587f * pixel.g + 0.114f * pixel.b) / 255.0f; |
|
|
|
|
// printf("brightnessPerceptual=%f\n", brightnessPerceptual);
|
|
|
|
|
|
|
|
|
|
if (brightnessPerceptual>0.8f) |
|
|
|
|
if (brightnessPerceptual>0.95f) |
|
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
// if (!(scene.mesh.invalidFacesRelative.data.contains(idxFace) && scene.is_face_visible_relative(idxFace)))
|
|
|
|
|
|