SlideShare a Scribd company logo
1 of 48
Download to read offline
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 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
P.V.C. Hough, Machine Analysis of Bubble Chamber Pictures, Proc.
Int. Conf. High Energy Accelerators and Instrumentation, 1959
Image space Hough parameter space
Parameter space representation
• A line in the image corresponds to a point in
Hough space
Image space Hough parameter space
Source: S. Seitz
Parameter space representation
• What does a point (x0, y0) in the image space
map to in the Hough space?
Image space Hough parameter space
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
Parameter space representation
• Where is the line that contains both (x0, y0)
and (x1, y1)?
Image space Hough parameter space
(x0, y0)
(x1, y1)
b = –x1m + y1
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
(x0, y0)
(x1, y1)
b = –x1m + y1
• Problems with the (m,b) space:
• Unbounded parameter domain
• Vertical lines require infinite m
Parameter space representation
• Problems with the (m,b) space:
• Unbounded parameter domain
• Vertical lines require infinite m
• Alternative: polar representation
Parameter space representation
ρ
θ
θ =
+ sin
cos y
x
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 θ
ρ
θ
features votes
Basic illustration
Square Circle
Other shapes
Several lines
features votes
Effect of noise
features votes
Effect of noise
Peak gets fuzzy and hard to locate
Effect of noise
• Number of votes for a line of 20 points with
increasing noise:
Random points
Uniform noise can lead to spurious peaks in the array
features votes
Random points
• As the level of uniform noise increases, the
maximum number of votes increases too:
Practical details
• Try to get rid of irrelevant features
• Take only 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
• Can deal with non-locality and occlusion
• Can detect multiple instances of a model in a
single pass
• Some robustness to noise: noise points
unlikely to contribute consistently to any
single bin
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: 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
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.
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
)
,
(
)
,
( y
x
f
r
y
x ∇
+
x
y
(x,y)
x
y
r
)
,
(
)
,
( y
x
f
r
y
x ∇
−
image space Hough parameter space
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
F. Jurie and C. Schmid, Scale-invariant shape features for recognition of
object categories, CVPR 2004
Original
images
Laplacian
circles
Hough-like
circles
Robustness to scale and clutter
Generalized Hough transform
• We want to find a shape defined by its boundary
points and a reference point
D. Ballard, Generalizing the Hough Transform to Detect Arbitrary Shapes,
Pattern Recognition 13(2), 1981, pp. 111-122.
a
p
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 θ
D. Ballard, Generalizing the Hough Transform to Detect Arbitrary Shapes,
Pattern Recognition 13(2), 1981, pp. 111-122.
a
θ r(θ)
Generalized Hough transform
• For model shape: construct a table indexed
by θ 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
Example
range of voting locations for test point
votes for points with θ =
Example
Application in recognition
• Instead of indexing displacements by gradient
orientation, index by “visual codeword”
B. Leibe, A. Leonardis, and B. Schiele, Combined Object Categorization and
Segmentation with an Implicit Shape Model, ECCV Workshop on Statistical
Learning in Computer Vision 2004
training image
visual codeword with
displacement vectors
Application in recognition
• Instead of indexing displacements by gradient
orientation, index by “visual codeword”
B. Leibe, A. Leonardis, and B. Schiele, Combined Object Categorization and
Segmentation with an Implicit Shape Model, ECCV Workshop on Statistical
Learning in Computer Vision 2004
test image
Implicit shape models: Training
1. Build codebook of patches around extracted
interest points using clustering (more on this
later in the course)
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
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
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
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.

More Related Content

What's hot

Lec07 corner blob
Lec07 corner blobLec07 corner blob
Lec07 corner blobBaliThorat1
 
Lec04 color
Lec04 colorLec04 color
Lec04 colorBaliThorat1
 
Lec11 single view-converted
Lec11 single view-convertedLec11 single view-converted
Lec11 single view-convertedBaliThorat1
 
Lec02 camera
Lec02 cameraLec02 camera
Lec02 cameraBaliThorat1
 
Lec03 light
Lec03 lightLec03 light
Lec03 lightBaliThorat1
 
Lighting and shading
Lighting and shadingLighting and shading
Lighting and shadingeshveeen
 
Dense Image Matching - Challenges and Potentials (Keynote 3D-ARCH 2015)
Dense Image Matching - Challenges and Potentials (Keynote 3D-ARCH 2015) Dense Image Matching - Challenges and Potentials (Keynote 3D-ARCH 2015)
Dense Image Matching - Challenges and Potentials (Keynote 3D-ARCH 2015) Konrad Wenzel
 
Edge detection
Edge detectionEdge detection
Edge detectionEdi Supriadi
 
Canny Edge Detection
Canny Edge DetectionCanny Edge Detection
Canny Edge DetectionSN Chakraborty
 
Michal Erel's SIFT presentation
Michal Erel's SIFT presentationMichal Erel's SIFT presentation
Michal Erel's SIFT presentationwolf
 
Fuzzy Logic Based Edge Detection
Fuzzy Logic Based Edge DetectionFuzzy Logic Based Edge Detection
Fuzzy Logic Based Edge DetectionDawn Raider Gupta
 
Visual realism
Visual realismVisual realism
Visual realismPatel Punit
 
04 image enhancement edge detection
04 image enhancement edge detection04 image enhancement edge detection
04 image enhancement edge detectionRumah Belajar
 
SURF - Speeded Up Robust Features
SURF - Speeded Up Robust FeaturesSURF - Speeded Up Robust Features
SURF - Speeded Up Robust FeaturesMarta Lopes
 
Edge detection
Edge detectionEdge detection
Edge detectionJyoti Dhall
 

What's hot (19)

Lec07 corner blob
Lec07 corner blobLec07 corner blob
Lec07 corner blob
 
Lec04 color
Lec04 colorLec04 color
Lec04 color
 
Lec11 single view-converted
Lec11 single view-convertedLec11 single view-converted
Lec11 single view-converted
 
Lec02 camera
Lec02 cameraLec02 camera
Lec02 camera
 
Lec03 light
Lec03 lightLec03 light
Lec03 light
 
Lighting and shading
Lighting and shadingLighting and shading
Lighting and shading
 
Edges and lines
Edges and linesEdges and lines
Edges and lines
 
Dense Image Matching - Challenges and Potentials (Keynote 3D-ARCH 2015)
Dense Image Matching - Challenges and Potentials (Keynote 3D-ARCH 2015) Dense Image Matching - Challenges and Potentials (Keynote 3D-ARCH 2015)
Dense Image Matching - Challenges and Potentials (Keynote 3D-ARCH 2015)
 
Edge detection
Edge detectionEdge detection
Edge detection
 
Lighting and shading
Lighting and shadingLighting and shading
Lighting and shading
 
Canny Edge Detection
Canny Edge DetectionCanny Edge Detection
Canny Edge Detection
 
Michal Erel's SIFT presentation
Michal Erel's SIFT presentationMichal Erel's SIFT presentation
Michal Erel's SIFT presentation
 
Illumination Model
Illumination ModelIllumination Model
Illumination Model
 
Fuzzy Logic Based Edge Detection
Fuzzy Logic Based Edge DetectionFuzzy Logic Based Edge Detection
Fuzzy Logic Based Edge Detection
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Visual realism
Visual realismVisual realism
Visual realism
 
04 image enhancement edge detection
04 image enhancement edge detection04 image enhancement edge detection
04 image enhancement edge detection
 
SURF - Speeded Up Robust Features
SURF - Speeded Up Robust FeaturesSURF - Speeded Up Robust Features
SURF - Speeded Up Robust Features
 
Edge detection
Edge detectionEdge detection
Edge detection
 

Similar to The Hough Transform: A Powerful Tool for Line and Shape Detection

Invariant Generalised Hough Transform
Invariant Generalised Hough TransformInvariant Generalised Hough Transform
Invariant Generalised Hough TransformShashank Dhariwal
 
Basics of Linear Hough Transform
Basics of Linear Hough TransformBasics of Linear Hough Transform
Basics of Linear Hough TransformRaj Rana
 
2D Transformation.pptx
2D Transformation.pptx2D Transformation.pptx
2D Transformation.pptxMuhammadNaqi7
 
Lecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matchingLecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matchingcairo university
 
06 image features
06 image features06 image features
06 image featuresankit_ppt
 
Computer Vision harris
Computer Vision harrisComputer Vision harris
Computer Vision harrisWael Badawy
 
Passive stereo vision with deep learning
Passive stereo vision with deep learningPassive stereo vision with deep learning
Passive stereo vision with deep learningYu Huang
 
Surface Data Capture Image Matching
Surface Data Capture Image MatchingSurface Data Capture Image Matching
Surface Data Capture Image MatchingRASHID JAVED
 
Semantic Retrieval and Automatic Annotation: Linear Transformations, Correlat...
Semantic Retrieval and Automatic Annotation: Linear Transformations, Correlat...Semantic Retrieval and Automatic Annotation: Linear Transformations, Correlat...
Semantic Retrieval and Automatic Annotation: Linear Transformations, Correlat...Jonathon Hare
 
testpang
testpangtestpang
testpangpangpang2
 
Nister iccv2005tutorial
Nister iccv2005tutorialNister iccv2005tutorial
Nister iccv2005tutorialJag Mohan Singh
 
Computer Vision - Single View
Computer Vision - Single ViewComputer Vision - Single View
Computer Vision - Single ViewWael Badawy
 
Computer Vision alignment
Computer Vision alignmentComputer Vision alignment
Computer Vision alignmentWael Badawy
 
Introduction to Computer Vision (uapycon 2017)
Introduction to Computer Vision (uapycon 2017)Introduction to Computer Vision (uapycon 2017)
Introduction to Computer Vision (uapycon 2017)Anton Kasyanov
 
Presentation sim opencv
Presentation sim opencvPresentation sim opencv
Presentation sim opencvAndres Fernandez
 
Fassold-MMAsia2023-Tutorial-GeometricDL-Part1.pptx
Fassold-MMAsia2023-Tutorial-GeometricDL-Part1.pptxFassold-MMAsia2023-Tutorial-GeometricDL-Part1.pptx
Fassold-MMAsia2023-Tutorial-GeometricDL-Part1.pptxHannesFesswald
 

Similar to The Hough Transform: A Powerful Tool for Line and Shape Detection (20)

cv1.ppt
cv1.pptcv1.ppt
cv1.ppt
 
Invariant Generalised Hough Transform
Invariant Generalised Hough TransformInvariant Generalised Hough Transform
Invariant Generalised Hough Transform
 
Basics of Linear Hough Transform
Basics of Linear Hough TransformBasics of Linear Hough Transform
Basics of Linear Hough Transform
 
2D Transformation.pptx
2D Transformation.pptx2D Transformation.pptx
2D Transformation.pptx
 
Lecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matchingLecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matching
 
06 image features
06 image features06 image features
06 image features
 
Computer Vision harris
Computer Vision harrisComputer Vision harris
Computer Vision harris
 
Passive stereo vision with deep learning
Passive stereo vision with deep learningPassive stereo vision with deep learning
Passive stereo vision with deep learning
 
Surface Data Capture Image Matching
Surface Data Capture Image MatchingSurface Data Capture Image Matching
Surface Data Capture Image Matching
 
Semantic Retrieval and Automatic Annotation: Linear Transformations, Correlat...
Semantic Retrieval and Automatic Annotation: Linear Transformations, Correlat...Semantic Retrieval and Automatic Annotation: Linear Transformations, Correlat...
Semantic Retrieval and Automatic Annotation: Linear Transformations, Correlat...
 
testpang
testpangtestpang
testpang
 
Nister iccv2005tutorial
Nister iccv2005tutorialNister iccv2005tutorial
Nister iccv2005tutorial
 
Computer Vision - Single View
Computer Vision - Single ViewComputer Vision - Single View
Computer Vision - Single View
 
Computer Vision alignment
Computer Vision alignmentComputer Vision alignment
Computer Vision alignment
 
Mvs adas
Mvs adasMvs adas
Mvs adas
 
Introduction to Computer Vision (uapycon 2017)
Introduction to Computer Vision (uapycon 2017)Introduction to Computer Vision (uapycon 2017)
Introduction to Computer Vision (uapycon 2017)
 
Lecture24
Lecture24Lecture24
Lecture24
 
Presentation sim opencv
Presentation sim opencvPresentation sim opencv
Presentation sim opencv
 
Image restoration and reconstruction
Image restoration and reconstructionImage restoration and reconstruction
Image restoration and reconstruction
 
Fassold-MMAsia2023-Tutorial-GeometricDL-Part1.pptx
Fassold-MMAsia2023-Tutorial-GeometricDL-Part1.pptxFassold-MMAsia2023-Tutorial-GeometricDL-Part1.pptx
Fassold-MMAsia2023-Tutorial-GeometricDL-Part1.pptx
 

More from BaliThorat1

8 operating system concept
8 operating system concept8 operating system concept
8 operating system conceptBaliThorat1
 
7 processor
7 processor7 processor
7 processorBaliThorat1
 
6 input output devices
6 input output devices6 input output devices
6 input output devicesBaliThorat1
 
2 windows operating system
2 windows operating system2 windows operating system
2 windows operating systemBaliThorat1
 
5 computer memory
5 computer memory5 computer memory
5 computer memoryBaliThorat1
 
4 computer languages
4 computer languages4 computer languages
4 computer languagesBaliThorat1
 
1 fundamentals of computer
1 fundamentals of computer1 fundamentals of computer
1 fundamentals of computerBaliThorat1
 
1 fundamentals of computer system
1 fundamentals of computer system1 fundamentals of computer system
1 fundamentals of computer systemBaliThorat1
 
Computer generation and classification
Computer generation and classificationComputer generation and classification
Computer generation and classificationBaliThorat1
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchartBaliThorat1
 
6 cpu scheduling
6 cpu scheduling6 cpu scheduling
6 cpu schedulingBaliThorat1
 
5 process synchronization
5 process synchronization5 process synchronization
5 process synchronizationBaliThorat1
 
3 processes
3 processes3 processes
3 processesBaliThorat1
 
2 os structure
2 os structure2 os structure
2 os structureBaliThorat1
 
1 intro and overview
1 intro and overview1 intro and overview
1 intro and overviewBaliThorat1
 
Lec01 introduction
Lec01 introductionLec01 introduction
Lec01 introductionBaliThorat1
 

More from BaliThorat1 (17)

8 operating system concept
8 operating system concept8 operating system concept
8 operating system concept
 
7 processor
7 processor7 processor
7 processor
 
6 input output devices
6 input output devices6 input output devices
6 input output devices
 
2 windows operating system
2 windows operating system2 windows operating system
2 windows operating system
 
5 computer memory
5 computer memory5 computer memory
5 computer memory
 
4 computer languages
4 computer languages4 computer languages
4 computer languages
 
1 fundamentals of computer
1 fundamentals of computer1 fundamentals of computer
1 fundamentals of computer
 
1 fundamentals of computer system
1 fundamentals of computer system1 fundamentals of computer system
1 fundamentals of computer system
 
Computer generation and classification
Computer generation and classificationComputer generation and classification
Computer generation and classification
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
6 cpu scheduling
6 cpu scheduling6 cpu scheduling
6 cpu scheduling
 
5 process synchronization
5 process synchronization5 process synchronization
5 process synchronization
 
4 threads
4 threads4 threads
4 threads
 
3 processes
3 processes3 processes
3 processes
 
2 os structure
2 os structure2 os structure
2 os structure
 
1 intro and overview
1 intro and overview1 intro and overview
1 intro and overview
 
Lec01 introduction
Lec01 introductionLec01 introduction
Lec01 introduction
 

Recently uploaded

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 

Recently uploaded (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 

The Hough Transform: A Powerful Tool for Line and Shape Detection

  • 1. Fitting: The Hough transform
  • 2. 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
  • 3. 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 P.V.C. Hough, Machine Analysis of Bubble Chamber Pictures, Proc. Int. Conf. High Energy Accelerators and Instrumentation, 1959 Image space Hough parameter space
  • 4. Parameter space representation • A line in the image corresponds to a point in Hough space Image space Hough parameter space Source: S. Seitz
  • 5. Parameter space representation • What does a point (x0, y0) in the image space map to in the Hough space? Image space Hough parameter space
  • 6. 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
  • 7. Parameter space representation • Where is the line that contains both (x0, y0) and (x1, y1)? Image space Hough parameter space (x0, y0) (x1, y1) b = –x1m + y1
  • 8. 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 (x0, y0) (x1, y1) b = –x1m + y1
  • 9. • Problems with the (m,b) space: • Unbounded parameter domain • Vertical lines require infinite m Parameter space representation
  • 10. • Problems with the (m,b) space: • Unbounded parameter domain • Vertical lines require infinite m • Alternative: polar representation Parameter space representation ρ θ θ = + sin cos y x Each point will add a sinusoid in the (θ,ρ) parameter space
  • 11. 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 θ ρ θ
  • 16. features votes Effect of noise Peak gets fuzzy and hard to locate
  • 17. Effect of noise • Number of votes for a line of 20 points with increasing noise:
  • 18. Random points Uniform noise can lead to spurious peaks in the array features votes
  • 19. Random points • As the level of uniform noise increases, the maximum number of votes increases too:
  • 20. Practical details • Try to get rid of irrelevant features • Take only 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
  • 21. Hough transform: Pros • Can deal with non-locality and occlusion • Can detect multiple instances of a model in a single pass • Some robustness to noise: noise points unlikely to contribute consistently to any single bin
  • 22. 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
  • 23. 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
  • 24. 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.
  • 25. Cascaded Hough transform T. Tuytelaars, M. Proesmans, L. Van Gool "The cascaded Hough transform," ICIP, vol. II, pp. 736-739, 1997.
  • 26. 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?
  • 27. Hough transform for circles ) , ( ) , ( y x f r y x ∇ + x y (x,y) x y r ) , ( ) , ( y x f r y x ∇ − image space Hough parameter space
  • 28. 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?
  • 29. Application in recognition F. Jurie and C. Schmid, Scale-invariant shape features for recognition of object categories, CVPR 2004
  • 30. Hough circles vs. Laplacian blobs F. Jurie and C. Schmid, Scale-invariant shape features for recognition of object categories, CVPR 2004 Original images Laplacian circles Hough-like circles Robustness to scale and clutter
  • 31. Generalized Hough transform • We want to find a shape defined by its boundary points and a reference point D. Ballard, Generalizing the Hough Transform to Detect Arbitrary Shapes, Pattern Recognition 13(2), 1981, pp. 111-122. a
  • 32. p 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 θ D. Ballard, Generalizing the Hough Transform to Detect Arbitrary Shapes, Pattern Recognition 13(2), 1981, pp. 111-122. a θ r(θ)
  • 33. Generalized Hough transform • For model shape: construct a table indexed by θ 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
  • 36. Example range of voting locations for test point
  • 37. Example range of voting locations for test point
  • 40. Example range of voting locations for test point
  • 41. votes for points with θ = Example
  • 42. Application in recognition • Instead of indexing displacements by gradient orientation, index by “visual codeword” B. Leibe, A. Leonardis, and B. Schiele, Combined Object Categorization and Segmentation with an Implicit Shape Model, ECCV Workshop on Statistical Learning in Computer Vision 2004 training image visual codeword with displacement vectors
  • 43. Application in recognition • Instead of indexing displacements by gradient orientation, index by “visual codeword” B. Leibe, A. Leonardis, and B. Schiele, Combined Object Categorization and Segmentation with an Implicit Shape Model, ECCV Workshop on Statistical Learning in Computer Vision 2004 test image
  • 44. Implicit shape models: Training 1. Build codebook of patches around extracted interest points using clustering (more on this later in the course)
  • 45. 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
  • 46. 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
  • 47. 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
  • 48. 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.