优化过滤算法
This commit is contained in:
1 parent
634590e6d4
commit
bbddc87ccc
1 file changed
+2
-2
@@ -1147,13 +1147,13 @@ bool MeshTexture::ListCameraFaces(FaceDataViewArr& facesDatas, float fOutlierThr
|
|||||||
const Pixel8U& pixel = imageData.image(j, i);
|
const Pixel8U& pixel = imageData.image(j, i);
|
||||||
// 假设是8位图像,RGB三个通道任一超过250即视为过曝
|
// 假设是8位图像,RGB三个通道任一超过250即视为过曝
|
||||||
if (pixel.r > 250 || pixel.g > 250 || pixel.b > 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;
|
float brightnessPerceptual = (0.299f * pixel.r + 0.587f * pixel.g + 0.114f * pixel.b) / 255.0f;
|
||||||
// printf("brightnessPerceptual=%f\n", brightnessPerceptual);
|
// printf("brightnessPerceptual=%f\n", brightnessPerceptual);
|
||||||
|
|
||||||
if (brightnessPerceptual>0.8f)
|
if (brightnessPerceptual>0.95f)
|
||||||
continue;
|
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)))
|
||||||
|
|||||||
Reference in new issue
Block a user