SlideShare a Scribd company logo
14
Most read
16
Most read
19
Most read
Face Detection
Using Viola-
Jones Algorithm
Agenda
Introduction
Face
Recognition
Face
Detection
Face
Detection
Viola-Jones Algorithm
Viola-Jones Algorithm
Viola-Jones outlines a box and
searches for a face within the box. It
is essentially searching for these
haar-like features, which will be
explained later. The box moves a
step to the right after going through
every tile in the picture. In this case,
we have used a large box size and
taken large steps for demonstration,
but in general, you can change the
box size and step size according to
your needs.
Haar-Like Features
With smaller steps, a number of
boxes detect face-like features
(Haar-like features) and the data of
all of those boxes put together,
helps the algorithm determine
where the face is.
Haar-Like Features
The features on right show a box
with a light side and a dark side,
which is how the machine
determines what the feature is.
Sometimes one side will be lighter
than the other, as in an edge of an
eyebrow. Sometimes the middle
portion may be shinier than the
surrounding boxes, which can be
interpreted as a nose.
Haar-Like Features
There are 3 types of Haar-like
features that Viola and Jones
identified in their research:
• Edge features
• Line-features
• Four-sided features
Haar-Like Features
These features help the machine
understand what the image is.
Imagine what the edge of a table
would look like on a b&w image.
One side will be lighter than the
other, creating that edge like b&w
feature as you can see in the
picture.
Haar-Like Features
In the two important features for
Face Detection, the horizontal and
the vertical features describe what
eyebrows and the nose,
respectively, look like to the
machine. Additionally, when the
images are inspected, each feature
has a value of its own. It’s quite
easy to calculate: Subtract White
area from the Black area.
Haar-Like Features
Imagine our haar-like feature was converted
into a grid. Each square represents a pixel.
For demonstration, we choose a 4 x 8 grid,
but in reality, there would be many more
pixels and thus a much larger grid for a
certain feature. The numbers in the boxes
represent the darkness of the features. The
higher it is, the darker the pixel. Thus, you
can see the numbers are higher on the right
side than on the left side. Now if you add up
the numbers on the two left-sided (white)
columns, and subtract it from the sum of the
right-sided columns, you will get the value of
the particular feature.
Haar-Like Features
So in this case, the value of our feature is →
(0.5 + 0.4 + 0.5 +0.6 + 0.4 + 0.7 + 0.5 + 0.4
+
0.4 + 0.5 + 0.6 + 0.8 + 0.5 + 0.7 + 0.6 + 0.6)
-
(0.1 + 0.1 + 0.2 + 0. 2+ 0.2 + 0.1 + 0.2 + 0.2
+
0.2 + 0.3 + 0.2 + 0.1 + 0.2 + 0.3 + 0.2 + 0.2)
B - W= 8.7 - 3
= 5.7
Integral Image
In reality, these calculations can be very
intensive since the number of pixels would
be much greater within a large feature.
The integral image plays its part in
allowing us to perform these intensive
calculations quickly so we can understand
whether a feature of a number of features
fit the criteria.
Integral Image
Now imagine the one highlighted in red is
our grid for a certain feature, and we are
trying to calculate the value of that feature.
Normally we would just add up the boxes,
but since that can be computationally
intensive, we will create an integral image.
Integral Image
To calculate the value of a single box in
the integral image, we take the sum of all
the boxes to its left.
Integral Image
The green box in the integral image is
calculated as the sum of the highlighted
area in the regular image. If we did this for
every box, we would have a sequence
going through the grid and it may look
something like the image below.
All we have to do is look at the 4 corners
of our feature, and add the purples,
subtract the greens.
→ 168–114 + 79–110 = 23
Why Integral Image?
Haar-like features are actually rectangular,
and the integral image process allows us
to find a feature within an image very
easily as we already know the sum value
of a particular square and to find the
difference between two rectangles in the
regular image, we just need to subtract
two squares in the integral image. So even
if you had a 1000 x 1000 pixels in your
grid, the integral image method makes the
calculations much less intensive and can
save a lot of time for any facial detection
model.
Flow For Face
Detection
Conditions For
Eyes & Upper
Body Detection
Summary
Thank You

More Related Content

What's hot (20)

PPT
Window to viewport transformation
Ankit Garg
 
PPTX
Chess board problem(divide and conquer)
RASHIARORA8
 
PPTX
Viola-Jones Object Detection
Venugopal Boddu
 
PDF
4. THREE DIMENSIONAL DISPLAY METHODS
SanthiNivas
 
PDF
Presentation of Visual Tracking
Yu-Sheng (Yosen) Chen
 
PPTX
KEY FRAME SYSTEM-Ruby Stella mary.pptx
ComputerScienceDepar6
 
PPTX
Face mask detection
Sonesh yadav
 
PPT
Face detection ppt
Pooja R
 
PPTX
Bresenham's line algorithm
Pooja Dixit
 
PPTX
Computer graphics realism
sathya dhineshkumar
 
