반응형
** 파이썬 이미지 크기 변형하기 **
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))
'Python' 카테고리의 다른 글
Perspective transform (0) | 2017.11.21 |
---|---|
how to plot a histogram : matplotlib (0) | 2017.09.26 |
How to show an image : skimage library (0) | 2017.07.21 |
How to plot a graph : mathplotlib library (0) | 2017.07.21 |
[NYU depth] How to read NYU depth dataset in python (0) | 2017.07.20 |