CONDREMAP_CVIP
condremap_cvip() - Performs Conditional remapping of image data.
Contents
SYNTAX
[ outImage ] = condremap_cvip( inImage, rangeIn, datatype)
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.
- datatype - Class of the remapped image.It can be uint8 or uint16 or double.
Output Parameter include :
- outImage - Remapped image having same size of input image.But, the class can be either user specified class type or or same class as of input image.
DESCRIPTION
The function linearly remaps the data range of input image into new range.The user has choice to either specify the new range or let the function choose the default parameter.For the remapped image, the user can explicitly define the new datatype or let the function to select same class of input image.First, it remaps the image into the user defined range.Second, the function checks whether the new range is within the maximum range of user specfied datatype.If not, the function remaps the output image into the maximum range of user specified datatype.
REFERENCE
1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.
EXAMPLE
% Read image I = imread('butterfly.tif'); % call function with default range & class O1 = condremap_cvip(I); % new range rangeIN = [0 4e+4]; % call function with user specified range and class O2 = condremap_cvip(I,rangeIN,'uint16'); % display input image figure;imshow(I);title('Input image'); % display output image figure;imshow(O1,[]);title('Output image with default parameters'); figure;imshow(O2,[]);title('Output image with user specified parameters');
CREDITS
Author: Norsang Lama, March 2017
Copyright © 2017-2018 Scott
E Umbaugh
For updates visit CVIP Toolbox Website