database stored minutiae

86
TABLE OF CONTENTS List of Tables …………………………………………………………………………………………….2 List of Figures …………………………………………………………………………………………..3 Abstract…………………………………………………………………………………………………….4 Introduction …………………………………………………………………………………………….5 Literature Review ……………………..……………………………………………………………..9 Project Implementation ……………………………………………………………………….20 Results and Discussions …………………………………………………………………………36 Conclusion …………………………………………………………………………………………….44 References …...……………………………………………………………………………………….46 Appendix A ……………………………………………………………………………………………48 Appendix B …………………………………………………………………………………………..55 1

Upload: omotolaakangbe

Post on 03-Dec-2015

257 views

Category:

Documents


1 download

DESCRIPTION

DATABASE STORED MINUTIAE

TRANSCRIPT

Page 1: Database Stored Minutiae

TABLE OF CONTENTS

List of Tables …………………………………………………………………………………………….2

List of Figures …………………………………………………………………………………………..3

Abstract…………………………………………………………………………………………………….4

Introduction …………………………………………………………………………………………….5

Literature Review ……………………..……………………………………………………………..9

Project Implementation ……………………………………………………………………….20

Results and Discussions …………………………………………………………………………36

Conclusion …………………………………………………………………………………………….44

References …...……………………………………………………………………………………….46

1

Page 2: Database Stored Minutiae

Appendix A ……………………………………………………………………………………………48

Appendix B …………………………………………………………………………………………..55

LIST OF TABLES

Page

Table 1.1 Normal Forms 3

Table 1.2 Course Table

27

Table 1.3 Student Table

28

Table 1.4 Registration/Exam Enrollment Table

28

Table 1.5 Minutiae/Finger Details Table

29

2

Page 3: Database Stored Minutiae

Table 1.6 Course Table (Final)

29

Table 1.7 Bifurcations Table (Final)

36

Table 1.8 Terminations Table (Final)

37

Table 1.9 Students Table (Final) 38

Table 2.0 Finger Table (Final)

39

Table 2.1 Registration Table (Final)

40

LIST OF FIGURES

Page

Figure 2.0 A fingerprint image acquired by an Optical Sensor 9

3

Page 4: Database Stored Minutiae

Figure 2.2.1. Minutia. (Valley is also referred as Furrow, Termination is 12

also called Ending, and Bifurcation is also called Branch)

Figure 2.2.2 Verification vs. Identification 14

Figure 2.2.3 Simplified Fingerprint Recognition System 15

Figure 2.2.4 Minutia Extractor 16

Figure2.2.5 Minutia Matcher 18

Figure 3.2.0 Data Model as a communication tool and database blueprint 21

Figure 3.2.1 Summary Of Steps In Exporting Data From Matlab To A

35

Database

Figure 4.0 Data Modeling Stage

42

Figure 4.1 Matlab Database Toolbox Stage

44

4

Page 5: Database Stored Minutiae

ABSTRACT

Fingerprint verification is one of the most reliable personal identification

methods in biometrics. This report presents the design and development of

a database for minutiae storage in a MATLAB-based fingerprint recognition

system. An examination authentication system (EAS) that will screen

students of Faculty of engineering at the entrance of an examination will

also be used as a case study for the database generated. The database will

be implemented by making use of MySQL, a relational database

management system. The process starts from connecting MATLAB to

MySQL using the Database ToolBox, Java Database Connectivity (JDBC)

Driver and proceeds to perform queries on and from MySQL using

MATLAB.

5

Page 6: Database Stored Minutiae

CHAPTER ONE

INTRODUCTION

1.1 INTRODUCTION

This chapter will focus on background of this project, problem of the

manual system, the objectives, scope and significance of the project.

1.2 BACKGROUND

A fingerprint database image may readily be used as a background

database or may be used for testing purpose. Collecting large

databases of fingerprint images is problematic due to the great

amount of time and money required and the private legislation, which

in some countries prohibits the diffusion of such personal information.

Fingerprint recognition is one of the most important biometric

techniques. The largely accepted uniqueness of fingerprints and the

availability of low-cost acquisition devices make it well suited for a

wide range of application [1].

Great efforts are continually spent on designing new fingerprint

algorithms, both in academic and industrial environments, but not

enough care is usually dedicated to performance evaluation. In fact

6

Page 7: Database Stored Minutiae

testing an algorithm requires a large database of samples(thousands

or tens of thousands) due to small errors that have to be estimated.

Unfortunately, collecting large databases of fingerprint images is:

(1)expensive in terms of both money and time

(2)boring for both the people involved and the volunteers

(3)problematic due to the privacy legislation that protects such

personal data.

FVC 2000[2] and FVC 2002[2] are examples of technology evaluations;

where real fingerprint databases were collected to test and compare

different algorithm.

1.3 PROBLEM STATEMENT

Traditionally, the major technique for admitting students to an

examination over the years has been through the presentation of a

token e.g. ID cards, Dockets, etc whereby the student possesses a

physical and portable device which contains his/her identity.

Student’s authentication is done manually by using these tokens given

by the course adviser and not a system. This project presents a

solution to the problem of examination malpractices in universities or

educational system at large. With this manual system, there are some

cases that student can cheat by employing mercenaries that bear

close resemblance to them or by even swapping the passport

photographs on dockets or even by using fake clone of the stamp used

on these dockets. The invigilator can’t monitor all the students in the

7

Page 8: Database Stored Minutiae

examination room. Because of this problem, a system may be needed

in order to enroll every student’s fingerprint at the point of admission

into the university. Matching will be done during the examination

period whereby each student’s fingerprint is taken at the point of

entry into the examination and is compared against the template

already stored in the student’s database.

1.4 OBJECTIVES

The objective is important to achieve the goal. The main objectives of

this project are:

1.4.1 To realize a database for minutiae storage using MATLAB and

MySQL taking examination authentication as a case study.

The first objective is to develop the database. This database will make

use of MySQL ,a relational database Management System (RDBMS)

which will be integrated with a MATLAB algorithm for fingerprint

recognition from an earlier project[3]. This database will store minutiae

details extracted from a fingerprint image from another standard

database FVC2002 [2] in the absence of a real student’s fingerprint

from a scanner/sensor. The database will also provide access to other

details to enable access to the information of the student easily.

1.4.2 To continue work on an earlier project [3] if possible.

Among the other future work recommended is to obtain a program

that will carry out the Alignment Stage of the minutia matching

8

Page 9: Database Stored Minutiae

process and automate the process completely using GUI and only

enable button clicks to carry out the whole processing.

1.5 PROJECT SIGNIFICANCE

The significance must be considered in every proposed system to

ensure that the proposed system will provide more benefit to all

parties especially the faculty. For this project, the significance has

been identified. The significance can be categorized into 3 groups.

There are:

1.5.1 Faculty

This significance of this system is mainly focusing for the faculty of

engineering itself. This is because this project will enhance the

efficiency of the manual system. It also can reduce in terms of docket

printing and avoid human error. All activities are done by computer

and technology.

1.5.2 Course Advisers

With this system, course advisers can also have access to the

student’s database which will consist of the fingerprint details and

also the courses for which the student will be writing examinations.

1.5.3 Students

As a user, students can motivate themselves to be more disciplined,

focused and dedicated.

1.6 CONCLUSION

9

Page 10: Database Stored Minutiae

This chapter discusses several important sections that relates to this

and it shall serve as a guideline to the successful completion of the

project. It includes elaboration on the background, problem statement,

objectives and significance of the project.

CHAPTER TWO

LITERATURE REVIEW

A fingerprint is an impression of the friction ridges of all or any part of

the finger. A friction ridge is a raised portion of the epidermis on the palmar

(palm and fingers) or plantar (sole and toes) skin, consisting of one or more

connected ridge units of friction ridge skin. These ridges are sometimes

known as "dermal ridges" or "dermal papillae”. Fingerprints may be

deposited in natural secretions from the eccrine glands present in friction

ridge skin (secretions consisting primarily of water) or they may be made by

ink or other contaminants transferred from the peaks of friction skin ridges

to a relatively smooth surface such as a fingerprint card. The term

10

Page 11: Database Stored Minutiae

fingerprint normally refers to impressions transferred from the pad on the

last joint of fingers and thumbs, though fingerprint cards also typically

