1 / 37

Digital Image Processing

Digital Image Processing. Chapter 10, Part II. 10.2 Edge Linking and Boundary Detection. The methods discussed in the previous section yield pixels lying only on edges. This section discusses edge algorithms that link edge pixels into “meaningful” edges. 10.2.1 Local Processing.

tirza
Download Presentation

Digital Image Processing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Digital Image Processing Chapter 10, Part II

  2. 10.2 Edge Linking and Boundary Detection • The methods discussed in the previous section yield pixels lying only on edges. • This section discusses edge algorithms that link edge pixels into “meaningful” edges.

  3. 10.2.1 Local Processing • Analyzing the characteristics of edge pixels in a small neighborhood. • Gradient magnitude. • Gradient direction. • All points that are similar according to a set of criteria are linked.

  4. 10.2.1 Local Processing • Given a pixel (x0, y0) in a neighborhood of (x, y), (x0, y0) is similar to (x, y) if • and αdenote gradient magnitude and direction. • E and A are predefined threshold values. Two neighboring pixels are linked if both magnitude and direction criteria are satisfied. Linked points are assigned a different gray level.

  5. Example 10.6

  6. 10.2.2 Global Processing via the Hough Transform • Motivation • Given a point (xi , yi), many lines pass through this point as yi = axi + b with different a and b. • Find all lines determined by every pair of points and find all subsets of points that are close to particular lines. • exhausted!

  7. The Parameter Space

  8. Hough Transform • Hough transform is a process that converts xy-plane to ab-plane (parameter space). Considering b = -axi + yi in ab-plane: • A point (xi , yi) in the image space is mapped to many points {(a, b)} in the parameter space which are on line. • (xj, yj) is mapped to many points {(a, b)} in the parameter space which are on line: b=-axj+yj. • These two points are collinear if b = -axi + yi and b=-axj+yj in the parameter space intersect at (a’, b’).

  9. The Procedures of Hough Transform Step 1: Subdivide ab-plane to accumulator cells. Let A(i, j) be the cell at (i, j) where amin≤ai ≤ amax, bmin ≤bj ≤bmax and A(i, j)=0. Step 2: For every (xk, yk), find b=-xkap+ykfor each allowed p. Step 3: Round off b to the nearest allowedvalue bq. Let A(p,q)=A(p,q)+1.

  10. Performance and Limitation • Performance • With n image points and K accumulator cells, there are nK computation involved. • Limitation • The slope approaches infinitely as the line approaches the vertival. • Solution: • Rewrite the normal representation of a line to xi cos + yisin = 

  11. Rewriting a line as x cos + y sin =  • This implementation is identical to the method using slope-intercept representation. • Instead of straight lines, the loci are sinusoidal curves in  -plane. 

  12. Rewriting a line as x cos + y sin =  90 -90

  13. Example 10.7

  14. Edge-Linking Using Hough Transform • Compute the gradient of an image and threshold it to obtain a binary image. • Specify subdivisions in the  -plane. • Examine the counts of the accumulator cells for high pixel concentrations. • Examine the relationship (for continuity) between pixels in a chosen cell.

  15. Example 10.8

  16. 10.3 Thresholding • Thresholding features its intuitive properties and simplicity in image segmentation. • Select a threshold T to separate the object pixels from background pixels. • Any point (x, y) with f(x,y) > T is called an object point (labeled 1); otherwise, the point is called a background point (labeled 0). • For multilevel thresholding, classify (x,y) as belongs to one object class if T1 < f(x,y) T2, to the other object class if f(x, y) > T2, and to the background f(x, y) T1.

  17. 10.3.1 Foundation

  18. 10.3.1 Foundation • The threshold T can be viewed as an operation in the following form: T = T[x, y, p(x,y), f(x,y)] where p(x,y) denotes some local property of this point (x, y), • For example, the average level of a neighborhood centered on (x, y). • If T depends… • only on f(x, y), then it is called global. • both on f(x, y) and p(x,y), then it is called local. • Not only on f(x, y) and p(x,y), but on x and y, then it is called dynamic or adaptive.

  19. Example 10.10

  20. 10.3.3 Basic Global Thresholding • The following algorithm can be used to obtain T automatically: 1. Select an initial estimate for T. 2. Segment the image into two groups of pixels G1 and G2 using T. 3. Compute the average gray level values of G1 and G2, 1 and 2. 4. Compute a new threshold value as T(k) = (1+2)/2, where k is the current looping index. 5. Repeat steps 2 through 4 until the difference in T is less than a predefined threshold z0, i.e., |T(k) - T(k-1)|<z0 A good initial value for T is the average gray level of the image.

  21. Example 10.11 Three iteration. The resulted threshold value is 125.4

  22. 10.3.4 Basic Adaptive thresholding • Divide the image into sub-images and use different a threshold to segment each subimage. • For example, if a sub-image containing boundaries, let the variance of such subimage be >100. Then, do the following: • Sub-images with variance >100: segmented with a global threshold. • Sub-images with variance <100: segmented with a threshold computed from itself. The thresholds can be obtained by the foregoing algorithm.

  23. Example 10.12

  24. 10.3.6 Use of Boundary Characteristics for Histogram Improvement and Local Thresholding • Consider only those pixels that lie on or near the edges between objects and background. • To form a three-level image s(x, y), let: • For pixels not on edges, s(x,y) = 0. • For pixels on dark side of edges, s(x,y) = +. • For pixels not on light side of edges, s(x,y) = –.

  25. Interpretation of a Three-Level Image • For binary image, the transition from the light background (=0) to dark object (=1) is characterized by the occurrence of a – followed by a +. • The interior of the object is characterized as + or 0. • The transition from the object back to the background is characterized by the occurrence of a + followed by a –. • The vertical or horizontal scan line containing a section of an object has the following structure: (…..)(–, +)(+ or 0)(+, –)(….)

  26. Example 10.14 • Segmenting an image using a histogram of the gradient and Laplacian.

  27. The histogram is obtained using only the pixels around the edges. Therefore, it is more regular and has better symmetric.

  28. 10.4 Region-based Segmentation • Finding the region according to continuity between pixels. • Partitions the image into sub-regions: R1, R2, ..., Rn, where • Ri is a connected region. • Ri  Rj = , i  j. • P(Ri) = TRUE; for example, all pixel in Ri have the same gray level or texture. • P(RiRj) = FALSE for i j.

  29. 10.4 Region-based Segmentation • Finding the region according to continuity between pixels. • The basic approach is to start with a set of “seeds”, and then grow regions by appending to each seed those neighboring points. • The selection of seeds • Manually

  30. The Procedure of Region Growing • A procedure that groups pixels or subregions into larger regions based on predefined criteria. • Starting with a set of “seeds” and then appending to each seed those neighboring pixels that have properties similar to the seed. • such as specified gray-level or color.

  31. Example 10.16 8-connected

  32. As shown below, even with well-behaved histograms, multilevel thresholding is difficult. • Solving this problem using region-based approach may be a good way in dealing with this problem.

  33. 10.4.3 Region Splitting and Merging • Quadtree • Subdivide an image into a set of disjointed regions and then merge and/or split the regions to satisfy the conditions of regions. • Two adjacent regions RiandRj are merged only if P(RiRj) = TRUE. • The split and merge algorithm: 1. Split into four disjoint quadrants any region Rifor which P(Ri) = FALSE 2. Merge any adjacent regions Riand Rj, for which P(RiRj) = TRUE 3. Stop when no further merging or splitting is possible.

  34. The Construction of a Quadtree • P(RiRj) = TRUE can be defined as follows: • If P(Ri) = TRUE, then in Ri, 80% of the pixels in it have the property: |zj-mi|≤σi . A quadtree representation

  35. Example 10.17

More Related