Fix error when blur is not enabled

This commit is contained in:
Nicolas Mowen 2025-06-09 11:59:36 -06:00
parent 98ff0cc056
commit 0c29e5bd66

View File

@ -111,7 +111,7 @@ class FaceRecognizer(ABC):
def get_blur_confidence_reduction(self, input: np.ndarray) -> tuple[float, float]: def get_blur_confidence_reduction(self, input: np.ndarray) -> tuple[float, float]:
"""Calculates the reduction in confidence based on the blur of the image.""" """Calculates the reduction in confidence based on the blur of the image."""
if not self.config.face_recognition.blur_confidence_filter: if not self.config.face_recognition.blur_confidence_filter:
return 1.0 return 0, 0.0
variance = cv2.Laplacian(input, cv2.CV_64F).var() variance = cv2.Laplacian(input, cv2.CV_64F).var()