record portions of lower joint areas of the fingers (which are also used to

make identifications) [4].

Figure2.0 A fingerprint image acquired by an Optical Sensor

2.1 BRIEF HISTORY OF FINGERPRINT

The basic idea of fingerprint started in the ancient Babylonian times when

Fingerprints were used on clay tablets for business transactions and also on

clay seals in ancient China.

The following gives some insight into the evolution of fingerprint into that

which we know it to be today:

In 14th century Persia, a doctor, observed on various official

government papers that no two fingerprints were exactly alike.

In 1686, Marcello Malpighi a professor of anatomy at the University

of Bologna, noted in his treatise; ridges, spirals and loops in

11

Page 12: Database Stored Minutiae

fingerprints. He made no mention of their value as a tool for

individual identification.

In 1880 (First Latent Print Identification) , Dr. Henry Faulds

published an article in the Scientific Journal, "Nature". He discussed

fingerprints as a means of personal identification, and the use of

printers ink as a method for obtaining such fingerprints. He is also

credited with the first fingerprint identification of a greasy fingerprint

left on an alcohol bottle.

Juan Vucetich made the first criminal fingerprint identification in

1892. Sir Francis Galton published his book, "Fingerprints",

establishing the individuality and permanence of fingerprints.

Galton's primary interest in fingerprints was as an aid in determining

heredity and racial background. He was able to scientifically prove

that fingerprints do not change over the course of an individual's

lifetime, and that no two fingerprints are exactly the same. According

to his calculations, the odds of two individual fingerprints being the

same were 1 in 64 billion. Galton identified the characteristics by

which fingerprints can be identified. A few of these same

characteristics (minutia) are basically still in use today, and are

sometimes referred to as Galton Details.

By 1946, the FBI had processed 100 million fingerprint cards in

manually maintained files; and by 1971, 200 million cards. With the

introduction of automated fingerprint identification system (AFIS)

12

Page 13: Database Stored Minutiae

technology, the files were split into computerized criminal files and

manually maintained civil files.  Many of the manual files were

duplicates though, the records actually represented somewhere in the

neighborhood of 25 to 30 million criminals, and an unknown number

of individuals in the civil files.

Today, the largest AFIS repository in America is operated by the

Department of Homeland Security's US Visit Program, containing

over 100 million persons' fingerprints, many in the form of two-finger

records.  The two-finger records are non-compliant with FBI and

Interpol standards, but sufficient for positive identification and

valuable for forensics because index fingers and thumbs are the most

commonly identified crime scene fingerprints.  The US Visit Program

has been migrating from two flat (not rolled) fingerprints to ten flat

fingerprints since 2007.  "Fast capture" research funded by the US

government will enable implementation of ten "rolled print

equivalent" fingerprint recording (within 15 seconds per person

fingerprinted) in future years. The largest ten print AFIS repository in

America is the FBI's Integrated AFIS (IAFIS) in Clarksburg, WV. 

IAFIS has more than 60 million individual computerized fingerprint

records (both criminal and civil applicant records).  Old paper

fingerprint cards for the civil files are still manually maintained in a

warehouse facility (rented shopping center space) in Fairmont, WV,

though most enlisted military service member fingerprint cards

13

Page 14: Database Stored Minutiae

received after 1990, and all military-related fingerprint cards

received after 19 May 2000, have now been computerized and can be

searched internally by the FBI.  In "Next Generation Identification,"

the FBI may make civil file AFIS searches available to US law

enforcement agencies through remote interface.  All US states and

many large cities have their own AFIS databases, each with a subset

of fingerprint records that is not stored in any other database.  Many

also store and search palm prints.  Law enforcement fingerprint

interface standards are important to enable sharing records and

reciprocal searches to identify criminals. [5]

2.2 FINGERPRINT RECOGNITION SYSTEM

Every person has minute raised ridges of skin on the inside surfaces of

his/her fingers, which display a number of characteristics known as

minutiae [6]. The minutiae do not change naturally during a person’s life.

Figure 2.2.1. Minutia. (Valley is also referred as Furrow, Termination is also called Ending, and Bifurcation is also called Branch)

These minutiae, the loops, whorls, arches, ridges, valleys, ridge endings,

etc., can be matched in two basic ways:

14

Page 15: Database Stored Minutiae

Identification (1: n, 1: many matching) of an individual using their

fingerprints is usually done for forensic or background checking purposes.

AFIS (Automated Fingerprint Identification System) is the most mature of

all biometric systems with the most widespread use, and has gone through

its own major advancements in terms of reliability and integration over the

past decade. This technology has traditionally been used by law

enforcement agencies around the globe to identify individuals. However, the

technology is increasingly being used in the private sector as a tool for

employee background checking, and its use is expanding within the public

sector as part of civil identification systems. AFIS systems require the

collection of all ten finger and thumb prints, both flat and rolled. [7]

Key Applications:

Law Enforcement Forensics

Civil Identification

Background Checking

Employment

Adoption/Foster Parenting

Border Control/Visa Issuance

15

Page 16: Database Stored Minutiae

Figure 2.2.2 Verification vs. Identification

Verification (1:1 matching) is accomplished using systems which are

generally referred to as fingerprint Recognition systems. This usually

involves an individual pressing one or two fingers (or finger and thumb)

against a reader to verify that they are who they say they are (usually in

combination with a smart card which includes a stored template for that

individual). The technologies underlying fingerprint readers vary, including

optical, silicon, and ultrasound-based models. Fingerprint technologies have

been reduced in size that readers can now be incorporated into very small

form factors, embedded into laptops, mobile telephones or PDAs, even

integrated with portable USB drives, where they replace passwords as the

key to gain access. This technology is widely used for access control (both

physical and logical) applications. Fingerprint-based systems are commonly

16

Page 17: Database Stored Minutiae

combined with smart card technologies and boast high levels of accuracy.

Fingerprint recognition technologies do have some key drawbacks,

however: there continues to be limited interoperability, as well as some

resistance from users who may associate fingerprint technologies with law-

enforcement applications. With a large number of vendors competing for a

piece of the fast growth market for biometrics, the costs for use of

fingerprint recognition has been driven down to the point that it has

become quite commonplace, included as a standard option on a number of

portable devices from manufacturers. High profile government sponsored

programs (e.g., US VISIT) will likely force greater global adoption of

fingerprint recognition technology in passport and immigration programs.[7]

2.2.1 SYSTEM LEVEL DESIGN

A fingerprint recognition system constitutes of fingerprint acquiring device,

minutia extractor and minutia matcher [Figure 2.2.3].

Figure 2.2.3 Simplified Fingerprint Recognition System

17

Page 18: Database Stored Minutiae

For fingerprint acquisition, optical or semi-conduct sensors are widely

used. They have high efficiency and acceptable accuracy except for some

cases that the user’s finger is too dirty or dry. However, the testing

fingerprint for my project is from the available fingerprints provided by

FVC2002 (Fingerprint Verification Competition 2002)[12] so no acquisition

stage is implemented. The minutia extractor and minutia matcher modules

are explained in detail in the next part for algorithm design.

2.2.2 ALGORITHM LEVEL DESIGN

To implement a minutia extractor, a three-stage approach is widely used by

researchers. They are preprocessing, minutia extraction and post

processing stage [Figure 2.2.4].

Figure 2.2.4 Minutia Extractor

The fingerprint image preprocessing stage [3] includes:

18

Page 19: Database Stored Minutiae

Image Enhancement, a necessary stage for fingerprint recognition

using minutiae extraction method which involves:

Block-wise Image Normalization: is a pixel-wise enhancement

preprocessing stage necessary to remove some noise due to

imperfections present in fingerprint reader/scanner after

acquisition of fingerprint image.

Orientation Estimation: The orientation field, which is a gradient

filed, defines the local orientation of the ridges contained in the

fingerprint, The orientation estimation is a required step in the

enhancement process by Gabor filtering which as a frequency

selective process also requires the ridge frequency.

Ridge frequency determination, and

Gabor filtering

Binarization: transform the 8-bit gray scale fingerprint image into a 1-

bit image with 0 values for ridges and 1 value for valleys, and

Segmentation: to separate the fingerprint which is the foreground

from the image background.

The minutiae extraction stage includes:

