Professional Documents
Culture Documents
Anex Project
Anex Project
Anex Project
On
Submitted By
ANEX P B [TK19CCSR30]
Under guidance of
Mrs . SREEJA K
(HOD Of Computer Science Department)
1|Page
TALIPARAMBA ARTS AND SCIENCE COLLEGE KANHIRANGAD
(Affiliated to Kannur University)
2019 - 2022
CERTIFICATE
ANEX P B [TK19CCSR30]
Date: 1.
2.
2|Page
ACKNOWLEDGEMENT
ANEX P B [TK19CCSR30]
3|Page
ABSTRACT
4|Page
CONTENTS
Title Page
Introduction 06
System Analysis 08
Survey of Technologies 12
System Requirements 15
System Design 16
Detailed Design with DFD 17
Approaches Towards Detection 22
Files 27
User Interface Design 29
Coding 36
Standardization of Coding 37
Testing 52
Implementation 56
Documentation 57
Maintenance 58
Future Enhancement 59
Conclusion 60
Bibliography 61
5|Page
INTRODUCTION
6|Page
Background and Objectives
Microsoft Office 2013 is also used in the project that we are using files
instead of databases to store data.
● User Registration
● Image Collection
● Image Detection and Verification
● Attendance Marking
● User Deletion
7|Page
SYSTEM ANALYSIS
Identification of need
Preliminary Investigation
Problem Definition
System Study
Project Planning
System Analysis
Identification of need
In the existing system all the process are done manually. It is very time
consuming. Naturally this system consists of repeating work. This increase data processing time
and retrieving time, resulting in poor efficiency. Information processing in the existing system
are done manually, it require large number of staff. In this case, a large number of registers are
maintained, for storage and retrieval of data. This increases total expenditure .Computerization
of above mentioned system would make an organized and systematic data processing.
Preliminary Investigation
One aspect of analyzing is defining the boundaries of the system and determining
whether or not a candidate system should consider other related systems. During analysis, data
are connected on the available files, decision points, and transactions handled by the present
system.
8|Page
1. EXISTING SYSTEM:
In order to handle successfully run a system, a System detailed and understanding
required. The present working of that system must be observed. In present system the
admission procedure is done manually into the ledgers and documented.
3. PROPOSED SYSTEM:
Problem Definition:
System Study
Feasibility Study:
On the basis of result of the initial study, feasibility Study takes place. Feasibility
study is carried out for ascertaining the feasibility of the project.
9|Page
The main objective of the Feasibility study is to test the technical, operational and
economic feasibility of developing a system. In the process of Feasibility study, the cost and
benefits are estimated with greater accuracy. In the case of technical Feasibility, a study of
function, performance and constraints that may affect the ability to achieve an acceptable
system is carried out. Economic Feasibility is an evaluation of development cost weighed
against the ultimate income or benefit derived from the developed system.
a) Technical Feasibility:
Technical feasibility deals with the hardware as well as software
requirements technically considering, all required tools are available.
b) Economic Feasibility:
The Economic Feasibility study was determining whether the
cost of not creating a system so great the project must be under taken
freely available. The cost required is only development of the code. Thus
the software is an economical one.
c) Operational feasibility:
The proposed system offers:
● Higher speed
The employee who are responsible for data entry and processing are computer trained
person, so there is no need for special training , if not then one week training can be required
for him to operate the system . Thus the system is operationally feasible.
10 | P a g e
Project Planning
The logical dependencies between tasks are defined using an activity network diagram
that enables identification of the critical path. Project planning is inherently uncertain as it must
be done before the project is actually started. Therefore the duration of the tasks is often
estimated through a weighted average of optimistic, normal, and pessimistic cases. The critical
chain method adds "buffers" in the planning to anticipate potential delays in project execution.
Float or slack time in the schedule can be calculated using project management software.
Then the necessary resources can be estimated and costs for each activity can be allocated to
each resource, giving the total project cost. At this stage, the project schedule may be optimized
to achieve the appropriate balance between resource usage and project duration to comply with
the project objectives. Once established and agreed, the project schedule becomes what is known
as the baseline schedule. Progress will be measured against the baseline schedule throughout the
life of the project. Analyzing progress compared to the baseline schedule is known as earned
value management.
The inputs of the project planning phase include the project charter and the
concept proposal. The outputs of the project planning phase include the project requirements,
the project schedule, and the project management plan. The Project Planning can be done
manually. However, when managing several projects, it is usually easier and faster to use
project management software.
11 | P a g e
SURVEY OF TECHNOLOGIES
12 | P a g e
Survey of Technologies:
We have number of technologies for developing the software, these are the following:
➢ Python
➢ OpenCV
➢ Tkinter
Python:
Python is a high-level, interpreted and general-purpose dynamic programming
language that focuses on code readability. The syntax in Python helps the programmers to do
coding in fewer steps as compared to Java or C++. The language was founded in the year
1991 by the developer Guido Van Rossum has the programming easy and fun to do. The
Python is widely used in bigger organizations because of its multiple programming
paradigms. They usually involve imperative and object-oriented functional programming. It
has a comprehensive and large standard library that has automatic memory management and
dynamic features.
Advantages of Python:
● Interactive.
● Interpreted .
● Modular .
● Dynamic .
● Object-oriented.
● Portable.
● High level .
13 | P a g e
● Python can connect to database systems. It can also read and modify files.
● Python can be used to handle big data and perform complex mathematics.
● Python can be used for rapid prototyping, or for production-ready software development.
Why Python?
● Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
● Python has a simple syntax similar to the English language.
● Python has syntax that allows developers to write programs with fewer lines than some
other programming languages.
● Python runs on an interpreter system, meaning that code can be executed as soon as it is
written. This means that prototyping can be very quick.
● Python can be treated in a procedural way, an object-orientated way or a functional way.
OpenCV:
OpenCV (Open Source Computer Vision Library) is a library of programming functions mainly
aimed at real-time computer vision Originally developed by intel, it was later supported by Willow
Garage then Itseez (which was later acquired by Intel). The library is cross-platform and free for
use under the open-source Apache 2 License. Starting with 2011, OpenCV features GPU
acceleration for real-time operations.
Tkinter:
Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to the Tk
GUI toolkit, and is Python's de facto standard GUI. Tkinter is included with
standard GNU/Linux, Microsoft Windows and macOS installs of Python.
14 | P a g e
System Requirements
PLATFORM : Tkinter
LANGUAGE : Python
15 | P a g e
SYSTEM DESIGN
⮚ Process of Design
⮚ Logical Design
⮚ Physical Design
⮚ Files
16 | P a g e
Process of Design
Based on the user requirements and the detailed analysis of a new system, the new
system must be designed. This is the phase of system designing. It is a most crucial phase in
the development of a system. Normally, the design proceeds in two stages:
In the preliminary or general design, the features of the new system are specified.
The costs of implementing these features and the benefits to be derived are estimated. If the
project is still considered to be feasible, we move to the detailed design stage.
In the detailed design stage, computer oriented work begins in earnest. At this stage,
the Design of the system becomes more structured. Structure design is a blueprint of a
computer system solution to a given problem having the same components and inter-
relationship among the same components as the original problem. Input, output and
processing specifications are drawn up in detail. In the design stage the programming
language and the platform in which the new system will run are also decided.
Logical Design
Data Flow Diagram
Physical Data Flow Diagrams are implementation dependent. They show actual
devices, departments, peoples etc. Involved in the current system, Logical data flow diagrams,
in contrast describe the system independently of flow it is actually implemented.
17 | P a g e
DFD is used to show how data flows through the system and the processes that
transform the input data into output. DFD represents one of the most ingenious tools used for
structured analysis. In the normal convention, logical DFD can be completed using only four
notations.
18 | P a g e
Level -0
19 | P a g e
Level 1 Admin Process
20 | P a g e
Level 2 User Process
21 | P a g e
Physical Design
Following the logical design is the physical design. This produces the working
system by defining the design specification that tells programmers exactly what the candidate
system must do. In turn, the programmer writes necessary programmers or modifies the
software package that accepts input from the user, performs the necessary calculation through
the existing file or data base, produces the report on a hard copy or displaces it on a screen and
maintenance and updated data base at all times.
Input Design
They in put design associated with the system includes user friendly interface screen
format, which reduces the burden of the end users, who are not highly proficient in using
computers.
Output Design
Computer output is the most important and direct sources of information to the
user. Efficient design of intelligent output will improve the system relationship with the user
and help in decision making. Print out should be designed around the output requirement of the
user. The output design associated with the system includes the various reports of table
generation and query execution. These reports can also be converted to a printable version and
then be printed. They are included the screen layout.
2. Illumination
3. Expression
4. Motion
5. Facial hair
6. Glasses
7. Background of image.
22 | P a g e
Face recognition technology is well advanced that can apply for many commercial
applications such as personal identification, security system, image- film processing,
psychology, computer interaction, entertainment system, smart card, law enforcement,
surveillance and so on. Face recognition can be done in both a still image and video
sequence which has its origin instill- image face recognition. Different approaches of face
recognition for still images can be categorized into three main groups such as
1. Holistic approach
2. Feature-based approach
3. Hybrid approach product
Wavelets, especially Gabor wavelets, play a building block role for facial representation in
these graph matching methods. A typical local feature representation consists of wavelet
coefficients for different scales and rotations based on fixed wavelet bases. These locally
estimated wavelet coefficients are robust to illumination change, translation, distortion,
rotation, and scaling. The grid is appropriately positioned over the image and is stored with
each grid point’s locally determined jet in figure 2(a), and serves to represent the pattern
classes. Recognition of a new image takes place by transforming the image into the grid of
jets, and matching all stored model graphs to the image. Conformation of the DLA is done
by establishing and dynamically modifying links between vertices in the model domain.
3. Hybrid approach: - The idea of this method comes from how human vision
system perceives both holistic and local feature. The key factors that influence
the performance of hybrid approach include how to determine which features
should be combined and how to combine, so as to preserve their advantages and
avert their disadvantages at the same time.
23 | P a g e
These problems have close relationship with the multiple classifier system (MCS) and
ensemble learning in the field of machine learning. Unfortunately, even in these fields, these
problems remain unsolved. In spite of this, numerous efforts made in these fields indeed
provide us some insights into solving these problems, and these lessons can be used as
guidelines in designing a hybrid face recognition system. hybrid approach that uses both
holistic and local information for recognition may be an effective way to reduce the
complexity of classifiers and improve their generalization capability.
a) Input Part
Input part is prerequisite for face recognition system. Image acquisition operation is
performed in this part. Live captured images are converted to digital data for performing
image-processing computations. These captured images are sent to face detection
algorithm.
24 | P a g e
.
For this reason, skin segmentation is applied as a first step of detection part. RGB color
space is used to describe skin like color . White balance of images differs due to change
in lighting conditions of the environment while acquiring image. This situation creates
non-skin objects that belong to skin objects.
Therefore, white balance of the acquired image should be corrected before segmenting it.
25 | P a g e
We can group face recognition methods into three main groups. The following approaches are
proposed:
Template matching: - Patterns are represented by samples, models, pixels, curves, textures.
The recognition function is usually a correlation or distance measure.
Neural networks: -The representation may vary. There is a network function in some point.
26 | P a g e
FILES
27 | P a g e
ID and Details
Attendance
28 | P a g e
USER INTERFACE DESIGN
29 | P a g e
HOME PAGE
30 | P a g e
OPTIONS SCREEN
31 | P a g e
CHANGE PASSWORD SCREEN
32 | P a g e
BUG REPORT
35 | P a g e
CODING
36 | P a g e
Coding Structure
Coding structure translates detailed design representation of software into
programming language realization.
● Maintainability
● Error Handling
● Parameters calling/passing
● Validation Checks
Code Efficiency
Code efficiency is a broad term used to depict the reliability, speed and
programming methodology used in developing codes for an application. Code efficiency is
directly linked with algorithmic efficiency and the speed of runtime execution for software. It
is the key element in ensuring high performance. The goal of code efficiency is to reduce
resource consumption and completion time as much as possible with minimum risk to the
business or operating environment. The software product quality can be accessed and evaluated
with the help of the efficiency of the code used.
Error Handling
37 | P a g e
In programming, a development error is one that can be prevented.
Such an error can occur in syntax or logic. Syntax errors, which are typographical mistakes or
improper use of special characters, are handled by rigorous proofreading. Logic errors, also
called bugs, occur when executed code does not produce the expected or desired result. Logic
errors are best handled by meticulous program debugging. This can be an ongoing process that
involves, in addition to the traditional debugging routine, beta testing prior to official release
and customer feedback after official release.
Parameters Calling/Passing
Validation Checks
Validation checks that the product design satisfies or fits the intended use (high-level
checking), i.e., the software meets the user requirements. This is done through dynamic
38 | P a g e
testing and other forms of review.
Verification and validation is not the same thing, although they are often
confused. Boehm succinctly expressed the difference between
⮚ Validation: Are we building the right product? (This is dynamic process for checking
and testing the real product. Software validation always involves with executing the code)
⮚ Verification: Are we building the product right? (This is static method for verifying
design, code. Software verification is human based checking of documents and files)
▪ Software Validation: The process of evaluating software during or at the end of the
development process to determine whether it satisfies specified requirements.
In other words, software validation ensures that the product actually meets the user's
needs, and that the specifications were correct in the first place, while software verification is
ensuring that the product has been built according to the requirements and design specifications.
Software validation ensures that "you built the right thing". Software verification ensures that
"you built it right". Software validation confirms that the product, as provided, will fulfill its
intended use.
From testing perspective:
39 | P a g e
CODES
40 | P a g e
GUI FRONTEND
import tkinter as tk
from tkinter import ttk
from tkinter import messagebox as mess
import tkinter.simpledialog as tsd
import cv2,os
import csv
import numpy as np
from PIL import Image
import pandas as pd
import datetime
import time
import shutil
window = tk.Tk()
window.geometry("1280x720")
window.resizable(True,False)
window.title("Attendance System")
window.configure(background='#262523')
res=0
exists = os.path.isfile("StudentDetails\StudentDetails.csv")
if exists:
with open("StudentDetails\StudentDetails.csv", 'r') as csvFile1:
reader1 = csv.reader(csvFile1)
for l in reader1:
res = res + 1
res = (res // 2) - 1
csvFile1.close()
else:
res = 0
MENUBAR
menubar = tk.Menu(window,relief='ridge')
filemenu = tk.Menu(menubar,tearoff=0)
filemenu.add_command(label='Change Password', command = change_pass)
filemenu.add_command(label='Report A Bug', command = contact)
filemenu.add_command(label='Exit',command = window.destroy)
menubar.add_cascade(label='Options',font=('times', 29, ' bold '),menu=filemenu)
42
TREEVIEW ATTENDANCE TABLE
tv= ttk.Treeview(frame1,height =13,columns = ('name','date','time'))
tv.column('#0',width=82)
tv.column('name',width=130)
tv.column('date',width=133)
tv.column('time',width=133)
tv.grid(row=2,column=0,padx=(0,0),pady=(150,0),columnspan=4)
tv.heading('#0',text ='ID')
tv.heading('name',text ='NAME')
tv.heading('date',text ='DATE')
tv.heading('time',text ='TIME')
SCROLLBAR
scroll=ttk.Scrollbar(frame1,orient='vertical',command=tv.yview)
scroll.grid(row=2,column=4,padx=(0,100),pady=(150,0),sticky='ns')
tv.configure(yscrollcommand=scroll.set)
BUTTONS
43
END
window.configure(menu=menubar)
window.mainloop()
ts = time.time()
date = datetime.datetime.fromtimestamp(ts).strftime('%d-%m-%Y')
day,month,year=date.split("-")
mont={'01':'January',
'02':'February',
'03':'March',
‘04':'April',
'05':'May',
'06':'June',
'07':'July',
'08':'August',
'09':'September',
'10':'October',
'11':'November',
'12':'December'
}
TAKING IMAGES
def TakeImages():
check_haarcascadefile()
columns = ['SERIAL NO.', '', 'ID', '', 'NAME']
assure_path_exists("StudentDetails/")
assure_path_exists("TrainingImage/")
serial = 0
exists = os.path.isfile("StudentDetails\StudentDetails.csv")
if exists:
with open("StudentDetails\StudentDetails.csv", 'r') as csvFile1:
reader1 = csv.reader(csvFile1)
for l in reader1:
serial = serial + 1
serial = (serial // 2)
csvFile1.close()
else:
44
with open("StudentDetails\StudentDetails.csv", 'a+') as csvFile1:
writer = csv.writer(csvFile1)
writer.writerow(columns)
serial = 1
csvFile1.close()
Id = (txt.get())
name = (txt2.get())
if ((name.isalpha()) or (' ' in name)):
cam = cv2.VideoCapture(0)
harcascadePath = "haarcascade_frontalface_default.xml"
detector = cv2.CascadeClassifier(harcascadePath)
sampleNum = 0
while (True):
ret, img = cam.read()
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = detector.detectMultiScale(gray, 1.3, 5)
for (x, y, w, h) in faces:
cv2.rectangle(img, (x, y), (x + w, y + h), (255, 0, 0), 2)
# incrementing sample number
sampleNum = sampleNum + 1
# saving the captured face in the dataset folder TrainingImage
cv2.imwrite("TrainingImage\ " + name + "." + str(serial) + "." + Id + '.' + str(sampleNum)
+ ".jpg",
gray[y:y + h, x:x + w])
# display the frame
cv2.imshow('Taking Images', img)
# wait for 100 miliseconds
if cv2.waitKey(100) & 0xFF == ord('q'):
break
# break if the sample number is morethan 100
elif sampleNum > 100:
break
cam.release()
cv2.destroyAllWindows()
res = "Images Taken for ID : " + Id
row = [serial, '', Id, '', name]
with open('StudentDetails\StudentDetails.csv', 'a+') as csvFile:
writer = csv.writer(csvFile)
writer.writerow(row)
csvFile.close()
message1.configure(text=res)
else:
if (name.isalpha() == False):
res = "Enter Correct name"
message.configure(text=res)
45
TRAINING IMAGES
def TrainImages():
check_haarcascadefile()
assure_path_exists("TrainingImageLabel/")
recognizer = cv2.face_LBPHFaceRecognizer.create()
harcascadePath = "haarcascade_frontalface_default.xml"
detector = cv2.CascadeClassifier(harcascadePath)
faces, ID = getImagesAndLabels("TrainingImage")
try:
recognizer.train(faces, np.array(ID))
except:
mess._show(title='No Registrations', message='Please Register someone first!!!')
return
recognizer.save("TrainingImageLabel\Trainner.yml")
res = "Profile Saved Successfully"
message1.configure(text=res)
message.configure(text='Total Registrations till now : ' + str(ID[0]))
TRACKING IMAGES
def TrackImages():
check_haarcascadefile()
assure_path_exists("Attendance/")
assure_path_exists("StudentDetails/")
for k in tv.get_children():
tv.delete(k)
msg = ''
i=0
j=0
recognizer = cv2.face.LBPHFaceRecognizer_create() # cv2.createLBPHFaceRecognizer()
exists3 = os.path.isfile("TrainingImageLabel\Trainner.yml")
if exists3:
recognizer.read("TrainingImageLabel\Trainner.yml")
else:
mess._show(title='Data Missing', message='Please click on Save Profile to reset data!!')
return
harcascadePath = "haarcascade_frontalface_default.xml"
faceCascade = cv2.CascadeClassifier(harcascadePath);
cam = cv2.VideoCapture(0)
font = cv2.FONT_HERSHEY_SIMPLEX
col_names = ['Id', '', 'Name', '', 'Date', '', 'Time']
exists1 = os.path.isfile("StudentDetails\StudentDetails.csv")
if exists1:
df = pd.read_csv("StudentDetails\StudentDetails.csv")
else:
mess._show(title='Details Missing', message='Students details are missing, please check!')
cam.release()
46
cv2.destroyAllWindows()
window.destroy()
while True:
ret, im = cam.read()
gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY)
faces = faceCascade.detectMultiScale(gray, 1.2, 5)
for (x, y, w, h) in faces:
cv2.rectangle(im, (x, y), (x + w, y + h), (225, 0, 0), 2)
serial, conf = recognizer.predict(gray[y:y + h, x:x + w])
if (conf < 50):
ts = time.time()
date = datetime.datetime.fromtimestamp(ts).strftime('%d-%m-%Y')
timeStamp = datetime.datetime.fromtimestamp(ts).strftime('%H:%M:%S')
aa = df.loc[df['SERIAL NO.'] == serial]['NAME'].values
ID = df.loc[df['SERIAL NO.'] == serial]['ID'].values
ID = str(ID)
ID = ID[1:-1]
bb = str(aa)
bb = bb[2:-2]
attendance = [str(ID), '', bb, '', str(date), '', str(timeStamp)]
else:
Id = 'Unknown'
bb = str(Id)
cv2.putText(im, str(bb), (x, y + h), font, 1, (255, 255, 255), 2)
cv2.imshow('Taking Attendance', im)
if (cv2.waitKey(1) == ord('q')):
break
ts = time.time()
date = datetime.datetime.fromtimestamp(ts).strftime('%d-%m-%Y')
exists = os.path.isfile("Attendance\Attendance_" + date + ".csv")
if exists:
with open("Attendance\Attendance_" + date + ".csv", 'a+') as csvFile1:
writer = csv.writer(csvFile1)
writer.writerow(attendance)
csvFile1.close()
else:
with open("Attendance\Attendance_" + date + ".csv", 'a+') as csvFile1:
writer = csv.writer(csvFile1)
writer.writerow(col_names)
writer.writerow(attendance)
csvFile1.close()
with open("Attendance\Attendance_" + date + ".csv", 'r') as csvFile1:
reader1 = csv.reader(csvFile1)
for lines in reader1:
i=i+1
if (i > 1):
if (i % 2 != 0):
iidd = str(lines[0]) + ' '
tv.insert('', 0, text=iidd, values=(str(lines[2]), str(lines[4]), str(lines[6])))
csvFile1.close()
cam.release()
cv2.destroyAllWindows()
47
RETURNING LABELS
def getImagesAndLabels(path):
# get the path of all the files in the folder
imagePaths = [os.path.join(path, f) for f in os.listdir(path)]
# create empth face list
faces = []
# create empty ID list
Ids = []
# now looping through all the image paths and loading the Ids and the images
for imagePath in imagePaths:
# loading the image and converting it to gray scale
pilImage = Image.open(imagePath).convert('L')
# Now we are converting the PIL image into numpy array
imageNp = np.array(pilImage, 'uint8')
# getting the Id from the image
ID = int(os.path.split(imagePath)[-1].split(".")[1])
# extract the face from the training image sample
faces.append(imageNp)
Ids.append(ID)
return faces, Ids
CHANGE PASSWORD
def change_pass():
global master
master = tk.Tk()
master.geometry("400x160")
master.resizable(False,False)
master.title("Change Password")
master.configure(background="white")
lbl4 = tk.Label(master,text='Enter Old Password',bg='white',font=('dosis', 11, ' bold '))
lbl4.place(x=10,y=10)
global old
old=tk.Entry(master,width=22 ,fg="black",relief='solid',font=('times', 12, ' bold '),show='*')
old.place(x=180,y=10)
lbl5 = tk.Label(master, text='Enter New Password', bg='white', font=('dosis', 11, ' bold '))
lbl5.place(x=10, y=45)
global new
new = tk.Entry(master, width=20, fg="black",relief='solid', font=('dosis', 12, ' bold '),show='*')
new.place(x=180, y=45)
lbl6 = tk.Label(master, text='Confirm New Password', bg='white', font=('dosis', 11, ' bold '))
lbl6.place(x=10, y=80)
global nnew
nnew = tk.Entry(master, width=22, fg="black", relief='solid',font=('times', 12, ' bold '),show='*')
nnew.place(x=180, y=80)
cancel=tk.Button(master,text="Cancel", command=master.destroy ,fg="black" ,bg="red"
,height=1,width=25 , activebackground = "white" ,font=('times', 10, ' bold '))
cancel.place(x=200, y=120)
48
save1 = tk.Button(master, text="Save", command=save_pass, fg="black", bg="#3ece48", height =
1,width=25, activebackground="white", font=('times', 10, ' bold '))
save1.place(x=10, y=120)
master.mainloop()
def save_pass():
assure_path_exists("TrainingImageLabel/")
exists1 = os.path.isfile("TrainingImageLabel\psd.txt")
if exists1:
tf = open("TrainingImageLabel\psd.txt", "r")
key = tf.read()
else:
master.destroy()
new_pas = tsd.askstring('Old Password not found', 'Please enter a new password below',
show='*')
if new_pas == None:
mess._show(title='No Password Entered', message='Password not set!! Please try again')
else:
tf = open("TrainingImageLabel\psd.txt", "w")
tf.write(new_pas)
mess._show(title='Password Registered', message='New password was registered
successfully!!')
return
op = (old.get())
newp= (new.get())
nnewp = (nnew.get())
if (op == key):
if(newp == nnewp):
txf = open("TrainingImageLabel\psd.txt", "w")
txf.write(newp)
else:
mess._show(title='Error', message='Confirm new password again!!!')
return
else:
mess._show(title='Wrong Password', message='Please enter correct old password.')
return
mess._show(title='Password Changed', message='Password changed successfully!!')
master.destroy()
PASSWORD VERIFICATION
def psw():
assure_path_exists("TrainingImageLabel/")
exists1 = os.path.isfile("TrainingImageLabel\psd.txt")
if exists1:
tf = open("TrainingImageLabel\psd.txt", "r")
key = tf.read()
else:
new_pas = tsd.askstring('Old Password not found', 'Please enter a new password below',
show='*')
if new_pas == None:
mess._show(title='No Password Entered', message='Password not set!! Please try again')
else:
49
tf = open("TrainingImageLabel\psd.txt", "w")
tf.write(new_pas)
mess._show(title='Password Registered', message='New password was registered
successfully!!')
return
password = tsd.askstring('Password', 'Enter Password', show='*')
if (password == key):
TrainImages()
elif (password == None):
pass
else:
mess._show(title='Wrong Password', message='You have entered wrong password')
def psw2():
tf = open("TrainingImageLabel\psd.txt", "r")
key = tf.read()
password = tsd.askstring('Password', 'Enter Password', show='*')
if (password == key):
delallsaved()
elif (password == None):
pass
else:
mess._show(title='Wrong Password', message='You have entered wrong password')
MISC
def assure_path_exists(path):
dir = os.path.dirname(path)
if not os.path.exists(dir):
os.makedirs(dir)
def tick():
time_string = time.strftime('%H:%M:%S')
clock.config(text=time_string)
clock.after(200,tick)
def contact():
mess._show(title='Contact us', message="Please contact us on : 'multimixnet@gmail.com' ")
def check_haarcascadefile():
exists = os.path.isfile("haarcascade_frontalface_default.xml")
if exists:
pass
else:
mess._show(title='Some file missing', message='Please contact us for help')
50
window.destroy()
def clear():
txt.delete(0, 'end')
res = "1)Take Images >>> 2)Save Profile"
message1.configure(text=res)
def clear2():
txt2.delete(0, 'end')
res = "1)Take Images >>> 2)Save Profile"
message1.configure(text=res)
def showsaved():
os.system('start "excel.exe" "StudentDetails\StudentDetails.csv"')
def delallsaved():
os.remove("StudentDetails\StudentDetails.csv")
shutil.rmtree('TrainingImage')
original = r'Model Files\StudentDetails.csv'
target = r'StudentDetails\StudentDetails.csv'
shutil.copyfile(original, target)
res = "Profiles deleted successfully"
message.configure(text=res)
51
TESTING
52
Testing
Testing is the process of executing the program with the intent of finding errors. Testing
cannot show the absence of defects, it can only show that software errors are present. The
testing principles used are:
System testing is vital for the success of any software system. In this phase, several tests
and validations will be carried out on modules to check for their functionality. Testing and
debugging is a very critical in system development. The quality of the system is confirmed by
the thoroughness of its testing. Duration and cost of testing and debugging is a significant
fraction of the system development life cycle and hence influences overall productivity during
the system development. In this phase the errors in the program or module are localized and
modifications are done to eliminate them. Some of the methods of system testing are given
below:
Testing Strategies
The choice of test approaches or test strategy is one of the most powerful factors in
the success of the test effort and the accuracy of the test plans and estimates. This factor is under
the control of the testers and test leaders.
Let’s survey the major types of test strategies that are commonly found:
⮚ Analytical: Let us take an example to understand this. The risk-based strategy
involves performing a risk analysis using project documents and stakeholder
input, then planning, estimating, designing, and prioritizing the tests based on
risk. Another analytical test strategy is the requirements-based strategy, where
an analysis of the requirements specification forms the basis for planning,
estimating and designing tests. Analytical test strategies have in common the use
of some formal or informal analytical technique, usually during the requirements
and design stages of the project.
● Model-based: Let us take an example to understand this. You can build mathematical
models for loading and response for e-commerce servers, and test based on that model.
If the behavior of the system under test conforms to that predicted by the model, the
system is deemed to be working. Model-based test strategies have in common the
creation or selection of some formal or informal model for critical system behaviors,
usually during the requirements and design stages of the project.
1. Methodical: Let us take an example to understand this. You might have a
checklist that you have put together over the years that suggests the major areas
of testing to run or you might follow an industry-standard for software quality,
such as ISO 9126, for your outline of major test areas. You then methodically
design, implement and execute tests following this outline. Methodical test
strategies have in common the adherence to a pre-planned, systematized approach
that has been developed in-house, assembled from various concepts
53
developed inhouse and gathered from outside, or adapted significantly from
outside ideas and may have an early or late point of involvement for testing.
⮚ Process – or standard-compliant: Let us take an example to understand this. You
might adopt the IEEE 829 standard for your testing, using books such as [Craig, 2002]
or [Drabick, 2004] to fill in the methodological gaps. Alternatively, you might adopt
one of the agile methodologies such as Extreme Programming. Process- or standard-
compliant strategies have in common reliance upon an externally developed approach
to testing, often with little – if any – customization and may have an early or late point
of involvement for testing.
● Dynamic: Let us take an example to understand this. You might
create a lightweight set of testing guide lines that focus on rapid
adaptation or known weaknesses in software. Dynamic
strategies, such as exploratory testing, have in common
concentrating on finding as many defects as possible during test
execution and adapting to the realities of the system under test
as it is when delivered, and they typically emphasize the later
stages of testing.
Unit Testing
Unit testing is carried out to screen wise, each screen being identified as an object.
Attention is diverted to individual modules, independently to one another to locate errors in
coding and logic.
In Unit testing,
● Module interface is tested to ensure that information properly
flows into and out of the program under test.
● Local data structures are examined to ensure that data stored
temporarily maintains its integrity during all steps in algorithm
execution.
● Boundary condition is tested to ensure that the module operates
properly at boundaries established to limit or restrict processing.
● All independent paths through the control structures are
executed to ensure that all statements in the module have been
executed at least once.
● Error handling paths are also tested.
This test focuses verification effort on the smallest unit of software unit of software
design, the module. Here, the module interfaces boundary conditions, and all independent paths
were verified by inputting false data. Each single operation is tested individually for its correct
functionality.
54
Integration Testing
Integration testing is a systematic technique for constructing the program structure while
at the same time conducting tests to uncover errors associated with interfacing. Unit tested
modules were taken and a single program structure was built that has been dictated by the
design. Incremental integration has been adopted here. The entire software was developed and
tested in small segments, where errors were easy to locate and rectify. After integration, the
single program was tested again with numerous test data to check for its functionality.The
integration can be performed in two ways:
⮚ Top down integration
⮚ Bottom up integration.
Here bottom up integration is performed. This strategy is implemented with the following steps.
⮚ Low-level modules are combined to form clusters that
perform a specific software sub function.
⮚ The cluster is tested.
⮚ Drivers are removed and clusters are combined moving
upward in the program structure.
Module Testing
55
IMPLEMENTATION
Implementation is the process of bringing a newly developed system or revised
into an operational one. It is the practical job of putting a theoretical design into practice. It may
involve the complete implementation of a computer complex or the introduction of one small
subsystem. The new system and its components are to be tested in a structured and planned
manner. The implementation stage of a project is often very complex and time consuming and
many more people are involved in the earlier stages. This involves careful planning,
investigation of the current system and constraints of implementation, creating computer-
compatible files, installing hardware, training the operating staff in changeover procedures
before the system is set up and running. A critical factor in the conversion is not disrupting the
functioning of the organization.
56
DOCUMENTATION
After the job of testing is completed the whole system was well documented in clear,
understandable and simple language. This was to ensure that if any updating has to be performed
in future, one who did the task would not face any problem performing those tasks. An attempt
was to attain maximum perfection in documenting the software in simple, precise and self-
explanatory manner.
The documentation deals with the system document with maximum clarity. Each
process is explained in detail. The various tables used by the system with field details are
provided. The system uses various kinds of forms to produce well structured screen formats.
These forms are also documented. The output generated by the system constitutes another part.
57
MAINTENANCE
Software development does not freeze at the moment of delivery. Usually, software
must grow and change over time. These activities are collectively referred to as software
maintenance. Application upgrades are part of the normal maintenance phases of the software
life cycle. A modification effort is actually a mini project and must proceed through all the
phases of the development process.
There are many reasons for software modification and continued development after
the first release. All the products evolve, and the software is no exception. Application may
need additional features not discovered during the original analysis and design. The software
may need fixes to correct problems not discovered during initial development and testing, or
the user needs or environment may change over time.
58
FUTURE ENHANCEMENT
The developed system is flexible for future enhancement. Some of them are
The system can be made efficient if these facilities are also incorporated into it. I
can also use new menu styles to enhance the software usability.
59
CONCLUSION
60
BIBILIOGRAPHY
61