ZOOM_CVIP

zoom_cvip() - Zooms an entire image or a part of the image by a given factor.

Contents

SYNTAX

  outImage = zoom_cvip( inImage, quadrant, factor, method, startPoint, sizeSR)

Input Parameters include :

                    'ul' ---->  upper left quadrant.
                    'ur' ---->  upper right quadrant.
                    'll' ---->  lower left quadrant.
                    'lr' ---->  lower right quadrant.
                    'all' ----> entire image.
                    'def'---->  specify the subregion.( use the input
                                arguments #5 and #6 to define subregion)
                                                        ('ul' | default)
                     1 -----> first-order hold (linear interpolation)
                                                           (0 | default)
                     startPoint(1) ---> row co-ordinate
                     startPoint(2) ---> column co-ordinate
                     sizeSR(1) ---> height
                     sizeSR(2) ---> width

Output Parameter includes :

DESCRIPTION

The function performs the zoom operation on an entire image or a part of the image. The user can specify the quadrants or the sub-region of the image. The maximum zoom factor allowed is 10. Two zoom methods are available: zero-order and first order zooming algorithms.

REFERENCE

1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.

EXAMPLE

% Read Image

 I = imread('cam.bmp');

% Calling function with default parameters

 O1 = zoom_cvip(I);

% Calling functio with user defined parameters

 O2 = zoom_cvip(I,'ur', 2.0, 0);

 O3 = zoom_cvip(I,'def',3.0, 0, [100  100], [156 120]);

% Display input image

 figure;imshow(I);title('Input Image');

% Display output image

 figure; imshow(O1/255);title('output Image with default parameters');
 figure; imshow(O2/255);title('output Image with user defined parameters');
 figure; imshow(O3/255);title('output Image with user defined parameters');

CREDITS

Author: Norsang Lama, June 2017
Copyright © 2017-2018 Scott E Umbaugh
For updates visit CVIP Toolbox Website