Thinning: Ridge thinning is used to eliminate the redundant pixels of

ridges till the ridges are just one pixel wide.

Minutiae marking: After thinning, then the minutiae points are

marked.

19

Page 20: Database Stored Minutiae

For the post processing stage, a more rigorous algorithm is developed to

remove false minutia.[13] Also some of the earlier methods introduce some

spurious minutia points in the image and so to keep the recognition system

consistent these false minutiae need to be removed.

Figure2.2.5 Minutia Matcher

The minutia matcher chooses any two minutia as a reference minutia pair

and then matches their associated ridges first. If the ridges match well, two

fingerprint images are aligned and matching is conducted for all remaining

minutia [Figure 2.2.5].

2.3 MINUTIAE STORAGE

As seen from figure 2.2.2, there is a need to store minutiae in a database

from where it will now be used for matching and that is the real essence of

this project.

20

Page 21: Database Stored Minutiae

2.4 FINGERPRINT CLASSIFICATION

This is the process of classifying a given fingerprint into a number of classes

such as left loop, right loop, whorl, arch and tented arch, double loop, etc. It

should be noted that this classification of fingerprints is essentially

skewed[14]. A fingerprint classification system should be invariant to

rotation, translation, and elastic distortion of the frictional skin. Fingerprint

classification is used for indexing in the fingerprint database. A typical

fingerprint classification approach is based on the extraction of fingerprint

singular points (core and delta) and the implementation of a rule based

classification system that takes its decision based on the number and

placement of core and delta in a fingerprint. Different classification

algorithms are proposed[15,16,17].

21

Page 22: Database Stored Minutiae

CHAPTER THREE

PROJECT IMPLEMENTATION

The project will be implemented using MySQL Server 5.1.33, MySQL

WorkBench 5.2.31 and also MATLAB 7.5.0 produced by Mathworks

Company Inc.

3.1 DESIGN STATEMENT

1. Read a fingerprint image from a file

2. Apply the algorithm to extract the minutiae points and remove

false/spurious minutiae points.

3. Store the minutiae points as a template to be saved in a MySQL database.

4. Repeat steps 1-3 for as many fingerprint images. Thus, a database is

achieved/created.

5. Read a new fingerprint image.

22

Page 23: Database Stored Minutiae

6. Perform Step 2 on the image.

7. Then compare with the database.

SOLUTION METHOD

Here, minutiae points shall be saved in a MySQL database rather than in a

text file as in the past algorithm [3]. The approach in doing this should

involve:

1. Connecting Matlab Database ToolBox to MySQL

2. Data Modeling: conceptual representation of the data structures that

are required by the database.

3. Editing the algorithm to save minutiae in MySQL database.

4. Then apply the steps in the design statement above.

3.2 DATA MODELING

A data model is a device that helps the users or stakeholders understand

clearly the database system that is being implemented based on the

information requirements of an organization, and enables the database

practitioners to implement the database system exactly conforming to the

information requirements. A data model, therefore, serves as a critical

tool for communication with the users; it also serves as a blueprint of the

database system for the developers.

23

Page 24: Database Stored Minutiae

Figure 3.2.0 Data Model as a communication tool and database blueprint.

3.2.1 FACTORS THAT ENSURE A GOOD DATA MODEL

-Completeness: A good model should support all the necessary data.

-Non-redundancy: A good model should specify a database in which the

same fact could be recorded more than once.

-Enforcement of Business Rules: A good model must accurately reflect

and enforce the rules that apply to the business’ data.

-Data Reusability: In a good model, the data stored in the database should

be re-useable for purposes beyond those anticipated in the process model.

Once an organization has captured data to serve a particular requirement,

other potential uses and users almost invariably emerge.

-Stability and Flexibility: A good model should cope well with possible

changes to the business requirements and new data required to support

such changes should be accommodated in existing tables. Alternatively,

24

Page 25: Database Stored Minutiae

simple extensions will suffice or major structural changes will have to be

made with corresponding impact on the rest of the system. All these largely

determine how quickly the system can respond to business change, which,

in many cases, determines how quickly the business as a whole can

respond. A data model is stable in the face of a change to requirements if

we do not need to modify it at all. A data model is flexible if it can be

readily extended to accommodate likely new requirements with only

minimal impact on the existing structure.

-Elegance: A good data model should provide a reasonably neat and simple

classification of the data as the difference in development cost between

systems based on simple, elegant data models and those based on highly

complex ones can be considerable indeed.

-Communication: A good data model should be effective in supporting

communication among the various stakeholders in the design of a system

(i.e. the tables and columns represent business concepts that the users and

business specialists are familiar with and can easily verify) and as such the

programmers will interpret the model correctly. The quality of the final

model will depend very much on informed feedback from business people.

Programmers, in turn, need to understand the model if they are to use it as

intended.

-Integration: The proposed database should fit with the organization’s

existing and future databases. Even when individual databases are well

designed, it is common for the same data to appear in more than one

25

Page 26: Database Stored Minutiae

database and for problems to arise in drawing together data from multiple

databases.

-Conflicting Objectives: In many cases, the above factors will conflict with

one another. An elegant but radical solution may be difficult to

communicate to conservative users. We may be so attracted to an elegant

model that we exclude requirements that do not fit. A model that accurately

enforces a large number of business rules will be unstable if some of those

rules change. And a model that is easy to understand because it reflects the

perspectives of the immediate system users may not support reusability or

integrate well with other databases.

Our overall aim is to develop a model that

provides the best balance among these possibly conflicting objectives. As in

other design disciplines, achieving this is a process of proposal and

evaluation, rather than a step by-step progression to the ideal solution.

3.2.2 LEVELS OF DATA MODELING

External Data Model: The external data model is a depiction of the

database system

from the viewpoints of individual user groups. This model may be used for

communication with individual groups of users. Each individual user group

is interested in a set of data items for performing its specific business

functions. The set of data items relevant for a specific user group forms part

of the external data model for this particular user group.

26

Page 27: Database Stored Minutiae

Conceptual Data Model: The conceptual data model is at a high and

general level,

intended mainly as a communication tool with the user community. In the

model, there is no room for details of data structure or for any

considerations of hardware and database software. This model does not

even address whether the final database system is going to be implemented

as a relational database system or any other type of database system.

However, the model should be complete and include sufficient components

so that it would be a true representation of the information requirements of

the organization.. It is the focus of communication between the data

modeler and business stakeholders, and it is usually presented as a diagram

with supporting documentation.

Logical Data Model: In a sense, the logical data model for an organization

is the aggregation of all the parts of the external data model. In the above

external data model, three user groups are shown. We assume that there

are only three user groups in the organization. Therefore, the complete

logical model must represent all the combined information requirements of

these three user groups. For the relational type of database system, the

logical model represents the information requirements in the form of two-

dimensional tables with rows and columns. The logical data model is a

translation of the conceptual model into structures that can be implemented

using a database management system (DBMS). Today, that usually

means that this model specifies tables and columns, as we saw in our first

27

Page 28: Database Stored Minutiae

example. These are the basic building blocks of relational databases, which

are implemented using a relational database management system

(RDBMS).

Physical Data Model: A physical data model has little use as a means of

communication with the users. Its primary purpose is to act as a blueprint

for the implementation of the database system. The details contained in a

physical data model are beyond the normal comprehension of the users. The

model expresses too many intricate details. It includes considerations of the

particular DBMS and the hardware environment in which the database

system gets implemented. The physical data model incorporates any

changes necessary to achieve adequate performance and is also presented

in terms of tables and columns, together with a specification of physical

storage (which may include data distribution) and access mechanisms.

Different methodologies differ on the exact level of detail that should

be included in each model and at what point certain decisions should be

taken. In some methodologies, the translation from conceptual to logical is

completely mechanical; in others, including our recommended approach,

there are some decisions to be made. The step from logical to physical may

be straightforward with no changes to tables and columns, if performance is

not a problem, or it may be highly complex and time-consuming, if it

becomes necessary to trade performance against other data model quality

criteria.

3.2.3 ADVANTAGES OF USING THE RELATIONAL MODEL

28

Page 29: Database Stored Minutiae

● It describes data independent of the actual physical representation of the

data.

● The model of data is simple and easy to understand.

● It provides high-level operations for querying the data.

