代码如下
import os
import cv2
for i in range(1,201):
if i==169 or i==189:
i = i+1
pth = C:\\Users\\Desktop\\asd\\+str(i)+.bmp
image = cv2.imread(pth) //从指定路径读取图像
cropImg = image[600:1200,750:1500] //获取感兴趣区域
cv2.imwrite(C:\\Users\\Desktop\\qwe\\+str(i)+.bmp,cropImg) //保存到指定目录
2021-10-28 17:10:32
30KB
c
nc
op
1