You are on page 1of 14

CE6011

Face Recognition System Door Automation

Maurya Banda

(CE11B009)

Amruta Sai Kiran (CE11B012)


D.Tarun Satya Sai (CE11B013)
K. Prasanth

(CE11B027)

N.B.Ravi Teja

(CE11B079)

Table of Contents
1 AIM....................................................................................................................................................................................... 3
2 INTRODUCTION ................................................................................................................................................................... 3
2.1 What is Face recognition system? .......................................................................................................................... 3
2.2 What is its significance? .................................................................................................................................. 3
2.3 What are the different applications with regard to security? .3
2.4 What are the disadvantages? 4
2.5 How does the FR Software work? 5
2.6 What happens inside the FRM? 7
3 WORKING MECHANISM ...................................................................................................................................................... 8
3.1 Door opening and closing ....................................................................................................................................... 8
3.2 Lighting System ........................................................................................................................................................ 9
3.3 BACNET Network....9
4 COMPONENTS REQUIRED ...10
5 SPECIFICATIONS OF AVAILABLE COMPONENTS 10
5.1 FRM Specifications.....10
5.2 Occupancy Sensor ...10
5.3Electric Bell 11
5.4 Electromagnetic Lock ...11
5.5 TCP/IP ..11
6 ALGORITHMS FOR VARIOUS CONNECTIONS ..11
6.1 Occupancy Sensor for lighting system ..11
6.2 FRM to EM lock: ( Communication : Analog)
6.3 FRM to Electric Bell 12
6.4 PC to HUB .12
6.5 FRM to PC ....12
6.6 Occupancy sensor to FRM ..12
6.7 Exit Button to FRM(Communication: Binary).12
6.8 Automated Attendance System .12
7 COST ANALYSIS OF COMPONENTS USED...12
7.1 Cost Estimation .... 12
7.2 Links for Costs ..12
8 REFERENCES...............14

Automated Door Operation System Using Face Recognition


1. Aim
To prepare a well explained conceptualization of an automated door operation system by incorporating
certain extended systems like Lighting Control, Security System and Automated Attendance for specific
occupancy purposes.

2. Introduction
2.1. What is Face recognition system?
A facial recognition system is a computer application automatically identifying or verifying a person from
a digital image or a video frame from a video source. One of the ways to do this is by comparing selected facial
features from the image and a facial database. It is typically used in security systems and can be compared to
other biometrics such as fingerprint or eye iris recognition systems.

2.2. What is its significance?


Among the different biometric techniques, facial recognition may not be the most reliable and
efficient. However, one key advantage is that it does not require the cooperation of the test subject to work.
Properly designed systems installed in airports, multiplexes, and other public places can identify individuals
among the crowd, without passers-by even being aware of the system. Other biometrics like fingerprints, iris
scans, and speech recognition cannot perform this kind of mass identification.
Facial recognition systems based on faceprints can quickly and accurately identify target individuals
when the conditions are favorable. However, if the subjects face is partially obscured or in profile rather than
facing forward, or if the light is insufficient, the software is less reliable. Nevertheless, the technology is evolving
quickly and there are several emerging approaches, such as 3D modeling, that may overcome current problems
with the systems. According to the National Institute of Standards and Technology (NIST), the incidence of false
positives in facial recognition systems has been halved every two years since 1993 and, as of the end of 2011,
was just 0.003%
Law enforcement agencies are using facial recognition software as a crime-fighting tool. Facial
recognition software also enhances marketing personalization. Now businesses are looking to use the
technology to reach customers. For example, billboards have been developed with integrated software that
identifies the gender, ethnicity and approximate age of passersby to deliver targeted advertising.

2.3. What are the different applications with regard to security?


The security currently become a very important issue in public or private institutions in which various
security systems have been proposed and developed for some crucial processes such as person identifications,
verification or recognition especially for building access control, suspect identifications by the police, driver
licenses and many others. Face recognition technology has seen many uses in governments, military forces,

banks, social welfare and security, electronic commerce and security and defence fields. Various uses of face
recognition system in doors is discussed here.

Domestic Use
Face recognition system can be used as a security system for houses and residential buildings.
Specifically when a person tries to access the door it either allows the person through the door if the person is
an authorized user or it specifies the owner of the house regarding the use of the door by any anonymous
person. In some cases when the user tries to access the door by forcible means it activates an alarm so that the
neighbours or the security of house can respond.
Offices
Face recognition system has many uses in offices.

