From 7777eee820fdcf5c7207a5f9289e8c5906955651 Mon Sep 17 00:00:00 2001 From: Avasam Date: Tue, 6 Aug 2024 12:38:16 -0400 Subject: [PATCH] interpolation=cv2.INTER_NEAREST in compare_with_capture --- pyproject.toml | 2 +- src/AutoSplitImage.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c160de14..f72a1498 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -134,7 +134,7 @@ max-branches = 15 it doesn't support special characters. Use `utils.imread` instead. https://github.com/opencv/opencv/issues/4292#issuecomment-2266019697""" "cv2.imwrite".msg = """\ -it doesn't support special characters. . Use `utils.imwrite` instead. +it doesn't support special characters. Use `utils.imwrite` instead. https://github.com/opencv/opencv/issues/4292#issuecomment-2266019697""" # https://github.com/hhatto/autopep8#usage diff --git a/src/AutoSplitImage.py b/src/AutoSplitImage.py index ede51a7b..9800bb2d 100644 --- a/src/AutoSplitImage.py +++ b/src/AutoSplitImage.py @@ -202,7 +202,7 @@ def compare_with_capture( if not is_valid_image(self.byte_array): return 0.0 - resized_capture = cv2.resize(capture, self.byte_array.shape[1::-1]) + resized_capture = cv2.resize(capture, self.byte_array.shape[1::-1], interpolation=cv2.INTER_NEAREST) return get_comparison_method_by_index( self.__get_comparison_method_index(default),