Professional Documents
Culture Documents
Machine Vision Exp 4 (Mumbai Univesrity)
Machine Vision Exp 4 (Mumbai Univesrity)
Experiment 04
Title: Detecting and Recognizing Objects
Aim: Object detection and recognition techniques, HOG descriptors, The scale issue, The location
issue, Non-maximum (or non-maxima) suppression, Support vector machines, People detection
Theory :
Object detection and recognition techniques:
Detecting and Recognizing Faces, which we'll reiterate for clarity: detecting an object is the ability
of a program to determine if a certain region of an image contains an unidentified object, and
recognizing is the ability of a program to identify this object. Recognizing normally only occurs
in areas of interest where an object has been detected, for example, we have attempted to recognize
faces on the areas of an image that contained a face in the first place.
When it comes to recognizing and detecting objects, there are a number of techniques used in
computer vision, which we'll be examining:
● Histogram of Oriented Gradients
● Image pyramids
● Sliding windows
Unlike feature detection algorithms, these are not mutually exclusive techniques, rather, they are
complimentary. You can perform a Histogram of Oriented Gradients (HOG) while applying the
sliding windows technique.
HOG descriptors:
HOG is a feature descriptor, so it belongs to the same family of algorithms, such as SIFT, SURF,
and ORB.
It is used in image and video processing to detect objects. Its internal mechanism is really clever;
an image is divided into portions and a gradient for each portion is calculated. We observed a
similar approach when we talked about face recognition through LBPH.
HOG, however, calculates histograms that are not based on color values, rather, they are based on
gradients. As HOG is a feature descriptor, it is capable of delivering the type ofinformation that
is vital for feature matching and object detection/recognition.
The extrapolation of histograms into descriptors is quite a complex process. First, local histograms
for each cell are calculated. The cells are grouped into larger regions called
Om Bhamare BE B 05
Aldel Education Trust’s
St. John College of Engineering and Management, Palghar
(A Christian Religious Minority Institution)
Approved by AICTE and DTE, Affiliated to University of Mumbai/MSBTE
St. John Technical Campus, Vevoor, Manor Road, Palghar (E), Dist. Palghar, Maharashtra-401404
NAAC Accredited with Grade ‘A’
DEPARTMENT OF COMPUTER ENGINEERING
blocks. These blocks can be made of any number of cells, but Dalal and Triggs found that 2x2
cell blocks yielded the best results when performing people detection.
Program :
HOG descriptors:
Om Bhamare BE B 05
Aldel Education Trust’s
St. John College of Engineering and Management, Palghar
(A Christian Religious Minority Institution)
Approved by AICTE and DTE, Affiliated to University of Mumbai/MSBTE
St. John Technical Campus, Vevoor, Manor Road, Palghar (E), Dist. Palghar, Maharashtra-401404
NAAC Accredited with Grade ‘A’
DEPARTMENT OF COMPUTER ENGINEERING
Om Bhamare BE B 05
Aldel Education Trust’s
St. John College of Engineering and Management, Palghar
(A Christian Religious Minority Institution)
Approved by AICTE and DTE, Affiliated to University of Mumbai/MSBTE
St. John Technical Campus, Vevoor, Manor Road, Palghar (E), Dist. Palghar, Maharashtra-401404
NAAC Accredited with Grade ‘A’
DEPARTMENT OF COMPUTER ENGINEERING
People detection:
import cv2
import numpy as np
Om Bhamare BE B 05
Aldel Education Trust’s
St. John College of Engineering and Management, Palghar
(A Christian Religious Minority Institution)
Approved by AICTE and DTE, Affiliated to University of Mumbai/MSBTE
St. John Technical Campus, Vevoor, Manor Road, Palghar (E), Dist. Palghar, Maharashtra-401404
NAAC Accredited with Grade ‘A’
DEPARTMENT OF COMPUTER ENGINEERING
Output :
People detection:
Conclusion: Hence we studied the Object detection and recognition techniques, HOG descriptors, the scale
issue, the location issue, Non-maximum (or non-maxima) suppression, Support vector machines, People
detection.
Om Bhamare BE B 05