PDF
Problem Characteristics in Artificial Intelligence
Bharat Bhushan
 
PPTX
Visible surface detection methods
KABILESH RAMAR
 
PPT
Boundary fill algm
rajeshranjithsingh
 
PPTX
What is computer vision?
Qentinel
 
PDF
20 Latest Computer Science Seminar Topics on Emerging Technologies
Seminar Links
 
PPTX
Point clipping
Shivam Kumar
 
PPTX
Computer graphics basic transformation
Selvakumar Gna
 
PPTX
Production System
Varunjeet Singh Rekhi
 
PPTX
Snakes in Images (Active contour tutorial)
Yan Xu
 
PPTX
IoT Applications and Networks
Abdulrahman Fady
 
Window to viewport transformation
Ankit Garg
 
Chess board problem(divide and conquer)
RASHIARORA8
 
Viola-Jones Object Detection
Venugopal Boddu
 
4. THREE DIMENSIONAL DISPLAY METHODS
SanthiNivas
 
Presentation of Visual Tracking
Yu-Sheng (Yosen) Chen
 
KEY FRAME SYSTEM-Ruby Stella mary.pptx
ComputerScienceDepar6
 
Face mask detection
Sonesh yadav
 
Face detection ppt
Pooja R
 
Bresenham's line algorithm
Pooja Dixit
 
Computer graphics realism
sathya dhineshkumar
 
Problem Characteristics in Artificial Intelligence
Bharat Bhushan
 
Visible surface detection methods
KABILESH RAMAR
 
Boundary fill algm
rajeshranjithsingh
 
What is computer vision?
Qentinel
 
20 Latest Computer Science Seminar Topics on Emerging Technologies
Seminar Links
 
Point clipping
Shivam Kumar
 
Computer graphics basic transformation
Selvakumar Gna
 
Production System
Varunjeet Singh Rekhi
 
Snakes in Images (Active contour tutorial)
Yan Xu
 
IoT Applications and Networks
Abdulrahman Fady
 

Similar to GUI based Face detection using Viola-Jones algorithm in MATLAB. (20)

PDF
pxc3888681
AMR ELMAGHARAY
 
PPTX
Face detection system design seminar
Sreerag Mandakathil Sreenath
 
PDF
Face Detection for identification of people in Images of Internet
ijceronline
 
PDF
What goes on during haar cascade face detection
Onibiyo Joshua Toluse
 
PDF
Face Detection System on Ada boost Algorithm Using Haar Classifiers
IJMER
 
PPTX
face detection
Smriti Tikoo
 
PDF
IRJET- Face Detection and Tracking Algorithm using Open CV with Raspberry Pi
IRJET Journal
 
PPTX
An Introduction to Face Detection
Livares Technologies Pvt Ltd
 
PDF
Iaetsd multi-view and multi band face recognition
Iaetsd Iaetsd
 
PDF
Facial emotion recognition
Rahin Patel
 
PDF
IRJET- Class Attendance using Face Detection and Recognition with OPENCV
IRJET Journal
 
PDF
Single frontal face detection by finding dark pixel group and comparing xy
IAEME Publication
 
PDF
Lecture 6-computer vision features descriptors matching
cairo university
 
PDF
Utilizing Viola Jones with Haar Cascade Along with Neural Networks for Face D...
ijtsrd
 
PPT
Face detection and expression using OpenCV using python
gamingboltz14
 
PDF
Real time voting system using face recognition for different expressions and ...
eSAT Publishing House
 
PDF
FACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKS
ijaia
 
PDF
IRJET - Face Recognition based Attendance System
IRJET Journal
 
PDF
IRJET- A Review on Various Techniques for Face Detection
IRJET Journal
 
PDF
Human’s facial parts extraction to recognize facial expression
ijitjournal
 
pxc3888681
AMR ELMAGHARAY
 
Face detection system design seminar
Sreerag Mandakathil Sreenath
 
Face Detection for identification of people in Images of Internet
ijceronline
 
What goes on during haar cascade face detection
Onibiyo Joshua Toluse
 
Face Detection System on Ada boost Algorithm Using Haar Classifiers
IJMER
 
face detection
Smriti Tikoo
 
IRJET- Face Detection and Tracking Algorithm using Open CV with Raspberry Pi
IRJET Journal
 
An Introduction to Face Detection
Livares Technologies Pvt Ltd
 
Iaetsd multi-view and multi band face recognition
Iaetsd Iaetsd
 
Facial emotion recognition
Rahin Patel
 
IRJET- Class Attendance using Face Detection and Recognition with OPENCV
IRJET Journal
 
Single frontal face detection by finding dark pixel group and comparing xy
IAEME Publication
 
Lecture 6-computer vision features descriptors matching
cairo university
 
Utilizing Viola Jones with Haar Cascade Along with Neural Networks for Face D...
ijtsrd
 
Face detection and expression using OpenCV using python
gamingboltz14
 
Real time voting system using face recognition for different expressions and ...
eSAT Publishing House
 
