SlideShare a Scribd company logo
1 of 25
Line Detection in Images–
Recent Developments and Applications
NANDEDKAR PARTH SHIRISH
1
Department of
Intelligent Media,
Yagi Laboratory
今日の流れーTopics
1.Goal of Line Detection, difference with Edge Detection
2.Successive Approximation Method
3.Hough Transform Method
4.RANSAC(Random Sample Consensus) Method
5.Vanishing Point Detection using Hough Transform
6.Applications-Rectangle Detection
2
Department of
Intelligent Media,
Yagi Laboratory
1. Goal of Line Detection
Line detection is an algorithm that takes a collection of
n edge points and finds all the lines on which these edge
points lie.
Most popular line detectors are Hough
transform and convolution-based techniques.
Convolution-based Line Detection:
Same process as Edge Detection.
3
1. Difference with Edge Detection
An edge is a transition from one phase/object/thing to
another. On one side you have one color, on the other side
you have another color.
A line is a 1D structure. It has the same phase/object/thing
on either side. On one side you have background, on the
other side you have background also.
→Better techniques can better differentiate between these.
4
2.Successive Approximation Method
• Transforming from a curve-contour to a simpler
representation (to Piecewise-linear polyline or B-spline cur
• Algorithm: Mark the first and last point. Find the farthest
inlier from this line and join First and this point. Now remov
the farthest inlier to this line.
• If contour is a line we can simplify it to that line.
5
3.Hough Transform Basics
A line-to-point transform, that transforms the data from
x,y space to m,h space, where each line is transformed
to a point.
Problem: neither m or h are bounded
Line k to x axis ⇒ h not defined
Line k to y axis ⇒ m → ∞ 6
3.Polar Hough Transform
Now both variables are bounded!
→ Polar Hough Transform:
Value for an arbitrary line (r – xcosθ – ysinθ = 0) in (r, θ)
Where f(x,y) is the 2D image
→ Unit Sphere & Cubemap Mappings possible(pg. 253)
7
3.Polar Hough Transform – Theoretical Example
Output in the case of perfectly continuous lines.
8
3.Hough Transform for Line Detection
→ Goal: To identify straight lines
• Process: For each pixel at (x,y) the Polar Hough transform
algorithm determines if there is enough evidence of a
straight line at that pixel, using votes from sample points.
→ Strengths:
• Gives equations of lines(but not “end-points” of segments).
• Works well with simple images that contain good straight
lines. (Good for Robot Vision)
• Deals with broken lines very well (in next slide).
• Reasonably efficient if there are “few” edge points.
9
3.Polar Hough Transform – Broken Line/
Sampling Example
10
3.Polar Hough Transform – Discrete case
Same as before, but discrete. Number in Accumulator cell
proportional to number of points on the line.
11
3.Polar Hough Transform – Voting Algorithm
12
3.Hough Transform for Line Detection
→ Problems:
• Very slow of there are many edge points.
• Hough Space is non-linear, different edge sensitivities in
different directions.
• Poor for short lines.
→ Recent Extensions of Hough Method:
• Circle and Ellipse detection by Double Hough Method.
• Image transform plus Hough for general 2D shape
detection.
• Vanishing Points Detection(section 4.3.3, part 5 of slides)13
4.RANSAC (Random Sample Consensus)
Method – (For Feature Detection)
• Determines the best transformation that includes the
most number of match features (inliers) from the previous
step.
• RANSAC loop for planar pattern detection:
1. Select four feature pairs (at random) in the two angles.
2. Compute homography H (see next slide).
3. Compute inliers where SSD(pi’, Hpi) < a certain value,ε.
4. Keep largest set of inliers.
5. Re-compute least-squares estimate on all of the inliers.
14
4.RANSAC Method – What are Homographies?
• Example of Homography
• Definition: Projective–mapping between any two
projection planes with the same center of
projection
15
4.RANSAC Method – What are Homographies?
• Definition: Projective–mapping between any two
projection planes with the same center of
projection
16
4.RANSAC Method – (For Line Detection)
→ Simple example: Let us fit a line
• Use biggest set of inliers
• Do least-square fit => SD is low, Very likely it is a line
17
4.RANSAC Method – Video: Fitting a Line
→ Strengths:
• Robust estimation
• Relatively high
accuracy
→ Weaknesses:
• Randomness.
• Number of
Iterations required
for p% success
18
→ Goal: To collect lost 3D information from perspective in a
2D image detecting Vanishing points of Parallel lines.
19
5.Vanishing Points Detection – using Hough Transform
5.Vanishing Points Detection – using Hough Transform
→ Textbook method using Cross Product:
Step 1) Calculate Vanishing Point Hypothesis (weight)
= Cross product of any two line vectors =
 Near-Collinear segments downweighted
