PCT_MEDIAN_CVIP
pct_median_cvip() - performs Image segmentation using PCT/Median cut algorithm..
Contents
SYNTAX
outImage = pct_median_cvip( inImage, numColors )
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 uin16 or double class.
- numColors - Number of colors. NumColors = 2(default)
Output Parameter include :
- outImage - Segmented image having same size of input image.
DESCRIPTION
The function performs the principal components transform (PCT) of the input image, and then performs the Median cut segmentation. The segmented image in PCT domain will be mapped back to original 3-D color space by taking inverse-PCT.
REFERENCE
1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.
EXAMPLE
%original image I = imread('butterfly.tif'); % default numColors = 2 O1 = pct_median_cvip(I); N = 8; %number of colors O2 = pct_median_cvip(I,N); %numColors = 8 % Display input image figure;imshow(I);title('Input image'); % Display output image figure;imshow(remap_cvip(O1,[]));title('Output image with default parameters'); figure;imshow(remap_cvip(O2,[]));title('Output image with user defined parameters');
CREDITS
Author: Mehrdad Alvandipour, october 2016
Copyright © 2017-2018 Scott
E Umbaugh
For updates visit CVIP Toolbox Website