Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction Segmentation plays an important part in computer vision and image processing applications. Its goal is to find regions that represent objects.

Similar presentations


Presentation on theme: "Introduction Segmentation plays an important part in computer vision and image processing applications. Its goal is to find regions that represent objects."— Presentation transcript:

1 Introduction Segmentation plays an important part in computer vision and image processing applications. Its goal is to find regions that represent objects. Image segmentation method look for objects that either : 1.have some measure of homogeneity within themselves or 2.have some measure of contrast with their objects on the board.

2  Noise in the image - typically caused by the camera, the lenses, the lightning or the signal path. - can be reduced by the use of the preprocessing methods  Spatial digitization -cause problems regarding connectivity of objects. -can be resolved with careful connectivity definitions and heuristics. Image Segmentation Problem

3 Connectivity  Connectivity refers to the way in which we define an objects. For example, after we have segmented an image, which segments should be connected to form an objects. Or at lower level, when searching image for homogeneous regions, how do we define which pixel are connected.  Pixel has 8 possible neighbors : i.Two horizontal neighbors ii.Two vertical neighbors iii.Four diagonal neighbors  Connectivity can be defined in 3 different ways : i.Four connectivity ii.Eight connectivity iii.Six connectivity

4 Connectivity cont. Figure A. connectivity a. Four connectivityb. Eight connectivity

5 Connectivity cont. c. Six connectivity NW/SEd. Six connectivity NE/SW

6 Image segmentation techniques can be divided into 3 main categories which are : 1.region growing and shrinking 2.clustering methods 3.boundary detection Segmentation Techniques

7 Region growing and shrinking is performed by finding homogenous regions and changing them until they no longer meet the homogeneity area. Region Growing and Shrinking Figure B. Growing & Shrinking

8 Clustering looks for data that can be grouped in domains other than the spatial domain. Clustering Figure C. Clustering

9 Boundary detection is often achieved using a differentiation operator to find lines or edges, followed by post processing to connect the points into borders Boundary Detection Figure D. Boundary Detection

10 Region growing and shrinking method segment an image into regions by operating principally in the r^c (row, column)-based image space. Methods that can combine local and global techniques, such as split and merge, are referred to as state space techniques and use graph structures to represent the regions and their boundaries. Region Growing and Shrinking

11 The split and merge techniques proceeds as follows : 1. Define a homogeneity test. This involves defining a homogeneity measure, which incorporate brightness, color, texture and determining a criterion the region must meet to pass the homogeneity test. 2.Split the image into equally sized regions. 3.Calculate the homogeneity measure for each region. 4.If the homogeneity test is passed for a region, then try to merge it with the neighbor(s). if the criterion is unfulfilled, the region is split. 5. Continue the process until all regions pass the homogeneity test. Region Growing and Shrinking cont.

12 Clustering technique threat individual elements placed into groups, that are based on some measure of similarity within the group. Difference than previous technique by domain other than the rc- based image space. example are color spaces, histogram spaces. The simplest method is to divide the space of interest into regions by selecting the center or median along each dimensions and splitting it there. Clustering Techniques

13 Clustering method is used in SCT/Center and PCT/Median segmentation algorithms Another method will include histogram thresholding and other complex statistical method. Recursive region splitting is a clustering method that uses a thresholding of histograms technique to segment the image by calculating for a specific set of feature, and then each of this histograms is searched for distinct peaks.The best peak is selected and split into regions based on this thresholding of the histogram. Clustering Techniques cont.

14 Splitting algorithm : 1.Consider the entire image as one region and compute histograms for each component of interest. 2.Apply a peak finding test to each histogram. Select the best peak and put threshold on either side of the peak. Segment the image into two regions based on the peak. 3.Smooth the binary thresholded image so that only a single connected sub region is left. 4.Repeats steps 1-3 for each region until no new subregions can be created, that is no histogram have significant peaks. Clustering Techniques cont.

15 Histogram peak finding : Number of pixel Figure E. Histogram peak finding Region 1 Region 2 Clustering Techniques cont. Two thresholds are selected, one on each side of the best peak. The image is then split into two regions. Region 1 corresponds to those pixel with feature values between the selected thresholds, known as those in the peak. Region 2 consists of those pixels with feature values outside the threshold.

