Upload
nikhil-sharma
View
136
Download
3
Tags:
Embed Size (px)
DESCRIPTION
Student Attendance By Image Analysis
Citation preview
A project Report
on
Biometric Approach Towards Student Attendance System
By
Anurag Srivastava BE/5568/10
Nikhil Sharma BE/5668/10
Niharika Gupta BE/5769/10
Under the guidance of
Prof. Smita Pallavi
Submitted in partial fulfillment of the requirement for the award of the
Degree of
Bachelor of Engineering in computer science
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
BIRLA INSTITUTE OF TECHNOLOGY
MESRA, PATNA CAMPUS
November 1,2013
ACKNOWLEDGEMENT
We would like to sincerely thank our mentor, Mrs. Smita Pallavi, Asst. Prof. ,
Computer Science and Engineering Department, BIT Mesra, Patna Campus for
her sagacious guidance and invaluable suggestions. We are grateful to her for
giving us an opportunity to work on “Biometric Approach Towards Student
Attendance System” with her. We would be ever indebted to her for planning of
the work, critical appraisal of the script and compilation of the project. With
sincere gratitude, we would also like to extend thanks to Dr. Kanhaiya Lal (In-
charge, Department of Computer Science and Engineering, BIT-Patna) for his
timely guidance.
We owe special thanks to Prof. Ashish Ranjan for his support in better
understanding of the concepts of Image Processing. This list is obviously
incomplete but allow us to submit that the omissions are inadvertent and we once
again record our deep-felt gratitude to all those associated with us in this endeavor.
Anurag Srivastava BE/5568/10
Nikhil Sharma BE/5668/10
Niharika Gupta BE/5769/10
Contents
1. Introduction
1.1 Problem Statement
1.2 Motivation and Challenges
1.3 Using Biometrics
1.4 Fingerprints
1.5 Why use Fingerprints?
1.6 Using Fingerprints for Student Attendance System.
2. Attendance Management Framework
2.1 Hardware-Software level design
2.2 Implementation Design
2.3 E-R Diagram
2.4 Network Design
2.5 Portable Device using wireless LAN
2.6 Data Flow Diagram
2.7 Database Management
2.8 Online Report Generation
3. Fingerprint Identification System
3.1 How Fingerprint Recognition Works?
3.2 Fingerprint Identification system flowchart
4. Fingerprint Enhancement
4.1 Segmentation
4.2 Normalization
4.3 Orientation Estimation
4.4 Ridge Frequency Estimation
4.5 Binarisation
4.6 Thinning
5. Fingerprint Recognition and Matching
5.1 Fingerprint Recognition
5.2 Matching
6. Software Design and Working Model
7. Future Work
8. Conclusion
9. References
10. Appendix
10.1 Matlab Functions used
Abstract
Biometric involves the identification and verification of individuals by analyzing
the human fingerprint characteristics. It has been widely used in various aspect of
life for different purposes. This project aims at effectively using this technology to
manage attendance of students at institutes like BIT Mesra automatically.
Manually taking the attendance and maintaining it for a long time makes it a
difficult task. Also it wastes a lot of time. This system takes attendance with the
help of a finger-print sensor module and all the records are saved on a computer. In
this project edge detection algorithm has been implemented for fingerprint
matching. This system is implemented in Matlab7 software. The hardware and
software can be integrated to make a portable attendance monitoring system. Our
matching technique runs in O (n) time.
Chapter 1
Introduction
1.1 Problem Statement
Designing a Student Attendance Management system based on fingerprint
recognition and faster one to many identification that manages records for
attendance in institutes.
1.2 Motivation and Challenges
Designing a better attendance management system for students so that records are
maintained with ease and accuracy was an important key behind motivating this
project. This would improve accuracy of attendance records because it will remove
all the hassles of roll calling and will save valuable time of the students as well as
teachers. Image processing and fingerprint recognition are very advanced today in
terms of technology.
1.3 Using Biometrics
Biometric Identification Systems are widely used for unique identification of
humans mainly for verification and identification. Biometrics is used as a form of
identity access management and access control. So use of biometrics in student
attendance management system is a secure approach. There are many types of
biometric systems like fingerprint recognition, face recognition , voice recognition,
iris recognition, palm recognition, , DNA recognition etc. In this project, we used
fingerprint recognition system.
1.4 Fingerprint
A fingerprint is an impression of the friction ridges on all parts of the finger. A
friction ridge is a raised portion of the epidermis on the palm or digits (fingers and
toes) or plantar (sole) skin, consisting of one or more connected ridge units of
friction ridge skin. These are sometimes known as "epidermal ridges" which
caused by the underlying interface between the dermal papillae of the dermis. [1].
It is believed that no two people have identical fingerprint in world, so the
fingerprint verification and identification is most popular way to verify the
authenticity or identity of a person wherever the security is a problematic question.
The reason for popularity of fingerprint technique is uniqueness of person arises
from his behavior; personal characteristics are like, for instance uniqueness, which
indicates that each and every fingerprint is unique, different from one other.
When human fingerprint experts determine if two fingerprints are from the same
finger, the matching degree between two minutiae pattern is one of the most
important factors. Thanks to the similarity to the way of human fingerprint experts
and compactness of templates, the minutiae-based matching method is the most
widely studied matching method.
1.5 Why use fingerprints? Fingerprints are considered to be the best and fastest method for biometric
identification. They are secure to use, unique for every person and does not change
in one's lifetime. Besides these, implementation of fingerprint recognition system
is cheap, easy and accurate up to satisfiability.
Fingerprint recognition has been widely used in both forensic and civilian
applications. Compared with other biometrics features , fingerprint-based
biometrics is the most proven technique and has the largest market shares . Not
only it is faster than other techniques but also the energy consumption by such
systems is too less.
1.6 Using fingerprint recognition system for attendance
management
Managing attendance records of students of an institute is a tedious task. It
consumes time and paper both. To make all the attendance related work automatic
and on-line, we have designed an attendance management system which could be
implemented in various institutes. It uses a fingerprint identification system
developed in this project. This fingerprint identification system uses existing as
well as new techniques in fingerprint recognition and matching.
Chapter 2
Attendance Management Framework
Manual attendance taking and report generation has its limitations. It is well
enough for 30-60 students but when it comes to taking attendance of students large
in number, it is difficult. For taking attendance for a lecture, a conference, etc. roll
calling and manual attendance system is a failure. Time waste over responses of
students, waste of paper etc. are the disadvantages of manual attendance system.
Moreover, the attendance report is also not generated on time.
To overcome these non-optimal situations, it is necessary that we should use an
automatic on-line attendance management system. So we present an
implementable attendance management framework. Student attendance system
framework is divided into three parts :
Hardware/Software Design,
Attendance Management Approach, and
On-line Report Generation.
Each of these is explained below.
2.1 Hardware - Software Level Design .
Proposed hardware consists following parts:
(1)Fingerprint Scanner,
(2)LCD/Display Module (optional),
(3)Computer
(4)LAN Connection
Fingerprint scanner will be used to input fingerprint of students into the computer
software.
LCD can be used to view the details of any individual student. However, the
display part can be implemented on the computer.
Fingerprint module
A computer can act as a server where the information of students can be stored and
their easy retrieval is possible. Computer Software present on this computer will
be interfacing fingerprint scanner and LCD and will be connected to the network.
It will input fingerprint, will process it and extract features for matching. After
matching, it will update database attendance records of the students.
Proposed software architecture consists of the database and the application
program.
Database: Record file stores all the information of the registered students as well
as their attendances in every subject.
Application Program: The application program is developed with Matlab7. It
provides a graphical user interface for the Attendance Management System. The
advantage of using of Matlab7 is its easy integration with the hardware.
Hardware present in classrooms
2.2 Implementation Process
Following points will make sure that attendance is marked correctly, without any
problem:
(1) All the hardware will be inside classroom. In this way outside interference will
be least. C-CTV cameras can be installed to prevent unauthorized access and
unprivileged activities.
(2) When teacher enters the classroom, the attendance marking will start.
Computer Software will start the process after taking login password from the
teacher.
(3) After some time, say 20 minutes of this process, no attendance will be given
because of late entrance. This time period can be increased or decreased as per
requirements.
(4) If attendance has already been marked, student is not able to mark another
attendance in the same lecture. This will show error on LCD screen.
Classroom Scenario
2.4 Network Diagram This attendance system will be spread over a wide network from classrooms via
intranet to internet. Network diagram is shown in fig. Using this network,
attendance reports will be made available over internet and e-mail. A monthly
report will be sent to each student via email and website will show the updated
attendance.
Network Diagram
We are using LAN for communication among servers and hardwares in the
classrooms. We can instead use wireless LAN with portable devices. Portable
device will have an embedded fingerprint scanner, wireless connection, a
microprocessor loaded with a software, memory and a display terminal.
Size of device could be small like a mobile phone depending upon how well the
device is manufactured.
2.5 Portable Device using Wireless LAN to implement
attendance system
Portable Device
This device should have a wireless connection. Using this wireless connection,
attendance taken would be updated automatically when device is in network of the
nodes which are storing the attendance records. Database of enrolled fingerprints
will be in this portable device. Size of enrolled database was 12.1 MB when 150
fingerprints were enrolled in this project. So for 10000 students, atleast 807 MB or
more space would be required for storing enrolled database. For this purpose, a
removable memory chip could be used. We cannot use wireless LAN here because
fetching data using wireless LAN will not be possible because of less range of
wireless devices.So enrolled data would be on chip itself. Attendance results will
be updated when portable device will be in the range of nodes which are storing
attendance reports.
We may update all the records online via the mobile network provided by different
companies. Today 3G network provides sufficient throughput which can be used
for updating attendance records automatically without going near nodes. In such
case, the need of database inside memory chip will not be mandatory. It will be
fetched by using 3G mobile network from central database repository. The design
of such a portable device is the task of embedded system engineers.
Using Portable Device
In this section, we suggest the working of portable device and the method of using
it for marking attendance. The device may either be having touchscreen
input/display or buttons with lcd display. A software specially designed for the
device will be running on it. Teachers will verify his/her fingerprint on the device
before giving it to students for marking attendance. After verifying the teacher's
identity, software will ask for course and and other required information about the
class which he or she is going to teach. Software will ask teacher the time after
which device will not mark any attendance. This time can vary depending on the
teacher's mood but our suggested value is 25 minutes. This is done to prevent late
entrance of students. This step will hardly take few seconds. Then students will be
given device for their fingerprint identification and attendance marking. In the
continuation, teacher will start his/her lecture. Students will hand over the device
to other students whose attendance is not marked. After 25 minutes or the time
decided by teacher, device will not input any attendance. After the class is over,
teacher will take device and will end the lecture. The main function of software
running on the device will be fingerprint identification of students followed by
report generation and sending reports to servers using 3G network. Other functions
will be downloading and updating the database available on the device from
central database repository.
2.6 Data Flow Diagram
Level 0 DFD
Level 1 DFD
2.7 Database Management
Database storage contains the fingerprint templates of students along with their
information (names, registration numbers, roll number and Subjects/lectures).
When student enrolls his/her finger on the fingerprint sensor module his/her
fingerprint is matched with database to mark the attendance.
2.8 On-Line Attendance Report Generation
Database for attendance can be stored in tabular form but here we are avoiding any
external storage means due to unavailability of MYSQL toolbox in matlab for
students .
Here database is stored in the form of structures .Primarily two structures are
maintained:
1. Student with attributes as
Name
Roll
Course
Day
2. Attendance with attributes as
Subject
Roll
Name
Attendance
Using this information, all the attendance can be managed for a student.
To implement multiple subjects teachers can have a separate structures with
attributes as subjects ,name, teacher_id.
For on-line report generation, a simple website can be hosted on college servers.
2.4 COMPARISON WITH OTHER STUDENT ATTENDANCE SYSTEMS
There are various other kinds of student attendance management systems available
like RFID based student attendance system and GSM-GPRS based student
attendance system.
Our system is better because first it saves time that could be used for teaching.
Second is its portability
[1]. Portability has its own advantage because the device could be taken to any
class wherever it is scheduled because it is dynamic. In GSM-GPRS based
systems, it use position of class for attendance marking which is not dynamic and
if schedule or location of the class changes, wrong attendance might be marked.
Problem with RFID based systems is that students have to carry RFID cards and
also the RFID detectors are needed to be installed. But, students may give proxies
easily using friend's RFID card. These problems are not in our system
[2]. We used fingerprints as recognition criteria so proxies cannot be given. If
portable devices are used, attendance marking will be done at any place and any
time. So our student attendance system is far better to be implemented.
Chapter 3
Fingerprint Identification System
An identification system is one which helps in identifying an individual among
many people when detailed information is not available. It may involve matching
available features of candidate like fingerprints with those already enrolled in
database.
3.1 How Fingerprint Recognition works?
Fingerprint images that are found or scanned are not of optimum quality. So we
remove noises and enhance their quality. We extract features like minutiae and
others for matching. If the sets of minutiae are matched with those in the database,
we call it an identified fingerprint. After matching, we perform post-matching steps
which may include showing details of identified candidate, marking attendance etc.
A brief flowchart is shown in next section.
3.2 Fingerprint Identification System Flowchart
A brief methodology of our Fingerprint Identification System is shown here in
following flowchart. Each of these are explained in the later chapters.
Chapter 4
Fingerprint Enhancement
The image acquired from scanner is sometimes not of perfect quality .It gets
corrupted due to irregularities and non-uniformity in the impression taken and due
to variations in the skin and the presence of the scars, humidity, dirt etc. To
overcome these problems , to reduce noise and enhance the definition of ridges
against valleys, various techniques are applied as following.
4.1 Segmentation
Image segmentation separates the foreground regions and the background regions
in the image. The foreground regions refer to the clear fingerprint area which
contains the ridges and valleys. This is the area of interest. The background regions
refer to the regions which are outside the borders of the main fingerprint area,
which does not contain any important or valid fingerprint information. The
extraction of noisy and false minutiae can be done by applying minutiae extraction
algorithm to the background regions of the image. Thus, segmentation is a process
by which we can discard these background regions, which results in more reliable
extraction of minutiae points. The background regions exhibit a very low grey -
scale variance value, whereas the foreground regions have a very high variance.
Firstly, the image is divided into blocks and the grey-scale variance is calculated
for each block in the image. If the variance is less than the global threshold, then
the block is assigned to be part of background region or else it is part of foreground
. The grey - level variance for a block of size S x S can be calculated as:
where Var(k) is the grey - level variance for the block k , G(i,j) is the grey – level
value at pixel (i,j) , and M(k) denotes the mean grey - level value for the
corresponding block k .
4.2 Normalization
Image normalization is the next step in fingerprint enhancement process.
Normalization is a process of standardizing the intensity values in an image so that
these intensity values lie within a certain desired range. It can be done by adjusting
the range of grey-level values in the image. Let G (i, j) denotes the grey-level value
at pixel (i, j), and N(i, j) represent the normalized grey-level value at pixel (i, j).
Then the normalized image can defined as:
Where Mo and Vo are the estimated mean and variance of I(i, j), respectively .
4.3 Orientation estimation The orientation field of a fingerprint image defines the local orientation of the
ridges contained in the fingerprint . The orientation estimation is a fundamental
step in the enhancement process as the subsequent Gabor filtering stage relies on
the local orientation in order to effectively enhance the fingerprint image. The least
mean square estimation method used by Raymond is used to compute the
orientation image. However, instead of estimating the orientation block-wise, we
have chosen to extend their method into a pixel-wise scheme, which produces a
finer and more accurate estimation of the orientation field. The steps for
calculating the orientation at pixel (i, j) are as follows:
1. Firstly , a block of size W x W is centered at pixel (i, j) in the normalized
fingerprint print image.
2. For each pixel in the block, compute the gradients dx (i, j) and dy (i, j),
which are the gradient magnitudes in the x and y directions, respectively.
The horizontal Sobel operator is used to compute dx(i, j) :[1 0 -1; 2 0 -2;1 0
1]
3. The local orientation at pixel (i, j) can then be estimated using the following
equations:
where θ(i, j) is the least square estimate of the local orientation at the block
centered at pixel θ(i, j).
Orientation Estimation
4. Smooth the orientation field in a local neighbourhood using a Gaussian
filter. The orientation image is firstly converted into a continuous vector
field, which is defined as:
where ᶲ x and ᶲ y are the x and y components of the vector field,
respectively.
4.4 Ridge Frequency Estimation
Another important parameter,in addition to the orientation image, that can be used
in the construction of the Gabor filter is the local ridge frequency. The local
frequency of the ridges in a fingerprint is represented by the frequency image.
The first step is to divide the image into blocks of size W x W.
In the next step we project the grey-level values of each pixels located inside each
block along a direction perpendicular to the local ridge orientation. This projection
results in an almost sinusoidal-shape wave with the local minimum points denoting
the ridges in the fingerprint.It involves smoothing the projected waveform using a
Gaussian lowpass filter of size W x W which helps in reducing the effect of noise
in the projection. The ridge spacing S(i, j) is then calculated by counting the
mediannumber of pixels between the consecutive minima points in the projected
waveform.The ridge frequency F(i, j) for a block centered at pixel (i, j) is given as
4.6 Binarisation
Most minutiae extraction algorithms operate on basically binary images where
there are only two levels of interest: the black pixels represent ridges, and the white
pixels represent valleys. Binarisation converts a greylevel image into a binary
image. This helps in improving the contrast between the ridges and valleys in a
fingerprint image,and consequently facilitates the extraction of minutiae. One very
useful property of the Gabor filter is that it contains a DC component of zero,
which indicates that the resulting filtered image has a zero mean pixel value.
Hence, binarisation of the image can be done by using a global threshold of zero.
Binarisation involves examining the grey-level value of every pixel in the
enhanced image, and, if the grey-level value is greater than the predefined global
threshold, then the pixel value is set to value one;else, it is set to zero.
The outcome of binarisation is a binary image which contains two levels of
information, the background valleys and the foreground ridges.
4.7 Thinning
Thinning is a morphological operation which is used to remove selected
foreground pixels from the binary images. A standard thinning algorithm from [1]
is used, which performs this operation using two sub iterations. The algorithm can
be accessed by a software MATLAB via the `thin' operation of the bimorph
function. Each sub iteration starts by examining the neighbourhood of every pixel
in the binary image, and on the basis of a particular set of pixel-deletion criteria, it
decides whether the pixel can be removed or not. These subiterations goes on until
no more pixels can be removed.
(a)Original Image, (b)Enhanced Image, (c)Binarised Image, (d)Thinned
Image
Chapter 5
Fingerprint Recognition and Matching
Fingerprint Recognition
The fingerprint recognition problem can be grouped into three sub-domains:
fingerprint enrollment,
verification and
fingerprint identification.
In addition, different from the manual approach for fingerprint recognition by
experts, the fingerprint recognition here is referred as AFRS (Automatic
Fingerprint Recognition System), which is program-based. Verification is typically
used for positive recognition, where the aim is to prevent multiple people from
using the same identity. Fingerprint verification is to verify the authenticity of one
person by his fingerprint. There is one-to one comparison in this case. In the
identification mode, the system recognizes an individual by searching the
templates of all the users in the database for a match. Therefore, the system
conducts a one to-many comparison to establish an individual’s identity.
The following are Fingerprint Recognition Techniques:
A. Minutiae Extraction Technique
Most of the finger-scan technologies are based on Minutiae. Minutia-based
techniques represent the fingerprint by its local features, like terminations and
bifurcations. This approach has
been intensively studied, also is the backbone of the current available fingerprint
recognition products . This is the most popular and widely used technique, being
the basis of the fingerprint comparison made by fingerprint examiners. Minutiae
are extracted from the two fingerprints and stored as sets of points in the two-
dimensional plane. Minutiae-based matching essentially consists of finding the
alignment between the template and the input minutiae sets those results in the
maximum number of minutiae pairings.
B. Pattern Matching or Ridge Feature Based Techniques Feature extraction and template generation are based on series of ridges as opposed
to discrete points which forms the basis of Pattern Matching Techniques. The
advantage of Pattern Matching techniques over Minutiae Extraction is that
minutiae points may be affected by wear and tear and the disadvantages are that
these are sensitive to proper placement of finger and need large storage for
templates. Pattern based algorithms compare the basic fingerprint patterns (arch,
whorl, and loop) between a previously stored template and a candidate fingerprint.
This requires that the images be aligned in the same orientation. To do this, the
algorithm finds a central point in the fingerprint image and centers on that. In a
pattern-based algorithm, the template contains the type, size, and orientation of
patterns within the aligned fingerprint image. The candidate fingerprint image is
graphically compared with the template to determine the degree to which they
match.
C. Correlation Based Technique
Two fingerprint images are superimposed and the correlation between
corresponding pixels is computed for different alignments (e.g. various
displacements and rotations). The cross-correlation is a well-known measure of
image similarity and the maximization in (1); it allows us to find the optimal
registration. The direct application of (1) rarely leads to acceptable results, mainly
due to the following problems:
i) Non-linear distortion makes impressions of the same finger significantly
different in terms of global structure; the use of local or block-wise
correlation techniques can help to deal with this problem.
ii) Skin condition and finger pressure cause image brightness, contrast, and
ridge thickness to vary significantly across different impressions. The use
of more sophisticated correlation measures may compensate for these
problems
iii) A direct application of (1) is computationally very expensive. Local
correlation and correlation in the Fourier domain can improve efficiency
Matching
Matching means finding most appropriate similar fingerprint to query fingerprint.
Fingerprints are matched by matching set of minutiae extracted. Minutiae sets
never match completely, so we compute match score of matching. If match score
satisfies accuracy needs, we call it successful matching. We used a new key based
one to many matching intended for large databases.
Existing Matching Techniques
1. One to many matching
Few algorithms are proposed by many researchers around the world which are
better than normal matching. But all of them are one to one verification or one to
one identification matching types. We developed a one to many matching
technique which uses key as the hashing tool. Initially, we do not match minutiae
sets instead we perform key matching with many keys of database. Those database
fingerprints, whose keys match with key of query fingerprint, are allowed for full
minutiae matching.
Algorithm : Key Based One to Many Matching Algorithm
M Input M from user;
j=1;
N Size of Database;
while j <= N do
if N - j >= 9 then
limit=M;
else
limit=N-j;
end
for i = j to j + limit - 1 do
Perform Matching(Gender, Class, i);
end
for i = 1 to M do
Gender Opposite of Estimated Gender;
Perform Matching(Gender, Class, i);
end
end
However we will be using edge detection technique which although involves one
to one matching but produces results with maximum efficiency.
2. Edge Detection
The purpose of edge detection in Automated Fingerprint Identification Systems
is to significantly reduce the amount of data found in a fingerprint image and leave
only the most important information. Edge detection works by finding points on an
image where the gray scale value changes greatly between pixels. The darker
pixels have low gray values while the lighter have high gray values. One method of
performing edge detection is based on convolution. Convolution is a mathematical
way of blending one function with another to produce a result expressing the
amount of overlap the functions have on one another. Two of the most common
edge detection filters are the Laplacian and the Canny operators. The Laplacian
operator is a method of edge detection based on taking the second derivatives of
the gray intensity (in the Cartesian coordinate system) while the Canny operator
uses the first derivative of the intensity. The Canny operator is the most commonly
used method for edge detection in AFIS since there are no significant advantages
in other systems[3]. The Laplacian function can be used to expresses the second
derivative of a function. There are some problems with using the Laplacian, since
it is especially prone to picking up features which are not actually edges in the
image. The Laplacian operator results in incorrect readings where the gray value
changes in small amounts consistently over part of the image. To reduce this noise
in an image, a Gaussian blur is often applied before the Laplacian operator. After
the second derivative is found, a threshold must be applied to determine actual
edges. More noise is produced with a lower threshold while a high threshold may
miss some edges. This is one of the most basic algorithms. Its implementation is as
follows:
ALGORITHM
Pic1 = Read image 1
Pic 2 = Read image 2
Edge_pic 1=edge(pic 1)
Edge_pic 2=edge(pic 2)
for a = 1 to 256
for b = 1 to 256
if(edge pic1(a,b)==1)
white_points = white_points+1;
else
black_points = black_points+1;
end
end
end
for i = 1 to 256
for j = 1 to 256
if(edge_pic1 (i,j)==1)&&(edge pic2(i,j)==1)
matched_data = matched_data+1;
end
end
end
total_data = white_points;
total_matched_percentage = (matched_data/total_data)*100;
if(total_matched_percentage >= 90)
Matched
else
Not Matched
End
Details
In the above algorithm a function edge is used for edge detection.This function
creates a binary image with black and white points. It looks for the sharp change in
intensity values to detect the edges. The algorithm used in project makes the use of
prewitt method or edge detection. After detection of edges,dots inside the edges are
made white in colour and the background gets black in colour.
This image is further enhanced and a binary image is produced as seen in
figure. After this we count the number of white points initial image to locate
fingerprint dots in sample image. Then both the image matrices are matched pixel
by pixel. If the number of dots matched exceeds 90% then the image is matched
else it is considered unmatched.
Original Scanned images
Binary Images after edge detection
Chapter 6
Software Design and Working model
LOGIN PAGE
This login Form is made For Security purpose. So only authenticated users can
access in to the Project.
There are two Type of persons who can enter in the project
1. Administrator
2. User
New Registration Form
This form is filled by the students at the time of registration. It asks for details like
name, roll no, branch, semester, current attendance.
Student details being entered during new registration
Take Attendance
Attendance granted once finger print matches with student record
This Form is used to choose subjects and the month for which attendance is to be
filled up. When the student gives his/her attendance using the fingerprint scanner
module, the entry is matched with the fingerprints already present in the existing
database. If the fingerprint matches, their attendance is added.
View Attendance
Teachers can view the attendance of students in various subjects just by entering
their roll no thus various updation and attendance sheets can be framed
Software Testing
The proposed system has been tested for a class of 70 students. Four students were
20 minutes late than the lecture time. The attendance of these four students was not
updated (see rules for detail).
Out of other 66 students 63 students were properly identified and thus their
attendance record was updated.
1 unsuccessful identification occurred because student did not properly place his
finger on the sensor (see rules for detail).
1 student got identified as a different student due to presence of only 90%
matching criteria.
1 student failed identification due to unregistered or error-full details in the
database. The accuracy of the system is shown
No. of
students
No. of student
attendances
not counted
Successful
Identification
Unsuccessful
Identification
Accuracy
70 04 63 03 95.45%
Attendance Accuracy
Hence the software tested against various students was found to be functioning
properly.The only issue addressed while testing of software was:
Proper mechanism should be used to ensure that the thumb impression taken
everytime is exactly same.
Conclusion
This project mainly comprised of development of attendance management system
and fingerprint identification system. Attendance management is very helpful in
saving valuable time of students and teachers, paper and generating report at
required time. This project presented a framework using which attendance
management can be made automated and on-line.
Fingerprint Identification System used for student identification is faster in
implementation than any other fingerprint identification systems. For fingerprint
recognition, prevalent enhancement techniques clubbed with new techniques
helped in implementing this project in a better and efficient way.
As we have seen that further implementation of biometric technology like face
recognition grouped with various other image processing technologies like motion
sensing can make this software even better.
Future Work
Fingerprint identification system will be improved further using more indexing
techniques like ridge density tolerance etc.
Instead of using our database, we would be using database of students.
More functionalities like view attendance, subject-wise analysis can be added.
Student attendance system is designed using LAN in this project. A more thought
process can involve the implementation of this software over a wireless network.
The problem of using wireless LAN is that wireless devices are costly and
implementation is hard because the wireless devices work in small area. For large
campuses one can use mobile network which would be sufficiently suitable
because now-a-days 3G network provides much speed. It would meet necessary
throughput and data fetching speed requirements.
Biometric methodology can be implemented at higher levels where face
recognition and other biometric analysis can be done to provide more
authentication towards the presence of students. An integration of RFID system
with the Xbox Kinect technology and color camera sensors can come handy when
implemented with face recognition and motion sensing techniques. RFID systems
here can come handy in detecting the persons present in the class . Students can be
given a wrist band embedded with RFID tags which they should wear essentially
when they attend lectures. Here, RFID system can be an Active Reader Passive
Tag (ARPT) system whose reader will keep on interrogating whether the RFID
tags remain in the class during the lecturehours. RFID tags in this system can also
use a Battery Assisted Passive (BAP) tag which acts like a passive tag but has a
small battery to power the tag's return reporting signal. Thus with RFID system
multiple people entries present in the class can be recorded at the same time.What
if someone else is wearing two wrist bands at the same time?In that case, a student
will get the attendance although he will be absent during the class hours. To avoid
this scenario, Image analysis of thestudent can be implemented along with RFID
systems to ensure more Color camera sensors can capture the students’ image
whenever he/she enters the classroom and then image processing of the recorded
RGB content of image by color sensors can be done to produce a pattern to cross
check with patterns already present in the database(using pattern Recognition
techniques). Along with that, RFID systems will also sense the unique key
present in RFID tags, carried by the student and match that with students’
identity in the database. If the pattern matched with the RFID key is the same
matched during image analysis, then that person will get the attendance, else
the person will be marked absent.
RFID systems can also used be to track the students present in class at regular
intervals so as to ensure that they were present in the class all the time. In
case, Xbox Kinect detects any student motion , (like when they are going out
for some reason),it can again perform image analysis to match that student’s
record and with the help of RFID sensors it can check if the tag is present in the
class. If the tag gets detected in the class and kinect detected student’s motion
going out of the class, then student is marked absent until the kinect sensors
record his movement coming inside the class. Also in case the tag remains
undetected, the student is marked absent until his motion of entering inside
the class gets detected .Thus student motion detected with Xbox kinect can
also be helpful in maintaining a record if the student attended the whole
lecture or not. Machine learning techniques can be used to train the system to
detect the motion of people coming out and inside the classroom.
If in case, kinect sensors did not record any movement and RFID tags do not
respond to readers, then it that case student’s attendance in class is marked
absent. Thus RFID tags,color camera sensors and Xbox kinect make
interdependent system to provide factual data.
Thus future advancements in the field of biometrics and its implementation with
newer image processing technology in this project can produce highly
efficient,authentic and reliable results
REFERENCES
[1]. K.G.M.S.K. Jayawardana, T.N. Kadurugamuwa, R.G. Rage and S.
Radhakrishnan”, Timesheet: An Attendance Tracking System”, Pro-ceedings of
the Peradeniya University Research Sessions, Sri Lanka, Vol.13, Part II, 18th
December 2008.
[2]. Yohei KAWAGUCHI, Tetsuo SHOJI , Weijane LIN ,Koh KAKU-SHO,
Michihiko MINOH ,“Face Recognition-based Lecture Atten-dance System”,
Department of Intelligence Science and Technology, Graduate School of
Informatics, Kyoto University. Academic Center for Computing and Media
Studies, Kyoto University
[3]. American University of Beirut (2005, November 1). Fingerprint identification
– project 2.
Retrieved January 17, 2006, from http://webfea-
lb.fea.aub.edu.lb/dsaf/labs/projectv1.1.pdf
[4]. Anil K. Jain, Arun Ross and Salil Prabhakar, “An introduction to biometric
recognition,” Circuits and Systems for Video Technology,IEEE Transactions on
Volume 14, Issue 1, Jan. 2004
Appendix Matlab Functions Used:
1. Start.m
function varargout = start(varargin)
% START M-file for start.fig
% START, by itself, creates a new START or raises the existing
% singleton*.
%
% H = START returns the handle to a new START or the handle to
% the existing singleton*.
%
% START('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in START.M with the given input arguments.
%
% START('Property','Value',...) creates a new START or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before start_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to start_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help start
% Last Modified by GUIDE v2.5 31-Oct-2013 15:28:57
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @start_OpeningFcn, ...
'gui_OutputFcn', @start_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before start is made visible.
function start_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to start (see VARARGIN)
% Choose default command line output for start
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes start wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = start_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in teacher.
function teacher_Callback(hObject, eventdata, handles)
% hObject handle to teacher (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
login;
start('visible','off');
% --- Executes on button press in student.
function student_Callback(hObject, eventdata, handles)
% hObject handle to student (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear all;
close all;
studlogin;
start('visible','off');
% --- Executes on button press in exit.
function exit_Callback(hObject, eventdata, handles)
% hObject handle to exit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear all;
close all;
2. login.m
function varargout = login(varargin)
% LOGIN M-file for login.fig
% LOGIN, by itself, creates a new LOGIN or raises the existing
% singleton*.
%
% H = LOGIN returns the handle to a new LOGIN or the handle to
% the existing singleton*.
%
% LOGIN('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in LOGIN.M with the given input arguments.
%
% LOGIN('Property','Value',...) creates a new LOGIN or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before login_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to login_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help login
% Last Modified by GUIDE v2.5 31-Oct-2013 15:21:23
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @login_OpeningFcn, ...
'gui_OutputFcn', @login_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before login is made visible.
function login_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to login (see VARARGIN)
% Choose default command line output for login
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes login wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = login_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if(str2num(get(handles.edit1,'string'))==1234)
studreg;
login('visible','off');
else
msgbox('invalid password');
end
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close all;
% --- Executes on button press in back.
function back_Callback(hObject, eventdata, handles)
% hObject handle to back (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear all;
close all;
start;
login('visible','off');
3. studlogin.m
function varargout = studlogin(varargin)
% STUDLOGIN M-file for studlogin.fig
% STUDLOGIN, by itself, creates a new STUDLOGIN or raises the existing
% singleton*.
%
% H = STUDLOGIN returns the handle to a new STUDLOGIN or the handle to
% the existing singleton*.
%
% STUDLOGIN('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in STUDLOGIN.M with the given input arguments.
%
% STUDLOGIN('Property','Value',...) creates a new STUDLOGIN or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before studlogin_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to studlogin_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help studlogin
% Last Modified by GUIDE v2.5 31-Oct-2013 15:19:38
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @studlogin_OpeningFcn, ...
'gui_OutputFcn', @studlogin_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before studlogin is made visible.
function studlogin_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to studlogin (see VARARGIN)
% Choose default command line output for studlogin
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes studlogin wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = studlogin_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.details,'string','');
set(handles.namemeta,'string','');
set(handles.name,'string','');
set(handles.rollmeta,'string','');
set(handles.roll,'string','');
set(handles.branchmeta,'string','');
set(handles.branch,'string','');
set(handles.currentmeta,'string','');
set(handles.current,'string','');
set(handles.record,'string','');
[filename, pathname] = uigetfile({'*.tif';'*.jpg';'*.gif';'*.*'}, 'Pick an Image File');
set(handles.edit1,'String',[pathname,filename]);
img=imread(get(handles.edit1,'string'));
axes(handles.axes1);
imshow(img,'Parent',handles.axes1);
guidata(hObject, handles);
load database.mat;
for i=1:length(array)
flag=matchfingerprint(array(i).image,get(handles.edit1,'string'));
if flag==1
set(handles.details,'string','Details');
set(handles.namemeta,'string','Name');
set(handles.rollmeta,'string','Roll No');
set(handles.branchmeta,'string','Branch');
set(handles.currentmeta,'string','Current Attendance');
set(handles.name,'string',array(i).name);
set(handles.roll,'string',num2str(array(i).roll));
set(handles.branch,'string',array(i).branch);
set(handles.current,'string',num2str(array(i).current_attendance));
break;
end
end
if flag~=1
set(handles.record,'string','Record Not Found');
end
clear;
function flag=matchfingerprint(path1,path2)
pic1 = imread(path1);
pic2 = imread(path2);
edge_det_pic1 = edge(pic1,'prewitt');%applying edge detection on first picture
%so that we obtain white and black points and edges of the objects present
%in the picture.
edge_det_pic2 = edge(pic2,'prewitt');%%applying edge detection on second picture
%initialization of different variables used
matched_data = 0;
white_points = 0;
black_points = 0;
x=0;
y=0;
l=0;
m=0;
%for loop used for detecting black and white points in the picture.
for a = 1:1:256
for b = 1:1:256
if(edge_det_pic1(a,b)==1)
white_points = white_points+1;
else
black_points = black_points+1;
end
end
end
%for loop comparing the white (edge points) in the two pictures
for i = 1:1:256
for j = 1:1:256
if(edge_det_pic1(i,j)==1)&&(edge_det_pic2(i,j)==1)
matched_data = matched_data+1;
else
;
end
end
end
%calculating percentage matching.
total_data = white_points;
total_matched_percentage = (matched_data/total_data)*100;
%outputting the result of the system.
if(total_matched_percentage >= 90) %can add flexability at this point by reducing the
amount of matching.
flag=1;
else
flag=0;
end
% --- Executes on button press in back.
function back_Callback(hObject, eventdata, handles)
% hObject handle to back (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear all;
close all;
start;
studlogin('visible','off');
% --- Executes on button press in exit.
function exit_Callback(hObject, eventdata, handles)
% hObject handle to exit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear all;
close all;
4. studreg.m
function varargout = studreg(varargin)
% STUDREG M-file for studreg.fig
% STUDREG, by itself, creates a new STUDREG or raises the existing
% singleton*.
%
% H = STUDREG returns the handle to a new STUDREG or the handle to
% the existing singleton*.
%
% STUDREG('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in STUDREG.M with the given input arguments.
%
% STUDREG('Property','Value',...) creates a new STUDREG or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before studreg_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to studreg_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help studreg
% Last Modified by GUIDE v2.5 31-Oct-2013 15:24:42
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @studreg_OpeningFcn, ...
'gui_OutputFcn', @studreg_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before studreg is made visible.
function studreg_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to studreg (see VARARGIN)
% Choose default command line output for studreg
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes studreg wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = studreg_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear all;
close all;
studdetails;
studreg('visible','off');
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear all;
close all;
studattendance;
studreg('visible','off');
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close all;
% --- Executes on button press in viewdetails.
function viewdetails_Callback(hObject, eventdata, handles)
% hObject handle to viewdetails (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear all;
close all;
viewdetails;
studreg('visible','off');
% --- Executes on button press in back.
function back_Callback(hObject, eventdata, handles)
% hObject handle to back (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear all;
close all;
start;
studreg('visible','off');
5. studdetails.m
function varargout = studdetails(varargin)
% STUDDETAILS M-file for studdetails.fig
% STUDDETAILS, by itself, creates a new STUDDETAILS or raises the existing
% singleton*.
%
% H = STUDDETAILS returns the handle to a new STUDDETAILS or the handle to
% the existing singleton*.
%
% STUDDETAILS('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in STUDDETAILS.M with the given input arguments.
%
% STUDDETAILS('Property','Value',...) creates a new STUDDETAILS or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before studdetails_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to studdetails_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help studdetails
% Last Modified by GUIDE v2.5 30-Oct-2013 13:44:11
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @studdetails_OpeningFcn, ...
'gui_OutputFcn', @studdetails_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before studdetails is made visible.
function studdetails_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to studdetails (see VARARGIN)
% Choose default command line output for studdetails
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes studdetails wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = studdetails_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[filename, pathname] = uigetfile({'*.tif';'*.jpg';'*.gif';'*.*'}, 'Pick an Image File');
set(handles.edit1,'String',[pathname,filename]);
img=imread(get(handles.edit1,'string'));
axes(handles.axes1);
imshow(img,'Parent',handles.axes1);
guidata(hObject, handles);
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit2_Callback(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit2 as text
% str2double(get(hObject,'String')) returns contents of edit2 as a double
% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit3_Callback(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit3 as text
% str2double(get(hObject,'String')) returns contents of edit3 as a double
% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit4_Callback(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit4 as text
% str2double(get(hObject,'String')) returns contents of edit4 as a double
% --- Executes during object creation, after setting all properties.
function edit4_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit5_Callback(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit5 as text
% str2double(get(hObject,'String')) returns contents of edit5 as a double
% --- Executes during object creation, after setting all properties.
function edit5_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
load database.mat%
details=struct ('serial',0,'name','','roll',0,'image','','branch','','current_attendance',0);
details.name=get(handles.edit6,'string');
details.roll=str2num(get(handles.edit3,'string'));
details.image=get(handles.edit1,'string');
details.branch=get(handles.edit7,'string');
details.serial=length(array)+1;%
%array=details;%
array=[array details];%
save database.mat array
clear all;
close all;
studreg;
studdetails('visible','off');
clear
function edit6_Callback(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit6 as text
% str2double(get(hObject,'String')) returns contents of edit6 as a double
% --- Executes during object creation, after setting all properties.
function edit6_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit7_Callback(hObject, eventdata, handles)
% hObject handle to edit7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit7 as text
% str2double(get(hObject,'String')) returns contents of edit7 as a double
% --- Executes during object creation, after setting all properties.
function edit7_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close all;
6. studattendance.m
function varargout = studattendance(varargin)
% STUDATTENDANCE M-file for studattendance.fig
% STUDATTENDANCE, by itself, creates a new STUDATTENDANCE or raises the existing
% singleton*.
%
% H = STUDATTENDANCE returns the handle to a new STUDATTENDANCE or the handle to
% the existing singleton*.
%
% STUDATTENDANCE('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in STUDATTENDANCE.M with the given input arguments.
%
% STUDATTENDANCE('Property','Value',...) creates a new STUDATTENDANCE or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before studattendance_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to studattendance_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help studattendance
% Last Modified by GUIDE v2.5 30-Oct-2013 13:45:01
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @studattendance_OpeningFcn, ...
'gui_OutputFcn', @studattendance_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before studattendance is made visible.
function studattendance_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to studattendance (see VARARGIN)
% Choose default command line output for studattendance
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes studattendance wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = studattendance_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.serialmeta,'string','');
set(handles.serial,'string','');
set(handles.text3,'string','');
set(handles.text4,'string','');
set(handles.text5,'string','');
set(handles.text6,'string','');
set(handles.text7,'string','');
set(handles.text8,'string','');
set(handles.text9,'string','');
[filename, pathname] = uigetfile({'*.tif';'*.jpg';'*.gif';'*.*'}, 'Pick an Image File');
set(handles.edit1,'String',[pathname,filename]);
img=imread(get(handles.edit1,'string'));
axes(handles.axes1);
imshow(img,'Parent',handles.axes1);
guidata(hObject, handles);
load database.mat;
for i=1:length(array)
flag=matchfingerprint(array(i).image,get(handles.edit1,'string'));
if flag==1
set(handles.serialmeta,'string','Serial No.');
set(handles.text3,'string','Name');
set(handles.text4,'string','Roll No');
set(handles.text5,'string','Branch');
set(handles.text10,'string','Current Attendance');
set(handles.serial,'string',array(i).serial);
set(handles.text6,'string',array(i).name);
set(handles.text7,'string',num2str(array(i).roll));
set(handles.text8,'string',array(i).branch);
set(handles.text11,'string',num2str(array(i).current_attendance));
break;
end
end
if flag~=1
set(handles.text9,'string','Record Not Found');
end
clear;
function flag=matchfingerprint(path1,path2)
pic1 = imread(path1);
pic2 = imread(path2);
edge_det_pic1 = edge(pic1,'prewitt');%applying edge detection on first picture
%so that we obtain white and black points and edges of the objects present
%in the picture.
edge_det_pic2 = edge(pic2,'prewitt');%%applying edge detection on second picture
%initialization of different variables used
matched_data = 0;
white_points = 0;
black_points = 0;
x=0;
y=0;
l=0;
m=0;
%for loop used for detecting black and white points in the picture.
for a = 1:1:256
for b = 1:1:256
if(edge_det_pic1(a,b)==1)
white_points = white_points+1;
else
black_points = black_points+1;
end
end
end
%for loop comparing the white (edge points) in the two pictures
for i = 1:1:256
for j = 1:1:256
if(edge_det_pic1(i,j)==1)&&(edge_det_pic2(i,j)==1)
matched_data = matched_data+1;
else
;
end
end
end
%calculating percentage matching.
total_data = white_points;
total_matched_percentage = (matched_data/total_data)*100;
%outputting the result of the system.
if(total_matched_percentage >= 90) %can add flexability at this point by reducing the
amount of matching.
flag=1;
else
flag=0;
end
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
studreg;
studattendance('visible','off');
% --- Executes on button press in grant.
function grant_Callback(hObject, eventdata, handles)
% hObject handle to grant (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
load database.mat
serial=str2num(get(handles.serial,'string'));
array(serial).current_attendance=array(serial).current_attendance+1;
set(handles.text11,'string',num2str(array(serial).current_attendance));
save database.mat array
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close all;
7. viewdetails.m
function varargout = viewdetails(varargin)
% VIEWDETAILS M-file for viewdetails.fig
% VIEWDETAILS, by itself, creates a new VIEWDETAILS or raises the existing
% singleton*.
%
% H = VIEWDETAILS returns the handle to a new VIEWDETAILS or the handle to
% the existing singleton*.
%
% VIEWDETAILS('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in VIEWDETAILS.M with the given input arguments.
%
% VIEWDETAILS('Property','Value',...) creates a new VIEWDETAILS or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before viewdetails_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to viewdetails_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help viewdetails
% Last Modified by GUIDE v2.5 31-Oct-2013 14:18:02
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @viewdetails_OpeningFcn, ...
'gui_OutputFcn', @viewdetails_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before viewdetails is made visible.
function viewdetails_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to viewdetails (see VARARGIN)
% Choose default command line output for viewdetails
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes viewdetails wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = viewdetails_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
function editroll_Callback(hObject, eventdata, handles)
% hObject handle to editroll (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of editroll as text
% str2double(get(hObject,'String')) returns contents of editroll as a double
% --- Executes during object creation, after setting all properties.
function editroll_CreateFcn(hObject, eventdata, handles)
% hObject handle to editroll (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in enter.
function enter_Callback(hObject, eventdata, handles)
% hObject handle to enter (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
load database.mat
set(handles.namemeta,'string','');
set(handles.rollmeta,'string','');
set(handles.branchmeta,'string','');
set(handles.currentmeta,'string','');
set(handles.name,'string','');
set(handles.roll,'string','');
set(handles.branch,'string','');
set(handles.current,'string','');
set(handles.record,'string','');
flag=0;
for i=1:length(array)
if array(i).roll==str2num(get(handles.editroll,'string'))
flag=1;
set(handles.namemeta,'string','Name');
set(handles.rollmeta,'string','Roll No');
set(handles.branchmeta,'string','Branch');
set(handles.currentmeta,'string','Attendance');
set(handles.name,'string',array(i).name);
set(handles.roll,'string',num2str(array(i).roll));
set(handles.branch,'string',array(i).branch);
set(handles.current,'string',array(i).current_attendance);
end
end
if flag==0
set(handles.record,'string','Record Not Found');
end
% --- Executes on button press in back.
function back_Callback(hObject, eventdata, handles)
% hObject handle to back (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear all;
close all;
studreg;
viewdetails('visible','off');