generalized hough transform. the generalized hough transform

Download Generalized Hough Transform. The Generalized Hough Transform

Post on 13-Jan-2016

225 views

Category:

Documents

1 download

Embed Size (px)

TRANSCRIPT

  • Generalized Hough Transform

  • The Generalized Hough Transform

  • From Standard to Generalized HTStandard Hough Transform requires parametric representation for desired curveThis idea is generalized in the Generalized Hough Transform

  • Example: Human Face recognitionIs there some attribute of the structure of the head that we can exploit to help estimate pose estimation?Is this attribute invariant under change in pose? Or Can we model how this attribute varies with pose?

  • Hough Transform in GeneralTechnique to isolate curves of a given shape in an image

    Standard Hough Transform (HT) uses parametric formulation of curves

    Generalized Hough Transform (GHT) extends for arbitrary curves

  • When we compute the correlation by voting, we spend most of the time casting bad votes.

    Idea is to use extra shape information (e.g. gradients) to cast fewer votes:O(n) complexity: For each of O(n) points on the boundary, cast O(1) votes.Key Idea to improve correlation by voting

  • General Hough Algorithm Idea1. explicitly list points on shape2. make table for all edge pixels for target3. for each pixel store its position relative to some reference point on the shapeif Im pixel i on the boundary, the reference point is at ref[i]

  • The Generalized Hough TransformTechnique to find arbitrary curves in a given imageParametric equation no longer requiredLook-up table used as transform mechanismTwo phases:R-Table Generation phaseObject Detection phase

  • Standard Techniques allow for invariance to scale and rotation in the planeIn general, objects in the real world are 3-dimensionalHence a single silhouette provides no invariance to pose (i.e. rotation out of the plane).No pose estimation.This is generalized to Surface Normal Hough TransformThe Generalized Hough Transform

  • Building the R-Table in GHT

  • GHT: Building the R-Table1. We are given the shape we want to localize2. We build a lookup table for this shape, called R-TableIt will replace the need for a parametric equation in the transform stage

  • GHT: Building the R-Table

  • GHT: Building the R-Table

  • GHT: Building the R-TableGHT: Building the R-Table

  • Object Localization in the R-Table in GHT

  • GHT: Object Localization

  • GHT: Object Localization

  • GHT: Object Localization

  • Conclusions on GHTStandard Techniques allow for invariance to scale and rotation in the planeIn general, objects in the real world are 3-dimensionalHence a single silhuette provides no invariance to pose (i.e. rotation out of the plane).No pose estimation.Now show more detailsConclusions on GHT

  • Generalized Hough Transform Algorithm

  • Algorithm of the General Hough Transform

  • Hough Transform for CurvesThe H.T. can be generalized to detect any curve that can be expressed in parametric form:Y = f(x, a1,a2,ap)a1, a2, ap are the parametersThe parameter space is p-dimensionalThe accumulating array is LARGE!

  • Generalized Hough TransformFind all desired points in imageFor each feature pointfor each pixel i on target boundaryget relative position of reference point from iadd this offset to position of iincrement that position in accumulatorFind local maxima in accumulatorMap maxima back to image to viewalgorithm

  • Generalizing the H.T.The H.T. can be used even if the curve has not a simple analytic form!Pick a reference point (xc,yc)For i = 1,,n :Draw segment to Pi on the boundary. Measure its length ri, and its orientation ai.Write the coordinates of (xc,yc) as a function of ri and aiRecord the gradient orientation fi at Pi.Build a table with the data, indexed by fi .xc = xi + ricos(ai)yc = yi + risin(ai)

  • Generalizing the H.T.(xc,yc)Pixc = xi + ricos(ai)yc = yi + risin(ai)Suppose, there were m different gradient orientations:(m
  • Generalized H.T. Algorithm:xc = xi + ricos(ai)yc = yi + risin(ai)Finds a rotated, scaled, and translated version of the curve:(xc,yc)PjfjSrjaj

    qForm an A accumulator array of possible reference points (xc,yc), scaling factor S and Rotation angle q.For each edge (x,y) in the image:Compute f(x,y)For each (r,a) corresponding to f(x,y) do:For each S and q:xc = xi + r(f) S cos[a(f) + q]yc = yi + r(f) S sin[a(f) + q]A(xc,yc,S,q) = A(xc,yc,S,q) + 1Find maxima of A.

  • Another variant of the Generalized Hough TransformFind Object Center given edges

    Create Accumulator Array

    Initialize:

    For each edge point

    For each entry in table, compute:

    Increment Accumulator:

    Find Local Maxima in

  • Generalize HT applied for circuits

  • Properties of Generalized Hough Transform What can we do when the curve we want to detect is not easily described parametrically?

    ~ By this, we mean, it cannot be captured in a relatively small number of parameters.

    ~ Recall, the dimensionality of the Hough space equal the number of parameters!

    The GHT constructs a parametric description of an arbitrary shape based on a learning process.

    This parametric description is not, in general, compact.

    We will begin by assuming the size, shape, and rotation (orientation) of the region is known a priori. (Or that we want only to detect instances of a given size and orientation.

    ~ The voting space is (equivalent to) image space, 2D, in the case of known size and rotation.

    ~ We will see how to deal with unknown orientation and size shortly -- with a 4D Hough space.

  • The list of ( , ) pairs, for a given and constitutesa partial characterization of the shape. : An arbitrary reference point inside the shape.: The length of the j-th line from the reference point to the shape perimeter, intersecting at a point of tangent angle .: The angle of the (current) tangent(s) to the perimeter.: The orientation of the j-th line segment.

  • By sweeping the tangent angle () over the range (0,2) in some reasonable quantization (!), we build what is called the R-table (reference table) description of the shape. Each pixel x (say, a detected edge point) with local orientation provides evidence (votes for) reference points at the set of locations indicated by the list in the R-table for that tangent direction... A vote is cast for each (r , ) pair in the list for that value.

    The voting space is isomorphic to image space. Again, this assumes known size and orientation for all appearances of the shape.

    After all the edge points have voted for all of their possible reference points, we interrogate the voting space for significant local maxima. These suggest possible detections of the shape of interest.

  • If we have not prenormalized for size (S) and rotation ( ) then our voting space is four dimensional and the reference location receiving the vote(s) for a given edge point and R-table entry is: Now, we interrogate the 4D accumulator array to recover likely locations, scale, and orientation for appearances of the shape.

    This is really a fancy form of a template match -- but one that is far more robust than a straightforward template matching algorithm.

    Selecting among multiple possible shapes requires multiple R-tables, multiple voting spaces.

    But, so does looking for lines and circles in the same image....

  • Generalized HT in biologically motivated robotics

  • Bimodal Active Stereo

  • Many simultaneous problems in robotics

  • Research Philosophy

  • The main concept of Radon Transform

  • The main concept of Radon Transform

  • Hough Transform: Comments Works on Disconnected Edges

    Relatively insensitive to occlusion

    Effective for simple shapes (lines, circles, etc)

    Trade-off between work in Image Space and Parameter Space

    Handling inaccurate edge locations:

    Increment Patch in Accumulator rather than a single point

  • H.T. SummaryH.T. is a voting scheme points vote for a set of parameters describing a line or curve.The more votes for a particular set the more evidence that the corresponding curve is present in the image.Can detect MULTIPLE curves in one shot.Computational cost increases with the number of parameters describing the curve.end

  • ********