Enlarging images
Have you ever tried resizing an image to make it larger? This usually results in loss of quality, with the enlarged image looking blurry.
The good news is that the algorithm used by scikit-image works very well for enlarging images up to a certain point.
In this exercise you'll enlarge an image three times!!
You'll do this by rescaling the image of a rocket, that will be loaded from the data
module.

Diese Übung ist Teil des Kurses
Image Processing in Python
Anleitung zur Übung
- Import the module and function needed to enlarge images, you'll do this by rescaling.
- Import the
data
module. - Load the
rocket()
image fromdata
. - Enlarge the
rocket_image
so it is 3 times bigger, with the anti aliasing filter applied. Make sure to setmultichannel
toTrue
or you risk your session timing out!
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Import the module and function to enlarge images
from skimage.____ import ____
# Import the data module
from skimage import ____
# Load the image from data
rocket_image = ____.____()
# Enlarge the image so it is 3 times bigger
enlarged_rocket_image = ____(rocket_image, ____, ____=____, multichannel=____)
# Show original and resulting image
show_image(rocket_image)
show_image(enlarged_rocket_image, "3 times enlarged image")