Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 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 Given a pixel (x 0, y 0 ) in a neighborhood of (x, y), (x 0, y 0 ) is similar to (x, y) if – and α denote gradient magnitude and direction. –E and A are predefined threshold values. 10.2.1 Local Processing 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  Motivation ◦ Given a point (x i, y i ), many lines pass through this point as y i = ax i + 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 is a process that converts xy- plane to ab-plane (parameter space). Considering b = -ax i + y i in ab-plane: ◦ A point (x i, y i ) in the image space is mapped to many points {(a, b)} in the parameter space which are on line. ◦ (x j, y j ) is mapped to many points {(a, b)} in the parameter space which are on line: b=-ax j +y j.  These two points are collinear if b = -ax i + y i and b=-ax j +y j in the parameter space intersect at (a’, b’).

9 Step 1: Subdivide ab-plane to accumulator cells. Let A(i, j) be the cell at (i, j) where a min ≤a i ≤ a max, b min ≤b j ≤b max and A(i, j)=0. Step 2: For every (x k, y k ), find b=-x k a p +y k for each allowed p. Step 3: Round off b to the nearest allowed value b q. Let A(p,q)=A(p,q)+1. The Procedures of Hough Transform

10  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 x i cos  + y i sin  = 

11  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 1. Compute the gradient of an image and threshold it to obtain a binary image. 2. Specify subdivisions in the  - plane. 3. Examine the counts of the accumulator cells for high pixel concentrations. 4. Examine the relationship (for continuity) between pixels in a chosen cell. 

15 Example 10.8

16  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 T 1 T 2, and to the background f(x, y)  T 1.

17 10.3.1 Foundation

18  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. 10.3.1 Foundation

19 Example 10.10

20  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 z 0, i.e., |T(k) - T(k-1)|<z 0 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  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

25  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) = –.

26

27  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)(+, –)(….)

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

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

30  Finding the region according to continuity between pixels.  Partitions the image into sub-regions: R 1, R 2,..., R n, where ◦ ◦ R i is a connected region. ◦ R i  R j = , i  j. ◦ P(R i ) = TRUE; for example, all pixel in R i have the same gray level or texture. ◦ P(R i  R j ) = FALSE for i  j.

31  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

32  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.

33 Example 10.16 8-connected

34 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.

35  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 R i and R j are merged only if P(R i  R j ) = TRUE. ◦ The split and merge algorithm: 1. Split into four disjoint quadrants any region R i for which P(R i ) = FALSE 2. Merge any adjacent regions R i and R j, for which P(R i  R j ) = TRUE 3. Stop when no further merging or splitting is possible.

36 A quadtree representation The Construction of a Quadtree P(R i  R j ) = TRUE can be defined as follows: If P(R i ) = TRUE, then in R i, 80% of the pixels in it have the property: |z j -m i |≤σ i.

37 Example 10.17


Download ppt "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."

Similar presentations


Ads by Google