add assert

pull/3218/head
WenmuZhou 2021-06-30 10:50:13 +08:00
parent fdaf1f1577
commit 88a8be1297
1 changed files with 1 additions and 0 deletions

View File

@ -625,6 +625,7 @@ def get_rotate_crop_image(img, points):
points[:, 0] = points[:, 0] - left
points[:, 1] = points[:, 1] - top
'''
assert len(points) == 4, "shape of points must be 4*2"
img_crop_width = int(
max(
np.linalg.norm(points[0] - points[1]),