Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

21
Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki

Transcript of Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Page 1: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Segmentation in color space using clustering

Student: Yijian Yang

Advisor: Longin Jan Latecki

Page 2: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Index

• Introduction– Segmentation

– Color Space

• Segmentation using both color space and spatial space information– Basic concept

– DBScan algorithm

• Result

Page 3: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Segmentation

• Definition

A process of separating of individual perception of the scene.

• Importance

The first step in image processing.

Page 4: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Segmentation Techniques

• Histogram thresholdingAssumption: The image is composed of regions with

different color ranges.

• Edge-based approachDifficulty: Need for joining separated edges.

• Region-based approach– Region growing

– Region splitting

– Region merging

– Their combination

Page 5: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Color Space

• There are many different existing color spaceExample: RGB, YUV, HSV, Munsell system and so on.

• Munsell color system is the best in simulating the human color vision.

Munsell Hue, Munsell Value, Munsell Chroma

Page 6: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

RGB to HVC

Page 7: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Basic Concept(1)• Distance

Page 8: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Basic Concept (2)

• Eps of a point

The neighborhood within a radius of a given point.

• Core point

If the Eps of a point contains at least a minimum number, MinPts, of points with similar property, it is a core point.

Page 9: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Basic Concept(3)

• Directly density-reachablePoint p is directly density-reachable from a point q if

It is obviously, directly density-reachable is symmetric for pairs of core point. But in general, it is not symmetric if one core point and one border point are involved.

Page 10: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Basic Concept(4)

• Density-reachable

A point p is density-reachable from a point q wrt. Eps and MinPts if there is a chain of points p1, p2, …, pn, p1=q pn=q such that pi+1 is directly density-reachable from pi.

Page 11: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Basic Concept(5)

• Density-connected

A point p is density-connected to a point q wrt. Eps and MinPts if there is a point o such that both p and q are density-reachable from o wrt. Eps MinPts.

Page 12: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Density-based Algorithm

1. Search the unlabeled pixels in an image in order of current core pixel and current core region.

2. If a core pixel p is found, a new cluster is created. Then we iteratively collect unlabeled pixels that are density-connected with p, and label these pixels with same cluster label.

3. If there are still existing core pixels in the image, goto 2.4. For the pixels that are not included in any clusters, merge them

with the cluster that is adjacent to them and has the highest similarity in average color value with them

5. Label each cluster we find in the image as a segmentation region.

Page 13: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Spatial Eps and Minpts

• Spatial Eps

Simply select the size of Spatial Eps circle according to the size of image. The larger the image is , the larger its Spatial Eps circle will be.

• MinPts

MinPts is set to half of the number of pixels in the Spatial Eps circle, which means that we will consider the pixels whose color are same as the dominant color in the circle.

Page 14: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Color space Eps

• To determine the value of Hradius, Vradius, and Cradius.

Page 15: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Program List

• Segmentation: Main function

• RGB2HVC: Transformation function from RGB to HVC

• Get_radius: Calculate H, V, C radius

• ExpandCluster: Region growing method

• Region Query: Finding homogeneous pixels

• Color_distance: Calculate HVC color space distance

• Spatial_distance: Calculate spatial space distance

• ChangeAllId: Change label function

• Show_segmentation: Display the resulting image according to different label.

Page 16: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Result 1

Original Picture Segmented Pictures

Page 17: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Result 2

Original Picture Segmented Pictures

Page 18: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Result 3

Original Picture Segmented Pictures

Page 19: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Result 4

Original Picture Segmented Pictures

Page 20: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Reference

• Color image segmentation using density-based clustering

• A density-based algorithm for discovering clusters in large spatial databases with noise

• Density-based clustering in spatial databases: the algorithm GDBSCAN and its application

• Color space analysis and color image segmentation

• Color segmentation techniques

Page 21: Segmentation in color space using clustering Student: Yijian Yang Advisor: Longin Jan Latecki.

Thanks!