remap_cvip() - remaps the data range of input image.
[ outImage ] = 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.
The function linearly remaps the data range of input image into a new range. The user has the choice to either specify the new range or let the function choose the default parameter. If the user doesn't pass the rangeIn input parameter, the program selects the maximun range of the datatype of input image as the new range. And in case of multiband image, the function performs the remapping in each band irrespective of the range of other bands.
1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.
% Read images I = imread('butterfly.tif'); % Calling function with default range O1 = remap_cvip(I); % Calling function with user defined parameters rangeIN = [0 200]; O2 = remap_cvip(I,rangeIN); % Display input image figure;imshow(I);title('InputImage'); % Display output image figure;imshow((O1));title('Remapped Image with default parameters') figure;imshow((O2));title('Remapped Image with User specified parameters');