From caa8347ff0009038329b602afd81b59f0808e6b6 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Tue, 29 Oct 2024 15:46:44 +0100 Subject: [PATCH] Minor cleanup --- tests/test_vision.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_vision.py b/tests/test_vision.py index 9f5e770c..6c43f2ea 100644 --- a/tests/test_vision.py +++ b/tests/test_vision.py @@ -123,5 +123,7 @@ def test_match_frame_color() -> None: output_vision_frame = match_frame_color(source_vision_frame, target_vision_frame) histogram_source = cv2.calcHist([ cv2.cvtColor(source_vision_frame, cv2.COLOR_BGR2HSV) ], [ 0, 1 ], None, [ 50, 60 ], [ 0, 180, 0, 256 ]) histogram_output = cv2.calcHist([ cv2.cvtColor(output_vision_frame, cv2.COLOR_BGR2HSV) ], [ 0, 1 ], None, [ 50, 60 ], [ 0, 180, 0, 256 ]) + cv2.normalize(histogram_source, histogram_source, 0, 1, cv2.NORM_MINMAX) + cv2.normalize(histogram_output, histogram_output, 0, 1, cv2.NORM_MINMAX) assert cv2.compareHist(histogram_source, histogram_output, cv2.HISTCMP_CORREL) > 0.5