●The model is conceptually simple, allowing application programmers to be

able to quickly grasp the important concepts they need to get started with

their work.

●The model is based on a mathematical structure, which allows many

operational aspects to be proved, and the operations have well-defined

properties.

● It’s easy to modify and add to relational databases.

● The same database can be represented with less redundancy.

3.3 NORMALIZATION

This is a set of rules for allocating data to tables in such a way as to

eliminate certain types of redundancy and incompleteness. [20] It is also a

data modeling technique, the goal of which is to organize data elements in

such a way that they’re stored in one place and one place only (with the

exception of foreign keys, which are shared). In practice, normalization is

usually one of the later activities in a data modeling project, as we cannot

start normalizing until we have established what columns (data items) are

required. In another approach, normalization is used in the logical database

design stage, following requirements analysis and conceptual modeling.

29

Page 30: Database Stored Minutiae

A normal form is a state of a relation that can be determined by

applying simple rules regarding dependencies to that relation. Normal

forms are designed to prevent update and delete anomalies, data

redundancies, and inconsistencies. [19]

Universal properties No duplicate members of the set.Record order unimportant (top to bottom).Attributes order unimportant (left to right).All attribute values are atomic. No single attribute is allowed to hold more than one value at one time.

First Normal Form (1NF) The appropriateness of the primary key.

Second Normal Form (2NF)

The dependence of all attributes on all aspects of the primary key.

Third Normal Form (3NF)

The dependence of any attribute on any attribute other than the primary key.

Boyce-Codd Normal Form(BCNF)

Verifies that all data sets are identified and segregated.

Fourth Normal Form (4NF)

Verifies that all attributes are single valued for a member of the set.

Domain Key Normal Form (DKNF)

Verifies that all constraints are the logical consequence of the definition of the keys and the domains (data value rules).

Table 1.1: Normal Forms

Universal Properties of Relations

30

Page 31: Database Stored Minutiae

The universal properties of relations are the preconditions that must be in

place prior to the test for normal forms. They refer to that two-dimensional

math form called a relation upon which relational design is based.

● There must be no duplicate instances (duplicate members of the set).

● Instances are unordered (top to bottom).

● Data elements are unordered (left to right).

● All data element values are atomic. No single column describing a single

instance is allowed to hold multiple values at one time.

STEPS OF NORMALIZATION

STEP 1: Put the data into tabular form (by removing repeating groups) and

remove duplicated data to separate tables.

COURSE CODE COURSE

TITLE/DECSRIPTION

DEPARTMENT

EEG 502 DIGITAL COMPUTER

DESIGN

ELECT./ELECT.

EEG 520 DIGITAL CONTROL ELECT./ELECT.

Table 1.2: Course Table

This table has 3 columns/fields and the course code can be set as primary

key as it contains different courses.

NAME MATRIC. NO. DEPARTMENT DATE OF

BIRTH

31

Page 32: Database Stored Minutiae

AKANGBE SAIDAT

OMOTOLA

070408006 COMPUTER

ENGINEERING

26/06/1990

BELLO

NASIRULLAHI

BOLARINWA

060408029 ELECT. /ELECT.

ENGINEERING

11/03/1987

Table 1.3: Student Table

This table contains 4 columns that stores information about each

student and here we have set the Matric No as Primary key because the

table contains information about different students. Here, the Matric No

serves as a unique identifier for each student.

NAME MATRIC. NO. DEPARTMENT COURSE

AKANGBE SAIDAT

OMOTOLA

070408006 COMPUTER

ENGINEERING

EEG 502

BELLO

NASIRULLAHI

BOLARINWA

060403029 ELECT. /ELECT.

ENGINEERING

EEG 502

Table 1.4: Registration/Exam Enrollment Table

This details contains the registration details of students writing

examinations for different courses. A student can offer many courses,

therefore matric no may not be a primary key. Also students from many

department can/might offer a course.

MATRIC

NO

NO.

OF

NO

.

TERMS

ORIENTATIO

ANGL

E

BIFS

ORIENTATIO

ANGL ANGL ANGL

32

Page 33: Database Stored Minutiae

TERM

S

OF

BIF

S

N N E

1

E

2

E

3 X Y X Y

0704080

06

2 2 27 27 -1.85 24 184 NaN

NaN 0.00

27 172 -2.07 33 191 -2.62 NaN -0.52

0604030

29

3 3 66 139 -1.67 67 92 -2.36 1.57 -1.05

69 156 1.02 67 177 -2.36 2.09 0.52

75 120 -1.68 74 135 2.09 -1.05 0.00

Table 1.5: Minutiae/Finger Details Table

From the algorithm after minutiae orientation, the minutiae details to

be saved in our database include:

-Number of Terminations

- Number of Bifurcations

-Termination Orientation

-Termination Angle of Orientation

-Bifurcation orientation

- Bifurcation Angle of Orientation

The table needs to be normalized as it has not yet satisfied the

universal properties of a relation/table.

STEP 11: Considering the Minutiae table, I determined the columns by:

(i) Putting one fact per column

33

Page 34: Database Stored Minutiae

-Looking at the terms orientation column in table 1.5 ,we can see that it

contains two distinct facts i.e X and Y and the same holds for the bifs

orientation table. Rather, these two facts should be recorded in separate

columns.

(ii) Hidden Data

-The second piece of tidying up involves making sure that we have not lost

any data in the translation to tabular form. The most common problem here

is that we cannot rely on the rows of the table being stored in any particular

order. After scrutinizing the nature of our database, the hidden data to

include is FINGERTYPE. This is because the design allocate for different

kinds of finger e.g thumb, index Finger, Middle Finger, Ring Finger &

Little/Pinky finger for either left or right hand.

(iii) Determining the Primary Key

- Finally, we determine a primary key for the table. The choice of primary

keys is a critical (and sometimes complex) task. For the moment, we will

simply note that the primary key is a minimal set of columns that contains a

different combination of values for each row of the table. Another way of

looking at primary keys is that each value of the primary key uniquely

identifies one row of the table. In this case, Course Code and Matric No will

do the job as stated earlier.

Primary Keys

A primary key is a nominated column or combination of columns that

has a different value for every row in the table.

34

Page 35: Database Stored Minutiae

Candidate Keys

Sometimes more than one column or combination of columns could

serve as a primary key.

Foreign Keys

When we remove repeating groups to a new table, we carry the

primary key of the original table with us, to cross-reference or “point back”

to the source. In moving from first to third normal form, we left

determinants behind as cross-references to the relevant rows in the new

tables. These cross-referencing columns are called foreign keys, and they

are the principal means of linking data from different tables.

3.4USING MATLAB DATABASE TOOLBOX

The Database Toolbox product enables you to exchange data between

MATLAB and a database . With the Visual Query Builder graphical user

interface tool within the toolbox, you can select data from database, use

MATLAB tools to analyze data, and store results back in the database.

However, the Database Toolbox software is not suitable for database

administration. When performing administrative things (e.g. creating

tables), use database management system application (e.g. mysql client

program)

35

Page 36: Database Stored Minutiae

After opening the MATLAB workspace window , Open the database toolbox

graphical user interface from the lower left corner of workspace window:

Start|Toolboxes|Database|Visual Query Builder (querybuilder) [11]The

first thing to do is to define data source (the data itself and the connection

to the data): Do the following in the Visual Query Builder window

1. Click Query | Define JDBC Data Source

2. Click Create New File in the opened window

3. Give a name to the data source MAT file and click Save. This file saves

your data source specification, which you can use in the future sessions

4.After that enter information for your data source into the Name, Driver,

and URL fields as follows:

o Name: database_name_you_want_to_connect

o Driver: com.mysql.jdbc.Driver

o URL:jdbc:mysql://localhost:3306/

database_name_you_want_to_connect

5. Click Add/Update and OK

Now you can start using Visual Query Builder to import or export data

between MATLAB and database. In order to import data from a database

into the MATLAB workspace, do the following in the Visual Query Builder

window:

1. Click the Select button under Data operation

2. Select your database from the data source list. Give your username and

36

Page 37: Database Stored Minutiae

password

3. Select tables and fields which you want to query

4. Enter a suitable name (e.g. A) in the MATLAB workspace variable field.

This variable stores the data that the query returns

