From 9503265f273a894313303ce1d1151d75178909a7 Mon Sep 17 00:00:00 2001 From: kvii <13721952202@163.com> Date: Wed, 27 Mar 2024 17:16:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=91=E5=9D=97=E5=8C=B9=E9=85=8D=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E8=BF=94=E5=9B=9E=E8=B5=B7=E5=A7=8B=20x=20=E5=9D=90?= =?UTF-8?q?=E6=A0=87=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ddddocr/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ddddocr/__init__.py b/ddddocr/__init__.py index 28c27d6..61760ef 100644 --- a/ddddocr/__init__.py +++ b/ddddocr/__init__.py @@ -2682,7 +2682,8 @@ class DdddOcr(object): min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(res) h, w = target.shape[:2] bottom_right = (max_loc[0] + w, max_loc[1] + h) - return {"target_y": target_y, + return {"target_x": target_x, + "target_y": target_y, "target": [int(max_loc[0]), int(max_loc[1]), int(bottom_right[0]), int(bottom_right[1])]} def slide_comparison(self, target_bytes: bytes = None, background_bytes: bytes = None):