Be the first to rate this file! 11 Downloads (last 30 days) File Size: 1.91 KB File ID: #28965
image thumbnail

zooming an image using nearest neighbor interpolation

by Dimuthu Senanayaka

 

06 Oct 2010 (Updated 06 Oct 2010)

nearest neighbor interpolation is used to zoom an image by any positive real number(any n>0).

| Watch this File

File Information
Description

zooming a given image by a given positive factor can be done..
copy nearest_neighbor_zoom.m file and the image file that should be zoomed to your work directory.
if the name of the image file is image.jpg and the zooming factor needed is 2.23,
run following command on command window.
nearest_neighbor_zoom('image.jpg',2.23);

Leave your comments...

MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
06 Oct 2010 Jan Simon

No help section, no H1 line, no checks of input. The function fails for indexed images.
The processing is performed by nested FOR loops without pre-allocation, such that the efficiency is very very low. Therefore this function is neither useful for real applications nor for education.
Take a look into INTERP2, which performs a dramatically more efficient nearest neighbor interpolation.

Please login to add a comment or rating.
Updates
06 Oct 2010

edited the description.

Tag Activity for this File
Tag Applied By Date/Time
image processing Dimuthu Senanayaka 06 Oct 2010 10:06:27

Contact us at files@mathworks.com