Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object Detection 01 – Advance Hough Transformation JJCAO.

Similar presentations


Presentation on theme: "Object Detection 01 – Advance Hough Transformation JJCAO."— Presentation transcript:

1 Object Detection 01 – Advance Hough Transformation JJCAO

2 Line and curve detection The HTis a standard tool in image analysis that allows recognition of global patterns in an image space by recognition of local patterns in a transformed parameter space. HT: Elegant method for direct object recognition – Edges need not be connected – Complete object need not be visible – Key Idea: Edges VOTE for the possible model 2 Detect partially occluded lines

3 HT for Lines 3 Parameter space (b,m) Image space y=mx+b (x,y)

4 Hough_Grd 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 θ A(θ, ρ) = A(θ, ρ) + 1 end Θ=[0-360] so there is a conversion

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

6 6

7 Generalizing the H.T. (x c,y c ) PiPiPiPi iiii riririri iiii x c = x i + r i cos(  i ) y c = y i + r i sin(  i ) Suppose, there were m different gradient orientations: (m <= n) Suppose, there were m different gradient orientations: (m <= n) 1122......mm1122......mm... (r 1 1,  1 1 ),(r 1 2,  1 2 ),…,(r 1 n1,  1 n1 ) (r 2 1,  2 1 ),(r 2 2,  1 2 ),…,(r 2 n2,  1 n2 )... (r m 1,  m 1 ),(r m 2,  m 2 ),…,(r m nm,  m nm ) jjjj rjrjrjrj jjjj R-table

8 Generalized Hough Transform Find Object Center given edges Create Accumulator Array Initialize: For each edge point For each entry in table, compute: Increment Accumulator: Find Local Maxima in Assumption: translation is the only transformation here, i.e., orientation and scale are fixed

9

10 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

11 Application in recognition Instead of indexing displacements by gradient orientation, index by “visual codeword” Combined Object Categorization and Segmentation with an Implicit Shape Model_ECCV04 Object Detection Using a Max-Margin Hough Transform_CVPR09 training image visual codeword with displacement vectors

12 Application in recognition Instead of indexing displacements by gradient orientation, index by “visual codeword” test image Combined Object Categorization and Segmentation with an Implicit Shape Model_ECCV04 Object Detection Using a Max-Margin Hough Transform_CVPR09

13 Implicit shape models: Training 1.Build codebook of patches around extracted interest points using clustering (more on this later in the course)

14 Implicit shape models: Training 1.Build codebook of patches around extracted interest points using clustering 2.Map the patch around each interest point to closest codebook entry

15 Implicit shape models: Training 1.Build codebook of patches around extracted interest points using clustering 2.Map the patch around each interest point to closest codebook entry 3.For each codebook entry, store all positions it was found, relative to object center

16 Implicit shape models: Testing 1.Given test image, extract patches, match to codebook entry 2.Cast votes for possible positions of object center 3.Search for maxima in voting space 4.Extract weighted segmentation mask based on stored masks for the codebook occurrences

17 Implicit shape models: Details Supervised training – Need reference location and segmentation mask for each training car Voting space is continuous, not discrete – Clustering algorithm needed to find maxima How about dealing with scale changes? – Option 1: search a range of scales, as in Hough transform for circles – Option 2: use scale-covariant interest points Verification stage is very important – Once we have a location hypothesis, we can overlay a more detailed template over the image and compare pixel-by-pixel, transfer segmentation masks, etc.

18 Hough transform: Discussion Pros – Can deal with non-locality and occlusion – Can detect multiple instances of a model – Some robustness to noise: noise points unlikely to contribute consistently to any single bin 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 Hough transform vs. RANSAC vs. Geometric hashing On Geometric Hashing and the generalized hough transform_tsmc94

19 Detection of multiple object instances 19 Detection of multiple object instances using Hough transform_cvpr10 Olga Barinova Graphics&Media Lab Moscow State University Victor Lempitsky Yandex company Moscow Visual Geometry Group, University of Oxford – postdoc Pushmeet Kohli Machine Learning and Perception Microsoft Research Cambridge Slides from CVPR 2010 [zip][zip] Talk at CVPR 2010 [link][link] C++ code for pedestrians detection original Visual Studio 2005 solution or Linux Port by Dr. Rodrigo Benenson.Visual Studio 2005 solutionLinux Port C++ code for lines detection the latest version, which is much faster and more accuratethe latest version

20 Major flaw of HT Lacks a consistent probabilistic model – Does not allow hypotheses to explain away the voting elements Maximum in Hough image corresponds to a correctly detected object The voting elements that were generated by this object also cast votes for other hypotheses The strength of those spurious votes is not inhibited => pseudo maximum Various non-maxima suppression (NMS) heuristics have to be used to localized peaks in the Hough image, which involve specification and tuning of several parameters: – sweep-plane approach (Real-time line detection through an improved Hough transform voting scheme_pr08) – … 20


Download ppt "Object Detection 01 – Advance Hough Transformation JJCAO."

Similar presentations


Ads by Google