SlideShare a Scribd company logo
1 of 30
Lecture 9: RANSAC
CSCI 455: Computer Vision
http://www.wired.com/gadgetlab/2010/07/camera-software-lets-you-see-into-the-past/
RAndom SAmple Consensus
Reading
• Szeliski: Chapter 6.1
Outliers outliers
inliers
Robustness
• Let’s consider a simpler example… linear
regression
• How can we fix this?
Problem: Fit a line to these datapoints Least squares fit
We need a better cost function…
• Suggestions?
Idea
• Given a hypothesized line
• Count the number of points that “agree” with
the line
– “Agree” = within a small distance of the line
– I.e., the inliers to that line
• For all possible lines, select the one with the
largest number of inliers
Counting inliers
Counting inliers
Inliers: 3
Counting inliers
Inliers: 20
How do we find the best line?
• Unlike least-squares, no simple closed-form
solution
• Hypothesize-and-test
– Try out many lines, keep the best one
– Which lines?
Translations
RAndom SAmple Consensus
Select one match at random, count inliers
RAndom SAmple Consensus
Select another match at random, count inliers
RAndom SAmple Consensus
Output the translation with the highest number of inliers
RANSAC
• Idea:
– All the inliers will agree with each other on the
translation vector; the (hopefully small) number of
outliers will (hopefully) disagree with each other
• RANSAC only has guarantees if there are < 50% outliers
– “All good matches are alike; every bad match is
bad in its own way.”
– Tolstoy via Alyosha Efros
RANSAC
• Inlier threshold related to the amount of
noise we expect in inliers
– Often model noise as Gaussian with some
standard deviation (e.g., 3 pixels)
• Number of rounds related to the percentage
of outliers we expect, and the probability of
success we’d like to guarantee
– Suppose there are 20% outliers, and we want to
find the correct answer with 99% probability
– How many rounds do we need?
RANSAC
x translation
y translation
set threshold so that, e.g.,
95% of the Gaussian
lies inside that radius
RANSAC
• Back to linear regression
• How do we generate a hypothesis?
x
y
RANSAC
x
y
• Back to linear regression
• How do we generate a hypothesis?
RANSAC
• General version:
1. Randomly choose s samples
• Typically s = minimum sample size that lets you fit a
model
2. Fit a model (e.g., line) to those samples
3. Count the number of inliers that approximately
fit the model
4. Repeat N times
5. Choose the model that has the largest set of
inliers
How many rounds?
• If we have to choose s samples each time
– with an outlier ratio e
– and we want the right answer with probability p
proportion of outliers e
s 5% 10% 20% 25% 30% 40% 50%
2 2 3 5 6 7 11 17
3 3 4 7 9 11 19 35
4 3 5 9 13 17 34 72
5 4 6 12 17 26 57 146
6 4 7 16 24 37 97 293
7 4 8 20 33 54 163 588
8 5 9 26 44 78 272 1177
Source: M. Pollefeysp = 0.99
How big is s?
• For alignment, depends on the motion model
– Here, each sample is a correspondence (pair of
matching points)
RANSAC pros and cons
• Pros
– Simple and general
– Applicable to many different problems
– Often works well in practice
• Cons
– Parameters to tune
– Sometimes too many iterations are required
– Can fail for extremely low inlier ratios
– We can often do better than brute-force sampling
Final step: least squares fit
Find average translation vector over all inliers
RANSAC
• An example of a “voting”-based fitting scheme
• Each hypothesis gets voted on by each data
point, best hypothesis wins
• There are many other types of voting schemes
– E.g., Hough transforms…
Panoramas
• Now we know how to create panoramas!
• Given two images:
– Step 1: Detect features
– Step 2: Match features
– Step 3: Compute a homography using RANSAC
– Step 4: Combine the images together (somehow)
• What if we have more than two images?
Can we use homographies to create a
360 panorama?
• In order to figure this out, we need to learn
what a camera is
360 panorama
Questions?
Hough transform
r
q

More Related Content

What's hot

Image segmentation based on color
Image segmentation based on colorImage segmentation based on color
Image segmentation based on coloreSAT Journals
 
Image pre processing - local processing
Image pre processing - local processingImage pre processing - local processing
Image pre processing - local processingAshish Kumar
 
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 Algorithmallyn joy calcaben
 
