对图片进行剪切代码如下:
import cv2
img = cv2.imread('image1.jpg',1)
imgInfo = img.shape
dst = img[100:200,200:300]
cv2.imshow('image',dst)
cv2.waitKey(0)
运行结果如下:
对图片进行剪切代码如下:
import cv2
img = cv2.imread('image1.jpg',1)
imgInfo = img.shape
dst = img[100:200,200:300]
cv2.imshow('image',dst)
cv2.waitKey(0)
运行结果如下: