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 :
- inImage - Input image of MxN or MxNxB size.The input image can be of uint8 or uint16 or double class.
- quadrant - Specify a region of the image.It is of string class.
'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)
- factor - Zoom factor (1.0 - 10.0) (2 | default)
- method - Zoom methods. 0 -----> zero-order hold
1 -----> first-order hold (linear interpolation)
(0 | default)
- startPoint - Upper-left pixel location of a subregion. Only needed if 'def' option is selected for quadrant parameter.
startPoint(1) ---> row co-ordinate
startPoint(2) ---> column co-ordinate
- sizeSR - Size of the sub-region. Only needed if 'def' option is selected for quadrant parameter.
sizeSR(1) ---> height
sizeSR(2) ---> width
Output Parameter includes :
- outImage - Zoom image
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