SlideShare a Scribd company logo
1 of 40
Download to read offline
Harris Corner Detector
Slides taken from: “Matching with Invariant Features”, Darya
Frolova, Denis Simakov, The Weizmann Institute of Science,
March 2004
An introductory example:
C.Harris, M.Stephens. “A Combined Corner and Edge Detector”. 1988
The Basic Idea
• We should easily recognize the point by
looking through a small window
• Shifting a window in any direction should
give a large change in intensity
Basic Idea (2)
“flat” region:
no change in
all directions
“edge”:
no change along
the edge direction
“corner”:
significant change
in all directions
Mathematics
Harris Detector:
Mathematics
Change of intensity for the shift [u,v]:
Intensity
Shifted
intensity
Window
function
orWindow function w(x,y) =
Gaussian1 in window, 0 outside
Eu ,v=∑
x , y
w x , y[I xu , yv−I x , y]
2
Mathematics
For small shifts [u,v] we have a bilinear approximation:
where M is a 2×2 matrix computed from image derivatives:
Eu ,v≃[u v]M [u
v]
M =∑
x , y
w x , y
[ I x
2
I x I y
I x I y I y
2
]
Mathematics
Intensity change in shifting window: eigenvalue analysis
λ1, λ2 – eigenvalues of M
direction of the
slowest change
direction of the
fastest change
(λmax)-1/2
(λmin)-1/2
Ellipse E(u,v) = const
M =∑
x , y
w x , y
[ I x
2
I x I y
I x I y I y
2
]
Mathematics
λ1
λ2
“Corner”
λ1 and λ2 are large,
λ1 ~ λ2;
E increases in all
directions
λ1 and λ2 are small;
E is almost constant
in all directions
“Edge”
λ1 >> λ2
“Edge”
λ2 >> λ1
“Flat”
region
Classification of
image points using
eigenvalues of M:
Mathematics
Measure of corner response:
(k – empirical constant, k = 0.04-0.06)
R=det M −k trace M 
2
det M =12
trace M =12
Mathematics
λ1
λ2 “Corner”
“Edge”
“Edge”
“Flat”
• R depends only on
eigenvalues of M
• R is large for a corner
• R is negative with large
magnitude for an edge
• |R| is small for a flat
region
R > 0
R < 0
R < 0|R| small
Harris Detector
• The Algorithm:
– Find points with large corner response
function R (R > threshold)
– Take the points of local maxima of R
Harris Detector: Workflow
Harris Detector: Workflow
Compute corner response R
Harris Detector: Workflow
Find points with large corner response: R>threshold
Harris Detector: Workflow
Take only the points of local maxima of R
Harris Detector: Workflow
Harris Detector: Summary
• Average intensity change in direction [u,v] can be
expressed as a bilinear form:
• Describe a point in terms of eigenvalues of M:
measure of corner response
• A good (corner) point should have a large intensity
change in all directions, i.e. R should be large
positive
R=det M −k trace M 
2
Eu ,v≃[u v]M [u
v]
Harris Detector: Properties
• Rotation invariance
• Ellipse rotates but its shape (i.e. eigenvalues)
remains the same
Harris Detector: Properties
• Partial invariance to affine intensity change
• Only derivatives are used => invariance to
intensity shift I → I + b
• Intensity scale: I → a I
Harris Detector: Properties
• But: non-invariant to image scale!
edge corner
Face Recognition
Slides taken from Jeremy Wyatt
(“www.cs.bham.ac.uk/~jlw/vision/face_recognition.ppt”)
Eigenfaces: The Idea
• Think of a face as being a weighted combination of some
“component” or “basis” faces
• These basis faces are called eigenfaces
-8029 2900 1751 1445 4238 6193
…
Face Representation
• These basis faces can be differently weighted to represent any face
• So we can use different vectors of weights to represent different
faces
-8029 -1183 2900 -2088 1751 -4336 1445 -669 4238 -4221 6193 10549
Learning Eigenfaces
• How do we pick the set of basis faces?
• We take a set of real training faces
Then we find (learn) a set of basis faces which best represent the
differences between them
We’ll use a statistical criterion for measuring this notion of “best
representation of the differences between the training faces”
We can then store each face as a set of weights for those basis faces
…
Using Eigenfaces: Recognition &
Reconstruction
• We can use the eigenfaces in two ways
• 1: we can store and then reconstruct a face from a set of weights
• 2: we can recognize a new picture of a familiar face
Learning Eigenfaces
• How do we learn them?
• We use a method called Principal Component
Analysis (PCA)
• To understand it we will need to understand
– What an eigenvector is
– What covariance is
• But first we will look at what is happening in PCA
qualitatively
Subspaces
• Imagine that our face is simply a (high dimensional) vector of pixels
• We can think more easily about 2D vectors
• Here we have data in two dimensions
• But we only really need one dimension to represent it
Finding Subspaces
• Suppose we take a line through the space
• And then take the projection of each point onto that line
• This could represent our data in “one” dimension
Finding Subspaces
• Some lines will represent the data in this way well, some badly
• This is because the projection onto some lines separates the data
well, and the projection onto some lines separates it badly
Finding Subspaces
• Rather than a line we can perform roughly the same trick with a
vector
• Now we have to scale the vector to obtain any point on the line
i µ νΦ =
ν
1
1
ν
 
