From f9bd83c8547054357b0ecc55dadda787e5422dad Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Fri, 24 Sep 2021 15:35:42 +0900 Subject: [PATCH] fix cast in text detection sample --- samples/dnn/text_detection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/dnn/text_detection.py b/samples/dnn/text_detection.py index 7014a80148..22c4f6b5ec 100644 --- a/samples/dnn/text_detection.py +++ b/samples/dnn/text_detection.py @@ -214,8 +214,8 @@ def main(): 0.5, (255, 0, 0)) for j in range(4): - p1 = (vertices[j][0], vertices[j][1]) - p2 = (vertices[(j + 1) % 4][0], vertices[(j + 1) % 4][1]) + p1 = (int(vertices[j][0]), int(vertices[j][1])) + p2 = (int(vertices[(j + 1) % 4][0]), int(vertices[(j + 1) % 4][1])) cv.line(frame, p1, p2, (0, 255, 0), 1) # Put efficiency information