본문 바로가기

Python

How to resize an image : skimage library

반응형

** 파이썬 이미지 크기 변형하기 **

In matlab, it is very easy to resize an image. 

However, in python, you need to know which library do I have to import before resizing. 

In python, skimage library supports resizing an image like matlab.


Here is an example. Enjoy!

from skimage.transform import resize
import skimage.io as io

img = io.imread(file_name)
img_resize = resize(img, (target_height, target_width))