fatheral / matlab_imresize

Python implementation of MatLab imresize function
MIT License
154 stars 41 forks source link

skimage #6

Open michaelscheinfeild opened 5 years ago

michaelscheinfeild commented 5 years ago

since sometimes it is deprecated we can change the main file

import numpy as np
from scipy import ndimage
import matplotlib.pyplot as plt
from imresize import *

img_uint8 = ndimage.imread("test\\lena_512x512.png")
plt.figure()
plt.imshow(img_uint8)
new_size = (123, 234)
new_img_uint8 = imresize(img_uint8, output_shape=new_size)

plt.figure()
plt.imshow(new_img_uint8)

plt.show()