Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 376b Introduction to Computer Vision 04 / 15 / 2008 Instructor: Michael Eckmann.

Similar presentations


Presentation on theme: "CS 376b Introduction to Computer Vision 04 / 15 / 2008 Instructor: Michael Eckmann."— Presentation transcript:

1 CS 376b Introduction to Computer Vision 04 / 15 / 2008 Instructor: Michael Eckmann

2 Michael Eckmann - Skidmore College - CS 376b - Spring 2008 Today’s Topics Comments/Questions Hough transform –go through an example of the Hough transform for lines –finding circles in an image

3 Hough Transform Let's look at the example in figure 10.22 on p. 307.

4 Hough Transform Consider the effects of different quantizations.

5 Hough Transform Consider the effects of different quantizations. –if quantize to too many values (finely) may not get appropriate bins to have high accumlations –if quantize to too few values (coursely) may get less accuracy to the results

6 Hough Transform For detecting circles: –an edge at pixel (r,c) that is part of a circle will have its gradient direction be towards the center of the circle (r c,c c )‏ –the circle is represented by the following equations: r c = r + radius * sin(theta)‏ c c = c – radius * cos(theta)‏ theta is the angle the radius makes with the x-axis diagram on the board Please note: error in Algorithm 10.9 in text. It says that R and C are the indices of the center. In fact, R and C are the indices of an edge on the circle and R0,C0 are the indices of the center.

7 Hough Transform For detecting circles: –the circle is represented by the following equations: r c = r + radius * sin(theta)‏ c c = c – radius * cos(theta)‏ therefore, there are 3 parameters radius, r c, c c So, we'll have an accumulator array of 3 dimensions We have a magnitude and a direction for each edge pixel --- the direction tells us theta, but note that r c and c c require a radius before they are computed. We can iterate over all possible radii that we care about.

8 Hough Transform Let's look at the Algorithm 10.9 on p. 310.

9 Hough Transform The Hough transform can be extended to detect curves represented by any analytic equation of the form: f(x,a), where x is the coordinates of an image point and a is a vector of parameters. –Initialize all elements of A[a] to 0. –For each edge pixel x, determine each a such that f(x,a) = 0 and do A[a]++ –Local maxima in A correspond to curves of f

10 Hough Transform The generalized Hough transform is defined in such a way to allow it to detect arbitrary shapes. Draw your shape (as a boundary)‏ –select a reference point inside the shape (e.g. the center of mass)‏ –at the boundary points compute the gradient direction towards the reference point and store the reference point as a function of that direction in a table –this is done so that given an edge in an image and its gradient direction, we can then lookup in this table to determine the possible reference points we would update the element of the accumulator array for the r and c of the reference point and the angle

11 Hough Transform Let's look at figure 2 here: http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/AV0405/ROBBEL/index.html See handout for more details


Download ppt "CS 376b Introduction to Computer Vision 04 / 15 / 2008 Instructor: Michael Eckmann."

Similar presentations


Ads by Google