Face Recognition Using Matlab
Face Recognition Using Matlab
Face detection is an easy and simple task for humans, but not so for computers. It
has been regarded as the most complex and challenging problem in the field of
computer vision due to large intra-class variations caused by the changes in facial
appearance, lighting and expression. Such variations result in the face distribution
to be highly nonlinear and complex in any space that is linear to the original
image space.
Face detection is the process of identifying one or more human faces in images or
videos. It plays an important part in many biometric, security and surveillance
systems, as well as image and video indexing systems.
Software program
This real-time face detection program is developed using MATLAB
version R2012a. A graphic user interface (GUI) allows users to perform
tasks interactively through controls like switches and sliders. You can
easily create a GUI and run it in MATLAB or as a stand-alone
application. The initial program output of this project is shown in Fig. 1.
MATLAB functions
The program (testing.m) has many functions. Do not edit the functions
as these are linkers and non-executable codes. First, you have to find
the format supported by the camera and its device ID using the
command given below (also shown in Fig. 2):
imaqhwinfo(‘winvideo’)
After finding the device ID, you can change the device ID number in
your source code.
The device ID here is {1}, so we have written ‘1’ in the code, as
mentioned below:
vid=videoinput(‘winvideo’,1,’YUY2_
640×480’);
We also have other formats in MATLAB. You can check which format
your camera supports by using the commands below (also shown in
Fig. 3):
info.DeviceInfo (1)
info.DeviceInfo.SupportedFormats
In Fig. 3, you can see that format ‘YUY2_160x120’ is the one supported
by the camera by default. But, there are other formats (resolutions)
that your camera can support, as shown in the last line of this
screenshot. If you select a different format and device number, you
should make changes in the source code accordingly. To detect a face
or a particular feature on the faces of people, use the following steps in
MATLAB program (testing.m):
detector=vision.CascadeObjectDetector
2. Call the step method with input image I, cascade object detector,
points PTS and any other optional properties.
Below is the syntax for using the step method. Use the step syntax with
input image I, selected cascade object detector and other optional
properties to perform detection.
insertObjectAnnotation(I,’rectangle’,
Position,Label)
BY
G.VIVEK 180040388