1 / 10

Lecture 6

Lecture 6. Hough Transform. Detecting lines. y = mx + b 3 lines : y 1 = m 1 x + b 1 y 2 = m 2 x + b 2 y 3 = m 3 x + b 3. Detecting Lines. For example, Given 7 points, find m, b. Initial an empty array indexed by (m,b). Detecting Lines. 1. (0,1), 1 = 0+b b = 1 2. (1,2), 2 = m+b

afya
Télécharger la présentation

Lecture 6

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. Lecture 6 Hough Transform

  2. Detecting lines y = mx + b 3 lines : y1 = m1x + b1 y2 = m2x + b2 y3 = m3x + b3

  3. Detecting Lines • For example, Given 7 points, find m, b Initial an empty array indexed by (m,b)

  4. Detecting Lines 1. (0,1), 1 = 0+b b = 1 2. (1,2), 2 = m+b b = 2 -m Max Vote - Peak in Hough Space Report (m,b) here 3. (1,3), 3 = m+b b = 3 - m 4. …… 5. …… … ... increase the array at each calculated (m,b)

  5. Problem: Vertical Lines Solution: xcosq + ysinq q = 0 .. 359 degree

  6. Hough Transform For Detecting Circles (x0,y0) - center, r - radius

  7. Hough Transform For Detecting Circles a = ... b = … r = … For all a,b,r A[a,b,r]++ Problem: How to find peak in 3D array Clustering Algorithm

  8. Hough Transform For Detecting Circles x = a + rcosq (1) y = b + rsinq (2) a = x - rcosq (3) b = y - rsinq (4) (1) *sinq xsinq = asinq + rsinqcosq (3) (2) *cosq ycosq = bcosq + rsinqcosq (4) (3) - (4) xsinq - ycosq = asinq - bcosq (5) (5) / cosq xtanq - y = atanq - b (6) b = (a-x)tanq + y

  9. Hough Transform For Detecting Circles b = (a-x)tanq + y still have 3 unknowns : a, b, q Using Sobel Edge Detector: Finding Gx and Gy q q = gradient direction

  10. bright dark Hough Transform For Detecting Circles Gradient Direction is perpendicular to edge direction q Known tanq at each edge element So, tanq is known There remains only 2 unknowns: a, b

More Related