It can be used for saving important files and documents which can be used only by a specified personal.
It can be used for allowing only the staff and other people who were pre-specified in the database of the
face recognition system.
It can act as an automated security system during free hours of the office usually when the office is
vacant.

Banks
The main use of face recognition system in banks is to have protected lockers for saving money and
important documents of properties.
Military
Military of many nations use face recognition system as an additional security system for the access of
highly valuable, precarious, dangerous and sophisticated weapons and armaments. These systems not only
improve the security of individual buildings but also increases the security of the state and country as a whole.

2.4. What are the disadvantages?


Many citizens express concern that their privacy is being compromised by the use of surveillance
technologies by corporations and the state. Some fear that it could lead to a total surveillance society, with
the government and other authorities having the ability to know the whereabouts and activities of all citizens
around the clock. This knowledge has been, is being, and could continue to be deployed to prevent the lawful
exercise of rights of citizens to criticize those in office, specific government policies or corporate practices.
Many centralized power structures with such surveillance capabilities have abused their privileged access to
maintain control of the political and economic apparatus, and to curtail populist reforms.
Facial recognition can be used not just to identify an individual, but also to unearth other personal data
associated with an individual such as other photos featuring the individual, blog posts, social networking
profiles, Internet behavior, travel patterns, etc. all through facial features alone. Moreover, individuals have
limited ability to avoid or thwart facial recognition tracking unless they hide their faces. This fundamentally
changes the dynamic of day-to-day privacy by enabling any marketer, government agency, or random stranger

to secretly collect the identities and associated personal information of any individual captured by the facial
recognition system.
Whatever might the propensity of disadvantages be in other fields, the face recognition system in the
security applications has been found very instrumental in automating the security operations in various walks of
industrial and domestic fields.

2.5. How does the FR Software work?


Object detection and tracking are important in many computer vision applications including activity
recognition, automotive safety, and surveillance. In this example, you will develop a simple face tracking system
by dividing the tracking problem into three separate problems:
1. Detect a face to track
2. Identify facial features to track
3. Track the face
Step 1: Detect a Face To Track
Before you begin tracking a face, you need to first detect it. Use the vision.CascadeObjectDetector to
detect the location of a face in a video frame. The cascade object detector uses the Viola-Jones detection
algorithm and a trained classification model for detection. By default, the detector is configured to detect faces,
but it can be configured for other object types.
% Create a cascade detector object.
faceDetector = vision.CascadeObjectDetector();
% Read a video frame and run the detector.
videoFileReader = vision.VideoFileReader('visionface.avi');
videoFrame
= step(videoFileReader);
bbox
= step(faceDetector, videoFrame);
% Draw the returned bounding box around the detected face.
videoOut = insertObjectAnnotation(videoFrame,'rectangle',bbox,'Face');
figure, imshow(videoOut), title('Detected face');

You can use the cascade object detector to track a face across successive video frames. However, when
the face tilts or the person turns their head, you may lose tracking. This limitation is due to the type of trained
classification model used for detection. To avoid this issue, and because performing face detection for every
video frame is computationally intensive, this example uses a simple facial feature for tracking.
Step 2: Identify Facial Features To Track
Once the face is located in the video, the next step is to identify a feature that will help you track the face. For
example, you can use the shape, texture, or color. Choose a feature that is unique to the object and remains
invariant even when the object moves.

In this example, you use skin tone as the feature to track. The skin tone provides a good deal of contrast
between the face and the background and does not change as the face rotates or moves.

% Get the skin tone information by extracting the Hue from the video frame
% converted to the HSV color space.
[hueChannel,~,~] = rgb2hsv(videoFrame);
% Display the Hue Channel data and draw the bounding box around the face.
figure, imshow(hueChannel), title('Hue channel data');
rectangle('Position',bbox(1,:),'LineWidth',2,'EdgeColor',[1 1 0])

Step 3: Track the Face


