mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 09:25:45 +08:00
Update text_detection.py
there is a recent change, how `std::vector<int>` is wrapped in python, it used to be a 2d array (requirig that weird `[0]` indexing), now it is only 1d
This commit is contained in:
parent
972a4b95b6
commit
8f9c36b730
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user