=  
 
16
3
2
νΦ =
Eigenvectors
An eigenvector is a vector that obeys the following rule:
Where is a matrix, and is a scalar (called the eigenvalue)
v vµ=A
A
v
µ
• Only square matrices have eigenvectors
• Not all square matrices have eigenvectors
• An n by n matrix has at most n distinct eigenvectors
• All the distinct eigenvectors of a matrix are orthogonal
Covariance
• Which single vector can be used to separate these points as much as
possible?
• This vector turns out to be a vector expressing the direction of the
correlation
• Here are two variables and
• They co-vary (y tends to change in roughly the same direction as x)
1x
2x
1x 2x
Covariance
• The covariances can be expressed as a matrix
• The diagonal elements are the variances e.g. Var(x1)
• The covariance of two variables is:
1x
2x
.617 .615
.615 .717
C
 
=  
 
1x
2x1x
2x
1 1 2 2
1
1 2
( )( )
cov( , )
1
n
i i
i
x x x x
x x
n
=
− −
=
−
∑
Eigenvectors of the covariance
matrix
• The covariance matrix has eigenvectors
covariance matrix
eigenvectors
eigenvalues
• Eigenvectors with larger eigenvalues
correspond to directions in which the
data varies more
• Finding the eigenvectors and eigenvalues of
the covariance matrix for a set of data is called
principal component analysis
1x
2x
.617 .615
.615 .717
C
 
=  
 
1
.735
.678
ν
− 
=  
 
2
.678
.735
ν
 
=  
 
1 0.049µ = 2 1.284µ =
Expressing points
• Suppose you think of your eigenvectors as specifying a new vector
space
• i.e. one can reference any point in terms of those eigenvectors
• A point’s position in this new coordinate system is what we earlier
referred to as its “weight vector”
• For many data sets you can cope with fewer dimensions in the new
space than in the old space
Eigenfaces
• In the face case:
– the face is a point in a high-dimensional space
– the training set of face pictures is our set of points
• Training:
– calculate the covariance matrix of the faces
– find the eigenvectors of the covariance matrix
• These eigenvectors are the eigenfaces or basis faces
• Eigenfaces with bigger eigenvalues will explain more
of the variation in the set of faces, i.e. will be more
distinguishing
Eigenfaces: image space to face
space
• When we see an image of a face we can transform it to face
space
• There are k=1…n eigenfaces
• The ith
face in image space is a vector
• The corresponding weight is
• We calculate the corresponding weight for every eigenface
.k kv= i
w x
kv
i
x
kw
Recognition in face space
• Recognition is now simple. We find the euclidean distance d
between our face and all the other stored faces in face space:
• The closest face in face space is the chosen match
( )
2
1 2 1 2
1
( , )
n
i i
i
d w w w w
=
= −∑
Reconstruction
• The more eigenfaces you have the better the reconstruction, but you
can have high quality reconstruction even with a small number of
eigenfaces
82 70 50
30 20 10
Summary
• Statistical approach to visual recognition
• Also used for object recognition
• Problems
• Reference: M. Turk and A. Pentland (1991). Eigenfaces
for recognition, Journal of Cognitive Neuroscience, 3(1):
71–86.

More Related Content

What's hot