With the skin tone selected as the feature to track, you can now use the vision.HistogramBasedTracker
for tracking. The histogram based tracker uses the CAMShift algorithm, which provides the capability to track an
object using a histogram of pixel values. In this example, the Hue channel pixels are extracted from the nose
region of the detected face. These pixels are used to initialize the histogram for the tracker. The example tracks
the object over successive video frames using this histogram.
% Detect the
% measure of
% pixels.
noseDetector
faceImage
noseBBox

nose within the face region. The nose provides a more accurate
the skin tone because it does not contain any background
= vision.CascadeObjectDetector('Nose');
= imcrop(videoFrame,bbox(1,:));
= step(noseDetector,faceImage);

% The nose bounding box is defined relative to the cropped face image.
% Adjust the nose bounding box so that it is relative to the original video
% frame.
noseBBox(1,1:2) = noseBBox(1,1:2) + bbox(1,1:2);
% Create a tracker object.
tracker = vision.HistogramBasedTracker;
% Initialize the tracker histogram using the Hue channel pixels from the
% nose.
initializeObject(tracker, hueChannel, noseBBox(1,:));
% Create a video player object for displaying video frames.
videoInfo
= info(videoFileReader);
videoPlayer = vision.VideoPlayer('Position',[300 300 videoInfo.VideoSize+30]);
% Track the face over successive video frames until the video is finished.
while ~isDone(videoFileReader)
% Extract the next video frame
videoFrame = step(videoFileReader);
% RGB -> HSV
[hueChannel,~,~] = rgb2hsv(videoFrame);

% Track using the Hue channel data


bbox = step(tracker, hueChannel);
% Insert a bounding box around the object being tracked
videoOut = insertObjectAnnotation(videoFrame,'rectangle',bbox,'Face');
% Display the annotated video frame using the video player object
step(videoPlayer, videoOut);
end
% Release resources
release(videoFileReader);
release(videoPlayer);

2.6.

What happens inside the FRM?

The FRM used in the present installation works on Viola Jones Face Detection Algorithm for which the
steps are discussed at length along with the code in the previous section. The hardware part of the FRM works
in the following mechanism. The functions of all the components that constitute the FRM are clearly mentioned
in the flowchart. Many commercially available machines follow a similar process. One such machine we
referenced for learning the mechanism is HF-FR701 which is a product by Chongquing Huifan Technology Co.,
Ltd.

3. Working Mechanism
Lighting System
Negative ID
Lock
Sensor
DOOR

Bell

USB
Key

Exit

Face Recognition
System

RS 230/485

PC

Attendance

TCP/IP

HUB

3.1.

Door opening and closing


1. The occupancy sensor which is door mounted, detects the person and sends a binary signal to the
FRM
2. The FRM activates the High Resolution Infrared Camera and the digital output of the face ID is
generated.
3. The FRM uses TCP/IP protocol for communication and uses the RS 232 cable for data transfer.
4. There is an intermediate RS232/485 converter placed to convert the RS232 signals to RS485
5. Later this information is sent to the PC(Router) via RS 485 cables.
6. Every Router has an unique IP address and is connected to the HUB via CAT5 cables
7. The digital output generated is matched with the authorized users face IDs which is hosted by the
HUB

8. If the persons face ID matches with the authorized, the FRM sends a binary signal to the
Electromagnetic lock and it opens.
9. If the persons face ID does not match with the authorized, the FRM sends a binary signal to the
security alarm and the security personnel of the building is cautioned.
10. After a person has moved in, the occupancy sensor sends a binary signal to the FRM and the
Electromagnetic Lock is actuated and the door is locked.
11. If the person wants to exit from the room, he presses the EXIT button which is wall mounted.
12. When the EXIT button is pressed a binary voltage signal is sent to the FRM, the Electromagnetic
Lock is actuated and the door opens.
13. After the person has moved out, the occupancy sensor again sends a binary signal to the FRM, and
the Electromagnetic Lock is actuated and the door is locked.

3.2.

Lighting System

The Face Recognition mechanism can be used for controlling the lighting inside the room and hence
it can help in energy saving.
1. When an authorized face ID is recognized, the occupancy of the room is increased by one.
2. Similarly when a person presses the EXIT button, the occupancy of the room is deducted by one
3. So whenever the occupancy of the room is zero, the FRM sends a binary signal to the lighting
system and the lights are turned off.

3.3.

BACNET Network

