change array dtype of boxes to more explicit dtype

This commit is contained in:
Florian Förster 2025-10-09 08:13:51 +02:00
parent d5a9071f9d
commit 67e49a47d8

View File

@ -166,7 +166,7 @@ def measure_length(
# !! should only be newer OpenCV versions
# box = cv2.cv.BoxPoints(rbox) if is_cv2() else cv2.boxPoints(rbox)
box = cv2.boxPoints(rbox)
box = np.array(box, dtype="int")
box = np.array(box, dtype=np.int32)
# order the points in the contour in top-left, top-right, bottom-right, and bottom-left
box = perspective.order_points(box)