Step 2) Populate Hough space(accumulator) with weights
and find peaks for Vanishing point votes from the lines.
Step 3) Calculate Least Squares Estimate for all Vanishing
points with respect to lines that voted for it.
20
where = Green Triangle area
Rule: The lower the sum of all areas subtended to segment
endpoints, the more appropriate the vanishing point.
21
5.Vanishing Points Detection – using Hough Transform
6.Applications
Rectangle Detection:
Step 1) First, detect all vanishing points
Step 2) Detect the Edge points/Lines that are aligned along
vanishing lines.
We then efficiently recover the inter-sections of pairs of
lines corresponding to different vanishing points. (論文[8])22
6.Applications
Rectangle Detection:
Using only Hough
Detection is an 8D
vector-space problem
(論文[8]).
Major Quadrilaterals in
image can be detected
using only Vanishing
Point and Line Detection
(論文[8]).
23
References
[1] Polar Hough:
https://www.wikiwand.com/en/Hough_transform
[2] Hough Accumulator:
https://chmodux.wordpress.com/2012/04/16/target-
acquisition/
[3] Ransac:
https://www.slideshare.net/allynjoycalcaben/computer-
vision-feature-matching-with-ransac-algorithm
[4] Homographies:
https://docs.opencv.org/master/d9/dab/tutorial_homog
raphy.html
24
References
[5] Ransac animation:
https://kapernikov.com/cable-detection-in-lidar-data/
[6] Various:
Computer Vision: Algorithms and Applications by Richard
Szeliski
[7] Vanishing Points Examples:
http://teresabernardart.com/the-rules-of-
perspective/#:~:text=There%20are%20three%20basic%20
types,illusion%20of%20depth%20and%20space.
[8] Rectangle Detection Algorithm:
https://www.researchgate.net/publication/228697341_Pe
rspective_rectangle_detection 25

More Related Content

What's hot

Invariant Generalised Hough Transform
Invariant Generalised Hough TransformInvariant Generalised Hough Transform
Invariant Generalised Hough Transform
Shashank Dhariwal
 
DESIGN AND IMPLEMENTATION OF PATH PLANNING ALGORITHM
DESIGN AND IMPLEMENTATION OF PATH PLANNING ALGORITHM DESIGN AND IMPLEMENTATION OF PATH PLANNING ALGORITHM
DESIGN AND IMPLEMENTATION OF PATH PLANNING ALGORITHM
NITISH K
 
Path Planning And Navigation
Path Planning And NavigationPath Planning And Navigation
Path Planning And Navigation
guest90654fd
 
Morphological antialiasing
Morphological antialiasingMorphological antialiasing
Morphological antialiasing
Chung-Yuan Lee
 
An automatic algorithm for object recognition and detection based on asift ke...
An automatic algorithm for object recognition and detection based on asift ke...An automatic algorithm for object recognition and detection based on asift ke...
An automatic algorithm for object recognition and detection based on asift ke...
Kunal Kishor Nirala
 

What's hot (19)

A Hough Transform Implementation for Line Detection for a Mobile Robot Self-N...
A Hough Transform Implementation for Line Detection for a Mobile Robot Self-N...A Hough Transform Implementation for Line Detection for a Mobile Robot Self-N...
A Hough Transform Implementation for Line Detection for a Mobile Robot Self-N...
 
Hough Transform By Md.Nazmul Islam
Hough Transform By Md.Nazmul IslamHough Transform By Md.Nazmul Islam
Hough Transform By Md.Nazmul Islam
 
