SlideShare a Scribd company logo
Lecture 5: Feature descriptors and matching
CSCI 455: Computer Vision
Reading
• Szeliski: 4.1
Local features: main components
1) Detection: Identify the
interest points
2) Description: Extract vector
feature descriptor surrounding
each interest point.
3) Matching: Determine
correspondence between
descriptors in two views
],,[ )1()1(
11 dxx x
],,[ )2()2(
12 dxx x
Kristen Grauman
Feature descriptors
We know how to detect good points
Next question: How to match them?
Answer: Come up with a descriptor for each point,
find similar descriptors between the two images
?
Feature descriptors
We know how to detect good points
Next question: How to match them?
Lots of possibilities
– Simple option: match square windows around the point
– State of the art approach: SIFT
• David Lowe, UBC http://www.cs.ubc.ca/~lowe/keypoints/
?
Invariance vs. discriminability
• Invariance:
– Descriptor shouldn’t change even if image is
transformed
• Discriminability:
– Descriptor should be highly unique for each point
Image transformations revisited
• Geometric
Rotation
Scale
• Photometric
Intensity change
Invariance
Suppose we are comparing two images I1 and I2
– I2 may be a transformed version of I1
– What kinds of transformations are we likely to
encounter in practice?
Invariant descriptors
• We looked at invariant / equivariant detectors
• Most feature descriptors are also designed to be
invariant to
– Translation, 2D rotation, scale
• They can usually also handle
– Limited 3D rotations (SIFT works up to about 60 degrees)
– Limited affine transforms (some are fully affine invariant)
– Limited illumination/contrast changes
How to achieve invariance
Need both of the following:
1. Make sure your detector is invariant
2. Design an invariant feature descriptor
– Simplest descriptor: a single 0
• What’s this invariant to?
– Next simplest descriptor: a square, axis-aligned 5x5
window of pixels
• What’s this invariant to?
– Let’s look at some better approaches…
• Find dominant orientation of the image patch
– E.g., given by xmax, the eigenvector of H corresponding to max (the
larger eigenvalue)
– Or simply the orientation of the (smoothed) gradient
– Rotate the patch according to this angle
Rotation invariance for
feature descriptors
Figure by Matthew Brown
Take 40x40 square window
around detected feature
– Scale to 1/5 size (using
prefiltering)
– Rotate to horizontal
– Sample 8x8 square window
centered at feature
– Intensity normalize the
window by subtracting the
mean, dividing by the
standard deviation in the
window (why?)
CSE 576: Computer Vision
Multiscale Oriented PatcheS descriptor
8 pixels
Adapted from slide by Matthew Brown
Detections at multiple scales
Basic idea:
• Take 16x16 square window around detected feature
• Compute edge orientation (angle of the gradient - 90) for each pixel
• Throw out weak edges (threshold gradient magnitude)
• Create histogram of surviving edge orientations
Scale Invariant Feature Transform
Adapted from slide by David Lowe
0 2
angle histogram
SIFT descriptor
Full version
• Divide the 16x16 window into a 4x4 grid of cells (2x2 case shown below)
• Compute an orientation histogram for each cell
• 16 cells * 8 orientations = 128 dimensional descriptor
Adapted from slide by David Lowe
Properties of SIFT
Extraordinarily robust matching technique
– Can handle changes in viewpoint
• Up to about 60 degree out of plane rotation
– Can handle significant changes in illumination
• Sometimes even day vs. night (below)
– Fast and efficient—can run in real time
– Lots of code available
• http://people.csail.mit.edu/albert/ladypack/wiki/index.php/Known_implementations_of_SIFT
SIFT Example
sift
868 SIFT features
Other descriptors
• HOG: Histogram of Gradients (HOG)
– Dalal/Triggs
– Sliding window, pedestrian detection
• FREAK: Fast Retina Keypoint
– Perceptually motivated
– Used in Visual SLAM
• LIFT: Learned Invariant Feature Transform
– Learned via deep learning
https://arxiv.org/abs/1603.09114
Questions?
Summary
• Keypoint detection: repeatable
and distinctive
– Corners, blobs, stable regions
– Harris, DoG
• Descriptors: robust and selective
– spatial histograms of orientation
– SIFT and variants are typically good
for stitching and recognition
– But, need not stick to one
Which features match?
Feature matching
Given a feature in I1, how to find the best match
in I2?
1. Define distance function that compares two
descriptors
2. Test all the features in I2, find the one with min
distance
Feature distance
How to define the difference between two features f1, f2?
– Simple approach: L2 distance, ||f1 - f2 ||
– can give small distances for ambiguous (incorrect) matches
I1 I2
f1 f2
f1 f2f2
'
Feature distance
How to define the difference between two features f1, f2?
• Better approach: ratio distance = ||f1 - f2 || / || f1 - f2’ ||
• f2 is best SSD match to f1 in I2
• f2’ is 2nd best SSD match to f1 in I2
• gives large values for ambiguous matches
I1 I2
Feature distance
• Does the SSD vs “ratio distance” change the
best match to a given feature in image 1?
Feature matching example
58 matches (thresholded by ratio score)
Feature matching example
51 matches (thresholded by ratio score)
We’ll deal with
outliers later
Evaluating the results
How can we measure the performance of a feature matcher?
50
75
200
feature distance
True/false positives
The distance threshold affects performance
– True positives = # of detected matches that are correct
• Suppose we want to maximize these—how to choose threshold?
– False positives = # of detected matches that are incorrect
• Suppose we want to minimize these—how to choose threshold?
50
75
200false match
true match
feature distance
How can we measure the performance of a feature matcher?
0.7
Evaluating the results
0 1
1
false positive rate
true
positive
rate
# true positives
# matching features (positives)
0.1
How can we measure the performance of a feature matcher?
recall
# false positives
# unmatched features (negatives)
1 - specificity
0.7
Evaluating the results
0 1
1
false positive rate
true
positive
rate
# true positives
# matching features (positives)
0.1
# false positives
# unmatched features (negatives)
ROC curve (“Receiver Operator Characteristic”)
How can we measure the performance of a feature matcher?
recall
1 - specificity
Single number: Area
Under the Curve (AUC)
E.g. AUC = 0.87
1 is the best
More on feature detection/description
http://www.robots.ox.ac.uk/~vgg/research/affine/
http://www.cs.ubc.ca/~lowe/keypoints/
http://www.vision.ee.ethz.ch/~surf/
Lots of applications
Features are used for:
– Image alignment (e.g., mosaics)
– 3D reconstruction
– Motion tracking
– Object recognition
– Indexing and database retrieval
– Robot navigation
– … other
Object recognition (David Lowe)
3D Reconstruction
Internet Photos (“Colosseum”) Reconstructed 3D cameras
and points
Sony Aibo
SIFT usage:
Recognize
charging
station
Communicate
with visual
cards
Teach object
recognition
Augmented Reality
Project 2:
Feature detection and matching
Demo
http://www.cs.cornell.edu/courses/cs6670/2009fa/projects/p1/project1.html
Questions?

More Related Content

Similar to Computer Vision descriptors

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
cairo university
 
Feature detection and matching
Feature detection and matchingFeature detection and matching
Feature detection and matching
Kuppusamy P
 
Computer Vision harris
Computer Vision harrisComputer Vision harris
Computer Vision harris
Wael Badawy
 
Michal Erel's SIFT presentation
Michal Erel's SIFT presentationMichal Erel's SIFT presentation
Michal Erel's SIFT presentation
wolf
 
06_features_slides.pdf
06_features_slides.pdf06_features_slides.pdf
06_features_slides.pdf
JanuarAdiPutra3
 
SIFT.ppt
SIFT.pptSIFT.ppt
SIFT.ppt
ShubhShubh12
 
SIFT.ppt
SIFT.pptSIFT.ppt
SIFT.ppt
MaTruongThanh1
 
Machine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackboxMachine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackbox
Ivo Andreev
 
Cahall Final Intern Presentation
Cahall Final Intern PresentationCahall Final Intern Presentation
Cahall Final Intern Presentation
Daniel Cahall
 
Scale Invariant Feature Transform
Scale Invariant Feature TransformScale Invariant Feature Transform
Scale Invariant Feature Transform
kislayabhi
 
Part2
Part2Part2
Nearest Neighbor Customer Insight
Nearest Neighbor Customer InsightNearest Neighbor Customer Insight
Nearest Neighbor Customer Insight
MapR Technologies
 
SIFT Based Feature Extraction and Matching for Archaeological Artifacts
SIFT Based Feature Extraction and Matching for Archaeological ArtifactsSIFT Based Feature Extraction and Matching for Archaeological Artifacts
SIFT Based Feature Extraction and Matching for Archaeological Artifacts
BIPUL MOHANTO [LION]
 
Practical Digital Image Processing 4
Practical Digital Image Processing 4Practical Digital Image Processing 4
Practical Digital Image Processing 4
Aly Abdelkareem
 
L5. Data Transformation and Feature Engineering
L5. Data Transformation and Feature EngineeringL5. Data Transformation and Feature Engineering
L5. Data Transformation and Feature Engineering
Machine Learning Valencia
 
Cbir ‐ features
Cbir ‐ featuresCbir ‐ features
Cbir ‐ features
tanweimin666
 
Machine Learning Pipelines
Machine Learning PipelinesMachine Learning Pipelines
Machine Learning Pipelines
jeykottalam
 
Object recognition
Object recognitionObject recognition
Object recognition
saniacorreya
 
30thSep2014
30thSep201430thSep2014
30thSep2014
Mia liu
 
PPT s06-machine vision-s2
PPT s06-machine vision-s2PPT s06-machine vision-s2
PPT s06-machine vision-s2
Binus Online Learning
 

Similar to Computer Vision descriptors (20)

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
 
Feature detection and matching
Feature detection and matchingFeature detection and matching
Feature detection and matching
 
Computer Vision harris
Computer Vision harrisComputer Vision harris
Computer Vision harris
 
Michal Erel's SIFT presentation
Michal Erel's SIFT presentationMichal Erel's SIFT presentation
Michal Erel's SIFT presentation
 
06_features_slides.pdf
06_features_slides.pdf06_features_slides.pdf
06_features_slides.pdf
 
SIFT.ppt
SIFT.pptSIFT.ppt
SIFT.ppt
 
SIFT.ppt
SIFT.pptSIFT.ppt
SIFT.ppt
 
Machine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackboxMachine learning for IoT - unpacking the blackbox
Machine learning for IoT - unpacking the blackbox
 
Cahall Final Intern Presentation
Cahall Final Intern PresentationCahall Final Intern Presentation
Cahall Final Intern Presentation
 
Scale Invariant Feature Transform
Scale Invariant Feature TransformScale Invariant Feature Transform
Scale Invariant Feature Transform
 
Part2
Part2Part2
Part2
 
Nearest Neighbor Customer Insight
Nearest Neighbor Customer InsightNearest Neighbor Customer Insight
Nearest Neighbor Customer Insight
 
SIFT Based Feature Extraction and Matching for Archaeological Artifacts
SIFT Based Feature Extraction and Matching for Archaeological ArtifactsSIFT Based Feature Extraction and Matching for Archaeological Artifacts
SIFT Based Feature Extraction and Matching for Archaeological Artifacts
 
Practical Digital Image Processing 4
Practical Digital Image Processing 4Practical Digital Image Processing 4
Practical Digital Image Processing 4
 
L5. Data Transformation and Feature Engineering
L5. Data Transformation and Feature EngineeringL5. Data Transformation and Feature Engineering
L5. Data Transformation and Feature Engineering
 
Cbir ‐ features
Cbir ‐ featuresCbir ‐ features
Cbir ‐ features
 
Machine Learning Pipelines
Machine Learning PipelinesMachine Learning Pipelines
Machine Learning Pipelines
 
Object recognition
Object recognitionObject recognition
Object recognition
 
30thSep2014
30thSep201430thSep2014
30thSep2014
 
PPT s06-machine vision-s2
PPT s06-machine vision-s2PPT s06-machine vision-s2
PPT s06-machine vision-s2
 

More from Wael Badawy

HTML introduction
HTML introduction HTML introduction
HTML introduction
Wael Badawy
 
Np complete reductions
Np complete reductionsNp complete reductions
Np complete reductions
Wael 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 Automata
Wael Badawy
 
Parsers -
Parsers -Parsers -
Parsers -
Wael Badawy
 
Computer Vision Cameras
Computer Vision CamerasComputer Vision Cameras
Computer Vision Cameras
Wael Badawy
 
Computer Vision Gans
Computer Vision GansComputer Vision Gans
Computer Vision Gans
Wael Badawy
 
Computer Vision image classification
Computer Vision image classificationComputer Vision image classification
Computer Vision image classification
Wael Badawy
 
Computer Vision Structure from motion
Computer Vision Structure from motionComputer Vision Structure from motion
Computer Vision Structure from motion
Wael Badawy
 
Universal turing
Universal turing Universal turing
Universal turing
Wael Badawy
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
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 properties
Wael 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 free
Wael Badawy
 
Computer Vision sfm
Computer Vision sfmComputer Vision sfm
Computer Vision sfm
Wael Badawy
 
Computer vision - photometric
Computer vision - photometricComputer vision - photometric
Computer vision - photometric
Wael 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

HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
EduSkills OECD
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
JomonJoseph58
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
danielkiash986
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
Mohammad Al-Dhahabi
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
Celine George
 

Recently uploaded (20)

HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)skeleton System.pdf (skeleton system wow)
skeleton System.pdf (skeleton system wow)
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
 

