📅  最后修改于: 2022-03-11 14:45:28.853000             🧑  作者: Mango
import cv2
import numpy as np
try:
from PIL import Image
except ImportError:
import Image
img_file = '/home/test_crop.jpg'
im = Image.open(img_file).convert('L')
im = im.crop((55, 563, 1603, 975))
im.save('_0defects.jpg')