Image filtering in Digital image processing
Image filtering in Digital image processingImage filtering in Digital image processing
Image filtering in Digital image processingAbinaya B
 
Color image processing Presentation
Color image processing PresentationColor image processing Presentation
Color image processing PresentationRevanth Chimmani
 
Edge linking in image processing
Edge linking in image processingEdge linking in image processing
Edge linking in image processingVARUN KUMAR
 
Feature detection and matching
Feature detection and matchingFeature detection and matching
Feature detection and matchingKuppusamy P
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313Slideshare
 
Computer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and MotionComputer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and MotionDamian T. Gordon
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image FundamentalsA B Shinde
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restorationMd Shabir Alam
 
ImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).pptImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).pptVikramBarapatre2
 
A Deep Journey into Super-resolution
A Deep Journey into Super-resolutionA Deep Journey into Super-resolution
A Deep Journey into Super-resolutionRonak Mehta
 
Literature Review on Single Image Super Resolution
Literature Review on Single Image Super ResolutionLiterature Review on Single Image Super Resolution
Literature Review on Single Image Super Resolutionijtsrd
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)asodariyabhavesh
 
Faster R-CNN: Towards real-time object detection with region proposal network...
Faster R-CNN: Towards real-time object detection with region proposal network...Faster R-CNN: Towards real-time object detection with region proposal network...
Faster R-CNN: Towards real-time object detection with region proposal network...Universitat Politècnica de Catalunya
 

What's hot (20)

Image segmentation based on color
Image segmentation based on colorImage segmentation based on color
Image segmentation based on color
 
Image compression models
Image compression modelsImage compression models
Image compression models
 
Image pre processing - local processing
Image pre processing - local processingImage pre processing - local processing
Image pre processing - local processing
 
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
 
Image filtering in Digital image processing
Image filtering in Digital image processingImage filtering in Digital image processing
Image filtering in Digital image processing
 
Color image processing Presentation
Color image processing PresentationColor image processing Presentation
Color image processing Presentation
 
Edge detection
Edge detectionEdge detection
Edge detection
 
Edge linking in image processing
Edge linking in image processingEdge linking in image processing
Edge linking in image processing
 
Psuedo color
Psuedo colorPsuedo color
Psuedo color
 
Feature detection and matching
Feature detection and matchingFeature detection and matching
Feature detection and matching
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
 
Computer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and MotionComputer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and Motion
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
 
Digital Image restoration
Digital Image restorationDigital Image restoration
Digital Image restoration
 
ImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).pptImageProcessing10-Segmentation(Thresholding) (1).ppt
ImageProcessing10-Segmentation(Thresholding) (1).ppt
 
A Deep Journey into Super-resolution
A Deep Journey into Super-resolutionA Deep Journey into Super-resolution
A Deep Journey into Super-resolution
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Literature Review on Single Image Super Resolution
Literature Review on Single Image Super ResolutionLiterature Review on Single Image Super Resolution
Literature Review on Single Image Super Resolution
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
 
Faster R-CNN: Towards real-time object detection with region proposal network...
Faster R-CNN: Towards real-time object detection with region proposal network...Faster R-CNN: Towards real-time object detection with region proposal network...
Faster R-CNN: Towards real-time object detection with region proposal network...
 

Similar to Computer Vision - RANSAC

Line Detection in Computer Vision
Line Detection in Computer VisionLine Detection in Computer Vision
Line Detection in Computer VisionParth Nandedkar
 
Machine Learning with Python made easy and simple
Machine Learning with Python  made easy and simple Machine Learning with Python  made easy and simple
Machine Learning with Python made easy and simple Rohit Dubey
 
Applied Mathematical Modeling with Apache Solr - Joel Bernstein, Lucidworks
Applied Mathematical Modeling with Apache Solr - Joel Bernstein, LucidworksApplied Mathematical Modeling with Apache Solr - Joel Bernstein, Lucidworks
Applied Mathematical Modeling with Apache Solr - Joel Bernstein, LucidworksLucidworks
 
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...cscpconf
 
Line Detection in Computer Vision - Recent Developments and Applications
Line Detection in Computer Vision - Recent Developments and ApplicationsLine Detection in Computer Vision - Recent Developments and Applications
Line Detection in Computer Vision - Recent Developments and ApplicationsParth Nandedkar
 
