October 16, 2014Computer Vision Lecture 12: Image Segmentation II 1 Hough Transform The Hough transform is a very general technique for feature detection.

Slides:



Advertisements
Similar presentations
Hough Transforms CSE 6367 – Computer Vision Vassilis Athitsos University of Texas at Arlington.
Advertisements

November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
DTU Informatics Introduction to Medical Image Analysis Rasmus R. Paulsen DTU Informatics TexPoint fonts.
Fitting: The Hough transform. Voting schemes Let each feature vote for all the models that are compatible with it Hopefully the noise features will not.
October 2, 2014Computer Vision Lecture 8: Edge Detection I 1 Edge Detection.
Computer Vision Lecture 16: Texture
Computer Vision Lecture 16: Region Representation
Segmentation (2): edge detection
November 4, 2014Computer Vision Lecture 15: Shape Representation II 1Signature Another popular method of representing shape is called the signature. In.
Edge Detection CSE P 576 Larry Zitnick
Hough Transform Jeremy Wyatt. The story so far We know how to find edges by convolving with the derivative of a Gaussian filter in two directions We then.
Lecture 5 Hough transform and RANSAC
CS 376b Introduction to Computer Vision 04 / 11 / 2008 Instructor: Michael Eckmann.
Object Recognition A wise robot sees as much as he ought, not as much as he can Search for objects that are important lamps outlets wall corners doors.
Fitting a Model to Data Reading: 15.1,
CS 376b Introduction to Computer Vision 04 / 14 / 2008 Instructor: Michael Eckmann.
Hough Transform. Detecting Lines Hough transform detects lines in images Equation of line is: y = mx + b or Hough transform uses an array called accumulator.
Edge Detection Today’s readings Cipolla and Gee –supplemental: Forsyth, chapter 9Forsyth Watt, From Sandlot ScienceSandlot Science.
1 Lines and Arcs Segmentation In some image sets, lines, curves, and circular arcs are more useful than regions or helpful in addition to regions. Lines.
Hough Transform (Section 10.2) CS474/67. Edge Linking and Boundary Detection Edge detection does not yield connected boundaries. Edge linking and boundary.
כמה מהתעשייה? מבנה הקורס השתנה Computer vision.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean Hall 5409 T-R 10:30am – 11:50am.
October 8, 2013Computer Vision Lecture 11: The Hough Transform 1 Fitting Curve Models to Edges Most contours can be well described by combining several.
CGMB424: IMAGE PROCESSING AND COMPUTER VISION
Hough Transform on the GPU Presented by Javier Garcia November 29, 2010.
October 14, 2014Computer Vision Lecture 11: Image Segmentation I 1Contours How should we represent contours? A good contour representation should meet.
Segmentation Course web page: vision.cis.udel.edu/~cv May 7, 2003  Lecture 31.
Fitting: The Hough transform. Voting schemes Let each feature vote for all the models that are compatible with it Hopefully the noise features will not.
HOUGH TRANSFORM Presentation by Sumit Tandon
HOUGH TRANSFORM & Line Fitting Introduction  HT performed after Edge Detection  It is a technique to isolate the curves of a given shape / shapes.
Generalized Hough Transform
Edges. Edge detection schemes can be grouped in three classes: –Gradient operators: Robert, Sobel, Prewitt, and Laplacian (3x3 and 5x5 masks) –Surface.
Lecture 08 Detecting Shape Using Hough Transform Lecture 08 Detecting Shape Using Hough Transform Mata kuliah: T Computer Vision Tahun: 2010.
October 29, 2013Computer Vision Lecture 13: Fourier Transform II 1 The Fourier Transform In the previous lecture, we discussed the Hough transform. There.
CS654: Digital Image Analysis Lecture 25: Hough Transform Slide credits: Guillermo Sapiro, Mubarak Shah, Derek Hoiem.
HOUGH TRANSFORM. Introduced in 1962 by Paul Hough pronounced like “tough” according to orm.html.
Fitting: The Hough transform
October 7, 2014Computer Vision Lecture 9: Edge Detection II 1 Laplacian Filters Idea: Smooth the image, Smooth the image, compute the second derivative.
Edge Detection and Geometric Primitive Extraction Jinxiang Chai.
Course 8 Contours. Def: edge list ---- ordered set of edge point or fragments. Def: contour ---- an edge list or expression that is used to represent.
October 1, 2013Computer Vision Lecture 9: From Edges to Contours 1 Canny Edge Detector However, usually there will still be noise in the array E[i, j],
Edges and Lines Readings: Chapter 10:
Basic Theory (for curve 01). 1.1 Points and Vectors  Real life methods for constructing curves and surfaces often start with points and vectors, which.
Course 5 Edge Detection. Image Features: local, meaningful, detectable parts of an image. edge corner texture … Edges: Edges points, or simply edges,
Digital Image Processing Lecture 17: Segmentation: Canny Edge Detector & Hough Transform Prof. Charlene Tsai.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
Instructor: Mircea Nicolescu Lecture 7
September 26, 2013Computer Vision Lecture 8: Edge Detection II 1Gradient In the one-dimensional case, a step edge corresponds to a local peak in the first.
Detecting Image Features: Corner. Corners Given an image, denote the image gradient. C is symmetric with two positive eigenvalues. The eigenvalues give.
Hough Transform CS 691 E Spring Outline Hough transform Homography Reading: FP Chapter 15.1 (text) Some slides from Lazebnik.
Object Recognition. Segmentation –Roughly speaking, segmentation is to partition the images into meaningful parts that are relatively homogenous in certain.
: Chapter 13: Finding Basic Shapes 1 Montri Karnjanadecha ac.th/~montri Image Processing.
1 Hough Transform. 2 A Technique to Isolate Features of a Particular Shape within an Image The classical Hough transform is most commonly used for the.
April 21, 2016Introduction to Artificial Intelligence Lecture 22: Computer Vision II 1 Canny Edge Detector The Canny edge detector is a good approximation.
October 3, 2013Computer Vision Lecture 10: Contour Fitting 1 Edge Relaxation Typically, this technique works on crack edges: pixelpixelpixel pixelpixelpixelebg.
Fitting: Voting and the Hough Transform
Detection of discontinuity using
Mean Shift Segmentation
Fourier Transform: Real-World Images
Fitting Curve Models to Edges
Image Processing, Leture #12
Computer Vision Lecture 9: Edge Detection II
Dr. Chang Shu COMP 4900C Winter 2008
Computer Vision Lecture 16: Texture II
Hough Transform COMP 4900C Winter 2008.
Hough Transform.
Morphological Operators
Finding Basic Shapes Hough Transforms
Finding Line and Curve Segments from Edge Images
Introduction to Artificial Intelligence Lecture 22: Computer Vision II
Presentation transcript:

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 1 Hough Transform The Hough transform is a very general technique for feature detection. In the present context, we will use it for the detection of straight lines as contour descriptors in edge point arrays. We could use other variants of the Hough transform to detect circular and other shapes. We could even use it outside of computer vision, for example in data mining applications. So understanding the Hough transform may benefit you in many situations.

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 2 Hough Transform The Hough transform is a voting mechanism. In general, each point in the input space votes for several combinations of parameters in the output space. Those combinations of parameters that receive the most votes are declared the winners. We will use the Hough transform to fit a straight line to edge position data. To keep the description simple and consistent, let us assume that the input image is continuous and described by an x-y coordinate system.

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 3 Hough Transform A straight line can be described by the equation: y = mx + c The variables x and y are the parameters of our input space, and m and c are the parameters of the output space. For a given value (x, y) indicating the position of an edge in the input, we can determine the possible values of m and c by rewriting the above equation: c = -xm + y You see that this represents a straight line in m-c space, which is our output space.

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 4 Hough Transform Example: Each of the three points A, B, and C on a straight line in input space are transformed into straight lines in output space. A B C A B C 0x y input space 0m c output space The parameters of their crossing point (which would be the winners) are the parameters of the straight line in input space. winner parameters

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 5 Hough Transform Hough Transform Algorithm: 1.Quantize input and output spaces appropriately. 2.Assume that each cell in the parameter (output) space is an accumulator (counter). Initialize all cells to zero. 3.For each point (x, y) in the image (input) space, increment by one each of the accumulators that satisfy the equation. 4.Maxima in the accumulator array correspond to the parameters of model instances.

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 6 Hough Transform The Hough transform does not require preprocessing of edge information such as ordering, noise removal, or filling of gaps. It simply provides an estimate of how to best fit a straight line (or other curve model) to the available edge data. If there are multiple straight lines in the image, the Hough transform will result in multiple peaks. You can search for these peaks to find the parameters for all the corresponding straight lines.

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 7 Improved Hough Transform Here is some practical advice for doing the Hough transform (e.g., for some future assignment). The m-c space described on the previous slides is simple but not very practical. It cannot represent vertical lines, and the closer the orientation of a line gets to being vertical, the greater is the change in m required to turn the line significantly. We are going to discuss an alternative output space that requires a bit more computation but avoids the problems of the m-c space.

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 8 Improved Hough Transform As we said before, it is problematic to use m (slope) and c (intercept) as an output space. Instead, it is a good idea to use the orientation  and length d of the normal of a straight line to describe it. The normal n of a straight line l is perpendicular to l and connects l with the origin of the coordinate system. The range of  is from 0  to 360 , and the range of d is from 0 to the length of the image diagonal. Note that we can skip the  interval from 180  to 270 , because it would require a negative d. Let us assume that the image is 450×450 units large.

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 9 Improved Hough Transform The parameters  and d form the output space for our Hough transform. line to be described  d input space 0450 Row i Column j 4500 representation of same line in output space 0000 360  636 output space  d 0

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 10 Improved Hough Transform For any edge point (i 0, j 0 ) indicated by our Sobel edge detector, we have to find all parameters  and d for those straight lines that pass through (i 0, j 0 ). We will then increase the counters in our output space located at every ( , d) by the edge strength, i.e., the magnitude provided by the Sobel detector. This way we will find out which parameters ( , d) are most likely to indicate the clearest lines in the image. But first of all, we have to discuss how to find all the parameters ( , d) for a given point (i 0, j 0 ).

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 11 Improved Hough Transform But how can we compute parameter d for each value of  ? Idea: Rotate (i 0, j 0 ) around origin by -  so that it lands on i-axis. Then the i-coordinate of the rotated point is the value of d. 1111 d1d1d1d1 2222 d2d2d2d2 (i 0, j 0 ) 3333 d3d3d3d Column j Row i By varying  from 0 to 360 we can find all lines crossing (i 0, j 0 ):

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 12 Improved Hough Transform And how do we rotate a point in two-dimensional space? The simplest way is to multiply the point vector with a rotation matrix. We compute the rotated point (i R, j R ) as obtained by rotation of point (i 0, j 0 ) around the point (0, 0) by the angle  as follows:

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 13 Improved Hough Transform We are only interested in the i-coordinate: i R = i 0  cos  - j 0  sin  In our case, we want to rotate by the angle -  : i R = i 0  cos(-  ) - j 0  sin(-  ) i R = i 0  cos  + j 0  sin  Now we can compute parameter d as a function of i 0, j 0, and  : d(i 0, j 0 ;  ) = i 0  cos  + j 0  sin  By varying  we are now able to determine all parameters ( , d) for a given point (i 0, j 0 ) and increase the counters in output space accordingly.

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 14 Improved Hough Transform We can then define the straight line representing the “winner” in parametric form using a parameter p. The points (i, j) of the line are then given by the following equation: By varying p within an appropriate range, we can compute every pixel of our straight line. But how can we find the vector (  i,  j) that determines the slope of the line?

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 15 Improved Hough Transform The idea here is that the orientation of the straight line is perpendicular to its normal. Since the orientation of the normal is given by the angle , the orientation of the straight line must be given by  - 90 . Therefore, we get:

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 16 Improved Hough Transform Then the complete equation for the straight line with parameters ( , d) looks like this: Just vary parameter p in steps of 1 (to catch every pixel) between approximately -900 to 900 (twice the image size). Whenever (i, j) is within the image range, then visualize that pixel in the bitmap.

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 17 Sample Results Input Image

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 18 Sample Results Edges in input image (Sobel filter output)

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 19 Sample Results Hough-transformed edge image  -90  0  0  90  90  180  d

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 20 Sample Results Five greatest maxima in Hough-transformed image  270  0  0  90  90  180  d

October 16, 2014Computer Vision Lecture 12: Image Segmentation II 21 Sample Results Lines in input image corresponding to Hough maxima