Due date: 15/02/2016 23:59 (After that, Elvis will left the building.)
Upload location: (will be provided later)
Ordinary HW:
Create a MATLAB function which takes one argument:- Path to an image, e.g., "c:\\smiley.bmp"
and triple the size of the image and display it. Use nearest neighbor interpolation.
Note: You can convert the image to a grayscale one in order not to deal with a 3D matrix. You are not allowed to use off-the-shelf MATLAB functions for zooming. The point of the HW is to implement a zooming and interpolation method. You can use MATLAB functions for other purposes, e.g., I = imread("c:\\smiley.bmp");
Bonus +50%:
via GIPHY
To make the function support any zoom amount, make the function take two arguments, one is the path as in ordinary HW, the other one is:
2. An integer indicating the desired amount of zoom, e.g., 5
And use bilinear interpolation.
Bonus + Lefting the lecturer speechless:
Do all the above and also support zooming in fractions, e.g., zoom: 3.42.
Good luck,
Kasım
-----------
Have a look at these:
https://en.wikipedia.org/wiki/Linear_interpolation
https://en.wikipedia.org/wiki/Image_scaling
No comments:
Post a Comment