Computer Vision descriptors

  • 1. Lecture 5: Feature descriptors and matching CSCI 455: Computer Vision
  • 3. Local features: main components 1) Detection: Identify the interest points 2) Description: Extract vector feature descriptor surrounding each interest point. 3) Matching: Determine correspondence between descriptors in two views ],,[ )1()1( 11 dxx x ],,[ )2()2( 12 dxx x Kristen Grauman
  • 4. Feature descriptors We know how to detect good points Next question: How to match them? Answer: Come up with a descriptor for each point, find similar descriptors between the two images ?
  • 5. Feature descriptors We know how to detect good points Next question: How to match them? Lots of possibilities – Simple option: match square windows around the point – State of the art approach: SIFT • David Lowe, UBC http://www.cs.ubc.ca/~lowe/keypoints/ ?
  • 6. Invariance vs. discriminability • Invariance: – Descriptor shouldn’t change even if image is transformed • Discriminability: – Descriptor should be highly unique for each point
  • 7. Image transformations revisited • Geometric Rotation Scale • Photometric Intensity change
  • 8. Invariance Suppose we are comparing two images I1 and I2 – I2 may be a transformed version of I1 – What kinds of transformations are we likely to encounter in practice?
  • 9. Invariant descriptors • We looked at invariant / equivariant detectors • Most feature descriptors are also designed to be invariant to – Translation, 2D rotation, scale • They can usually also handle – Limited 3D rotations (SIFT works up to about 60 degrees) – Limited affine transforms (some are fully affine invariant) – Limited illumination/contrast changes
  • 10. How to achieve invariance Need both of the following: 1. Make sure your detector is invariant 2. Design an invariant feature descriptor – Simplest descriptor: a single 0 • What’s this invariant to? – Next simplest descriptor: a square, axis-aligned 5x5 window of pixels • What’s this invariant to? – Let’s look at some better approaches…
  • 11. • Find dominant orientation of the image patch – E.g., given by xmax, the eigenvector of H corresponding to max (the larger eigenvalue) – Or simply the orientation of the (smoothed) gradient – Rotate the patch according to this angle Rotation invariance for feature descriptors Figure by Matthew Brown
  • 12. Take 40x40 square window around detected feature – Scale to 1/5 size (using prefiltering) – Rotate to horizontal – Sample 8x8 square window centered at feature – Intensity normalize the window by subtracting the mean, dividing by the standard deviation in the window (why?) CSE 576: Computer Vision Multiscale Oriented PatcheS descriptor 8 pixels Adapted from slide by Matthew Brown
  • 14. Basic idea: • Take 16x16 square window around detected feature • Compute edge orientation (angle of the gradient - 90) for each pixel • Throw out weak edges (threshold gradient magnitude) • Create histogram of surviving edge orientations Scale Invariant Feature Transform Adapted from slide by David Lowe 0 2 angle histogram
  • 15. SIFT descriptor Full version • Divide the 16x16 window into a 4x4 grid of cells (2x2 case shown below) • Compute an orientation histogram for each cell • 16 cells * 8 orientations = 128 dimensional descriptor Adapted from slide by David Lowe
  • 16. Properties of SIFT Extraordinarily robust matching technique – Can handle changes in viewpoint • Up to about 60 degree out of plane rotation – Can handle significant changes in illumination • Sometimes even day vs. night (below) – Fast and efficient—can run in real time – Lots of code available • http://people.csail.mit.edu/albert/ladypack/wiki/index.php/Known_implementations_of_SIFT
  • 18. Other descriptors • HOG: Histogram of Gradients (HOG) – Dalal/Triggs – Sliding window, pedestrian detection • FREAK: Fast Retina Keypoint – Perceptually motivated – Used in Visual SLAM • LIFT: Learned Invariant Feature Transform – Learned via deep learning https://arxiv.org/abs/1603.09114
  • 20. Summary • Keypoint detection: repeatable and distinctive – Corners, blobs, stable regions – Harris, DoG • Descriptors: robust and selective – spatial histograms of orientation – SIFT and variants are typically good for stitching and recognition – But, need not stick to one
  • 22. Feature matching Given a feature in I1, how to find the best match in I2? 1. Define distance function that compares two descriptors 2. Test all the features in I2, find the one with min distance
  • 23. Feature distance How to define the difference between two features f1, f2? – Simple approach: L2 distance, ||f1 - f2 || – can give small distances for ambiguous (incorrect) matches I1 I2 f1 f2
  • 24. f1 f2f2 ' Feature distance How to define the difference between two features f1, f2? • Better approach: ratio distance = ||f1 - f2 || / || f1 - f2’ || • f2 is best SSD match to f1 in I2 • f2’ is 2nd best SSD match to f1 in I2 • gives large values for ambiguous matches I1 I2
  • 25. Feature distance • Does the SSD vs “ratio distance” change the best match to a given feature in image 1?
  • 26. Feature matching example 58 matches (thresholded by ratio score)
  • 27. Feature matching example 51 matches (thresholded by ratio score) We’ll deal with outliers later
  • 28. Evaluating the results How can we measure the performance of a feature matcher? 50 75 200 feature distance
  • 29. True/false positives The distance threshold affects performance – True positives = # of detected matches that are correct • Suppose we want to maximize these—how to choose threshold? – False positives = # of detected matches that are incorrect • Suppose we want to minimize these—how to choose threshold? 50 75 200false match true match feature distance How can we measure the performance of a feature matcher?
  • 30. 0.7 Evaluating the results 0 1 1 false positive rate true positive rate # true positives # matching features (positives) 0.1 How can we measure the performance of a feature matcher? recall # false positives # unmatched features (negatives) 1 - specificity
  • 31. 0.7 Evaluating the results 0 1 1 false positive rate true positive rate # true positives # matching features (positives) 0.1 # false positives # unmatched features (negatives) ROC curve (“Receiver Operator Characteristic”) How can we measure the performance of a feature matcher? recall 1 - specificity Single number: Area Under the Curve (AUC) E.g. AUC = 0.87 1 is the best
  • 32. More on feature detection/description http://www.robots.ox.ac.uk/~vgg/research/affine/ http://www.cs.ubc.ca/~lowe/keypoints/ http://www.vision.ee.ethz.ch/~surf/
  • 33. Lots of applications Features are used for: – Image alignment (e.g., mosaics) – 3D reconstruction – Motion tracking – Object recognition – Indexing and database retrieval – Robot navigation – … other
  • 35. 3D Reconstruction Internet Photos (“Colosseum”) Reconstructed 3D cameras and points
  • 38. Project 2: Feature detection and matching Demo http://www.cs.cornell.edu/courses/cs6670/2009fa/projects/p1/project1.html