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 :

Output Parameter include :

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