Python Image Crop Code
2021. 8. 6. 17:11ㆍIT
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()
반응형
'IT' 카테고리의 다른 글
Python / Image to PDF (0) | 2021.10.29 |
---|---|
Python Curve Editor (0) | 2021.08.06 |
Python Image + Masking Image 합성 (0) | 2021.08.06 |
Python Making Image 만들기 (0) | 2021.08.06 |
Yocto Project Quick Build / 소스받고 빌드해보기 (0) | 2021.06.22 |