2 quan ze parameter space a min max pmin pmax

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: lines in the image }༇  Consider all possible lines that can pass through a single point }༇  }༇  Restric-on of the statement above. A line that passes through 1 point gets one vote }༇  Find the line that gets most votes }༇  Hough Transform for Lines }༇  Aim: Create a mechanism for vo-ng }༇  }༇  Equa-on of line is y=mx+c }༇  }༇  m is slope, c is intercept Consider only one point (x,y) }༇  }༇  A line should get as many votes as the points it passes through For example (2,4) How many lines can pass through this point? Hough Transform for Lines x=2 y=4 y=x+2 y=-x+6 y=2x y=-2x+8 y (2,4) And so on… (infinite lines) x Hough Transform for Lines Can we write the general expression for all the lines passing through (2,4)? }༇  All those lines will have a specific rela-onship between m and c }༇  Any arbitrary combina-on of m and c will not pass through the given point; only certain combina-ons will work }༇  Hough Transform for Lines y=4 y=x+2 y=-x+6 y=2x y=-2x+8 y (2,4) x m=0, c = 4 m=1, c = 2 m=-1, c = 6 m=2, c = 0 m=-2, c = 8 What is the relationship between valid pairs of (m,c)? Hough Transform for Lines c y 4 (2,4) x 2 m Hough Transform for Lines Equa-on of line is y=mx+c }༇  We are given (x,y) [e.g. (2,4)] }༇  (m,c) are the unknowns }༇  Can be rewri[en as c = (- x)m + y }༇  Consider (x,y) space: y=mx+c represents a line }༇  Consider transformed space (m,c), then c=(- x)m + y is a line in this space }༇  (- x) is gradient, y is the intercept }༇  Interpretation Line in (m,c) space represents all possible lines that could pass through a single point (x,y) }༇  Point in (x,y) space is a line in (m,c) space }༇  Point in (m,c) space is a … }༇  Line in (x,y) space }༇  Finding Lines using Hough Transform c y Solution: Where all lines intersect… 4 (2,4) m = 2, c = 0 x 2 m Hough Transform for Lines Ini-alize Accumulator array, A, of two dimensions (m, c) }༇  For each point (x,y) in image, increment cells along line c = - xm+y by 1 }༇  Find maximum point in accumulator array for solu-on }༇  Algorithm 1.  2.  Quan-ze parameter space A[cmin, … , cmax, mmin, … , mmax] For each edge point (x,y) For (m = mmin, m ≤ mmax, m++) c = (- x)m + y A [c,m] = A [c,m] + 1; 3.  Find local maxima in A Hough Transform for Lines }༇  }༇  }༇  }༇  }༇  Problems with this procedure? What about the range of slope? m spans - ∞ to ∞ Solu-on? Use alternate parameteri...
View Full Document

This note was uploaded on 03/02/2014 for the course CS 436 taught by Professor Sohaibkhan during the Winter '13 term at Lahore University of Management Sciences.

Ask a homework question - tutors are online