Unit III_Ch 17_Probablistic Methods.pptx
Unit III_Ch 17_Probablistic Methods.pptxUnit III_Ch 17_Probablistic Methods.pptx
Unit III_Ch 17_Probablistic Methods.pptxsmithashetty24
 
17 large scale machine learning
17 large scale machine learning17 large scale machine learning
17 large scale machine learningTanmayVijay1
 
10_support_vector_machines (1).pptx
10_support_vector_machines (1).pptx10_support_vector_machines (1).pptx
10_support_vector_machines (1).pptxshyedshahriar
 
Data Analysis and Algorithms Lecture 1: Introduction
 Data Analysis and Algorithms Lecture 1: Introduction Data Analysis and Algorithms Lecture 1: Introduction
Data Analysis and Algorithms Lecture 1: IntroductionTayyabSattar5
 
An Inductive inference Machine
An Inductive inference MachineAn Inductive inference Machine
An Inductive inference MachineAly Abdelkareem
 
Anomaly detection Full Article
Anomaly detection Full ArticleAnomaly detection Full Article
Anomaly detection Full ArticleMenglinLiu1
 
EGUE Technikrom Final_8_12_13
EGUE Technikrom Final_8_12_13EGUE Technikrom Final_8_12_13
EGUE Technikrom Final_8_12_13Paul Brodbeck
 
Simple math for anomaly detection toufic boubez - metafor software - monito...
Simple math for anomaly detection   toufic boubez - metafor software - monito...Simple math for anomaly detection   toufic boubez - metafor software - monito...
Simple math for anomaly detection toufic boubez - metafor software - monito...tboubez
 
Model Selection and Validation
Model Selection and ValidationModel Selection and Validation
Model Selection and Validationgmorishita
 
cs 601 - lecture 1.pptx
cs 601 - lecture 1.pptxcs 601 - lecture 1.pptx
cs 601 - lecture 1.pptxGopalPatidar13
 

Similar to Computer Vision - RANSAC (20)

lec09_ransac.pptx
lec09_ransac.pptxlec09_ransac.pptx
lec09_ransac.pptx
 
15303589.ppt
15303589.ppt15303589.ppt
15303589.ppt
 
Line Detection in Computer Vision
Line Detection in Computer VisionLine Detection in Computer Vision
Line Detection in Computer Vision
 
Machine Learning with Python made easy and simple
Machine Learning with Python  made easy and simple Machine Learning with Python  made easy and simple
Machine Learning with Python made easy and simple
 
Applied Mathematical Modeling with Apache Solr - Joel Bernstein, Lucidworks
Applied Mathematical Modeling with Apache Solr - Joel Bernstein, LucidworksApplied Mathematical Modeling with Apache Solr - Joel Bernstein, Lucidworks
Applied Mathematical Modeling with Apache Solr - Joel Bernstein, Lucidworks
 
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
 
Line Detection in Computer Vision - Recent Developments and Applications
Line Detection in Computer Vision - Recent Developments and ApplicationsLine Detection in Computer Vision - Recent Developments and Applications
Line Detection in Computer Vision - Recent Developments and Applications
 
Unit III_Ch 17_Probablistic Methods.pptx
Unit III_Ch 17_Probablistic Methods.pptxUnit III_Ch 17_Probablistic Methods.pptx
Unit III_Ch 17_Probablistic Methods.pptx
 
17 large scale machine learning
17 large scale machine learning17 large scale machine learning
17 large scale machine learning
 
10_support_vector_machines (1).pptx
10_support_vector_machines (1).pptx10_support_vector_machines (1).pptx
10_support_vector_machines (1).pptx
 
Data Analysis and Algorithms Lecture 1: Introduction
 Data Analysis and Algorithms Lecture 1: Introduction Data Analysis and Algorithms Lecture 1: Introduction
Data Analysis and Algorithms Lecture 1: Introduction
 
An Inductive inference Machine
An Inductive inference MachineAn Inductive inference Machine
An Inductive inference Machine
 
Anomaly detection Full Article
Anomaly detection Full ArticleAnomaly detection Full Article
Anomaly detection Full Article
 
CHAPTER 4.1.pdf
CHAPTER 4.1.pdfCHAPTER 4.1.pdf
CHAPTER 4.1.pdf
 