5. Click Execute to run the query. The query result appers in the Data field.

6. Double-click the variable in the Data field. That opens a Variable Editor,

where the query data is shown.

In order to export data from the MATLAB workspace into a database, do the

following in the Visual Query Builder window:

1.  Click the Insert button under Data operation

2.  Select your database from the data source list

3.  Select tables and fields which you want to export data from the MATLAB

software

4.  Do the following in the MATLAB workspace (in the command window),

not in the Visual Query Builder window: Attach the data to a variable:

variable_name = \{'data_value'\}; and press enter.

5. Enter the same name of the variable in the MATLAB workspace variable

field (in the Visual Query Builder window)

6. Click Execute to export the data.

Alternatively, you can use the coding approach of connecting MATLAB to

a MySQL database. This is preferable as you could just add this code to your

algorithm or project.

37

Page 38: Database Stored Minutiae

% Database Serverhost = 'localhost:3306';

% Database Username/Passworduser = 'root'; %Enter the username of your accountpassword = 'password'; %Enter the password to your account here.

% Database NamedbName = 'project'; %Enter the name of your database e.g project

% JDBC ParametersjdbcString = sprintf('jdbc:mysql://%s/%s', host, dbName);jdbcDriver = 'com.mysql.jdbc.Driver';

% Set this to the path to your MySQL Connector/J JAR%javaaddpath('C:\mysql-connector-java-5.1.14-bin.jar')

% Create the database connection objectdbConn = database(dbName, user, password, jdbcDriver, jdbcString)isconnection(dbConn)

QUERY = 'INSERT INTO student(deptID) values(04)'; %type your query here

[filenames]=fetch(dbConn,QUERY)close(dbConn);

38

Page 39: Database Stored Minutiae

Figure 3.2.1: Summary Of Steps In Exporting Data From Matlab To A Database

All these was carried out to successfully connect MATLAB to MySQL.

39

Page 40: Database Stored Minutiae

CHAPTER FOUR

RESULTS AND DISCUSSIONS

After each stage in the solution method was carried out, different results

were obtained. The results achieved are shown for the different stages.

NORMALIZATION STAGE

- After normalizing, the following tables were obtained:

Course

Code

Course Title Semest

er

Department Unit

Table 1.6: Course Table (Final)

It was then created in the MySQL database by performing the

following queries:

