IGS_CVIP
igs_cvip() - performs gray level quantization of an image.
Contents
SYNTAX
[ outImage] = igs_cvip( inImage, graylevel)
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 double class. If double class, the function assumes the data range of image is from 0 to 1.
- graylevel - Number of gray levels. It must be a power of 2, but not greater than 256.
Output Parameter includes:
- outImage - Quantized image having same size and same class of input image.
DESCRIPTION
The function performs the gray level quantization of an image using improved gray scale (IGS) method. The number of gray-level must be a power of 2. IGS minimizes false contouring that can occur in areas that appear to be uniform, but also adds a dithered effect to the image which may not be desired for segmentation. It is recommended that morphological filtering is performed, for example, erosion before using the segmented image for feature extraction.
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 ,default graylevel = 4 O1 = igs_cvip(I); % new graylevel graylevel = 16; % Calling function with user specified graylevel O2 = igs_cvip(I,graylevel); % Display input image figure;imshow(I);title('Input 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