402 likes | 563 Views
C o l o r image segmentation – an innovative approach. base on a paper by Tie Qi Chen, Yi Lu. Course Presentation. Amin Fazel May 2003 Sharif University of Technology. Image segmentation. Definition Process of partitioning image pixel based on selected image features
E N D
Color image segmentation– an innovative approach base on a paper by Tie Qi Chen, Yi Lu Course Presentation Amin Fazel May 2003 Sharif University of Technology
Image segmentation • Definition • Process of partitioning image pixel based on selected image features • Pixel of same region spatially connected and have similar image feature • Level of subdivision depends on the problem • Segmentation should stop when the objects of interest have been isolated Machine Vision Course Presentation
Image segmentation • Applications • Image analysis • Machine vision • Target acquisition • Object recognition • … Machine Vision Course Presentation
Color image segmentation • Definition • Here selected segmentation feature is color • This process group pixels into same region that • Spatially connected • Have similar color feature Machine Vision Course Presentation
Unsupervised color image segmentation • Definition • If below knowledge is not available • Number of regions present in the image • Type of region present in the image Machine Vision Course Presentation
Choosing a suitable color space • Common color spaces • RGB, HSI, YIQ, CMY • Benefits of L*u*v* color space 1. covers the whole of the visible gamut of colors 2. the difference between two colors can be measured by their Euclidean distance 3. additive mixture of two colors lies on the line joining them. 4. decreases the chance that any given step in color value will be noticeable on a display Machine Vision Course Presentation
Choosing a suitable color space • L*u*v* parameters • L* is intensity (lightness) : 0 to 100 • u* is redness-greenness : -127 to 128 • v* is yellowness-blueness : -127 to 128 • Converting formula • by CIEstandard formula RGB and L*u*v* colorspace Machine Vision Course Presentation
Color histogram • Definition • Three dimensional (3D) discrete feature space • Provide the color distribution of the image • Is obtained by discretizing the colors in the color space counting the number of times each discrete color occurs in the image Machine Vision Course Presentation
Color histogram • Example : Machine Vision Course Presentation
Overview of the system • The system consists of two stages • Fuzzy clustering algorithm to generate clusters of similar colors • Using a color histogram of an image • The output of the fuzzy clustering algorithm • Set of non-overlapping color clusters, CL1 • Each cluster in CL1 contain similar color • All colors in the same cluster are assigned with the same color label Machine Vision Course Presentation
Overview of the system • Region segmentation algorithm agglomerates the initial clusters based on Spatial connection & Color distance between the adjacent regions • The second set of clusters, CL2, is obtained by labeling image pixels with the corresponding color clusters in CL1 • Therefore , |CL2| >> |CL1| • In this stage merges the selected adjacent regions Machine Vision Course Presentation
A color image segmentation system Stage 2: Region segmentation colorImage a color histogram CL2 CL1 Compute Histogram In a color space Map initial clusters to image domain Merging neighboring clusters Fuzzy clustering in color histogram domain Stage 1: colorsegmentation CL3:a set of color region Machine Vision Course Presentation
A fuzzy clustering algorithm • Applying fuzzy logic to color clustering • Consider a cluster of similar colors as a fuzzy set • Represent the likeliness of a color pixel belonging to a fuzzy set by a fuzzy membership function Machine Vision Course Presentation
A fuzzy clustering algorithm • Two critical issues involved in a fuzzy clustering algorithm • Generating fuzzy membership function • Defining a color distance function between two color clusters and a distance function between a color and a color cluster Machine Vision Course Presentation
A fuzzy clustering algorithm • Fuzzy membership function • Let be the set of possible colors in the image • Use Gaussian function to define the probability of a color C belonging to a color cluster • P is the center of the cluster • R is the radius of the cluster • ||-|| denote the Euclidean distance between a color and a cluster Machine Vision Course Presentation
A fuzzy clustering algorithm • …Fuzzy membership function • The probability of a color belonging to the k-th cluster and not belonging to any other cluster • M is the number of clusters • is used as a fuzzy membership function for color k in the color space Machine Vision Course Presentation
A fuzzy clustering algorithm • Fuzzy membership function Machine Vision Course Presentation
A fuzzy clustering algorithm • Important characteristics of membership function • Belief value decrease when distance between a color C and a color cluster P increase • Suppresses the belief value of a color to a cluster when it is close to the other clusters • Prevent two clusters moving towards each other during the optimization process • The belief value of a color belonging to a cluster is always greater than zero Machine Vision Course Presentation
A fuzzy clustering algorithm • Measure of goodness of fit • Express how well a given n-cluster description matches a given set of data • Objective function (mean square error) • The colors near the border of each cluster give large contribution to the mean square error Machine Vision Course Presentation
A fuzzy clustering algorithm • Algorithm • First cluster is generated by finding such that • becomes the initial center of cluster 1, i.e. • The center of the first cluster is optimized through the following iteration until Machine Vision Course Presentation
A fuzzy clustering algorithm • … Algorithm • For M>1, the initial center of cluster , is set to such that • Function V is the probability of a color not belonging to any existing cluster • This new cluster is optimized using the previous iterative procedure • The algorithm stops generating a new cluster M when Machine Vision Course Presentation
A fuzzy clustering algorithm • Effect of objective function used in the cluster generation Machine Vision Course Presentation
A fuzzy clustering algorithm • The only parameters that need to be evaluated are • R, the cluster radius • , the distance between the cluster generated in the previous iteration and the current iteration • , the stop threshold of cluster generation • Parameters and have less effect on the clustering result • The most critical parameter is R Machine Vision Course Presentation
A fuzzy clustering algorithm • More on Cluster Radius • Determines how much the clusters can overlap with each other in the histogram domain • This parameter is provided by the user • For image that have coarse feature a large R is recommended • A smaller R is a good choice for image with fine detailed color feature Machine Vision Course Presentation
A fuzzy clustering algorithm • Effects of the parameter R R=64 R=32 R=16 R=8 Machine Vision Course Presentation
Image segmentation in image domain • At this stage system map the clusters in CL1 to the image domain to obtain CL2 • Each cluster in CL2 contains pixels that are • Spatially connected • Belong to the same color cluster in CL1 • Region segmentation uses following parameters • The color distance among neighboring clusters in the spatial domain • Cluster size • The maximum number of clusters in CL3 Machine Vision Course Presentation
Image segmentation in image domain • Investigation of clustering merging methods • These methods use a common parameter, max_cls, to control the max number of clusters • Attempts to merge the adjacent clusters that are similar in colors • This algorithm use a control parameter to denote color difference threshold Machine Vision Course Presentation
Image segmentation in image domain • Considers the size of clusters as the only selection criterion • It selects the smallest clusters and merges the clusters with one of its neighbors to witch It has the smallest color distance • Considers the color distance as the more important criterion in cluster merging • This algorithm consists of three passes of merging Machine Vision Course Presentation
Image segmentation in image domain • …continue • The algorithm repeatedly merges the smallest clusters with their neighbors that have the closet color distance • The algorithm selects a pair of two adjacent clusters that has the smallest color distance within the entire image to merge • The algorithm repeatedly merges the smallest cluster with its closest neighbors in color distance Machine Vision Course Presentation
Image segmentation in image domain • Comparison of clustering result generated by tree different spatial merging method • An egg nebula image • Clusters generated by the fuzzy clustering algorithm • Clustering result by method 1 • Clustering result by method 2 • Clustering result by method 3 Machine Vision Course Presentation
Image segmentation in image domain • computing the color distance between two neighboring clusters A and B • The first function is based on the color difference of the border pixels of clusters A and B. • where Machine Vision Course Presentation
Image segmentation in image domain • and • Where and are the minimum and maximum coordinates of all pixels in A that have direct neighbors in B • Similarly, Machine Vision Course Presentation
Image segmentation in image domain • Illustration of border points between region A and B • Border (A, B) contain the yellow points within the red bounding box • Border (B, A) contain the blue points within the red bounding box Machine Vision Course Presentation
Image segmentation in image domain • The second color distance function is based on the central color of a cluster defined as: • where p is a pixel € A • |A| is the size of A • C(p) is the 3-D color vector of pixel p in L*u*v space the color distance of two clusters is measured using the Euclidean distance between their central color vector Machine Vision Course Presentation
Results of implementation • Clustering result • The original image • 4 clusters generated by the fuzzy clustering algorithm • 4 clusters generated by the segmentation algorithm in image domain Machine Vision Course Presentation
Results of implementation • An example of applying the image segmentation system to a car image • The original image • The image 12 color clusters generated by the fuzzy clustering algorithm and 598 spatial clusters in the image domain • The segmentation result Machine Vision Course Presentation
Results of implementation • Image segmentation result on two face images • Setting the cluster radius parameter to R=8, 16, 32 and 64 Machine Vision Course Presentation
Color image segmentation– an innovative approach Based on a paper by Tie Qi Chen, Yi Lu Course Presentation Thanks For Your Attention The End