解决一个崩溃的Bug
This commit is contained in:
1 parent
3dff609cb8
commit
2fefb4738c
1 file changed
+3
-16
@@ -1151,25 +1151,12 @@ bool MeshTexture::ListCameraFaces(FaceDataViewArr& facesDatas, float fOutlierThr
|
|||||||
// continue;
|
// continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
// 已有的过曝判断保留
|
|
||||||
float brightnessPerceptual = (0.299f * pixel.r + 0.587f * pixel.g + 0.114f * pixel.b) / 255.0f;
|
float brightnessPerceptual = (0.299f * pixel.r + 0.587f * pixel.g + 0.114f * pixel.b) / 255.0f;
|
||||||
if (brightnessPerceptual > 0.95f)
|
// printf("brightnessPerceptual=%f\n", brightnessPerceptual);
|
||||||
|
|
||||||
|
if (brightnessPerceptual>0.95f)
|
||||||
continue;
|
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;
|
|
||||||
|
|
||||||
// 只两个条件:极亮 + 低饱和
|
|
||||||
bool isSpecular = (Y > 240.0f) && (saturation_approx < 0.12f);
|
|
||||||
|
|
||||||
if (isSpecular) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// if (!(scene.mesh.invalidFacesRelative.data.contains(idxFace) && scene.is_face_visible_relative(idxFace)))
|
// if (!(scene.mesh.invalidFacesRelative.data.contains(idxFace) && scene.is_face_visible_relative(idxFace)))
|
||||||
// if (false)
|
// if (false)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user