Fitting: The Hough transform

Slides:



Advertisements
Similar presentations
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.
Advertisements

Feature Matching and Robust Fitting Computer Vision CS 143, Brown James Hays Acknowledgment: Many slides from Derek Hoiem and Grauman&Leibe 2008 AAAI Tutorial.
Image Segmentation Image segmentation (segmentace obrazu) –division or separation of the image into segments (connected regions) of similar properties.
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2013.
Segmentation (2): edge detection
Fitting: The Hough transform
Lecture 5 Hough transform and RANSAC
CS 558 C OMPUTER V ISION Lecture VIII: Fitting, RANSAC, and Hough Transform Adapted from S. Lazebnik.
Fitting lines. Fitting Choose a parametric object/some objects to represent a set of tokens Most interesting case is when criterion is not local –can’t.
Computer Vision - A Modern Approach Set: Fitting Slides by D.A. Forsyth Fitting Choose a parametric object/some objects to represent a set of tokens Most.
Fitting. We’ve learned how to detect edges, corners, blobs. Now what? We would like to form a higher-level, more compact representation of the features.
Fitting a Model to Data Reading: 15.1,
Fitting: The Hough transform
Robust estimation Problem: we want to determine the displacement (u,v) between pairs of images. We are given 100 points with a correlation score computed.
Fitting.
כמה מהתעשייה? מבנה הקורס השתנה Computer vision.
Computer Vision - Fitting and Alignment
Computer Vision More Image Features Hyunki Hong School of Integrative Engineering.
Fitting and Registration Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/14/12.
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.
Fitting & Matching Lecture 4 – Prof. Bregler Slides from: S. Lazebnik, S. Seitz, M. Pollefeys, A. Effros.
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.
Photo by Carl Warner. Feature Matching and Robust Fitting Computer Vision James Hays Acknowledgment: Many slides from Derek Hoiem and Grauman&Leibe.
Fitting : Voting and the Hough Transform Monday, Feb 14 Prof. Kristen Grauman UT-Austin.
Object Detection 01 – Advance Hough Transformation JJCAO.
CS 1699: Intro to Computer Vision Matching and Fitting Prof. Adriana Kovashka University of Pittsburgh September 29, 2015.
Generalized Hough Transform
CS654: Digital Image Analysis Lecture 25: Hough Transform Slide credits: Guillermo Sapiro, Mubarak Shah, Derek Hoiem.
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2013.
Fitting: The Hough transform
Edge Detection and Geometric Primitive Extraction Jinxiang Chai.
EECS 274 Computer Vision Model Fitting. Fitting Choose a parametric object/some objects to represent a set of points Three main questions: –what object.
Fitting Thursday, Sept 24 Kristen Grauman UT-Austin.
Computer Vision - Fitting and Alignment (Slides borrowed from various presentations)
Object Detection 01 – Basic Hough Transformation JJCAO.
Hough Transform Procedure to find a shape in an image Shape can be described in parametric form Shapes in image correspond to a family of parametric solutions.
CSE 185 Introduction to Computer Vision Feature Matching.
October 16, 2014Computer Vision Lecture 12: Image Segmentation II 1 Hough Transform The Hough transform is a very general technique for feature detection.
Digital Image Processing Lecture 17: Segmentation: Canny Edge Detector & Hough Transform Prof. Charlene Tsai.
Fitting.
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.
CS 558 C OMPUTER V ISION Fitting, RANSAC, and Hough Transfrom Adapted from S. Lazebnik.
HOUGH TRANSFORM.
CS 2770: Computer Vision Fitting Models: Hough Transform & RANSAC
Segmentation by fitting a model: Hough transform and least squares
Presented by David Lee 3/20/2006
Fitting: Voting and the Hough Transform
Miguel Tavares Coimbra
Fitting.
Line Fitting James Hayes.
Detection of discontinuity using
Fitting: Voting and the Hough Transform (part 2)
A special case of calibration
Fitting: Voting and the Hough Transform April 24th, 2018
Fitting Curve Models to Edges
Fitting.
Computer Vision - A Modern Approach
Photo by Carl Warner.
Prof. Adriana Kovashka University of Pittsburgh October 19, 2016
Photo by Carl Warner.
Fitting CS 678 Spring 2018.
776 Computer Vision Jan-Michael Frahm.
Hough Transform.
CSE 185 Introduction to Computer Vision
Presented by Xu Miao April 20, 2005
Introduction to Artificial Intelligence Lecture 22: Computer Vision II
Presentation transcript:

Fitting: The Hough transform

Review: Corner and blob detection What are some characteristics of good features? What is the distinguishing characteristic of corners? What are the invariance properties of Harris corners? What is a scale space? What is spatial selection? What is scale selection? What operator is used to find blobs? What is the difference between invariance and covariance?

9300 Harris Corners Pkwy, Charlotte, NC Fitting: Motivation We’ve learned how to detect edges, corners, blobs. Now what? We would like to form a higher-level, more compact representation of the features in the image by grouping multiple features according to a simple model 9300 Harris Corners Pkwy, Charlotte, NC

Fitting Choose a parametric model to represent a set of features simple model: lines simple model: circles complicated model: car Source: K. Grauman

Fitting Choose a parametric model to represent a set of features Membership criterion is not local Can’t tell whether a point belongs to a given model just by looking at that point Three main questions: What model represents this set of features best? Which of several model instances gets which feature? How many model instances are there? Computational complexity is important It is infeasible to examine every possible set of parameters and every possible combination of features

Case study: Line detection Fitting: Issues Noise in the measured feature locations Extraneous data: clutter (outliers), multiple lines Missing data: occlusions Case study: Line detection

Voting schemes Let each feature vote for all the models that are compatible with it Hopefully the noise features will not vote consistently for any single model Missing data doesn’t matter as long as there are enough features remaining to agree on a good model

Hough transform An early type of voting scheme General outline: Discretize parameter space into bins For each feature point in the image, put a vote in every bin in the parameter space that could have generated this point Find bins that have the most votes Image space Hough parameter space P.V.C. Hough, Machine Analysis of Bubble Chamber Pictures, Proc. Int. Conf. High Energy Accelerators and Instrumentation, 1959

Parameter space representation A line in the image corresponds to a point in Hough space Image space Hough parameter space Source: K. Grauman

Parameter space representation What does a point (x0, y0) in the image space map to in the Hough space? Answer: the solutions of b = –x0m + y0 This is a line in Hough space Image space Hough parameter space Source: K. Grauman

Parameter space representation Where is the line that contains both (x0, y0) and (x1, y1)? It is the intersection of the lines b = –x0m + y0 and b = –x1m + y1 Image space Hough parameter space (x1, y1) (x0, y0) b = –x1m + y1 Source: K. Grauman

Polar representation for lines Problems with the (m,b) space: Unbounded parameter domain Vertical lines require infinite m

Polar representation for lines Problems with the (m,b) space: Unbounded parameter domain Vertical lines require infinite m Alternative: polar representation Each point will add a sinusoid in the (,) parameter space

Algorithm outline Initialize accumulator H to all zeros For each edge point (x,y) in the image For θ = 0 to 180 ρ = x cos θ + y sin θ H(θ, ρ) = H(θ, ρ) + 1 end end Find the value(s) of (θ, ρ) where H(θ, ρ) is a local maximum The detected line in the image is given by ρ = x cos θ + y sin θ ρ θ

Basic illustration features votes Figure 15.1, top half. Note that most points in the vote array are very dark, because they get only one vote. features votes

Other shapes Square Circle

Several lines

Effect of noise Peak gets fuzzy and hard to locate features votes This is 15.1 lower half features votes Peak gets fuzzy and hard to locate

Effect of noise Number of votes for a line of 20 points with increasing noise: This is the number of votes that the real line of 20 points gets with increasing noise (figure15.3)

