X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=camera_utils.py;h=9e7efd6dfccbd7df2d1eb8bd13eb8075a6bfe4f1;hb=31c81f6539969a5eba864d3305f9fb7bf716a367;hp=799efd35d19fa39a7879c6c0851f9e697704927b;hpb=17e8082381dbbf691dfb19fb1b38a97e48d6ab87;p=python_utils.git diff --git a/camera_utils.py b/camera_utils.py index 799efd3..9e7efd6 100644 --- a/camera_utils.py +++ b/camera_utils.py @@ -5,8 +5,8 @@ import logging import platform import subprocess -from typing import NamedTuple, Optional import warnings +from typing import NamedTuple, Optional import cv2 # type: ignore import numpy as np @@ -56,7 +56,8 @@ def sanity_check_image(hsv: np.ndarray) -> SanityCheckImageMetadata: hs_zero_count += 1 logger.debug(f"hszero#={hs_zero_count}, weird_orange={weird_orange_count}") return SanityCheckImageMetadata( - hs_zero_count > (num_pixels * 0.75), weird_orange_count > (num_pixels * 0.75) + hs_zero_count > (num_pixels * 0.75), + weird_orange_count > (num_pixels * 0.75), )