兄弟萌,话不多说,show me the code!
import cv2
img_path = 'D:\projects\data_augment/test.jpg'
img = cv2.imread(img_path) # 读取图片
scale = .5
img_resize = cv2.resize(img,(int(img.shape[1]*scale),int(img.shape[0]*scale))) # resize
print('img_resize.shape:',img_resize.shape) # 查看图片shape
crop = img[354:1742,753:2184] # [ymin:ymax,xmin:xmax]
crop = cv2.resize(img,(int(img.shape[1]*scale),int(img.shape[0]*scale)))
cv2.imshow('crop',crop)
cv2.waitKey(0)
cv2.imshow('w',img_resize) # 显示resize之后的image
cv2.waitKey(0)