From 8f9c36b730d64c46381f8a90da78404987588fc0 Mon Sep 17 00:00:00 2001 From: berak Date: Wed, 9 Feb 2022 17:14:05 +0100 Subject: [PATCH] Update text_detection.py there is a recent change, how `std::vector` is wrapped in python, it used to be a 2d array (requirig that weird `[0]` indexing), now it is only 1d --- samples/dnn/text_detection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/dnn/text_detection.py b/samples/dnn/text_detection.py index 22c4f6b5ec..c4263061ef 100644 --- a/samples/dnn/text_detection.py +++ b/samples/dnn/text_detection.py @@ -187,7 +187,7 @@ def main(): indices = cv.dnn.NMSBoxesRotated(boxes, confidences, confThreshold, nmsThreshold) for i in indices: # get 4 corners of the rotated rect - vertices = cv.boxPoints(boxes[i[0]]) + vertices = cv.boxPoints(boxes[i]) # scale the bounding box coordinates based on the respective ratios for j in range(4): vertices[j][0] *= rW