EDGE DETECTION USING SOBEL OPERATOR.pptx
EDGE DETECTION USING SOBEL OPERATOR.pptxEDGE DETECTION USING SOBEL OPERATOR.pptx
EDGE DETECTION USING SOBEL OPERATOR.pptxkolaruboys
 
Digital Image Processing: Digital Image Fundamentals
Digital Image Processing: Digital Image FundamentalsDigital Image Processing: Digital Image Fundamentals
Digital Image Processing: Digital Image FundamentalsMostafa G. M. Mostafa
 
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
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithmsRajendran
 
Scale Invariant Feature Transform
Scale Invariant Feature TransformScale Invariant Feature Transform
Scale Invariant Feature Transformkislayabhi
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1shabanam tamboli
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processingAhmed Daoud
 
Simplification of cfg ppt
Simplification of cfg pptSimplification of cfg ppt
Simplification of cfg pptShiela Rani
 
Bit plane slicing
Bit plane slicingBit plane slicing
Bit plane slicingAsad Ali
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manualUma mohan
 
Machine learning with neural networks
Machine learning with neural networksMachine learning with neural networks
Machine learning with neural networksLet's talk about IT
 
Digital Image Processing Fundamental
Digital Image Processing FundamentalDigital Image Processing Fundamental
Digital Image Processing FundamentalThuong Nguyen Canh
 
Image feature extraction
Image feature extractionImage feature extraction
Image feature extractionRishabh shah
 

What's hot (20)

Canny Edge Detection
Canny Edge DetectionCanny Edge Detection
Canny Edge Detection
 
EDGE DETECTION USING SOBEL OPERATOR.pptx
EDGE DETECTION USING SOBEL OPERATOR.pptxEDGE DETECTION USING SOBEL OPERATOR.pptx
EDGE DETECTION USING SOBEL OPERATOR.pptx
 
Chapter 5 of 1
Chapter 5 of 1Chapter 5 of 1
Chapter 5 of 1
 
Digital Image Processing: Digital Image Fundamentals
Digital Image Processing: Digital Image FundamentalsDigital Image Processing: Digital Image Fundamentals
Digital Image Processing: Digital Image Fundamentals
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
 
Greedy algorithms
Greedy algorithmsGreedy algorithms
Greedy algorithms
 
Computer Vision
Computer VisionComputer Vision
Computer Vision
 
Scale Invariant Feature Transform
Scale Invariant Feature TransformScale Invariant Feature Transform
Scale Invariant Feature Transform
 
Illumination Models & Shading
Illumination Models & ShadingIllumination Models & Shading
Illumination Models & Shading
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
Simplification of cfg ppt
Simplification of cfg pptSimplification of cfg ppt
Simplification of cfg ppt
 
fractals
fractalsfractals
fractals
 
Bit plane slicing
Bit plane slicingBit plane slicing
Bit plane slicing
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
Machine learning with neural networks
Machine learning with neural networksMachine learning with neural networks
Machine learning with neural networks
 
Digital Image Processing Fundamental
Digital Image Processing FundamentalDigital Image Processing Fundamental
Digital Image Processing Fundamental
 
Image feature extraction
Image feature extractionImage feature extraction
Image feature extraction
 
Distance function
Distance functionDistance function
Distance function
 
Edge detection
Edge detectionEdge detection
Edge detection
 

Similar to Harris corner detector and face recognition

Computer Vision harris
Computer Vision harrisComputer Vision harris
Computer Vision harrisWael Badawy
 
Matching with Invariant Features
Matching with Invariant FeaturesMatching with Invariant Features
Matching with Invariant Featureszukun
 
Lec07 corner blob
Lec07 corner blobLec07 corner blob
Lec07 corner blobBaliThorat1
 
Fundamentals of Machine Learning.pptx
Fundamentals of Machine Learning.pptxFundamentals of Machine Learning.pptx
Fundamentals of Machine Learning.pptxWiamFADEL
 
10_1425_web_Lec_04_2D_Motion.pdf
10_1425_web_Lec_04_2D_Motion.pdf10_1425_web_Lec_04_2D_Motion.pdf
10_1425_web_Lec_04_2D_Motion.pdfKumarRoshan23
 
machine learning.pptx
machine learning.pptxmachine learning.pptx
machine learning.pptxAbdusSadik
 
Lecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matchingLecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matchingcairo university
 
Curve fitting of exponential curve
Curve fitting of exponential curveCurve fitting of exponential curve
Curve fitting of exponential curveDivyang Rathod
 
Chapter 3 motion in two d 2
Chapter 3 motion in two d 2Chapter 3 motion in two d 2
Chapter 3 motion in two d 2Chris Auld
 
Colloquium5816_2016_05_11
Colloquium5816_2016_05_11Colloquium5816_2016_05_11
Colloquium5816_2016_05_11Chelsey Erway
 
Eigen values and Eigen vectors ppt world
Eigen values and Eigen vectors ppt worldEigen values and Eigen vectors ppt world
Eigen values and Eigen vectors ppt worldraykoustav145
 
01_ELMAGTER_DNN_VEKTOR-ANALYSIS_FULL.pdf
01_ELMAGTER_DNN_VEKTOR-ANALYSIS_FULL.pdf01_ELMAGTER_DNN_VEKTOR-ANALYSIS_FULL.pdf
01_ELMAGTER_DNN_VEKTOR-ANALYSIS_FULL.pdfhasanahputri2
 
Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...
Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...
Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...Maninda Edirisooriya
 
SPHA021 Notes-Classical Mechanics-2020.docx
SPHA021 Notes-Classical Mechanics-2020.docxSPHA021 Notes-Classical Mechanics-2020.docx
SPHA021 Notes-Classical Mechanics-2020.docxlekago
 
Chapter 3 motion in two d
Chapter 3 motion in two dChapter 3 motion in two d
Chapter 3 motion in two dChris Auld
 

Similar to Harris corner detector and face recognition (20)

Computer Vision harris
Computer Vision harrisComputer Vision harris
Computer Vision harris
 
Matching with Invariant Features
Matching with Invariant FeaturesMatching with Invariant Features
Matching with Invariant Features
 
Lec07 corner blob
Lec07 corner blobLec07 corner blob
Lec07 corner blob
 
september4.ppt
september4.pptseptember4.ppt
september4.ppt
 
Fundamentals of Machine Learning.pptx
Fundamentals of Machine Learning.pptxFundamentals of Machine Learning.pptx
Fundamentals of Machine Learning.pptx
 
10_1425_web_Lec_04_2D_Motion.pdf
10_1425_web_Lec_04_2D_Motion.pdf10_1425_web_Lec_04_2D_Motion.pdf
10_1425_web_Lec_04_2D_Motion.pdf
 
machine learning.pptx
machine learning.pptxmachine learning.pptx
machine learning.pptx
 
Lecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matchingLecture 6-computer vision features descriptors matching
Lecture 6-computer vision features descriptors matching
 
Data Mining Lecture_9.pptx
Data Mining Lecture_9.pptxData Mining Lecture_9.pptx
Data Mining Lecture_9.pptx
 
Curve fitting of exponential curve
Curve fitting of exponential curveCurve fitting of exponential curve
Curve fitting of exponential curve
 
Chapter 3 motion in two d 2
Chapter 3 motion in two d 2Chapter 3 motion in two d 2
Chapter 3 motion in two d 2
 
Colloquium5816_2016_05_11
Colloquium5816_2016_05_11Colloquium5816_2016_05_11
Colloquium5816_2016_05_11
 
Eigen values and Eigen vectors ppt world
Eigen values and Eigen vectors ppt worldEigen values and Eigen vectors ppt world
Eigen values and Eigen vectors ppt world
 
01_ELMAGTER_DNN_VEKTOR-ANALYSIS_FULL.pdf
01_ELMAGTER_DNN_VEKTOR-ANALYSIS_FULL.pdf01_ELMAGTER_DNN_VEKTOR-ANALYSIS_FULL.pdf
01_ELMAGTER_DNN_VEKTOR-ANALYSIS_FULL.pdf
 
Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...
Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...
Lecture 4 - Linear Regression, a lecture in subject module Statistical & Mach...
 
Covariance.pdf
Covariance.pdfCovariance.pdf
Covariance.pdf
 
SPHA021 Notes-Classical Mechanics-2020.docx
SPHA021 Notes-Classical Mechanics-2020.docxSPHA021 Notes-Classical Mechanics-2020.docx
SPHA021 Notes-Classical Mechanics-2020.docx
 