FACE RECOGNITION ALGORITHM BASED ON ORIENTATION HISTOGRAM OF HOUGH PEAKS
ijaia
 
IRJET - Face Recognition based Attendance System
IRJET Journal
 
IRJET- A Review on Various Techniques for Face Detection
IRJET Journal
 
Human’s facial parts extraction to recognize facial expression
ijitjournal
 
Ad

Recently uploaded (20)

PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPTX
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PPTX
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
PPTX
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
Quarter 1_PPT_PE & HEALTH 8_WEEK 3-4.pptx
ronajadolpnhs
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PDF
Geographical Diversity of India 100 Mcq.pdf/ 7th class new ncert /Social/Samy...
Sandeep Swamy
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PPTX
Controller Request and Response in Odoo18
Celine George
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
Dimensions of Societal Planning in Commonism
StefanMz
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
Quarter 1_PPT_PE & HEALTH 8_WEEK 3-4.pptx
ronajadolpnhs
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
Geographical Diversity of India 100 Mcq.pdf/ 7th class new ncert /Social/Samy...
Sandeep Swamy
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
Controller Request and Response in Odoo18
Celine George
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
Horarios de distribución de agua en julio
pegazohn1978
 
Ad

GUI based Face detection using Viola-Jones algorithm in MATLAB.

  • 8. Viola-Jones Algorithm Viola-Jones outlines a box and searches for a face within the box. It is essentially searching for these haar-like features, which will be explained later. The box moves a step to the right after going through every tile in the picture. In this case, we have used a large box size and taken large steps for demonstration, but in general, you can change the box size and step size according to your needs.
  • 9. Haar-Like Features With smaller steps, a number of boxes detect face-like features (Haar-like features) and the data of all of those boxes put together, helps the algorithm determine where the face is.
  • 10. Haar-Like Features The features on right show a box with a light side and a dark side, which is how the machine determines what the feature is. Sometimes one side will be lighter than the other, as in an edge of an eyebrow. Sometimes the middle portion may be shinier than the surrounding boxes, which can be interpreted as a nose.
  • 11. Haar-Like Features There are 3 types of Haar-like features that Viola and Jones identified in their research: • Edge features • Line-features • Four-sided features
  • 12. Haar-Like Features These features help the machine understand what the image is. Imagine what the edge of a table would look like on a b&w image. One side will be lighter than the other, creating that edge like b&w feature as you can see in the picture.
  • 13. Haar-Like Features In the two important features for Face Detection, the horizontal and the vertical features describe what eyebrows and the nose, respectively, look like to the machine. Additionally, when the images are inspected, each feature has a value of its own. It’s quite easy to calculate: Subtract White area from the Black area.
  • 14. Haar-Like Features Imagine our haar-like feature was converted into a grid. Each square represents a pixel. For demonstration, we choose a 4 x 8 grid, but in reality, there would be many more pixels and thus a much larger grid for a certain feature. The numbers in the boxes represent the darkness of the features. The higher it is, the darker the pixel. Thus, you can see the numbers are higher on the right side than on the left side. Now if you add up the numbers on the two left-sided (white) columns, and subtract it from the sum of the right-sided columns, you will get the value of the particular feature.
  • 15. Haar-Like Features So in this case, the value of our feature is → (0.5 + 0.4 + 0.5 +0.6 + 0.4 + 0.7 + 0.5 + 0.4 + 0.4 + 0.5 + 0.6 + 0.8 + 0.5 + 0.7 + 0.6 + 0.6) - (0.1 + 0.1 + 0.2 + 0. 2+ 0.2 + 0.1 + 0.2 + 0.2 + 0.2 + 0.3 + 0.2 + 0.1 + 0.2 + 0.3 + 0.2 + 0.2) B - W= 8.7 - 3 = 5.7
  • 16. Integral Image In reality, these calculations can be very intensive since the number of pixels would be much greater within a large feature. The integral image plays its part in allowing us to perform these intensive calculations quickly so we can understand whether a feature of a number of features fit the criteria.
  • 17. Integral Image Now imagine the one highlighted in red is our grid for a certain feature, and we are trying to calculate the value of that feature. Normally we would just add up the boxes, but since that can be computationally intensive, we will create an integral image.
  • 18. Integral Image To calculate the value of a single box in the integral image, we take the sum of all the boxes to its left.
  • 19. Integral Image The green box in the integral image is calculated as the sum of the highlighted area in the regular image. If we did this for every box, we would have a sequence going through the grid and it may look something like the image below. All we have to do is look at the 4 corners of our feature, and add the purples, subtract the greens. → 168–114 + 79–110 = 23
  • 20. Why Integral Image? Haar-like features are actually rectangular, and the integral image process allows us to find a feature within an image very easily as we already know the sum value of a particular square and to find the difference between two rectangles in the regular image, we just need to subtract two squares in the integral image. So even if you had a 1000 x 1000 pixels in your grid, the integral image method makes the calculations much less intensive and can save a lot of time for any facial detection model.
  • 22. Conditions For Eyes & Upper Body Detection