Presentation is loading. Please wait.

Presentation is loading. Please wait.

TOPIC 12 IMAGE SEGMENTATION & MORPHOLOGY. Image segmentation is approached from three different perspectives :. Region detection: each pixel is assigned.

Similar presentations


Presentation on theme: "TOPIC 12 IMAGE SEGMENTATION & MORPHOLOGY. Image segmentation is approached from three different perspectives :. Region detection: each pixel is assigned."— Presentation transcript:

1 TOPIC 12 IMAGE SEGMENTATION & MORPHOLOGY

2 Image segmentation is approached from three different perspectives :. Region detection: each pixel is assigned to a particular object or region.. Boundary detection: one attempts to detect the boundaries that exist between regions.. Edge detection: one seeks to identify edge pixels and then link them together to form a connected boundary. SEGMENTATION

3 THRESHOLDING

4 THE LAPLACIAN OPERATOR

5 THE LAPLACIAN OPERATOR IN PRACTICE

6 If the area around the pixel has a constant grey level then application of the kernel results in a grey level value of 0 The average grey level is 0 Negative values are possible. In practice this can be avoided by defining zero to be the grey value 128 The kernel is not direction sensitive in the sense of preferentially selecting either vertical or horizontal edges. PROPERTIES OF THE LAPLACIAN OPERATOR

7

8 ALTERNATIVE FORM OF THE LAPLACIAN

9 ROBERTS OPERATOR

10 SOBEL OPERATOR

11 The Sobel operator is one of those most commonly used and has received special attention because it can be performed in real time (< 1/30 sec. Per image) which makes it attractive for military tracking applications. THE SOBEL OPERATOR

12 The Canny Edge Detector The Canny edge detector is an example of an optimal edge detector in that it claims to optimise the edge detecting process. Its operation is however quite complex. It works as a multi stage process : 1.The image is smoothed with a Gaussian convolution. 2.A simple 2D operator (similar to the Roberts) is applied to highlight regions with a high gradient. 3.Edges give rise to ridges in the gradient image the algorithm then tracks along these ridges marking a trail 1 pixel wide on the top of the ridge. 4.Two parameters control the process (a) which is the lowest point on a ridge that tracking begins and (b) b<a is the point at which tracking ceases when the height of the ridge falls below this value.

13 The Canny edge detector in action a = 0.0938b = 0.0375

14

15 Edge detection in MATLAB function UsingEdge %To edge detect a butterfly A = imread('moth9.gif'); [BW,thresh] = edge(A,'sobel',0.04); imshow(BW) thresh Thresh=0.04 Thresh=0.06

16 A morphological transformation is one where a structuring element (usually 3x3 but could be larger) is passed over the binary image and a logical operation performed (e.g. AND, OR, NOT, XOR in simple cases) on a pixel by pixel basis. The structuring element is also binary in form A MORPHOLOGICAL TRANSFORMATION

17 This is the process of eliminating all boundary points from an element. In other words if a pixel with a value 1 has an immediate neighbour with a value 0 the pixel value is set to 0. Note : the pixel values are not continuously updated during the transformation otherwise the result would be a blank image ! BASIC EROSION

18 EROSION APPLICATION

19 FORMAL DEFINITION OF EROSION

20 Dilation is the inverse of erosion where any pixel adjacent to a pixel of value 1 is changed to 1 DILATION

21 Thinning Erosion can be programmed as a two step process so that objects are not broken up. In the first step candidate pixels are marked for deletion but not deleted. In the second pass pixels are eliminated only if they would not destroy the connectivity of the object. Thinning reduces objects to a single pixel wide line highlighting line topology

22 THINNING

23 Opening The process of erosion followed by dilation is known as opening. It has the effect of eliminating small objects, smoothing the boundaries of large objects without significantly changing their area. In other words a good combination for cleaning up a segmented image.

24 Closing The process of dilation followed erosion is known as closing. It has the effect of filling small and thin holes and smoothing boundaries without changing the area of larger objects.

25 Shrinking If erosion is implemented in such a way that single pixel objects are left intact the process is known as shrinking. It is a useful way of counting the size distribution of objects in the scene by successive shrinking followed by counting the change in the number of single pixel objets in the image.

26 Skeletonisation This process is very similar to thinning and can also be achieved by a two pass process. The essential difference is that skeletonisation retains the full dimension of the object.

27 ANALYSIS PIPELINE

28 UNDERSTANDING A PRINTED CIRCUIT BOARD

29 Using convolution for filtering (a) (b) Figure 14.3

30 Convolution and Correlation Convolution Finds its principal application in high and low pass filtering Correlation Finds its principal application in template matching

31 Example of using filter2 111 111 111 The mask function UsingMask %Edge detection using a mask A = imread('moth9.gif'); %smooth the image mask = [1 1 1;1 1 1;1 1 1]; multiplier = 1/(255*9); mask = multiplier.*mask; BW = filter2(mask,A); %imshow(BW)

32 An improved filtering mask to remove noise 131 3163 131

33 DILATION


Download ppt "TOPIC 12 IMAGE SEGMENTATION & MORPHOLOGY. Image segmentation is approached from three different perspectives :. Region detection: each pixel is assigned."

Similar presentations


Ads by Google