Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


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

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

2 Michael Eckmann - Skidmore College - CS 376b - Spring 2008 Today’s Topics Comments/Questions –comment on images in the directories Canny edge detection algorithm in more detail Hough transform for detecting equations of –lines in the image –circles in the image –etc.

3 Segmentation Canny edge detection –what were the main steps in Canny edge detection that we discussed last time?

4 Segmentation Canny edge detection could be used to segment regions by finding closed loops in the edge image. Canny edge detection steps –smooth input image by convolving a Gaussian mask of standard deviation sigma –use Roberts operator to compute edge magnitudes and directions (similar to what you're doing in the current assignment, but you're using different edge operators)‏ –suppress non-maxima – that is, essentially thin the edges by saving only pixels that have the largest magnitude on either side (in the direction of the edge)‏ –use a high magnitude threshold and a low magnitude threshold --- start at those pixels over the high threshold and create contours by following 8-neighbords as long as they are above the low threshold

5 Segmentation Canny edge detector Let's look at Algorithm 10.5 in our text on p.300 –I think there's an error in the text in the Supress_Nonmaxima function (modulo should be divide)‏

6 Hough Transform A method for detecting straight lines and circles and other curves from intensity images. Input: –the family of curves being sought Output: –the set of curves of that family found in the image e.g. if you're looking for lines, the hough transform will give you the equations of the lines appearing in the image

7 Hough Transform The equation of a line y = mx + b has two unknown parameters m and b. x and y are the coordinates of pixels making up that line. The number of unknown parameters of the family of curves being sought denotes the number of dimensions of an Accumulator array used by Hough. So in the line case, the number of dimensions of the accumulator is 2. A[M,B] is the value of the accumulator array for a particular quantized m and b.

8 Hough Transform y = mx + b is problematic in that it cannot describe vertical lines. An alternative equation is d = x cos(theta) + y sin(theta)‏ d is the perpendicular distance from the line to the origin theta is the angle between perpendicular and the x-axis diagram on the board

9 Hough Transform y = mx + b is problematic in that it cannot describe vertical lines. An alternative equation is d = x cos(theta) + y sin(theta)‏ d is the perpendicular distance from the line to the origin theta is the angle between perpendicular and the x-axis In an image, the origin is at the top left and rows are positive going down from there, so we change the equation to: d = c cos(theta) - r sin(theta)‏ How many dimensions will our accumulator array have?

10 Hough Transform The general procedure is as follows –given the number of parameters in the family of curves being sought, create an accumulator array of that many dimensions and choose the bins by deciding how you wish to quantize the parameters e.g. if you want accuracy of angle theta up to 10 degrees you can quantize the angle to 36 different values our text shows in figure 10.21 the accumulator array for a 256x256 image. The indices for angle being 0,10,20,..., 350 and for d being 0,3,6,9,...,360. Why is this only for a 256x256?

11 Hough Transform The procedure is as follows –given the number of parameters in the family of curves being sought, create an accumulator array of that many dimensions and choose the bins by deciding how you wish to quantize the parameters –gather evidence for each edge at a pixel (and its neighborhood) determine what line best fits to that edge (that is, compute d and theta)‏ increment the accumulator array element at indices d,theta (either increment by 1 or by the magnitude of the edge)‏ –if want to give weight to higher magnitude lines on influencing the lines to be found

12 Hough Transform The procedure is as follows –then after each pixel is considered and the accumulator array holds the evidence of lines the accumulator array is examined for peaks. –The peaks in the accumulator array tell us the most likely equations of lines that appear in the image. The line equations are for infinite length lines. If you wanted to know where the line segments start and stop, you can keep track of a point list for each quantized parameter d and theta. Let's look at page 307 figure 10.22


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

Similar presentations


Ads by Google