答案 0 :(得分:0)
如果您已经知道裁剪框的确切尺寸,那么很容易
box_count = 3
box_w = 50
box_h = 50
regions = []
for r in range(1,box_count+1):
regions.append(img[(r-1)*box_h:r*box_h, 0:box_w]) #img is the image
for region in regions:
cv2.imshow("r", region)
cv2.waitKey(1000)