Edge Detection using Hough Transform
Edge Detection using Hough TransformEdge Detection using Hough Transform
Edge Detection using Hough Transform
 
Invariant Generalised Hough Transform
Invariant Generalised Hough TransformInvariant Generalised Hough Transform
Invariant Generalised Hough Transform
 
Back face detection
Back face detectionBack face detection
Back face detection
 
Robotics for Path Planning
Robotics for Path PlanningRobotics for Path Planning
Robotics for Path Planning
 
Real time Canny edge detection
Real time Canny edge detectionReal time Canny edge detection
Real time Canny edge detection
 
Computer Graphics (Hidden surfaces and line removal, Curves and surfaces, Sur...
Computer Graphics (Hidden surfaces and line removal, Curves and surfaces, Sur...Computer Graphics (Hidden surfaces and line removal, Curves and surfaces, Sur...
Computer Graphics (Hidden surfaces and line removal, Curves and surfaces, Sur...
 
Exact Cell Decomposition of Arrangements used for Path Planning in Robotics
Exact Cell Decomposition of Arrangements used for Path Planning in RoboticsExact Cell Decomposition of Arrangements used for Path Planning in Robotics
Exact Cell Decomposition of Arrangements used for Path Planning in Robotics
 
Path Planning for Mobile Robot Navigation Using Voronoi Diagram and Fast Marc...
Path Planning for Mobile Robot Navigation Using Voronoi Diagram and Fast Marc...Path Planning for Mobile Robot Navigation Using Voronoi Diagram and Fast Marc...
Path Planning for Mobile Robot Navigation Using Voronoi Diagram and Fast Marc...
 
DESIGN AND IMPLEMENTATION OF PATH PLANNING ALGORITHM
DESIGN AND IMPLEMENTATION OF PATH PLANNING ALGORITHM DESIGN AND IMPLEMENTATION OF PATH PLANNING ALGORITHM
DESIGN AND IMPLEMENTATION OF PATH PLANNING ALGORITHM
 
VEHICLE RECOGNITION USING VIBE AND SVM
VEHICLE RECOGNITION USING VIBE AND SVM VEHICLE RECOGNITION USING VIBE AND SVM
VEHICLE RECOGNITION USING VIBE AND SVM
 
Canny Edge Detection
Canny Edge DetectionCanny Edge Detection
Canny Edge Detection
 
Path Planning And Navigation
Path Planning And NavigationPath Planning And Navigation
Path Planning And Navigation
 
Morphological antialiasing
Morphological antialiasingMorphological antialiasing
Morphological antialiasing
 
An automatic algorithm for object recognition and detection based on asift ke...
An automatic algorithm for object recognition and detection based on asift ke...An automatic algorithm for object recognition and detection based on asift ke...
An automatic algorithm for object recognition and detection based on asift ke...
 
OpenCV presentation series- part 5
OpenCV presentation series- part 5OpenCV presentation series- part 5
OpenCV presentation series- part 5
 
Identification of Scatter Sources and Significant Reduction of Scatter Occurr...
Identification of Scatter Sources and Significant Reduction of Scatter Occurr...Identification of Scatter Sources and Significant Reduction of Scatter Occurr...
Identification of Scatter Sources and Significant Reduction of Scatter Occurr...
 
Rapidly-Exploring Random Tree
Rapidly-Exploring Random TreeRapidly-Exploring Random Tree
Rapidly-Exploring Random Tree
 

Similar to Line Detection in Computer Vision - Recent Developments and Applications

Machine learning for high-speed corner detection
Machine learning for high-speed corner detectionMachine learning for high-speed corner detection
Machine learning for high-speed corner detection
butest
 

Similar to Line Detection in Computer Vision - Recent Developments and Applications (20)

Lane detection by use of canny edge
Lane detection by use of canny edgeLane detection by use of canny edge
Lane detection by use of canny edge
 
color doppler
color dopplercolor doppler
color doppler
 
06 image features
06 image features06 image features
06 image features
 
Passive stereo vision with deep learning
Passive stereo vision with deep learningPassive stereo vision with deep learning
Passive stereo vision with deep learning
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
PSanthanam.ppt
PSanthanam.pptPSanthanam.ppt
PSanthanam.ppt
 
Outlier detection method introduction
Outlier detection method introductionOutlier detection method introduction
Outlier detection method introduction
 
Machine learning for high-speed corner detection
Machine learning for high-speed corner detectionMachine learning for high-speed corner detection
Machine learning for high-speed corner detection
 
Computer Vision - RANSAC
Computer Vision - RANSACComputer Vision - RANSAC
Computer Vision - RANSAC
 
cv1.ppt
cv1.pptcv1.ppt
cv1.ppt
 
Report
ReportReport
Report
 
A Method to Determine End-Points ofStraight Lines Detected Using the Hough Tr...
A Method to Determine End-Points ofStraight Lines Detected Using the Hough Tr...A Method to Determine End-Points ofStraight Lines Detected Using the Hough Tr...
A Method to Determine End-Points ofStraight Lines Detected Using the Hough Tr...
 
Object tracking with SURF: ARM-Based platform Implementation
Object tracking with SURF: ARM-Based platform ImplementationObject tracking with SURF: ARM-Based platform Implementation
Object tracking with SURF: ARM-Based platform Implementation
 
cohenmedioni.ppt
cohenmedioni.pptcohenmedioni.ppt
cohenmedioni.ppt
 
Line Detection using Hough transform .pptx
Line Detection using Hough transform .pptxLine Detection using Hough transform .pptx
Line Detection using Hough transform .pptx
 
Methods for comparing scanpaths and saliency maps: strengths and weaknesses
Methods for comparing scanpaths and saliency maps: strengths and weaknessesMethods for comparing scanpaths and saliency maps: strengths and weaknesses
Methods for comparing scanpaths and saliency maps: strengths and weaknesses
 
Camera-Based Road Lane Detection by Deep Learning II
Camera-Based Road Lane Detection by Deep Learning IICamera-Based Road Lane Detection by Deep Learning II
Camera-Based Road Lane Detection by Deep Learning II
 
Fisheye Omnidirectional View in Autonomous Driving
Fisheye Omnidirectional View in Autonomous DrivingFisheye Omnidirectional View in Autonomous Driving
Fisheye Omnidirectional View in Autonomous Driving
 
Computer Vision: Feature matching with RANSAC Algorithm
Computer Vision: Feature matching with RANSAC AlgorithmComputer Vision: Feature matching with RANSAC Algorithm
Computer Vision: Feature matching with RANSAC Algorithm
 
Point Cloud Processing: Estimating Normal Vectors and Curvature Indicators us...
Point Cloud Processing: Estimating Normal Vectors and Curvature Indicators us...Point Cloud Processing: Estimating Normal Vectors and Curvature Indicators us...
Point Cloud Processing: Estimating Normal Vectors and Curvature Indicators us...
 

More from Parth Nandedkar

More from Parth Nandedkar (11)

Large scale cell tracking using an approximated Sinkhorn algorithm
Large scale cell tracking using an approximated Sinkhorn algorithmLarge scale cell tracking using an approximated Sinkhorn algorithm
Large scale cell tracking using an approximated Sinkhorn algorithm
 
Large scale cell tracking using an approximated Sinkhorn algorithm
Large scale cell tracking using an approximated Sinkhorn algorithmLarge scale cell tracking using an approximated Sinkhorn algorithm
Large scale cell tracking using an approximated Sinkhorn algorithm
 
Discount tracker - Fujitsu Hackathon
Discount tracker - Fujitsu HackathonDiscount tracker - Fujitsu Hackathon
Discount tracker - Fujitsu Hackathon
 
Motion and Position Map in Cell Tracking for Bioimaging
Motion and Position Map in Cell Tracking for BioimagingMotion and Position Map in Cell Tracking for Bioimaging
Motion and Position Map in Cell Tracking for Bioimaging
 
Speech at english_seminar
Speech at english_seminarSpeech at english_seminar
Speech at english_seminar
 
Permutations and Combinations IIT JEE+Olympiad Lecture 1
Permutations and Combinations IIT JEE+Olympiad Lecture 1 Permutations and Combinations IIT JEE+Olympiad Lecture 1
Permutations and Combinations IIT JEE+Olympiad Lecture 1
 
Permutations and Combinations IIT JEE+Olympiad Lecture 4
Permutations and Combinations IIT JEE+Olympiad Lecture 4Permutations and Combinations IIT JEE+Olympiad Lecture 4
Permutations and Combinations IIT JEE+Olympiad Lecture 4
 
Permutations and Combinations IIT JEE+Olympiad Lecture 3
Permutations and Combinations IIT JEE+Olympiad Lecture 3 Permutations and Combinations IIT JEE+Olympiad Lecture 3
Permutations and Combinations IIT JEE+Olympiad Lecture 3
 
LSTM and GRU RNNs in Sentiment Analysis (Japanese)
LSTM and GRU RNNs in Sentiment Analysis (Japanese)LSTM and GRU RNNs in Sentiment Analysis (Japanese)
LSTM and GRU RNNs in Sentiment Analysis (Japanese)
 
Deep Learning Demonstration using Tensorflow (7th lecture)
Deep Learning Demonstration using Tensorflow (7th lecture)Deep Learning Demonstration using Tensorflow (7th lecture)
Deep Learning Demonstration using Tensorflow (7th lecture)
 
Basics of Deep Learning (2nd lecture)
Basics of Deep Learning (2nd lecture)Basics of Deep Learning (2nd lecture)
Basics of Deep Learning (2nd lecture)
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 

Line Detection in Computer Vision - Recent Developments and Applications

  • 1. Line Detection in Images– Recent Developments and Applications NANDEDKAR PARTH SHIRISH 1 Department of Intelligent Media, Yagi Laboratory
  • 2. 今日の流れーTopics 1.Goal of Line Detection, difference with Edge Detection 2.Successive Approximation Method 3.Hough Transform Method 4.RANSAC(Random Sample Consensus) Method 5.Vanishing Point Detection using Hough Transform 6.Applications-Rectangle Detection 2 Department of Intelligent Media, Yagi Laboratory
  • 3. 1. Goal of Line Detection Line detection is an algorithm that takes a collection of n edge points and finds all the lines on which these edge points lie. Most popular line detectors are Hough transform and convolution-based techniques. Convolution-based Line Detection: Same process as Edge Detection. 3
  • 4. 1. Difference with Edge Detection An edge is a transition from one phase/object/thing to another. On one side you have one color, on the other side you have another color. A line is a 1D structure. It has the same phase/object/thing on either side. On one side you have background, on the other side you have background also. →Better techniques can better differentiate between these. 4
  • 5. 2.Successive Approximation Method • Transforming from a curve-contour to a simpler representation (to Piecewise-linear polyline or B-spline cur • Algorithm: Mark the first and last point. Find the farthest inlier from this line and join First and this point. Now remov the farthest inlier to this line. • If contour is a line we can simplify it to that line. 5
  • 6. 3.Hough Transform Basics A line-to-point transform, that transforms the data from x,y space to m,h space, where each line is transformed to a point. Problem: neither m or h are bounded Line k to x axis ⇒ h not defined Line k to y axis ⇒ m → ∞ 6
  • 7. 3.Polar Hough Transform Now both variables are bounded! → Polar Hough Transform: Value for an arbitrary line (r – xcosθ – ysinθ = 0) in (r, θ) Where f(x,y) is the 2D image → Unit Sphere & Cubemap Mappings possible(pg. 253) 7
  • 8. 3.Polar Hough Transform – Theoretical Example Output in the case of perfectly continuous lines. 8
  • 9. 3.Hough Transform for Line Detection → Goal: To identify straight lines • Process: For each pixel at (x,y) the Polar Hough transform algorithm determines if there is enough evidence of a straight line at that pixel, using votes from sample points. → Strengths: • Gives equations of lines(but not “end-points” of segments). • Works well with simple images that contain good straight lines. (Good for Robot Vision) • Deals with broken lines very well (in next slide). • Reasonably efficient if there are “few” edge points. 9
  • 10. 3.Polar Hough Transform – Broken Line/ Sampling Example 10
  • 11. 3.Polar Hough Transform – Discrete case Same as before, but discrete. Number in Accumulator cell proportional to number of points on the line. 11
  • 12. 3.Polar Hough Transform – Voting Algorithm 12
  • 13. 3.Hough Transform for Line Detection → Problems: • Very slow of there are many edge points. • Hough Space is non-linear, different edge sensitivities in different directions. • Poor for short lines. → Recent Extensions of Hough Method: • Circle and Ellipse detection by Double Hough Method. • Image transform plus Hough for general 2D shape detection. • Vanishing Points Detection(section 4.3.3, part 5 of slides)13
  • 14. 4.RANSAC (Random Sample Consensus) Method – (For Feature Detection) • Determines the best transformation that includes the most number of match features (inliers) from the previous step. • RANSAC loop for planar pattern detection: 1. Select four feature pairs (at random) in the two angles. 2. Compute homography H (see next slide). 3. Compute inliers where SSD(pi’, Hpi) < a certain value,ε. 4. Keep largest set of inliers. 5. Re-compute least-squares estimate on all of the inliers. 14
  • 15. 4.RANSAC Method – What are Homographies? • Example of Homography • Definition: Projective–mapping between any two projection planes with the same center of projection 15
  • 16. 4.RANSAC Method – What are Homographies? • Definition: Projective–mapping between any two projection planes with the same center of projection 16
  • 17. 4.RANSAC Method – (For Line Detection) → Simple example: Let us fit a line • Use biggest set of inliers • Do least-square fit => SD is low, Very likely it is a line 17
  • 18. 4.RANSAC Method – Video: Fitting a Line → Strengths: • Robust estimation • Relatively high accuracy → Weaknesses: • Randomness. • Number of Iterations required for p% success 18
  • 19. → Goal: To collect lost 3D information from perspective in a 2D image detecting Vanishing points of Parallel lines. 19 5.Vanishing Points Detection – using Hough Transform
  • 20. 5.Vanishing Points Detection – using Hough Transform → Textbook method using Cross Product: Step 1) Calculate Vanishing Point Hypothesis (weight) = Cross product of any two line vectors =  Near-Collinear segments downweighted Step 2) Populate Hough space(accumulator) with weights and find peaks for Vanishing point votes from the lines. Step 3) Calculate Least Squares Estimate for all Vanishing points with respect to lines that voted for it. 20
  • 21. where = Green Triangle area Rule: The lower the sum of all areas subtended to segment endpoints, the more appropriate the vanishing point. 21 5.Vanishing Points Detection – using Hough Transform
  • 22. 6.Applications Rectangle Detection: Step 1) First, detect all vanishing points Step 2) Detect the Edge points/Lines that are aligned along vanishing lines. We then efficiently recover the inter-sections of pairs of lines corresponding to different vanishing points. (論文[8])22
  • 23. 6.Applications Rectangle Detection: Using only Hough Detection is an 8D vector-space problem (論文[8]). Major Quadrilaterals in image can be detected using only Vanishing Point and Line Detection (論文[8]). 23
  • 24. References [1] Polar Hough: https://www.wikiwand.com/en/Hough_transform [2] Hough Accumulator: https://chmodux.wordpress.com/2012/04/16/target- acquisition/ [3] Ransac: https://www.slideshare.net/allynjoycalcaben/computer- vision-feature-matching-with-ransac-algorithm [4] Homographies: https://docs.opencv.org/master/d9/dab/tutorial_homog raphy.html 24
  • 25. References [5] Ransac animation: https://kapernikov.com/cable-detection-in-lidar-data/ [6] Various: Computer Vision: Algorithms and Applications by Richard Szeliski [7] Vanishing Points Examples: http://teresabernardart.com/the-rules-of- perspective/#:~:text=There%20are%20three%20basic%20 types,illusion%20of%20depth%20and%20space. [8] Rectangle Detection Algorithm: https://www.researchgate.net/publication/228697341_Pe rspective_rectangle_detection 25