In a commercial building there can be multiple installations of the face recognition system.
The BACNET network is used for connecting all the routers, controllers , sensors and actuators to
a common HUB.
Each PC (Router)has a unique IP address
The FRMs(Controllers) have a unique Net ID
The sensors have a unique Instance ID

Router

FRM
Occupancy
sensor

HUB

Router

EM Lock

FRM
Door Bell

FRM
Occupancy
sensor

EM Lock

FRM
Door Bell

4. Components required:

FRM- Face Recognition Machine


Occupancy Sensor
Electric Bell
Electromagnetic Lock
RS232/485 communication cables
RS 232-RS 485 convertor
CAT 5 LAN Cables

5. Specifications of available components


5.1. FRM specifications
Memory
Hardware
Camera
Display
Face Capacity

256M Flash, 64M SDRAM


Platform: ZEM600
High Resolution Infrared Camera
3 Inch Touch Screen
400

Logs Capacity
Backup Battery
Communication
Access Control Interfaces

100,000
2000mAh
TCP/IP, RS232/485
3rd party electric lock, door sensor, alarm, wired bell and exit button

Power Supply
Verification Speed
Operating temperature
Operating Humidity

12V/3A
2 Seconds
0C-45C
20%-80%

5.2. Occupancy Sensor


Detection Range
6m
Detection Angle
360
Time Setting
5 sec-102min
Power Source
110V-130V/AC, 220-240V/AC
Power Frequency
50/60HZ
Rated Load
800W(110-130V/AC), 1200W(220-240V/AC)
Working Humidity
<93%RH
Ambient Light
10LUX-2000LUX
Working Temperature -10C~+40C
Installation Height
1.5m-3.5m

5.3. Electric Bell


Receiver:3V DC;
150M range &315MHz
32 pcs music
Chime Sound: 80~90DB

5.4. Electromagnetic Lock


Material:
Al alloy and steel.
Magnetic body material:
silicon steel plate.
Holding force:
600lbs (280KGS).
Lock body dimension:
25250.529mm.
Working voltage:
12V(24v can order).
Working current:
320mA.
Electricity status: continuously supply current
Operating temperature
-10 to 55C (14 to 131F)
Installation type:
Hanging mounted/surface mounted
Humidity:
0 to 95% non-condensing
Locks surface temperature: Current temperature 20% (when power is on)
Used for single door
Can connect with different kinds of access system.

5.5. TCP/IP
TCP/IP communication mode is used between the hub and the computer that checks the ID
created by the FR 701 and sees if it matches with the pre-existing database of IDs. TCP/IP provides end-to-end
connectivity specifying how data should be formatted, addressed, transmitted, routed and received at the
destination. This utilizes Cat5 cables.

6. Algorithms for various connections


6.1.

Occupancy Sensor to Lighting System : ( Communication : Binary Output )


1.
2.
3.
4.

6.2.

Initialize occupancy =0
If Sensor = 1 => occupancy=occupancy+1
If Exit= 1 =>occupancy= occupancy -1 (When the exit switch is pressed from inside the room)
If (occupancy >1 ) Turn on the lights else Turn off the lights

FRM to EM lock : ( Communication : Analog)


1.
2.
3.
4.

The FRM recognizes the face and generates a face id


Matches the face id with the database
If the face id matches with the authorized then the lock opens
If the face id does not match with the authorized , lock does not open and the information is
sent to the security system

6.3.

FRM to Electronic Bell : (Communication : Analog)


1. If the face id does not match with the database a binary signal is sent to the electronic bell
2. The electronic bell is turned on.

6.4. PC to HUB
1.
2.
3.
4.

The PC is connected to the HUB using CAT 5 cables.


The PC uses TCP/IP protocol to communicate with the hub
The hub hosts the information of all the valid ids
This connection is used to check the validity of an incoming id

6.5. FRM to PC
1. The Controller generates a digital output of the face id
2. These signals are transmitted via RS 232 cables
3. As the PC uses RS 485 input, a RS232/485 converter is used to convert the RS232 signals to RS
485
(A PC can use both RS 232 and RS 485 communication but RS 485 communication is preferred
as many controllers can be connected to the PC)

6.6. Occupancy Sensor to FRM