Ahmed
AhmedAhmed
Ahmed
 
1619 quantum computing
1619 quantum computing1619 quantum computing
1619 quantum computing
 
Chapter 3 motion in two d
Chapter 3 motion in two dChapter 3 motion in two d
Chapter 3 motion in two d
 

Recently uploaded

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 

Recently uploaded (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 

Harris corner detector and face recognition

  • 1. Harris Corner Detector Slides taken from: “Matching with Invariant Features”, Darya Frolova, Denis Simakov, The Weizmann Institute of Science, March 2004
  • 2. An introductory example: C.Harris, M.Stephens. “A Combined Corner and Edge Detector”. 1988
  • 3. The Basic Idea • We should easily recognize the point by looking through a small window • Shifting a window in any direction should give a large change in intensity
  • 4. Basic Idea (2) “flat” region: no change in all directions “edge”: no change along the edge direction “corner”: significant change in all directions
  • 5. Mathematics Harris Detector: Mathematics Change of intensity for the shift [u,v]: Intensity Shifted intensity Window function orWindow function w(x,y) = Gaussian1 in window, 0 outside Eu ,v=∑ x , y w x , y[I xu , yv−I x , y] 2
  • 6. Mathematics For small shifts [u,v] we have a bilinear approximation: where M is a 2×2 matrix computed from image derivatives: Eu ,v≃[u v]M [u v] M =∑ x , y w x , y [ I x 2 I x I y I x I y I y 2 ]
  • 7. Mathematics Intensity change in shifting window: eigenvalue analysis λ1, λ2 – eigenvalues of M direction of the slowest change direction of the fastest change (λmax)-1/2 (λmin)-1/2 Ellipse E(u,v) = const M =∑ x , y w x , y [ I x 2 I x I y I x I y I y 2 ]
  • 8. Mathematics λ1 λ2 “Corner” λ1 and λ2 are large, λ1 ~ λ2; E increases in all directions λ1 and λ2 are small; E is almost constant in all directions “Edge” λ1 >> λ2 “Edge” λ2 >> λ1 “Flat” region Classification of image points using eigenvalues of M:
  • 9. Mathematics Measure of corner response: (k – empirical constant, k = 0.04-0.06) R=det M −k trace M  2 det M =12 trace M =12
  • 10. Mathematics λ1 λ2 “Corner” “Edge” “Edge” “Flat” • R depends only on eigenvalues of M • R is large for a corner • R is negative with large magnitude for an edge • |R| is small for a flat region R > 0 R < 0 R < 0|R| small
  • 11. Harris Detector • The Algorithm: – Find points with large corner response function R (R > threshold) – Take the points of local maxima of R
  • 14. Harris Detector: Workflow Find points with large corner response: R>threshold
  • 15. Harris Detector: Workflow Take only the points of local maxima of R
  • 17. Harris Detector: Summary • Average intensity change in direction [u,v] can be expressed as a bilinear form: • Describe a point in terms of eigenvalues of M: measure of corner response • A good (corner) point should have a large intensity change in all directions, i.e. R should be large positive R=det M −k trace M  2 Eu ,v≃[u v]M [u v]
  • 18. Harris Detector: Properties • Rotation invariance • Ellipse rotates but its shape (i.e. eigenvalues) remains the same
  • 19. Harris Detector: Properties • Partial invariance to affine intensity change • Only derivatives are used => invariance to intensity shift I → I + b • Intensity scale: I → a I
  • 20. Harris Detector: Properties • But: non-invariant to image scale! edge corner
  • 21. Face Recognition Slides taken from Jeremy Wyatt (“www.cs.bham.ac.uk/~jlw/vision/face_recognition.ppt”)
  • 22. Eigenfaces: The Idea • Think of a face as being a weighted combination of some “component” or “basis” faces • These basis faces are called eigenfaces -8029 2900 1751 1445 4238 6193 …
  • 23. Face Representation • These basis faces can be differently weighted to represent any face • So we can use different vectors of weights to represent different faces -8029 -1183 2900 -2088 1751 -4336 1445 -669 4238 -4221 6193 10549
  • 24. Learning Eigenfaces • How do we pick the set of basis faces? • We take a set of real training faces Then we find (learn) a set of basis faces which best represent the differences between them We’ll use a statistical criterion for measuring this notion of “best representation of the differences between the training faces” We can then store each face as a set of weights for those basis faces …
  • 25. Using Eigenfaces: Recognition & Reconstruction • We can use the eigenfaces in two ways • 1: we can store and then reconstruct a face from a set of weights • 2: we can recognize a new picture of a familiar face
  • 26. Learning Eigenfaces • How do we learn them? • We use a method called Principal Component Analysis (PCA) • To understand it we will need to understand – What an eigenvector is – What covariance is • But first we will look at what is happening in PCA qualitatively
  • 27. Subspaces • Imagine that our face is simply a (high dimensional) vector of pixels • We can think more easily about 2D vectors • Here we have data in two dimensions • But we only really need one dimension to represent it
  • 28. Finding Subspaces • Suppose we take a line through the space • And then take the projection of each point onto that line • This could represent our data in “one” dimension
  • 29. Finding Subspaces • Some lines will represent the data in this way well, some badly • This is because the projection onto some lines separates the data well, and the projection onto some lines separates it badly
  • 30. Finding Subspaces • Rather than a line we can perform roughly the same trick with a vector • Now we have to scale the vector to obtain any point on the line i µ νΦ = ν 1 1 ν   =     16 3 2 νΦ =
  • 31. Eigenvectors An eigenvector is a vector that obeys the following rule: Where is a matrix, and is a scalar (called the eigenvalue) v vµ=A A v µ • Only square matrices have eigenvectors • Not all square matrices have eigenvectors • An n by n matrix has at most n distinct eigenvectors • All the distinct eigenvectors of a matrix are orthogonal
  • 32. Covariance • Which single vector can be used to separate these points as much as possible? • This vector turns out to be a vector expressing the direction of the correlation • Here are two variables and • They co-vary (y tends to change in roughly the same direction as x) 1x 2x 1x 2x
  • 33. Covariance • The covariances can be expressed as a matrix • The diagonal elements are the variances e.g. Var(x1) • The covariance of two variables is: 1x 2x .617 .615 .615 .717 C   =     1x 2x1x 2x 1 1 2 2 1 1 2 ( )( ) cov( , ) 1 n i i i x x x x x x n = − − = − ∑
  • 34. Eigenvectors of the covariance matrix • The covariance matrix has eigenvectors covariance matrix eigenvectors eigenvalues • Eigenvectors with larger eigenvalues correspond to directions in which the data varies more • Finding the eigenvectors and eigenvalues of the covariance matrix for a set of data is called principal component analysis 1x 2x .617 .615 .615 .717 C   =     1 .735 .678 ν −  =     2 .678 .735 ν   =     1 0.049µ = 2 1.284µ =
  • 35. Expressing points • Suppose you think of your eigenvectors as specifying a new vector space • i.e. one can reference any point in terms of those eigenvectors • A point’s position in this new coordinate system is what we earlier referred to as its “weight vector” • For many data sets you can cope with fewer dimensions in the new space than in the old space
  • 36. Eigenfaces • In the face case: – the face is a point in a high-dimensional space – the training set of face pictures is our set of points • Training: – calculate the covariance matrix of the faces – find the eigenvectors of the covariance matrix • These eigenvectors are the eigenfaces or basis faces • Eigenfaces with bigger eigenvalues will explain more of the variation in the set of faces, i.e. will be more distinguishing
  • 37. Eigenfaces: image space to face space • When we see an image of a face we can transform it to face space • There are k=1…n eigenfaces • The ith face in image space is a vector • The corresponding weight is • We calculate the corresponding weight for every eigenface .k kv= i w x kv i x kw
  • 38. Recognition in face space • Recognition is now simple. We find the euclidean distance d between our face and all the other stored faces in face space: • The closest face in face space is the chosen match ( ) 2 1 2 1 2 1 ( , ) n i i i d w w w w = = −∑
  • 39. Reconstruction • The more eigenfaces you have the better the reconstruction, but you can have high quality reconstruction even with a small number of eigenfaces 82 70 50 30 20 10
  • 40. Summary • Statistical approach to visual recognition • Also used for object recognition • Problems • Reference: M. Turk and A. Pentland (1991). Eigenfaces for recognition, Journal of Cognitive Neuroscience, 3(1): 71–86.