RELATIVE_REMAP_CVIP
relative_remap_cvip() - remaps the data range of input image.
Contents
SYNTAX
[ outImage ] = relative_remap_cvip( inImage, rangeIn )
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. If double class, the function assumes the data range of image is from 0 to 1.
- rangeIn - New data range of image. A row vector or column vector of length two. First element should be low end and second element should be high end.
Output Parameter includes :
- outImage - Remapped image having same size and same class as that of input image.
DESCRIPTION
The function linearly remaps the data range of input image into new range.The user has the choice to either specify the new range or let the function choose the default range.If the user doesn't pass the range in input parameter,the default range is maximun possible range of the datatype of input image.And in case of multiband image,the function performs the relative remapping, and to perform it,first,it finds the band having highest range.Second,it finds the mapping parameters corresponding to that band and maps all bands using same parameters.
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 range O1 = relative_remap_cvip(I); % Calling function with new range user specified rangeIN = [0 200]; O2 = relative_remap_cvip(I,rangeIN); % Display input image figure;imshow(I);title('Input Image'); % Display output image figure;imshow((O1));title('Relative remapped Image with default parameters') figure;imshow((O2));title('Relative remapped Image with User specified parameters');
CREDITS
Author: Norsang Lama, March 2017
Copyright © 2017-2018 Scott
E Umbaugh
For updates visit CVIP Toolbox Website