16 Clustering Techniques cont. Figure E.1. Histogram Thresholding Segmentation a. Original image b. Histogram of image (a)

17 Clustering Techniques cont. c. Image after histogram thresholding using 4 gray levels d. Histogram of image (c)

18 Initially developed for the identification of variegated coloring in skin tumor images. Variegated coloring is features for diagnosis of melanoma, deadliest skin cancer. SCT decouples the color information from the brightness information. Due brightness effected by lightning condition, 2-dimensional color subspace (2 angles) used with more robust algorithm. Spherical Coordinate Transform - SCT

19 1. Convert the RGB triple into spherical coordinates (L, angle A, angle B). 2.Find the minima and maxima of angles A and B. 3.Divide the subspace, define by the maxima and minima, into equally seized blocks 4.Calculate the RGB means for the pixel values in each block. 5.Replace the original pixel values with the corresponding RGB means. SCT/Center Segmentation Algorithm

20 BLUE GREEN RED Angle A Angle B BLUE GREEN RED Angle A Angle B SCT/Center Segmentation Algorithm cont. a. The spherical coordinate transform separate the red, green and blue information into a two-dimensional color space defined by angles A and B, and a one-dimensional brightness space defined by L b. The color triangle Figure F. SCT

21 Angle A REDGREE N BLUE Angle B 1010 Center is WHITE in color (255,255,255) SCT/Center Segmentation Algorithm cont. c. The color triangle showing regions defined by 10 degree increments on angle A and angle B ++=

22 SCT/Center Segmentation Algorithm cont. Figure F.1 a. Original imageb. SCT/Center segmentation using 4 colors

23 1.The algorithm develops based on color compression map (24 bits/pixel color to average 2 bit/pixels color images). 2.PCT principal components transform is base on statistical properties of the image and can be applied to any K-dimensional mathematical space (e.g. 3 dimensional color space). 3.PCT use median split algorithm in image segmentation. It happens when PCT aligns the main axis along the variance path. (See figure below) Principal Component Transform – PCT

24 1.Find the PCT for the RGB image. Transform the RGB data using the PCT 2.Perform the median split algorithm: find the axis that has the maximal range (initially it will be the PCT axis). Divide the data along this axis so that there are equal numbers of points on either side if the split-the median point. Continue until the desired number of color reached. 3.Calculate averages for all the pixels falling within a single parallelepiped (box). 4.Map each pixel to the closest average color values, base on a Euclidean distance measure. PCT also used in image compression (coding), since this transform is optimal in the least-square-error sense. PCT/Median Algorithm

25 X Y Large range Y X Y’ X’ a. Original data exhibit a large range b. PCT aligns the main axis (x’) along the maximum variance path Principal Components Transform Figure G. PCT

26 Y’ X’ Y’ X’Small range c. The new axes are rotatedd. Transformed data now have a small range. Most of the variance, or information, is along the x’-axis, in one dimension rather than two, as in (a). Principal Components Transform cont.

27 Figure G.1 a. Original image b. PCT/Median segmented with 2 colors

28 Principal Components Transform cont. c. PCT/Median segmented with 4 colors d. PCT/Median segmented with 8 colors

29 Boundary Detection -One of the methods of segmentation. Done by defining objects through finding the boundaries between objects Algorithm a. Perform edge detection algorithm mark the points that are part of an image those points are then merged into line segments merge the lines to become object boundaries b. Image thresholding Done by considering the histogram of edge detection by finding the best valley Merge the existing image segments into boundaries through image linking

30 Boundary Detection cont. Figure H. Edge detection threshold Number of pixel Threshold Pixel value after edge detection

31 Boundary Detection cont. Figure H.1 Image after Sobel edge detection

32 Morphological Filtering The purpose of morphological filtering is to simplify the search for object of interest. Done by smoothing out object outlines thus filing small holes, eliminating small projections, etc. Two kinds of operation discussed here: a. Dilation b. Erosion

