You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
279 B

2 years ago
from cv2 import selectROI
from function.GeometricTrans.LargeSmall import largeSmall
def cut(img,rate):
# 得到手动裁剪的矩形区域
bbox = selectROI(img, False)
cut = img[bbox[1]:bbox[1] + bbox[3], bbox[0]:bbox[0] + bbox[2]]
return largeSmall(cut, rate)