lec10svm.ppt
lec10svm.pptlec10svm.ppt
lec10svm.ppt
 
Week08.pdf
Week08.pdfWeek08.pdf
Week08.pdf
 
EGUE Technikrom Final_8_12_13
EGUE Technikrom Final_8_12_13EGUE Technikrom Final_8_12_13
EGUE Technikrom Final_8_12_13
 
Simple math for anomaly detection toufic boubez - metafor software - monito...
Simple math for anomaly detection   toufic boubez - metafor software - monito...Simple math for anomaly detection   toufic boubez - metafor software - monito...
Simple math for anomaly detection toufic boubez - metafor software - monito...
 
Model Selection and Validation
Model Selection and ValidationModel Selection and Validation
Model Selection and Validation
 
cs 601 - lecture 1.pptx
cs 601 - lecture 1.pptxcs 601 - lecture 1.pptx
cs 601 - lecture 1.pptx
 

More from Wael Badawy

HTML introduction
HTML introduction HTML introduction
HTML introduction Wael Badawy
 
Np complete reductions
Np complete reductionsNp complete reductions
Np complete reductionsWael Badawy
 
N F A - Non Deterministic Finite Automata
N F A - Non Deterministic Finite AutomataN F A - Non Deterministic Finite Automata
N F A - Non Deterministic Finite AutomataWael Badawy
 
Computer Vision Cameras
Computer Vision CamerasComputer Vision Cameras
Computer Vision CamerasWael Badawy
 
Computer Vision Gans
Computer Vision GansComputer Vision Gans
Computer Vision GansWael Badawy
 
Computer Vision image classification
Computer Vision image classificationComputer Vision image classification
Computer Vision image classificationWael Badawy
 
Computer Vision Structure from motion
Computer Vision Structure from motionComputer Vision Structure from motion
Computer Vision Structure from motionWael Badawy
 
Universal turing
Universal turing Universal turing
Universal turing Wael Badawy
 
Turing variations
Turing variations Turing variations
Turing variations Wael Badawy
 
Time complexity
Time complexity Time complexity
Time complexity Wael Badawy
 
Regular pumping
Regular pumping Regular pumping
Regular pumping Wael Badawy
 
Regular pumping examples
Regular pumping examples Regular pumping examples
Regular pumping examples Wael Badawy
 
Regular properties
Regular propertiesRegular properties
Regular propertiesWael Badawy
 
Regular expressions
Regular expressions Regular expressions
Regular expressions Wael Badawy
 
Pushdown Automota
Pushdown Automota Pushdown Automota
Pushdown Automota Wael Badawy
 
Pda accept context free
Pda accept context freePda accept context free
Pda accept context freeWael Badawy
 
Computer Vision sfm
Computer Vision sfmComputer Vision sfm
Computer Vision sfmWael Badawy
 
Computer vision - photometric
Computer vision - photometricComputer vision - photometric
Computer vision - photometricWael Badawy
 

More from Wael Badawy (20)

HTML introduction
HTML introduction HTML introduction
HTML introduction
 
Np complete reductions
Np complete reductionsNp complete reductions
Np complete reductions
 
N F A - Non Deterministic Finite Automata
N F A - Non Deterministic Finite AutomataN F A - Non Deterministic Finite Automata
N F A - Non Deterministic Finite Automata
 
Parsers -
Parsers -Parsers -
Parsers -
 
Computer Vision Cameras
Computer Vision CamerasComputer Vision Cameras
Computer Vision Cameras
 
Computer Vision Gans
Computer Vision GansComputer Vision Gans
Computer Vision Gans
 
Computer Vision image classification
Computer Vision image classificationComputer Vision image classification
Computer Vision image classification
 
Computer Vision Structure from motion
Computer Vision Structure from motionComputer Vision Structure from motion
Computer Vision Structure from motion
 
Universal turing
Universal turing Universal turing
Universal turing
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
Turing variations
Turing variations Turing variations
Turing variations
 
Time complexity
Time complexity Time complexity
Time complexity
 
Regular pumping
Regular pumping Regular pumping
Regular pumping
 
Regular pumping examples
Regular pumping examples Regular pumping examples
Regular pumping examples
 
Regular properties
Regular propertiesRegular properties
Regular properties
 
Regular expressions
Regular expressions Regular expressions
Regular expressions
 
Pushdown Automota
Pushdown Automota Pushdown Automota
Pushdown Automota
 
Pda accept context free
Pda accept context freePda accept context free
Pda accept context free
 
Computer Vision sfm
Computer Vision sfmComputer Vision sfm
Computer Vision sfm
 
Computer vision - photometric
Computer vision - photometricComputer vision - photometric
Computer vision - photometric
 

Recently uploaded

History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
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
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
_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
 
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
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
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
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 

Recently uploaded (20)

History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
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
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
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
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
_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
 
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
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
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
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 

Computer Vision - RANSAC

  • 1. Lecture 9: RANSAC CSCI 455: Computer Vision http://www.wired.com/gadgetlab/2010/07/camera-software-lets-you-see-into-the-past/ RAndom SAmple Consensus
  • 4. Robustness • Let’s consider a simpler example… linear regression • How can we fix this? Problem: Fit a line to these datapoints Least squares fit
  • 5. We need a better cost function… • Suggestions?
  • 6. Idea • Given a hypothesized line • Count the number of points that “agree” with the line – “Agree” = within a small distance of the line – I.e., the inliers to that line • For all possible lines, select the one with the largest number of inliers
  • 10. How do we find the best line? • Unlike least-squares, no simple closed-form solution • Hypothesize-and-test – Try out many lines, keep the best one – Which lines?
  • 12. RAndom SAmple Consensus Select one match at random, count inliers
  • 13. RAndom SAmple Consensus Select another match at random, count inliers
  • 14. RAndom SAmple Consensus Output the translation with the highest number of inliers
  • 15. RANSAC • Idea: – All the inliers will agree with each other on the translation vector; the (hopefully small) number of outliers will (hopefully) disagree with each other • RANSAC only has guarantees if there are < 50% outliers – “All good matches are alike; every bad match is bad in its own way.” – Tolstoy via Alyosha Efros
  • 16. RANSAC • Inlier threshold related to the amount of noise we expect in inliers – Often model noise as Gaussian with some standard deviation (e.g., 3 pixels) • Number of rounds related to the percentage of outliers we expect, and the probability of success we’d like to guarantee – Suppose there are 20% outliers, and we want to find the correct answer with 99% probability – How many rounds do we need?
  • 17. RANSAC x translation y translation set threshold so that, e.g., 95% of the Gaussian lies inside that radius
  • 18. RANSAC • Back to linear regression • How do we generate a hypothesis? x y
  • 19. RANSAC x y • Back to linear regression • How do we generate a hypothesis?
  • 20. RANSAC • General version: 1. Randomly choose s samples • Typically s = minimum sample size that lets you fit a model 2. Fit a model (e.g., line) to those samples 3. Count the number of inliers that approximately fit the model 4. Repeat N times 5. Choose the model that has the largest set of inliers
  • 21. How many rounds? • If we have to choose s samples each time – with an outlier ratio e – and we want the right answer with probability p proportion of outliers e s 5% 10% 20% 25% 30% 40% 50% 2 2 3 5 6 7 11 17 3 3 4 7 9 11 19 35 4 3 5 9 13 17 34 72 5 4 6 12 17 26 57 146 6 4 7 16 24 37 97 293 7 4 8 20 33 54 163 588 8 5 9 26 44 78 272 1177 Source: M. Pollefeysp = 0.99
  • 22. How big is s? • For alignment, depends on the motion model – Here, each sample is a correspondence (pair of matching points)
  • 23. RANSAC pros and cons • Pros – Simple and general – Applicable to many different problems – Often works well in practice • Cons – Parameters to tune – Sometimes too many iterations are required – Can fail for extremely low inlier ratios – We can often do better than brute-force sampling
  • 24. Final step: least squares fit Find average translation vector over all inliers
  • 25. RANSAC • An example of a “voting”-based fitting scheme • Each hypothesis gets voted on by each data point, best hypothesis wins • There are many other types of voting schemes – E.g., Hough transforms…
  • 26. Panoramas • Now we know how to create panoramas! • Given two images: – Step 1: Detect features – Step 2: Match features – Step 3: Compute a homography using RANSAC – Step 4: Combine the images together (somehow) • What if we have more than two images?
  • 27. Can we use homographies to create a 360 panorama? • In order to figure this out, we need to learn what a camera is