Browse Source

解决一个崩溃的Bug

master
hesuicong 1 month ago
parent
commit
2fefb4738c
  1. 17
      libs/MVS/SceneTexture.cpp

17
libs/MVS/SceneTexture.cpp

@ -1151,24 +1151,11 @@ bool MeshTexture::ListCameraFaces(FaceDataViewArr& facesDatas, float fOutlierThr @@ -1151,24 +1151,11 @@ bool MeshTexture::ListCameraFaces(FaceDataViewArr& facesDatas, float fOutlierThr
// continue;
}
/*
// 已有的过曝判断保留
float brightnessPerceptual = (0.299f * pixel.r + 0.587f * pixel.g + 0.114f * pixel.b) / 255.0f;
if (brightnessPerceptual > 0.95f)
continue;
float Y = 0.299f * pixel.r + 0.587f * pixel.g + 0.114f * pixel.b;
float maxChan = MAXF(pixel.r, MAXF(pixel.g, pixel.b));
float minChan = MINF(pixel.r, MINF(pixel.g, pixel.b));
float saturation_approx = (maxChan > 0) ? (maxChan - minChan) / maxChan : 0.0f;
// printf("brightnessPerceptual=%f\n", brightnessPerceptual);
// 只两个条件:极亮 + 低饱和
bool isSpecular = (Y > 240.0f) && (saturation_approx < 0.12f);
if (isSpecular) {
if (brightnessPerceptual>0.95f)
continue;
}
*/
// if (!(scene.mesh.invalidFacesRelative.data.contains(idxFace) && scene.is_face_visible_relative(idxFace)))
// if (false)

Loading…
Cancel
Save