opencv读取图片
再使用numpy截取图片
// image path is the file path
// get gray scale image
image = cv2.imread(os.path.join(image_path, 'time010.png'), 0)
image = image[x:x + width, y:y + hight]
cv2.imwrite(os.path.join(image_path, 'test.png'), image)
opencv读取图片
再使用numpy截取图片
// image path is the file path
// get gray scale image
image = cv2.imread(os.path.join(image_path, 'time010.png'), 0)
image = image[x:x + width, y:y + hight]
cv2.imwrite(os.path.join(image_path, 'test.png'), image)