TRANSLATE_CVIP
translate_cvip() - Translates or moves the entire image or a part of the image..
Contents
SYNTAX
outImage = translate_cvip(inImage, shiftOffset, grayFill)
Input Parameters include :
- inImage - 1-band input image of MxN size or 3-band input image of MxNx3 size. The input image can be of uint8 or uint16 or double class.
- shiftOffset - Row and column co-ordinates of upper-left pixel to move Row or column vector of length 2. shiftOffset(1): row co-ordinate shiftOffset(2): column co-ordinate ([M/2 N/2] | default)
- grayFill - Gray value to fill vacated area. (128 | default)
Output Parameter includes :
- outImage - Translated image
DESCRIPTION
The function translates the entire image or a part of the image. Translate can perform two different operations, horizontal and vertical translation of an image. Translation moves the image as a whole; it can either wrap the image around the 'edges' or fill vacated areas with a constant value.
REFERENCE
1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.
EXAMPLE
% Read Image I = imread('butterfly.tif'); % Calling function with default parameters O1 = translate_cvip(I); %O1 is of double class and the %range [0 255] % Calling function with user defined parameters O2 = translate_cvip(I,[256 256],0); % 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 specified parameters');
CREDITS
Author: Norsang Lama, June 2017
Copyright © 2017-2018 Scott
E Umbaugh
For updates visit CVIP Toolbox Website