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

Chapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsChapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsasodariyabhavesh
 
Feature detection and matching
Feature detection and matchingFeature detection and matching
Feature detection and matchingKuppusamy P
 
Chapter 4 Image Processing: Image Transformation
Chapter 4 Image Processing: Image TransformationChapter 4 Image Processing: Image Transformation
Chapter 4 Image Processing: Image TransformationVarun Ojha
 
Image feature extraction
Image feature extractionImage feature extraction
Image feature extractionRushin Shah
 
Thresholding.ppt
Thresholding.pptThresholding.ppt
Thresholding.pptshankar64
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filtersA B Shinde
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and RepresentationAmnaakhaan
 
Image feature extraction
Image feature extractionImage feature extraction
Image feature extractionRishabh shah
 
Image Restoration
Image RestorationImage Restoration
Image RestorationPoonam Seth
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...Hemantha Kulathilake
 
reducing noises in images
reducing noises in imagesreducing noises in images
reducing noises in imagesaswathdas
 
Elements of visual perception
Elements of visual perceptionElements of visual perception
Elements of visual perceptionDr INBAMALAR T M
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentationasodariyabhavesh
 

What's hot (20)

Chapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsChapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woods
 
Feature detection and matching
Feature detection and matchingFeature detection and matching
Feature detection and matching
 
Module 31
Module 31Module 31
Module 31
 
Chapter 4 Image Processing: Image Transformation
Chapter 4 Image Processing: Image TransformationChapter 4 Image Processing: Image Transformation
Chapter 4 Image Processing: Image Transformation
 
Image segmentation
Image segmentation Image segmentation
Image segmentation
 
Image feature extraction
Image feature extractionImage feature extraction
Image feature extraction
 
Thresholding.ppt
Thresholding.pptThresholding.ppt
Thresholding.ppt
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filters
 
Image Acquisition and Representation
Image Acquisition and RepresentationImage Acquisition and Representation
Image Acquisition and Representation
 
Chap6 image restoration
Chap6 image restorationChap6 image restoration
Chap6 image restoration
 
Image feature extraction
Image feature extractionImage feature extraction
Image feature extraction
 
SIFT
SIFTSIFT
SIFT
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
Bit plane coding
Bit plane codingBit plane coding
Bit plane coding
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
reducing noises in images
reducing noises in imagesreducing noises in images
reducing noises in images
 
Elements of visual perception
Elements of visual perceptionElements of visual perception
Elements of visual perception
 
Wiener Filter
Wiener FilterWiener Filter
Wiener Filter
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 

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

Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
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
 
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
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
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
 
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.
 

Recently uploaded (20)

Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
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
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
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 ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
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
 
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...
 

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.