接之前教程代码:
提取100 × 100像素的ROI(感兴趣的区域),输入图像x=320,y=60, x=420,y=160
roi = image[0:100, 320:420]
cv2.imshow("ROI", roi)
cv2.imwrite("cv_cut_thor.jpg", roi)
cv2.waitKey(0)
效果:
标签:roi,裁剪,ROI,入门教程,cv2,320,420,视觉,100
来源: https://blog.csdn.net/com_fang_bean/article/details/113776135