1. The occupancy sensor generates a binary output (0- no occupancy & 1- occupancy)
2. If occupancy=1 then the FRM actuates the IP camera
3. The IP camera starts reading the face of the person

6.7. Exit Button to FRM(Communication: Binary)


1. When a person presses the exit button from inside, a binary signal is generated and it is sent to

FRM (Exit=1)
2. The FRM recognizes the signal and actuates the Electromagnetic Lock
3. And also the occupancy measure of the room is reduced by 1 (Occupancy=Occupancy-1)

6.8. Automated Attendance System

This system can be used for a board room or a meeting room to maintain a directory for the
attendance
1. The FRM recognizes the face and generates the face id.

7. Cost Analysis of the components used in face recognition


7.1. Cost Estimation
COMPONENT

ESTIMATED COST

USB to RS485 convertor

Rs 280/-

Electromagnetic Lock

Rs 1950/-

HF-FR701

Rs 18600/-

UA-RT PCB board

Rs 3000/-

USB 2.0 to RS232 Serial DB9 Pin Male


Adapter SKU#622

Rs 200/-

RS232 to RS485 Adapter Converter Card


access control Systems
CAT 5 NETWORKING LAN PATCH CORD
CABLE 1.5 METERs
200ft feet RS485 Signal Transmission Cable
for Control CCTV PTZ Security camera

Rs 250/-

Electric Bell

Rs 250/-

Total

Rs 26080/-

Allowance (appx)

Rs 1000/-

Total estimated cost

Rs 27080/-

Rs 60/Rs 1500/-

7.2. Links for costs

USB to RS485 convertor

http://www.ebay.com/bhp/usb-to-rs485-adapter

Electromagnetic Lock

http://www.ebay.com/sch/i.html?_trksid=p2053587.m570.l1313.TR0.TRC0.H0.XElectromagnetic+Lock+&_nkw=
Electromagnetic+Lock+&_sacat=0&_from=R40

HF-FR701 or any other similar model

http://www.alibaba.com/trade/search?fsb=y&IndexArea=product_en&CatId=&SearchText=hf-fr701

UA-RT PCB board

http://sigma-shop.com/product/129/uart-8-channel-relay-controller-with-clips-for-din-mount-rail-12vdc.html

USB 2.0 to RS232 Serial DB9 Pin Male Adapter SKU#622

http://www.ebay.com/sch/i.html?_odkw=USB+2.0+to+RS232+Serial+DB9+Pin+Male+Adapter+SKU%23622&_os
acat=0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.XUSB+2.0+to+RS232+Serial+DB9+Pin+Adapte
r+SKU%23622&_nkw=USB+2.0+to+RS232+Serial+DB9+Pin+Adapter+SKU%23622&_sacat=0

RS232 to RS485 Adapter Converter Card access control Systems

http://www.ebay.com/sch/i.html?_odkw=USB+2.0+to+RS232+Serial+DB9+Pin+Adapter+SKU%23622&_osacat=
0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.XRS232+to+RS485+Adapter+Converter+Card+acce
ss+control+Systems+&_nkw=RS232+to+RS485+Adapter+Converter+Card+access+control+Systems+&_sacat=0

CAT 5 NETWORKING LAN PATCH CORD CABLE 1.5 METERs

Gurunath departmental store

200ft feet RS485 Signal Transmission Cable for Control CCTV PTZ Security camera

http://www.ebay.com/sch/i.html?_odkw=CAT+5+NETWORKING+LAN+PATCH+CORD+CABLE+1.5+METERs&_osa
cat=0&_from=R40&_trksid=p2045573.m570.l1313.TR0.TRC0.H0.X200ft+feet+RS485+Signal+Transmission+Cabl
e+for+Control+CCTV+PTZ+Security+camera&_nkw=200ft+feet+RS485+Signal+Transmission+Cable+for+Control
+CCTV+PTZ+Security+camera&_sacat=0

Electric bell

http://www.ebay.in/itm/electric-bell-kit-do-yourself-diy-science-activity-model-hobby-toy-gift/111303990398?pt=in_toys_games_school_stuff

8. References

www.wikipedia.org

http://www.alibaba.com/trade/search?fsb=y&IndexArea=product_en&CatId=&SearchText=hf-fr701

http://stackoverflow.com
http://www.mathworks.in
Research paper on Viola Jones Face detection algorithm