Random points Uniform noise can lead to spurious peaks in the array 15.2; main point is that lots of noise can lead to large peaks in the array features votes Uniform noise can lead to spurious peaks in the array

Random points As the level of uniform noise increases, the maximum number of votes increases too: Figure 15.4; as the noise increases in a picture without a line, the number of points in the max cell goes up, too

Practical details Try to get rid of irrelevant features Take edge points with significant gradient magnitude Choose a good grid / discretization Too coarse: large votes obtained when too many different lines correspond to a single bucket Too fine: miss lines because some points that are not exactly collinear cast votes for different buckets Increment neighboring bins (smoothing in accumulator array) Who belongs to which line? Tag the votes

Hough transform: Pros All points are processed independently, so can cope with occlusion Some robustness to noise: noise points unlikely to contribute consistently to any single bin Can deal with non-locality and occlusion Can detect multiple instances of a model in a single pass

Hough transform: Cons Complexity of search time increases exponentially with the number of model parameters Non-target shapes can produce spurious peaks in parameter space It’s hard to pick a good grid size

Extension: Cascaded Hough transform Let’s go back to the original (m,b) parametrization A line in the image maps to a pencil of lines in the Hough space What do we get with parallel lines or a pencil of lines? Collinear peaks in the Hough space! So we can apply a Hough transform to the output of the first Hough transform to find vanishing points Issue: dealing with unbounded parameter space T. Tuytelaars, M. Proesmans, L. Van Gool "The cascaded Hough transform," ICIP, vol. II, pp. 736-739, 1997.

Cascaded Hough transform T. Tuytelaars, M. Proesmans, L. Van Gool "The cascaded Hough transform," ICIP, vol. II, pp. 736-739, 1997.

Extension: Incorporating image gradients Recall: when we detect an edge point, we also know its gradient direction But this means that the line is uniquely determined! Modified Hough transform: For each edge point (x,y) θ = gradient orientation at (x,y) ρ = x cos θ + y sin θ H(θ, ρ) = H(θ, ρ) + 1 end

Hough transform for circles How many dimensions will the parameter space have? Given an oriented edge point, what are all possible bins that it can vote for?

Hough transform for circles image space Hough parameter space r y (x,y) x x y

Hough transform for circles Conceptually equivalent procedure: for each (x,y,r), draw the corresponding circle in the image and compute its “support” x y r What is more efficient: going from the image space to the parameter space or vice versa?

Application in recognition F. Jurie and C. Schmid, Scale-invariant shape features for recognition of object categories, CVPR 2004

Hough circles vs. Laplacian blobs Original images Robustness to scale and clutter Laplacian circles Hough-like circles F. Jurie and C. Schmid, Scale-invariant shape features for recognition of object categories, CVPR 2004

Generalized Hough transform We want to find a shape defined by its boundary points and a reference point a D. Ballard, Generalizing the Hough Transform to Detect Arbitrary Shapes, Pattern Recognition 13(2), 1981, pp. 111-122.

Generalized Hough transform We want to find a shape defined by its boundary points and a reference point For every boundary point p, we can compute the displacement vector r = a – p as a function of gradient orientation θ a r(θ) θ p D. Ballard, Generalizing the Hough Transform to Detect Arbitrary Shapes, Pattern Recognition 13(2), 1981, pp. 111-122.

Generalized Hough transform For model shape: construct a table storing displacement vectors r as function of gradient direction Detection: For each edge point p with gradient orientation θ: Retrieve all r indexed with θ For each r(θ), put a vote in the Hough space at p + r(θ) Peak in this Hough space is reference point with most supporting edges Assumption: translation is the only transformation here, i.e., orientation and scale are fixed Source: K. Grauman

Example model shape

Example displacement vectors for model points

Example range of voting locations for test point

Example range of voting locations for test point

Example votes for points with θ =

Example displacement vectors for model points