CREATE TABLE `course` (

`Course Code` varchar(6) NOT NULL,

`Course Title` varchar(45) NOT NULL,

`Semester` varchar(1) NOT NULL,

`Department` varchar(45) NOT NULL,

`Unit` smallint(6) NOT NULL,

PRIMARY KEY (`Course Code`,`Course Title`,`Semester`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1

Here, Course Code, Course Title and semester are all primary

keys/candidate keys because the design assumes that there can be only one

unique course code with a particular title that can be offered in a semester.

40

Page 41: Database Stored Minutiae

Matric

No

Number

of

Bifurcatio

ns

X Y Angle

1

Angle

2

Angle

3

Finger

Type

Table 1.7: Bifurcations Table (Final)

It was also created in the MySQL database by performing the

following queries:

CREATE TABLE `bifurcations` (

`X` int(3) NOT NULL,

`Y` int(3) NOT NULL,

`Angle1` decimal(3,2) NOT NULL,

`Angle2` decimal(3,2) NOT NULL,

`Angle3` decimal(3,2) NOT NULL,

`Finger Type` varchar(20) NOT NULL,

`Matric No` varchar(9) NOT NULL,

`Number of Bifurcations` int(11) NOT NULL,

PRIMARY KEY (`Matric No`,`X`,`Y`,`Angle1`,`Angle2`,`Angle3`,`Finger Type`,`Number of Bifurcations`)

KEY `Matric No` (`Matric No`),

KEY `Finger Type` (`Finger Type `),

CONSTRAINT ` Finger Type ` FOREIGN KEY (`Finger Type `) REFERENCES `finger` (`Finger Type `) ON DELETE CASCADE ON UPDATE CASCADE,

CONSTRAINT `Matric No` FOREIGN KEY (`Matric No`) REFERENCES `student` (`Matric No`) ON DELETE CASCADE ON UPDATE CASCADE

) ENGINE=InnoDB DEFAULT CHARSET=latin1

Here, we have made the student’s Matric No, bifurcation positions(X,

Y), bifurcation orientation (Angle1, Angle2, Angle3), Finger Type and

number of bifurcations candidate keys because our design assumes that the

41

Page 42: Database Stored Minutiae

probability of 2 persons out of about 6 billion people having the same

bifurcation position and orientation is very small and hence negligible for a

small population i.e. Students as used in this project.

Matric

No

Number of

Terminatio

ns

X Y Angle

Finger

Type

Table 1.8: Terminations Table (Final)

The MySQL queries to create this is:

CREATE TABLE `terminations` (

`Matric No` varchar(9) NOT NULL,

`X` int(3) NOT NULL,

`Y` int(3) NOT NULL,

`Angle` decimal(3,2) NOT NULL,

`Finger Type` varchar(20) NOT NULL,

`Number of Terminations` int(11) NOT NULL,

PRIMARY KEY (`Matric No`,`X`,`Y`,`Angle`,`Finger Type`,`Number of Terminations`)

KEY `Matric No` (`Matric No`),

KEY `Finger Type` (`Finger Type `),

CONSTRAINT ` Finger Type ` FOREIGN KEY (`Finger Type `) REFERENCES `finger` (`Finger Type `) ON DELETE CASCADE ON UPDATE CASCADE,

CONSTRAINT `Matric No` FOREIGN KEY (`Matric No`) REFERENCES `student` (`Matric No`) ON DELETE CASCADE ON UPDATE CASCADE

) ENGINE=InnoDB DEFAULT CHARSET=latin1

Here, the case of candidate keys is exactly the same as that of

bifurcations and it has been assumed in the design that that the probability

42

Page 43: Database Stored Minutiae

of 2 persons out of about 6 billion people having the same bifurcation

position and orientation is very small and hence negligible for a small

population i.e. Students as used in this project.

Matric

No

First

Name

Last

Name

Other

Names

Date of

Birth

Departme

nt

Phone

No

Sex

Table 1.9: Students Table (Final)

The MySQL queries to create this include:

CREATE TABLE `student` (

`Matric No` varchar(9) NOT NULL,

`First Name` varchar(25) NOT NULL,

`Last Name` varchar(25) NOT NULL,

`Other Names` varchar(25) NOT NULL,

`Date of Birth` date NOT NULL,

`Department` varchar(45) NOT NULL,

`Phone No` varchar(18) DEFAULT NULL,

`Sex` char(1) NOT NULL,

PRIMARY KEY (`Matric No`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1

43

Page 44: Database Stored Minutiae

Table 2.0: Finger Table (Final)

CREATE TABLE `finger` (

`Finger Type` varchar(20) NOT NULL,

PRIMARY KEY (`Finger Type`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1

Matric

No

Course Code Semester Session

Table 2.1: Registration Table (Final)

CREATE TABLE `registration` (

`Matric No` varchar(9) NOT NULL,

`Course Code` varchar(6) NOT NULL,

`Semester` varchar(1) NOT NULL,

`Session` year(4) NOT NULL,

PRIMARY KEY (`Matric No`,`Course Code`,`Session`),

KEY `Course Code` (`Course Code`),

KEY `Matric No` (`Matric No`),

CONSTRAINT `Course Code` FOREIGN KEY (`Course Code`) REFERENCES `course` (`Course Code`) ON DELETE CASCADE ON UPDATE CASCADE,

44

Finger Type

Page 45: Database Stored Minutiae

CONSTRAINT `Matric No` FOREIGN KEY (`Matric No`) REFERENCES `student` (`Matric No`) ON DELETE CASCADE ON UPDATE CASCADE

) ENGINE=InnoDB DEFAULT CHARSET=latin1

As seen from Table 1.7 and 1.8, the minutiae table in table 1.5 has

been split into two tables i.e. Bifurcations and Terminations. Also, extra

details were added in the Students Table e.g.

-First Name, last Name, other names: used to distinguish or almost uniquely

identify candidates for the exam as against ‘name’ only as used in the

former table. Also, ‘name’ is a reserved word for most databases so this

helps us to classify. ,

-Phone number, Sex, etc.

DATA MODELLING STAGE

The relational model obtained is as shown below:

45

Page 46: Database Stored Minutiae

Figure 4.0: Data Modeling Stage

This was obtained using the MySQL WorkBench, after creating the

schemas i.e. tables.

: This icon stands for a 1: n relationship.

-Matric No under Student Table has a 1: n relationship with Matric No

under Terminations table. The same applies for Matric No under

Bifurcations table.

46

Page 47: Database Stored Minutiae

- Finger Type under finger Table has a 1: n relationship with Finger Type

under Terminations table. The same applies for Finger Type under

Bifurcations table.

- Course Code under Course Table has a 1: n relationship with Course Code

under Registration table.

N.B: Relationships illustrate how two entities share information in the

database structure. Entities with one-to-one relationships should be merged

into a single entity.Each remaining entity is modeled by a table with a

primary key and attributes, some of which may be foreign keys. One-to-

many relationships are modeled by a foreign key attribute in the table

representing entity on the "many" side of the relationship. Many-to-many

relationships among two entities are modeled by a third table that has

foreign keys that refer to the entities. These foreign keys should be included

in the relationship table's primary key, if appropriate.

MATLAB DATABASE TOOLBOX STAGE

After successfully connecting to the Matlab Database ToolBox

otherwise known as Query Builder, we have:

47

Page 48: Database Stored Minutiae

Figure 4.1: Matlab Database Toolbox Stage

Then I went ahead to perform queries to export data embedded in

our MATLAB variables to our MySQL database named ‘project’. The

variables were obtained after running the MATLAB codes in matching

algorithm by the initial author. [3]

48

Page 49: Database Stored Minutiae

CHAPTER FIVE

CONCLUSION

This project report has briefly introduced the major concepts in

database designing for storing minutiae in a fingerprint recognition system

and has succeeded in overcoming the challenges faced by the initial author.

A significant improvement was made on the data modeling stage with the

introduction of normalization approach which is the most versatile

technique used in data modeling.

In addition, minutiae details i.e. terminations and bifurcations were

successfully separated into different schemas/tables. In order to ensure

connection between the matching algorithm and the DBMS being used, the

driver meant for that purpose had to be carefully configured.

Queries were then being made to the database to create the schemas

obtained after modeling and also to export data from the algorithm to the

database for storage purposes and for future reference.

A graphical user interface was also obtained to view the processing stages

with the use of the GUI ToolBox in MATLAB (See AppendixB), thereby

automating the process with the use of enabled buttons clicks only.

5.0 CHALLENGES

Several challenges were encountered while carrying out this project and

these include:

49

Page 50: Database Stored Minutiae

Difficulty in setting up connection between MATLAB and MySQL

using JDBC driver: I spent a very long time in doing this because it

required case-sensitive strings that had to be used in the

configuration such that even a mere mistype of a character e.g. “d”

instead of “D” prevented a successful connection.

Difficulty in determining how to model the minutiae details into a

database: this was because of the long nature of the orientations and

positions of the bifurcations and terminations as one finger could e.g.

have like 35 terminations and 53 bifurcations.

5.1 FUTURE WORK

Although, this project has tried its best in storing minutiae in a

database, there is still need for some future work to be carried out.

This include:

1) The possibility of encrypting all the minutiae details in a long

string as used in the SECUGEN fingerprint reader: this might

involve some form of coding/hashing.

50

Page 51: Database Stored Minutiae

REFERENCES

[1 ]. Nalini Ratha, Ruud Bolle(2004) , Automatic Fingerprint Recognition

System, New York: Springer-Verlag.

[2]. D. Maltoni, D. Maio, A.K. Jain & S. Prabhakar (2009), Handbook of

Fingerprint Recognition (Second Edition), London: Springer.

[3].Adeoye Adewale (2010), Matlab-based design and implementation of

fingerprint matching algorithm, University of Lagos, Nigeria.

[4]. Sy Mohd Syathir bin Sy Ali Zainol Abidin (2007) , Intelligent

Fingerprint Recognition System , Universiti Malaysia Pahang

[5]. Greg Moore , David L. von Minden, PhD (2011) , The History of

Fingerprints ,Retrieved March 8,2011, from

http://www.onin.com/fp/fphistory.htm

[6]. J. D.Woodward, N.M. Orlans, & P. T. Higgins (2002), Biometrics, New

York: McGraw-Hill.

[7]. Global Security Intelligence (2011), Fingerprint Recognition, Retrieved

from http://globalseci.com/?page_id=39

[8]. Wikipedia (2010), Database, http://wikipedia.org

51

Page 52: Database Stored Minutiae

[9]. J. Krupa, A. Prochazka, V. Hanta, R. Hava, Technical Computing Using

Sybase Database For Biomedical Signal Analysis, Institute of Chemical

Technology, Prague :

Department of Computing and Control Engineering

[10]. University Of Ibadan (2005) , MySQL Tutorial , ATDB.

[11].Math Works (2011),Database Toolbox

,http://www.mathworks.com/access/helpdesk/help/toolbox/database/gs/

braiey2-1.html#braiey2-24

[12] FVC2002, Finger Print Verification competition,

http://bias.csr.unibo.it/fvc2002/

[13] WU ZHILI (2002), Fingerprint Recognition, Hong Kong Baptist

University.

[14]. Anil Jain, Sharath Pankanti (1998), Fingerprint Classification and

Matching,

Michigan State University, MI.

[15]. Andrew Senior (2001), IEEE Transactions on Pattern Analysis and

Machine

Intelligence, A Combination Fingerprint Classifier, vol. 23 ,no. 10, pp 1165-

1174.

[16]. Meltem Ballan et al., A Fingerprint Classification Technique Using

Directional Images, Yildiz Technical University, Istanbul, Turkey and the

University of Texas at Austin , Austin, Texas.

52

Page 53: Database Stored Minutiae

[17]. A. Senior (1997), A Hidden Markov Model Fingerprint Classifier, Proc.

Asilomar

Conn. Signals, Systems, and Computers.

[18]. Paulraj Ponniah (2007), Data Modeling Fundamentals A practical

Guide for IT

Professionals, New Jersey: Wiley.

[19]. Sharon Allen & Evan Terry(2005),Beginning Relational Data

Modeling(Second

Edition), Apress.

[20]. Graeme C. Simsion & Graham C. Witt (2005), Data Modeling

Essentials (Third Edition), Morgan Kaufmann

APPENDIX A

BRIEF DEFINITION OF SOME KEY COMPONENTS AND

OPERATIONS

Database: A database consists of an organized collection of data for one

or more uses, typically in digital form. [8] One way of classifying databases

involves the type of their contents, for example: bibliographic, document-

text, statistical. Digital databases are managed using database management

systems, which store database contents, allowing data creation and

maintenance, and search and other access. Database architecture consists

of three levels, external, conceptual and internal. Biometric data storage,

that refers to the design and implementation of a relational database

53

Page 54: Database Stored Minutiae

system. The advantage of storing the biometric data in the database is

based on the inherent advantage presented by database systems:

centralized accurate, highly secure, reliable and organized data, easy

access to insert, update and retrieve biometric data.

DATABASE MANAGEMENT SYSTEM (DBMS): is a set of computer

programs that controls the creation, maintenance, and the use of a

database. It allows organizations to place control of database development

in the hands of database administrators (DBAs) and other specialists. A

DBMS is a system software package that helps the use of integrated

collection of data records and files known as databases. It allows different

user application programs to easily access the same database. DBMSs may

use any of a variety of database models, such as the network model or

relational model.

Open Database Connectivity (ODBC): this provides a standard

software interface for accessing a database management system (DBMS).

ODBC provides a universal middleware layer between the application and

the DBMS, allowing the application developers to only have to learn a single

interface, nor do they have to update their software if changes are made to

the DBMS specification, only the driver needs updating. An ODBC driver

can thus be thought of as analogous to a printer or other driver, providing a

standard set of calls for the application to use, which then translates those

commands into the correct commands at the DBMS end. An application that

can communicate through ODBC is referred to as ODBC-compliant. Any

54

Page 55: Database Stored Minutiae

ODBC-compliant can access any DBMS that has a corresponding driver. For

the driver, the ODBC model allows for two different solutions, either having

the driver reside on the client machine, or as a part of a server-side

solution. Drivers exist for all major DBMS.

Java Database Connectivity (JDBC): is an API (Application

Programming Interface) for the Java programming language that defines

how a client may access a database. It provides methods for querying and

updating data in a database. JDBC is oriented towards relational databases.

A JDBC-to-ODBC bridge enables connection to any ODBC-accessible data

source in the Java Virtual Machine (JVM) host environment. JDBC drivers

are client-side adapters (installed on the client machine, not on the server)

that converts requests from the Java programs to a protocol that the DBMS

can understand.

Metadata: Database store user data and they also store information

about the database itself. Most DBMSs have a set of system tables, which

list tables in the database, column names in each table, primary keys,

foreign keys, stored procedures, and so forth. Each DBMS has its own

functions for getting information about table layouts and database features.

JDBC provides the interface Database Metadata, which a driver writer must

implement so that its methods return information about the driver and/or

DBMS for which the driver is written. For example, a large number of

methods return whether or not the driver supports a particular

functionality. This interface gives users and tools a standardized way to get

55

Page 56: Database Stored Minutiae

metadata. In general, developers writing tools and drivers are the ones

most likely to be concerned with metadata.

Matlab Database Toolbox: The Database Toolbox is one of an

extensive collection of toolboxes for use with MATLAB. The Database

Toolbox enables you to move data (both importing and exporting) between

MATLAB and popular relational databases.

With the Database Toolbox, you can bring data from an existing database

into MATLAB, use any of the MATLAB computational and analytic tools, and

store the results back in the database or in another database. Also, you can

read from the database, importing the data into the MATLAB workspace.

You can interact with most popular databases from within MATLAB,

including Oracle, Sybase, Microsoft SQL Server, and Informix. The toolbox

also enables simultaneous access to multiple databases within a single

MATLAB session and enables transactions involving large data sets. Using

the Visual Query Builder, you can interact with a database without knowing

SQL. MATLAB Database Toolbox [10] supports communication using ODBC or

JDBC driver with compatible database including IBM DB2, IBM Informix,

Ingres, Microsoft Access, Microsoft Excel, Microsoft SQL Server, MySQL,

Oracle, PostgreSQL, Sybase SQL Anywhere and Sybase SQL Server.

Fig 3.2.1

MATLAB-MySQL communication Schema

56

The Math Works MATLAB

Database Toolbox

JDBCDriver

MySQL

Page 57: Database Stored Minutiae

MySQL: is a relational database management system (RDBMS) that runs

as a server providing multi-user access to a number of databases. The

database (the "DB" in RDBMS) is the repository for the information you

want to store, structured in a simple, regular fashion:

o The collection of data in a database is organized into tables.

o Each table is organized into rows and columns.

o Each row in a table is a record.

o Records can contain several pieces of information; each column in a

table corresponds to one of those pieces.

The management system (the "MS") is the software that lets you use

your data by allowing you to insert, retrieve, modify, or delete records. [10]

The word "relational" (the "R") indicates a particular kind of DBMS, one

that is very good at relating (that is, matching up) information stored in one

table to information stored in another by looking for elements common to

each of them. The power of a relational DBMS lies in its capability to pull

data from those tables conveniently and to join information from related

tables to produce answers to questions that can't be answered from

individual tables alone.

PRELIMINARY REQUIREMENTS FOR USING MYSQL ON YOUR

MACHINE

You need to have the MySQL software installed. (e.g. with XAMPP

server) and configured

MySQL WorkBench(optional)

57

Page 58: Database Stored Minutiae

You need a MySQL account so that you can connect to the server.

You need a database to work with.

SQL QUERIES

CREATE TABLE `bifurcations` (

`X` int(3) NOT NULL,

`Y` int(3) NOT NULL,

`Angle1` decimal(3,2) NOT NULL,

`Angle2` decimal(3,2) NOT NULL,

`Angle3` decimal(3,2) NOT NULL,

`Finger Type` varchar(20) NOT NULL,

`Matric No` varchar(9) NOT NULL,

`Number of Bifurcations` int(11) NOT NULL,

PRIMARY KEY (`Matric No`,`X`,`Y`,`Angle1`,`Angle2`,`Angle3`,`Finger Type`,`Number of Bifurcations`)

KEY `Matric No` (`Matric No`),

KEY `Finger Type` (`Finger Type `),

CONSTRAINT ` Finger Type ` FOREIGN KEY (`Finger Type `) REFERENCES `finger` (`Finger Type `) ON DELETE CASCADE ON UPDATE CASCADE,

CONSTRAINT `Matric No` FOREIGN KEY (`Matric No`) REFERENCES `student` (`Matric No`) ON DELETE CASCADE ON UPDATE CASCADE

) ENGINE=InnoDB DEFAULT CHARSET=latin1

------------------------------------------------------------------------------------------------------------

CREATE TABLE `course` (

`Course Code` varchar(6) NOT NULL,

`Course Title` varchar(45) NOT NULL,

`Semester` varchar(1) NOT NULL,

`Department` varchar(45) NOT NULL,

`Unit` smallint(6) NOT NULL,

58

Page 59: Database Stored Minutiae

PRIMARY KEY (`Course Code`,`Course Title`,`Semester`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1

-----------------------------------------------------------------------------------------------------------

CREATE TABLE `finger` (

`Finger Type` varchar(20) NOT NULL,

PRIMARY KEY (`Finger Type`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1

-----------------------------------------------------------------------------------------------------------

CREATE TABLE `registration` (

`Matric No` varchar(9) NOT NULL,

`Course Code` varchar(6) NOT NULL,

`Semester` varchar(1) NOT NULL,

`Session` year(4) NOT NULL,

PRIMARY KEY (`Matric No`,`Course Code`,`Session`),

KEY `Course Code` (`Course Code`),

KEY `Matric No` (`Matric No`),

CONSTRAINT `Course Code` FOREIGN KEY (`Course Code`) REFERENCES `course` (`Course Code`) ON DELETE CASCADE ON UPDATE CASCADE,

CONSTRAINT `Matric No` FOREIGN KEY (`Matric No`) REFERENCES `student` (`Matric No`) ON DELETE CASCADE ON UPDATE CASCADE

) ENGINE=InnoDB DEFAULT CHARSET=latin1

------------------------------------------------------------------------------------------------------------

CREATE TABLE `student` (

`Matric No` varchar(9) NOT NULL,

`First Name` varchar(25) NOT NULL,

`Last Name` varchar(25) NOT NULL,

`Other Names` varchar(25) NOT NULL,

`Date of Birth` date NOT NULL,

`Department` varchar(45) NOT NULL,

59

Page 60: Database Stored Minutiae

`Phone No` varchar(18) DEFAULT NULL,

`Sex` char(1) NOT NULL,

PRIMARY KEY (`Matric No`)

) ENGINE=InnoDB DEFAULT CHARSET=latin1

------------------------------------------------------------------------------------------------------------

CREATE TABLE `terminations` (

`Matric No` varchar(9) NOT NULL,

`X` int(3) NOT NULL,

`Y` int(3) NOT NULL,

`Angle` decimal(3,2) NOT NULL,

`Finger Type` varchar(20) NOT NULL,

`Number of Terminations` int(11) NOT NULL,

PRIMARY KEY (`Matric No`,`X`,`Y`,`Angle`,`Finger Type`,`Number of Terminations`)

KEY `Matric No` (`Matric No`),

KEY `Finger Type` (`Finger Type `),

CONSTRAINT ` Finger Type ` FOREIGN KEY (`Finger Type `) REFERENCES `finger` (`Finger Type `) ON DELETE CASCADE ON UPDATE CASCADE,

CONSTRAINT `Matric No` FOREIGN KEY (`Matric No`) REFERENCES `student` (`Matric No`) ON DELETE CASCADE ON UPDATE CASCADE

) ENGINE=InnoDB DEFAULT CHARSET=latin1

APPENDIX B: GRAPHICAL USER INTERFACE

60

Page 61: Database Stored Minutiae

Among the future work recommended by the earlier author[3] is to

automate the process of the algorithm completely. Though some measure of

automation is observed especially as functions are used throughout in the

project, it was expected that future work will, perhaps, use a GUI and only

enable button clicks to carry out the whole processing.

Hence, I was able to obtain the following:

Figure B1: load FingerPrint image

61

Page 62: Database Stored Minutiae

Figure B2: Enhancement by Histogram Equalization

Figure B3:Enhancement by FFT

62

Page 63: Database Stored Minutiae

Figure B4: Adaptive Binarization after FFT

Figure B5: Orientation Flow Estimate

63

Page 64: Database Stored Minutiae

Figure B6: region of Interest (ROI)

Figure B7: Thinned-ridge map

64

Page 65: Database Stored Minutiae

Figure B8: remove H breaks

Figure B9: remove spike

65

Page 66: Database Stored Minutiae

Figure B10: Minutia

Figure B11: Extracting minutia

66

Page 67: Database Stored Minutiae

Figure B12: Saving Minutia in an ASCII(.dat) file

Figure B13: Opening Fingerprint Template files for matching

67

Page 68: Database Stored Minutiae

Figure B14: Matching Successful (100%)

The MATLAB code used for GUI include :

%gui_start.m%Script file to generate the GUI%Final Year Project 2010-2011%Akangbe S.O%Computer Engineering, UNILAG clearFigWin = figure('Position',[50 -50 650 500],... 'Name','Fingerprint Matching Algorithm - 070408006',... 'NumberTitle','off',... 'Color',[ 0.827450980392157 0.815686274509804 0.776470588235294 ]); AxesHandle1 = axes('Position',[0.2 0.15 0.35 0.7],... 'Box','on');AxesHandle2 = axes('Position',[0.6 0.15 0.35 0.7],... 'Box','on'); BackColor = get(gcf,'Color');%[ 0.827450980392157 0.815686274509804 0.776470588235294 ] %[ 0.741176470588235 0.725490196078431 0.658823529411765 ] FrameBox = uicontrol(FigWin,... 'Units','normalized', ...

68

Page 69: Database Stored Minutiae

'Style','frame',... 'BackgroundColor',[ 0.741176470588235 0.725490196078431 0.658823529411765 ],... 'ForegroundColor',[ 0.741176470588235 0.725490196078431 0.658823529411765 ],... 'Position',[0 0 0.15 1]); %create static text.Text2 = uicontrol(FigWin,... 'Style','text',... 'Units','normalized', ... 'Position',[0 0.95 1 0.05],... 'FontSize',15,... 'BackgroundColor',[ 0.741176470588235 0.725490196078431 0.658823529411765 ],... 'HorizontalAlignment','right', ... 'String','Fingerprint Matching Algorithm - 070408006'); Text2 = uicontrol(FigWin,... 'Style','text',... 'Units','normalized', ... 'Position',[0 0 1 0.05],... 'FontSize',15,... 'BackgroundColor',[ 0.741176470588235 0.725490196078431 0.658823529411765 ],... 'HorizontalAlignment','right', ... 'String','Fingerprint Matching Algorithm - 070408006'); w=16;textLoad='Load Fingerprint Image';h=uicontrol(FigWin,... 'Style','pushbutton',... 'Position',[0,320,80,20],... 'String','Load',... 'Callback',... ['image1=loadimage;'... 'subplot(AxesHandle1);'... 'imagesc(image1);'... 'title(textLoad);'... 'colormap(gray);']); text_filterArea='Orientation Flow Estimate';h=uicontrol(FigWin,... 'Style','pushbutton',... 'Position',[0,240,80,20],... 'String','Direction',... 'Callback',... ['subplot(AxesHandle2);[o1Bound,o1Area]=direction(image1,16);title(text_filterArea);']); text_ROI='Region Of Interest(ROI)';h=uicontrol(FigWin,... 'Style','pushbutton',... 'Position',[0,220,80,20],... 'String','ROI Area',... 'Callback',... ['subplot(AxesHandle2);[o2,o1Bound,o1Area]=drawROI(image1,o1Bound,o1Area);title(text_ROI);']);

69

Page 70: Database Stored Minutiae

text_eq='Enhancement by histogram Equalization';h=uicontrol(FigWin,... 'Style','pushbutton',... 'Position',[0,300,80,20],... 'String','his-Equalization',... 'Callback',... ['subplot(AxesHandle2);image1=histeq(uint8(image1));imagesc(image1);title(text_eq);']); text21='Adaptive Binarization after FFT';h=uicontrol(FigWin,... 'Style','pushbutton',... 'Position',[0,260,80,20],... 'String','Binarization',... 'Callback',... [%'W=inputdlg(text);W=str2num(char(W));'... 'subplot(AxesHandle1);'... 'image1=adaptiveThres(double(image1),32);title(text21);']); text='Please input the FFT factor(0~1)';text_fft='Enhancement by FFT';h=uicontrol(FigWin,... 'Style','pushbutton',... 'Position',[0,280,80,20],... 'String','fft',... 'Callback',... ['W=inputdlg(text);W=str2double(char(W));'... 'subplot(AxesHandle1);image1=fftenhance(image1,W);imagesc(image1);title(text_fft);']); text31='Thinned-ridge map';h=uicontrol(FigWin,... 'Style','pushbutton',... 'Position',[0,200,80,20],... 'String','Thining',... 'Callback',... ['subplot(AxesHandle2);o1=im2double(bwmorph(o2,''thin'',Inf));imagesc(o1,[0,1]);title(text31);']); text41='Remove H breaks';h=uicontrol(FigWin,... 'Style','pushbutton',... 'Position',[0,180,80,20],... 'String','remove H breaks',... 'Callback',... ['subplot(AxesHandle2);o1=im2double(bwmorph(o1,''clean''));o1=im2double(bwmorph(o1,''hbreak''));imagesc(o1,[0,1]);title(text41);']); textn1='remove spike';h=uicontrol(FigWin,... 'Style','pushbutton',... 'Position',[0,160,80,20],... 'String','Removing spike',... 'Callback',...

70

Page 71: Database Stored Minutiae

['subplot(AxesHandle2);o1=im2double(bwmorph(o1,''spur''));imagesc(o1,[0,1]);title(textn1);']); %% locate minutia and show all those minutiatext51='Minutia';h=uicontrol(FigWin,... 'Style','pushbutton',... 'Position',[0,140,80,20],... 'String','Extract',... 'Callback',... ['[end_list1,branch_list1,ridgeMap1,edgeWidth]=mark_minutia(o1,o1Bound,o1Area,w);'... 'subplot(AxesHandle2);show_minutia(o1,end_list1,branch_list1);title(text51);']); %Process for removing spurious minutiatext61='Remove spurious minutia';h=uicontrol(FigWin,... 'Style','pushbutton',... 'Position',[0,120,80,20],... 'String','Real Minutiae',... 'Callback',... ['[pathMap1,real_end1,real_branch1]=remove_spurious_Minutia(o1,end_list1,branch_list1,o1Area,ridgeMap1,edgeWidth);'... 'subplot(AxesHandle1);show_minutia(o1,real_end1,real_branch1);title(text61);']); %save template file, including the minutia position,direction,and ridge informationtextSaveName='file name';h=uicontrol(FigWin,... 'Style','pushbutton',... 'Position',[0,100,80,20],... 'String','save',... 'Callback',... ['W=inputdlg(textSaveName);W=char(W);'... 'save(W,''real_end1'',''pathMap1'',''-ASCII'');']); %invoke template file loader and do matchingh=uicontrol('Style','pushbutton',... 'String','Match',... 'Position',[0,80,80,20],... 'Callback',... ['finger1=fingerTemplateRead;'... 'finger2=fingerTemplateRead;'... 'percent_match=match_end(finger1,finger2,10);']);

The use of a GUI has hence rendered the project very effective as we

can now view the transitions from one processing stage to another. Also, the

print was being loaded into the MATLAB environment using the loadimage

function below which is sufficient in the absence of a fingerprint reader.

71

Page 72: Database Stored Minutiae

function image1=loadimage% dialog for opening fingerprint files%Final Year Project 2010-2011%Akangbe S.O%Computer Engineering,UNILAG [imagefile1 , pathname]= uigetfile('*.bmp;*.BMP;*.tif;*.TIF;*.jpg','Open An Fingerprint image'); if imagefile1 ~= 0 cd(pathname);image1=readimage(char(imagefile1));image1=255-double(image1); end;

72