33 Dilation Allows objects to expand, thus potentially filling in small holes and connecting disjoint objects. The process is performed by laying the structuring element on the image and sliding it across the image in a manner similar to convolution. The difference is in the operation performed. Algorithm 1.If the origin of the structuring elements coincides with a ‘0’ in the image, there is no change; move to the next pixel. 2.If the origin of the structuring element coincides with a ‘1’ in the image, performed the OR logic operation on all pixel within the structuring element. Dilation

34 Figure I. Dilation Figure A shows a dilation process. Note that with a dilation operation all the ‘1’ pixels in the original image will retained, any boundaries will be expanded, and small holes will be filled. Dilation cont.

35 Erosion Shrinks objects by etching away (eroding) their boundaries. The erosion process is similar to dilation, but we turn pixels to ‘0’ not ‘1’. Algorithm 1.If the origin of the structuring element coincides with ‘0’ in the image, there is no change; move to the next pixel. 2.If the origin of the structuring element coincides with a ‘1’ in the image, and any of the ‘1’ pixels in the structuring element extended beyond the object (‘1’ pixels) in the image, then change the ‘1’ pixel in the image to a ‘0’. Erosion

36 X Figure J. Erosion Figure B shows that the only remaining pixels are those that coincides to the origin of the structuring element where the entire structuring element was contained in the existing object. Because the structuring element is 3 pixels wide, the 2-pixel-wide right leg of the image object eroded away, but the 3-pixel-wide left leg retained some of its center pixels. Erosion cont.

37 Opening = erosion followed by dilation Used to eliminate all pixels in region that are too small to contain the structuring element. Figure K.1.1 Original image. Opening and Closing

38 X Figure K.1.2 Structural element; x origin Figure K.1.3 Image after closing; dilation followed by erosion; original in dashes Opening and Closing cont.

39 Closing = dilation followed by erosion Used to fill in holes and small gaps. Different results even though both consist of erosion and dilation. They also can be extended to gray level images in different ways. Figure K.2.1 Original image Opening and Closing cont.

40 X Figure K.2.2 Structural element; x origin. Figure K.2.3 Image after closing; dilation followed by erosion. Opening and Closing cont.

41 Figure K.3.1 Opening a. Original image b. Image (a) after morphological opening using a 5x5 circular structuring element

42 Opening and Closing cont. Figure K.3.2 Opening and Closing b. Image (a) after morphological closing using a 5x5 circular structuring element

43 Binary Morphological Filtering Based on iterative approach (6-connectivity) Flexibility If pixel 1’s, all surround connectivity threat as 0 If pixel 0’s do nothing Then each pixel underlying each other on top with the high value promoted

44 Binary Morphological Filtering 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 0 1 11 1 0 01 1 11 1 0 1 11 11 1 1 1 1 00 0 1 1 1 0 0 01 1 1 0 0 0 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Figure L. Surrounds for Iterative Morphological Filtering

45 The different combination surrounds is define by : 1.The set of surround S, where a = 1. 2.A logic function, L(a,b),where b is the current pixel value, specifies the output of the morphological function. 3.The number of iterations n Binary Morphological Filtering cont.

46 Dilation, erosion, opening and closing can be extended to gray level images in various ways. By thresholding the gray level image to create binary image and then apply the existing operators is the easiest way. However this method is not suitable for many application because too much information is lost during the thresholding process. More information can be retained if we treat the image as a sequence of binary image by operating on each gray level as if it were the 1 value and assuming everything else to be 0. Binary Morphological Filtering cont.

47 a. Rectangular image grid with every other row shifted by one half pixel b. Hexagonal grid Binary Morphological Filtering cont. Figure L.1 Hexagonal Grid

48 Author……………………. Asyrul Naim Ibrahim IT 02153 Andi Rossi Abd Razak IT01496 Azmi Abd Rahman IT02240 Saiful Nizam Samsudin IT01508 Triple A and S


Download ppt "Introduction Segmentation plays an important part in computer vision and image processing applications. Its goal is to find regions that represent objects."

Similar presentations


Ads by Google