import cv2
from PIL import Image
img = Image.open(‘lady.jpg’)
area=(100,100,600,600)
cropped_img=img.crop(area)
#cv2로 읽어야 함
#h, w, c = im.shape
#print(‘width: ‘, w)
#print(‘height: ‘, h)
#print(‘channel:’, c)
img.show()
cropped_img.show()
import cv2
from PIL import Image
img = Image.open(‘lady.jpg’)
area=(100,100,600,600)
cropped_img=img.crop(area)
#cv2로 읽어야 함
#h, w, c = im.shape
#print(‘width: ‘, w)
#print(‘height: ‘, h)
#print(‘channel:’, c)
img.show()
cropped_img.show()