0% found this document useful (0 votes)
8 views81 pages

Project

The document presents a project titled 'Traffic Management based on Vehicle Counter using AI,' submitted for a Bachelor of Technology degree in Computer Science and Engineering. It outlines the development of an intelligent surveillance system utilizing AI for detecting unauthorized access through CCTV cameras, employing various algorithms to enhance efficiency and reduce complexity. The project includes sections on methodology, system implementation, and future scope, emphasizing the importance of automated detection and analysis in modern surveillance systems.

Uploaded by

k.sravanthiists
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views81 pages

Project

The document presents a project titled 'Traffic Management based on Vehicle Counter using AI,' submitted for a Bachelor of Technology degree in Computer Science and Engineering. It outlines the development of an intelligent surveillance system utilizing AI for detecting unauthorized access through CCTV cameras, employing various algorithms to enhance efficiency and reduce complexity. The project includes sections on methodology, system implementation, and future scope, emphasizing the importance of automated detection and analysis in modern surveillance systems.

Uploaded by

k.sravanthiists
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Traffic Management based on Vehicle Counter using AI

A Major Project Work

Submitted in partial fulfillment of the Requirements for the award of the Degree of

BACHELOR OF TECHNOLOGY
In
COMPUTER SCIENCE AND ENGINEERING
By
K. Monika 226W1A0527
T. Mounika Devi 226W1A0554
G. Tejaswi 216W1A05B1
S. 216W5A05B2

Under the Esteemed guidance of

Dr SIVA BALAN SETTU


Associate Professor

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

INTERNATIONAL SCHOOL OF TECHNOLOGY AND SCIENCES FOR WOMEN


(AN AUTONOMOUS INSTITUTION)

(Approved by AICTE and Affiliated to JNTU, Kakinada)


Accredited by NBA for CSE, ECE&AGRI, Accredited by NAAC with A+
East Gonagudem, Rajanagaram, Rajamahendravaram, East Godavari District,
Andhra Pradesh, India - 533294.

(2024-25)
INTERNATIONAL SCHOOL OF TECHNOLOGY AND SCIENCES FOR WOMEN
(AN AUTONOMOUS INSTITUTION)
(Approved by AICTE and Affiliated to JNTU, Kakinada)
Accredited by NBA for CSE, ECE&AGRI, Accredited by NAAC with A+
East Gonagudem, Rajanagaram,
Rajamahendravaram, East Godavari District,
Andhra Pradesh, India– 533294.

DEPARTMENT OF COMPUTER SCIENCE &


ENGINEERING

CERTIFICATE

This is to Certify that the Project Work Entitled “Traffic Management based on Vehicle Counter
using AI” is the bonafide Work of P. Varshitha (216W1A05A9), R. Roopa (216W1A05B0), R.
Gishitha (216W105B1), S. Harika Siri
(216W5A05B2) Submitted to the faculty of Computer Science And Engineering, in Partial
fulfillment of the requirements for the award of the degree of BACHELOR OF
TECHNOLOGY in COMPUTER SCIENCE AND ENGINEERING from
International School of Technology And Sciences for Women, East Gonagudem,
Rajanagaram.

Dr. SIVA BALAN SETTU Mr. A. VENKATA RAJU


Project Guide Head of the Department
Associate Professor. Department of CSE,
Department of CSE, International School of Technology
International School of Technology And Sciences for Women,
And Sciences for Women, Rajanagaram -533294
Rajanagaram-533294

EXTERNAL EXAMINER
ACKNOWLEDGMENT

The satisfaction and euphoria that accompany the successful completion of any task would be
incomplete without the mention of people who made it possible, whose constant guidance and
encouragement crowned our efforts with success. It is a pleasant aspect that we have now the
opportunity to express my gratitude for all of them.

The first person we would like to thank our Guide Dr. Siva Balan Settu, Professor, CSE
Department, International School of Technology And Sciences (Women). His wide knowledge
and logical way of thinking have made a deep impression on us . His understanding,
encouragement and personal guidance have provided the basis for this project. He is a source of
inspiration for innovative ideas and his kind support is well known to all his students and
colleagues.

We would like to thank is my HOD Mr. A. Venkata Raju , Professor, CSE Department,
International School of Technology and Sciences (Women). His wide knowledge and logical
way of thinking have made a deep impression on us. His understanding, encouragement and
personal guidance have provided the basis for this project. He is a source of inspiration for
innovative ideas and his kind support is well known to all his students and colleagues.

We owe our sincere gratitude to our Principal Dr. Y. Rajasree Rao, International School of
Technology and Sciences (Women) for her constant and encouragement and timely suggestion
during academic period.

I am very much thankful to Technical Supporting Staff & Management who helped us for the
successful completion of the project.

By:

[Link]

216W1A05A9
R. ROOPA

216W1A05B0
R. GISHITHA

216W1A05B1
S. HARIKA SIRI

216W5A05B2
DECLARATION

We, P. Varshitha (216W1A05A9), R. Roopa (216W1A05B0), R. Gishitha


(216W105B1), S. Harika Siri (216W5A05B2) hereby declare that the project report
titled “A MULTI LAYERED ALGORITHM FOR UNAUTHORIZED ACCESS AND
ALERT SYSTEM” under the guidance of Dr Siva Balan Settu is submitted in partial
fulfillment of the requirements for the degree of Bachelors of Technology in
Computer Science And Engineering.

This is a record of bonafide work carried out by we and the results


embodied in this project have not been reproduced or copies from any source. The
results embodied in this project report have not been submitted to another University
or Institute for the award of any other degree or Diploma.

By:

[Link] 216W1A05A9
R. ROOPA 216W1A05B0
R. GISHITHA 216W1A05B1
S. HARIKA SIRI 216W5A05B2

IV
TABLE OF CONTENTS

[Link]. TITLE PAGE NO

1 CERTIFICATE II

2 DECLARATION IV

3 ABSTRACT VII

4 INTRODUCTION 8-15

5 LITERATURE REVIEW 16-20

6 PROBLEM STATEMENT AND METHODOLOGY 21-28

7 SYSTEM IMPLEMENTATION 29-34

8 SYSTEM STUDY 35-39

9 CODE 40-51

10 SYSTEM TESTING 52-54

11 SOFTWARE DESCRIPTION 55-67

12 CONCLUSION AND FUTURE SCOPE 68-69

13 REFERENCES 70-72

V
LIST OF FIGURES

FIGURE NO TITLE PAGE NO

1 SYSTEM ARCHITECTURE 26

2 USE CASE DIAGRAM 26

3 CLASS DIAGRAM 27

4 COMPONENT DIAGRAM 27

5 DEPLOYMENT DIAGRAM 28

VI
ABSTRACT

The ultimate aim is to provide the indoor security using the CCTV camera. The CCTV
Camera is a video camera that feeds or streams its image in real time; Webcams are known
for their low manufacturing cost and their high flexibility, making them the lowest-cost form
of video conversations and inefficient security issues. The system will detect suspicious
person i.e. unauthorized entry in a restricted place in a video by using AMD algorithm and
will start tracking once the user has specified a suspicious person by his/her on the display.
The main purpose of background subtraction is to generate a reliable background model and
thus significantly improve the detection of moving objects. Advanced Motion Detection
(AMD) achieves complete detection of moving objects. A camera is been connected inside
the monitoring room which produces alert messages on the account of any suspicious activity.
This system can be implemented by using the python software tool. Deep learning concepts
drastically decrease the time needed to arrange an exact map. Unauthorized access, which
means when someone enters into your device, system or your house without your permission
is said to be unauthorized access. Several methods are being used to handle these
unauthorized access problems. This study demonstrates to increase the capability of the
devices we have constructed. In existing system the model was developed by using
Convolutional Neural Network (CNN) which results in low efficiency and high complexity
so, we propose the model to eradicate this by using Harr Cascade, Local Binary Pattern (LBP)
algorithms in addition of CNN to increase the efficiency and decrease the complexity. The
input will be the face recognition of a person through camera and the output will be of two
types. Type1 is unauthorized access, which will alerts the people in the form of an alarm
sound at the surrounding premises and Email alert to the owner. Type2 is an authorized one
which will do nothing, it just displays an authorized message alert. The main motto of this
model is to detect the unauthorized persons and sends the buzz alert to the person whenever
any unknown person is trying to enter into our premises.

VII
CHAPTER 1

INTRODUCTION

1.1 Introduction of Project

The human quest for automating the detection of everyday occurrences has spurred the
development of intelligent surveillance systems, promising to streamline our lives while
keeping pace with advancing technology. This necessity has catalyzed the invention of
surveillance systems capable of autonomously detecting and analyzing activities, minimizing
the need for constant human monitoring.

In contemporary commercial settings, surveillance cameras are omnipresent, capturing digital


data that can be utilized for various purposes. However, to fully harness the potential of this
data, it is imperative to implement mechanisms for detecting moving objects within the
recorded footage without relying solely on human observation.

Real-time segmentation of moving regions within image sequences serves as a foundational


component in many vision systems. Video surveillance practices can range from manual,
where human analysts scrutinize the footage, to semi-autonomous systems, which involve
some level of automated processing but still require human intervention, such as basic motion
detection triggering further analysis by experts.

Fully-autonomous surveillance systems represent the pinnacle of this evolution, operating


without human intervention. These systems handle both low-level tasks, like motion detection
and tracking, as well as high-level decision-making processes such as abnormal event
detection and gesture recognition.

Automated object classification and tracking are paramount features of modern video
surveillance systems, alleviating the impracticality of extended human monitoring. These
systems not only detect moving objects but also categorize them into predefined classes,
enabling a deeper understanding of their behaviors and interactions within the environment.

8
In conclusion, the evolution of intelligent surveillance systems represents a significant
technological advancement, offering unprecedented capabilities in automated detection,
analysis, and categorization of visual data. By leveraging the power of artificial intelligence,
these systems empower us to enhance safety, optimize operations, and navigate the
complexities of modern-day surveillance challenges.

1.1.1 Introduction of Domain

Deep Learning:

In the realm of statistics, Deep Learning is defined as an application of artificial intelligence


aimed at leveraging available information through algorithms to process or assist in
processing statistical data. While Deep Learning integrates concepts of automation, it still
necessitates human guidance. One of the distinguishing features of Deep Learning is its
emphasis on achieving a high level of generalization, enabling systems to perform effectively
on unseen data instances.

Deep learning represents a relatively novel discipline within Computer Science, offering a
suite of data analysis techniques. While some of these techniques are rooted in well-
established statistical methods like logistic regression and principal component analysis, many
others diverge from traditional statistical approaches.

In classical statistical methodologies, the typical approach involves identifying a specific


probabilistic model that best fits observed data within a class of related models. Conversely,
Deep Learning techniques focus on finding models that optimize data fitting, albeit without
the constraint of being limited to probabilistic models.

A notable advantage of Deep Learning over traditional statistical methods is its freedom from
the requirement of underlying probabilistic models. Although certain Deep Learning
techniques may incorporate probabilistic elements, classical statistical methods often face
limitations, particularly in the era of Big Data. With data sources becoming increasingly
intricate and multifaceted, the task of prescribing probabilistic models that accurately capture
relationships among variables from diverse data sources can prove exceedingly challenging, if
not unfeasible.

9
Deep Learning offers a broader and more flexible array of alternative analysis methods,
potentially better suited to the complexities of modern data sources. For statistical agencies, it
is crucial to explore the potential integration of Deep Learning techniques into their
methodologies, assessing whether these techniques may better fulfill future needs compared to
traditional statistical approaches. This exploration could lead to enhanced capabilities in
handling and analyzing the vast and diverse datasets characteristic of contemporary data
environments.

CLASSES OF DEEP LEARNING

Deep learning techniques can be broadly categorized into two main classes: Supervised Deep
Learning and Unsupervised Deep Learning.

A. Supervised Deep Learning:

Supervised learning involves training a model on labeled data, where the input and output
variables are known. Examples of supervised deep learning techniques include Logistic
Regression and Support Vector Machines (SVM).

1. Logistic Regression (Statistics): In logistic regression, a binary response variable and


multiple predictor variables are observed for a set of observation units, known as training
data. The goal is to predict or classify the response variable based on the predictors. The
model assumes a Bernoulli distribution for the response variable and establishes a linear
relationship between the predictors and the log-odds of the response. Coefficients of this
linear function are optimized using maximum likelihood estimation to fit the model to the
data.

2. Support Vector Machines (SVM) (Deep Learning): SVM is a non-statistical supervised


deep learning technique used for classification tasks. Unlike logistic regression, SVM
operates on the principles of geometry rather than probability theory. It seeks to find the
hyperplane in the predictor space that best separates data points with different class labels.
The optimization problem in SVM involves finding the hyperplane with maximum margin,
providing robust classification performance.

Other examples of supervised deep learning techniques include decision trees, neural
networks, and Bayesian networks, each with its unique approach to modelling and predicting
outcomes.

10
B. Unsupervised Deep Learning:

Unsupervised learning involves training models on unlabeled data, where only input variables
are provided without corresponding output labels. Examples of unsupervised deep learning
techniques include Principal Component Analysis (PCA) and Cluster Analysis.

1. Principal Component Analysis (PCA) (Statistics): PCA is a statistical technique used to


reduce the dimensionality of data by finding orthogonal axes along which the maximum
variance is captured. It aims to summarize high-dimensional data by projecting it onto a
lower- dimensional subspace while retaining as much variance as possible.

2. Cluster Analysis (Deep Learning): Cluster analysis is a non-statistical unsupervised deep


learning technique used to identify inherent grouping structures within data. It partitions data
points into clusters based on similarities or distances between them. The goal is to uncover
patterns or relationships among data points without prior knowledge of class labels.

Another example of unsupervised deep learning is association analysis, which aims to


discover co-occurrence patterns among items in datasets.

In summary, supervised and unsupervised deep learning techniques offer powerful tools for
extracting insights and making predictions from data, with applications across various
domains including image recognition, natural language processing, and anomaly detection.

1.1.2 Image Enhancement:

Image enhancement is a critical stage in digital image processing, aiming to improve the
usefulness and quality of images. This process involves highlighting relevant details,
removing noise, and ultimately making the image visually appealing. There are two main
categories of image enhancement techniques: spatial domain and frequency domain
techniques.

1. Spatial Domain Techniques: Spatial domain techniques directly manipulate image pixels.
These methods operate on the spatial domain representation of the image, making adjustments
to individual pixel values. Spatial domain techniques are commonly used for tasks such as
contrast stretching, histogram equalization, and spatial filtering.

11
2. Frequency Domain Techniques: Frequency domain techniques are based on modifying the
Fourier or wavelet transform of the image. These methods involve transforming the image
into the frequency domain, where operations such as filtering and enhancement are
performed. Frequency domain techniques are particularly useful for tasks such as smoothing,
sharpening, and noise reduction.

When images contain unwanted information, such as noise, it becomes necessary to perform
denoising. Denoising is typically carried out in two stages: noise detection and noise removal.
Noise in images can originate from various sources, including sensors, environmental
conditions (such as rain or snow), and transmission through noisy channels.

Common types of noise include:

Impulsive Noise: Also known as salt-and-pepper noise, impulsive noise appears as random
bright or dark pixels scattered throughout the image.

Additive White Gaussian Noise (AWGN):AWGN is a type of noise characterized by its


Gaussian distribution and constant power spectral density. It appears as a uniform, random
interference in the image.

Periodic Noise: This type of noise exhibits a regular, repeating pattern in the image and is
often caused by factors such as electrical interference or sensor defects.

Denoising techniques aim to address these different types of noise to improve the overall
quality of the image. Effective denoising helps prevent visual unpleasantness, improves
compression efficiency, and enhances the accuracy of image analysis algorithms.

In summary, image enhancement and denoising play crucial roles in digital image processing,
ensuring that images are of high quality and suitable for various applications across industries
such as medical imaging, surveillance, and remote sensing. By employing spatial and
frequency domain techniques, noise can be effectively detected and removed, leading to
improved visual clarity and usability of the images.

12
1.1.3 Digital Image Processing:

Under the umbrella of Digital Image Processing, two primary research paths have emerged.
The first path revolves around methods aimed at determining the authenticity of an image,
particularly whether it was captured by the device it claims to have been acquired with.

This involves conducting ballistic analyses to identify the specific device responsible for
capturing the image or, at the very least, to rule out devices that could not have captured it
.The historical trajectory of a digital image can be conceptualized as comprising three main
phases: acquisition, coding, and editing. Techniques falling under the purview of image
source device identification focus on examining these phases to ascertain the true origin of an
image. This includes analyzing the unique characteristics introduced during acquisition by
different devices. In contrast, the second research path aims to uncover traces of semantic
manipulation, such as forgeries, by scrutinizing inconsistencies in natural image statistics.
These methods delve into the underlying statistical properties of images to detect alterations
or manipulations that may have been made to deceive viewers. Digital image processing
enables the enhancement of image features relevant to a particular application while
suppressing irrelevant details. This allows for the extraction of useful information about the
scene depicted in the image. Images are generated by various physical devices, including
cameras, x-ray machines, electron microscopes, radar systems, and ultrasound devices, and
serve diverse purposes across entertainment, medical, business, industrial, military, civil,
security, and scientific domains.

The primary objective across these applications is to enable observers, whether human or AI,
to extract pertinent information from the images. However, raw images often require
processing to optimize their suitability for this purpose. This processing, known as image
enhancement, involves refining the visual quality of the image and enhancing its
interpretability for subsequent analysis or utilization.

In industrial contexts, for instance, raw images may not provide the necessary clarity or detail
required for effective decision-making. Therefore, image enhancement techniques are
employed to improve the visual quality and extract valuable information from the images This
This underscores the importance of image processing in various sectors where accurate
interpretation of visual data is critical for decision-making and problem-solving.

13
1.1.4 Image Analysis:

Image enhancement, carried out by an observer to extract information from images, is termed
image analysis. The distinction between enhancement and analysis lies in their respective
outputs: images versus scene information. Each presents unique challenges and employs
distinct methods. Enhancement historically involved chemical, optical, and electronic means
to improve image quality. Conversely, analysis has predominantly relied on human
interpretation, with increasing electronic assistance. Digital image processing, a subset of the
electronic domain, converts images into arrays of small integers known as pixels, representing
physical quantities such as scene radiance. These digital representations are stored in memory
and processed by computers or other digital hardware. Digital image processing, whether
enhancing images for human observers or performing autonomous analysis, offers several
advantages, including cost-effectiveness, speed, and flexibility. The declining cost and
improving performance of personal computers have made digital image processing the
predominant method. This evolution has democratized image processing, making it accessible
to a wider audience and enabling various applications across industries. Moreover, the
integration of advanced algorithms and machine learning techniques has further enhanced the
capabilities and efficiency of digital image processing systems.

Objective of the Problem

The domain of possibility and information programs focuses on advancing security techniques
to address challenges in various applications, particularly in repeated aim detection scenarios.
The primary objective of computerized surveillance systems is to augment human operators in
prospect investigation and event categorization by autonomously detecting objects and
analysing their actions using computer vision, pattern recognition, and signal processing
techniques. This review highlights several advancements in these fields, emphasizing that
achieving a practical end-to-end surveillance system remains a challenging task due to
numerous real-world challenges. Despite these challenges, advancements in computing
technology have made it economically and technically feasible to adopt multi-camera and
multi-modal structures, meeting the requirements of efficient surveillance systems in a wide
range of security applications such as safeguarding important buildings and city surveillance.

14
Visual surveillance has emerged as a dynamic research area within pattern analysis and
artificial intelligence, owing to its critical role in supporting surveillance intelligence and law
enforcement agencies in combating criminal activities.

The primary objective of visual surveillance systems is to detect abnormal object behaviours
and trigger alarms when such behaviours are detected, often utilizing advanced motion
detection (AMD) algorithms. These advancements underscore the importance of continued
research and development in the field of surveillance technology to address evolving security
challenges and enhance public safety. By leveraging cutting-edge technologies and
interdisciplinary approaches, visual surveillance systems can play a pivotal role in ensuring
security and mitigating criminal activities in various environments.

1.2 Scope of the project

Video monitoring has long been utilized to ensure security in sensitive indoor areas such as
banks, department stores, shopping malls, offices, and homes. This paper presents a
framework designed to facilitate real-time detection of humans in a video stream captured by
a static camera. At each stage of the processing chain, which takes raw images of the stream
as input and ultimately outputs the identities of individuals, we propose an Advanced Motion
Detection (AMD) algorithm.

The AMD algorithm comprises three significant modules: background modeling (BM), alarm
trigger (AT), and object extraction (OE), which are well-suited for modern surveillance
systems. This algorithm operates in real-time and offers efficient accuracy in detecting
suspicious activities. Automating suspicious activity detection can significantly reduce error
rates and enhance overall security effectiveness.

By integrating these modules into a cohesive framework, the system can effectively identify
and respond to potential security threats in real-time, thus improving the overall safety and
security of monitored environments. Furthermore, the automation of suspicious activity
detection reduces the burden on human operators and enhances the efficiency and reliability
of surveillance systems.

15
CHAPTER 2

LITERATURE REVIEW

2.1 Detection of suspicious activity and estimate of risk from human behavior shot by
surveillance camera Miwa Takai IEEE 2023.

In these days, surveillance camera system prevails as a security system at high speed because
this system can monitor from remote places using Web camera attached to video monitor by
network. Additionally, digital equipment such as Web camera, and hard disk drive are mass-
produced, and are sold at low price. And, performance gain of these digital equipment
improves at a rapid rate. Current surveillance camera system shows dynamic images from
some oversight areas shot by multiple Web cameras at the same time. Then, this system
makes observer's mind and body tired because he/she has to watch enormous number of
dynamic images been constantly updated. Moreover, this system has a serious problem, which
is an observer slips over predictor of crime. This study extracts Motion Region from moving
person, and measures Motion Quantity for measuring his/her active state. And, this proposal
method finds the detecting point of suspicious activity, and estimates the degree of risk of the
suspicious activity.

2.2 Automated Invigilation System for Detection of Suspicious Activities during


Examination Md Adil; Rajbala Simon; Sunil Kumar Khatri IEEE 2023.

Cheating and abnormal activities like- whispering, impersonation or hand contact are widely
involved in offline examination around the globe, this hinders the integrity and morality of
fair conduction of examination. Video Surveillance systems embeds image and video
processing algorithms to monitor, analyse and process various activities and even detection of
crime, suspicious activities. The purpose of this research is to design a robust video
surveillance system model to monitor and analyse activities during examination, this will
allow the academic institutes to detect and identity unfair or suspicious activities during
examination. This system model will use automated video as feed to monitor students
activities during examination in real-time. We have discussed about various video analytics or
video processing and image processing methods and tools involved in surveillance model.

16
2.3 Self-powered event-triggered wireless sensor network for monitoring sabotage
activities Chuan Dong; Suiqiong Li; Mengyang Li; Qisheng He; Dacheng Xu; Xinxin Li
IEEE 2023.

A self-powered event-triggered wireless sensor network was developed for monitoring


sabotage activities. The network has the capability of identifying suspicious activities and
automatically sending out alarming signals. The sensor network consists of self-powered
wireless alarming sensor nodes (SWASNs), router nodes, receiver nodes, GSM network and
PC terminal. The SWASN is powered by a novel vibration-threshold triggered energy
harvester (VTT-EH), which generates significant electric energy to power the sensor node
only when the input vibration amplitude excesses a certain threshold. With the event
identification capability, the SWASN sends out alarming signals to router node if sabotage
activity occurs. The alarming signal is then transmitted to the receiver node and the control
center through GSM network. The GSM network is used in the proposed network to achieve
long distance transmission and the capability of handling large amount of sensor nodes over
large areas. The developed sensor network was tested. The results show that the designed
function was realized. The proposed sensor network can be used in various applications of
activity monitoring in the field.

2.4 Deep Learning Approach for Suspicious Activity Detection from Surveillance Video
C.V Amrutha; C. Jyotsna; J. Amudha IEEE 2023.

Video Surveillance plays a pivotal role in today's world. The technologies have been
advanced too much when artificial intelligence, Deep learning and deep learning pitched into
the system. Using above combinations, different systems are in place which helps to
differentiate various suspicious behaviors from the live tracking of footages. The most
unpredictable one is human behaviour and it is very difficult to find whether it is suspicious or
normal. Deep learning approach is used to detect suspicious or normal activity in an academic
environment, and which sends an alert message to the corresponding authority, in case of
predicting a suspicious activity.

Monitoring is often performed through consecutive frames which are extracted from the
video. The entire framework is divided into two parts. In the first part, the features are
computed from video frames and in second part, based on the obtained features classifier
predict the class as suspicious or normal.

17
2.5 Wireless Real Time Suspicious Activity Detection using Smart Glass Shefali
Sarang; Harshal Shinde; Vaishnavi Raut; Shubham Sonje; Gargi Phadke IEEE 2023.

Today we live in a less secure world. That being said we are constantly under some threat, be
it accidents on road or robbery etc. There are number of security systems which are installed
to tackle these problems. Instead they record video and consume memory. It does not give any
implication about the incident. To tackle these problems a real time suspicious activity
detection system should be developed. This system will have advantage over conventional
system as it will continuously monitor the frame from particular camera. This can be
implemented in any field using less amount of hardware. The system which we are designing
is used to monitor the events taking place in frame of camera using image processing. In this
paper we are using a Raspberry Pi as our main processor to which camera will be interfaced.

2.6 Detection of User Cluster with Suspicious Activity in Online Social Networking Sites
A. Sharath Kumar; Sanjay Singh IEEE 2023.

Online social networking sites such as Facebook and Google+ among others are the great way
to be in touch with our near and dear ones. Nonetheless, the power of social networking sites
can be exploited for the purpose of illegal activities such as planning terrorism related
activities or spreading some sorts of hate message in the society. So if there is systems which
can identify such activities and the persons involved, then that system will prove to be a boon
for the law enforcement people. This paper proposes a system for detection of the sentiments
in online messages and comments exchanged over social networking and blogging sites,
which monitors communication between users and identify the messages of individuals who
exhibits anomalies behavior over time. The proposed system is also able to identify group of
people who are discussing about same topics which may be about a suspicious activity

18
2.7 Research on Intelligent Video Surveillance techniques for suspicious activity
detection critical review Garima Mathur; Mahesh Bundele IEEE 2023.

Surveillance denotes close observation and monitoring of behavior, activities, or other


dynamic information, of people or objects for the purpose of influencing, managing, directing,
or protecting them. With advancement in technology and emerging of various intelligent
prediction techniques, it has now become possible to imbibe the traditional video surveillance
with intelligence to identify or take decision according to the scenarios. Intelligent video
surveillance system (IVS) based on image recognition is widely employed to effectively avert
crimes and provide public security. Due to the high complexity of processing real time data
and analysis/understanding of image contents, a well-developed user friendly and cost
effective product is not present for use. This paper is an outcome of comparative analysis of
extracts drawn from literature review of 57 IEEE papers ranging from year 1977 to the year
2015, carried out to understand the suspicious activity detection methodologies used for
detecting abnormal human behavior, tracing abandoned object, or unattended baggage etc.,
which led to an extensive comparison between various proposed methods. Many technologies,
mostly based on intelligent techniques like Neural Systems, Fuzzy Logic, Support Vector
Deep, Genetic Algorithm etc. emerged out as basis for intelligence in such systems. The
outcome of the review is presented in form of various findings, which includes techniques and
methods used to solve particular research problem, along with their strengths and weaknesses
and the scope for the future work in the area.

2.8 Surveillance System for Detection of Suspicious Human Activities at War Field P. A.
Dhulekar; S.T. Gandhe; Nachiket Sawale; Vikas Shinde; Sunil Khute IEEE 2023.

War field surveillance system plays vital role in security of every Nation. Major problems
related are surveillance at national borders. Manual monitoring is relatively difficult in case of
the borders where the area is too big; specifically, during night the majority of the attacks are
executed by rivals where the human vision is not capable to identify enemy location. Therefor
intelligent system needs to be developed which will automatically identify survival of enemy
in less light situation or night. We put forward intelligent war field surveillance system consist
of raspberry pi processor interfaced with night vision camera capable of sensing environment,
intelligent decision making, commanding capability and and performing action on the
environment. The Internet of things is used to inform concern authority about enemy status.

19
This system includes night vision camera and raspberry pi module which can transmit videos
of the war field sequentially to prevent any hurt and loss to human life. The system will be
used as proper Deep for the defence sector to decrease the loss of human life and also useful
to decrease infiltrations at border regions. It works on the principle of optical flow algorithm
for movement detection. The developed algorithm is implemented in real time by motion
based moving object detection method.

2.9 Human activities monitoring at bus stops Gasserm G; N. Bird; O. Masoud; N.


Papanikolopoulos IEEE 2023.

We introduce a vision-based system to monitor for suspicious human activities at a bus stop.
The system currently examines for drug dealing activity. To accomplish this goal, the system
must measure how long individuals loiter around the bus stop. To facilitate this, the system
must track individuals from the video feed, identify them, and keep a record of how long they
spend at the bus stop. The system is broken into three distinct portions: background
subtraction, object tracking, and human recognition. The background subtraction and object
tracking modules use off-the-shelf algorithms and are shown to work well following people as
they walk around a bus stop. The human recognition module segments the image of an
individual into three portions corresponding to the head, torso, and legs. Using the median
color of each of these regions, two people can be quickly compared to see if they are the same
person.

2.10 A Review on Abnormal Activity Detection Methods; Pushpendra Kumar


Pateriya; Devinder Kaur; Mritunjay Kumar Rai IEEE 2023.

Abnormal activity recognition and its detection becomes a major task in surveillance videos.
In the context of security purposes, it becomes more challenging to identify the abnormal
events or activities in video surveillance. Surveillance closely observes, monitors and identify
the behaviour of any object like people, suspicious thing or any abnormal activity.
Technology is increases very fast, it becomes easier to identify and detect the abnormal
activities. There are a lot of techniques and methods are available in field of detection of
abnormal activities. In this paper, we discuss about the various methods and techniques and
discuss about their advantages and disadvantages. And also compare these technologies based
upon their performance. In related work, there are many techniques like Spatio-temporal
Saliency Detection, Graph Formulation, Oriented GMM.
20
CHAPTER 3

PROBLEM STATEMENT AND METHODOLOGY

3.1 PROBLEM DEFINITION

Super-resolution imaging (SR) is a technique aimed at enhancing the resolution of imaging


systems. Particularly, single-image super-resolution involves transforming a low-resolution
(LR) image into a high-resolution (HR) one, thereby improving image quality. This technique
finds applications in various fields where enhanced image quality is desired .In recent years,
super-resolution has gained popularity in image processing, with a particular focus on
biometric palm images. Several methods have been evaluated to enhance the quality of these
images by increasing their resolution.

However, despite its potential benefits, the existing system faces several challenges:

1. Low Accuracy Rate in Classifying Moving Humans: The current system exhibits
insufficient accuracy in accurately classifying moving humans within input videos. This
limitation hampers its effectiveness in surveillance and security applications.

2. Increased Time Consumption: Implementing super-resolution methods often requires

significant computational resources and time. The current system suffers from prolonged
processing times, which can impede real-time applications and efficiency.

3. Limited Applicability Across Datasets: Certain datasets may not be compatible with the

existing super-resolution techniques, limiting the system's versatility and applicability.

4. High Noise Ratio .The presence of noise in the input images poses a significant challenge
in achieving accurate super-resolution results. The current system struggles to effectively
handlehigh noise levels, leading to degraded output quality.

Addressing these challenges is crucial for advancing super-resolution techniques and


enhancing their practical utility in various domains, including biometrics, surveillance, and
medical imaging. By developing more robust and efficient algorithms, researchers can
overcome these limitations and unlock the full potential of super-resolution technology.
21
3.2 METHODOLOGY

3.2.1 Existing system

Convolution Neural Network (CNN):

In deep learning, a convolutional neural network (CNN, or ConvNet) is a class of deep


neural networks, most commonly applied to analyzing visual imagery. They are also known
as shift invariant or space invariant artificial neural networks (SIANN), based on their
shared-weights architecture and translation invariance characteristics. They have applications
in image and video recognition, recommender systems, image classification, Image
segmentation, medical image analysis, natural language processing, brain-computer
interfaces, and financial time series.

CNNs are regularized versions of multilayer perceptrons. Multilayer perceptrons usually


mean fully connected networks, that is, each neuron in one layer is connected to all neurons in
the next layer. The "fully-connectedness" of these networks makes them prone to overfitting
data. Typical ways of regularization include adding some form of magnitude measurement of
weights to the loss function. CNNs take a different approach towards regularization: they take
advantage of the hierarchical pattern in data and assemble more complex patterns using
smaller and simpler patterns. Therefore, on the scale of connectedness and complexity, CNNs
are on the lower extreme .Convolutional networks were inspired by biological processes in
that the connectivity pattern between neurons resembles the organization of the animal visual
cortex. Individual cortical neurons respond to stimuli only in a restricted region of the visual
field known as the receptive field. The receptive fields of different neurons partially overlap
such that they cover the entirevisual field.

CNNs use relatively little pre-processing compared to other image classification algorithms.
DRAWBACKS OF EXISTING SYSTEM
1. Poor image resolution
2. Less Accuracy
3. Poor lighting and low contrast
4. Higher Computational Cost
5. Lack of standards
6. More time consuming process

22
3.2.2 ProposedSystem

Local Binary Pattern

(LBP)

Local binary patterns (LBP) is a type of visual descriptor used for classification in computer
vision. LBP is the particular case of the Texture Spectrum model proposed in 1990. LBP was
first described in 1994. It has since been found to be a powerful feature for texture
classification; it has further been determined that when LBP is combined with the Histogram
of oriented gradients (HOG) descriptor, it improves the detection performance considerably
on some datasets. A comparison of several improvements of the original LBP in the field of
background subtraction was made in 2015 by Silva et al. A full survey of the different
versions of LBP can be found in Bouwmans et al.

The LBP feature vector, in its simplest form, is created in the following manner:

 Divide the examined window into cells (e.g. 16x16 pixels for each cell).
 For each pixel in a cell, compare the pixel to each of its 8 neighbors (on its left-top, left-
middle, left-bottom, right-top, etc.). Follow the pixels along a circle, i.e. clockwise or
counter-clockwise.
 Where the center pixel's value is greater than the neighbor's value, write "0". Otherwise,
write "1". This gives an 8-digit binary number (which is usually converted to decimal for
convenience).
 Compute the histogram, over the cell, of the frequency of each "number" occurring (i.e.,
each combination of which pixels are smaller and which are greater than the center). This
histogram can be seen as a 256-dimensional feature vector.
 Optionally normalize the histogram.
 Concatenate (normalized) histograms of all cells. This gives a feature vector for the entire
window.

The feature vector can now be processed using the Support vector machine, extreme learning
machines, or some other machine learning algorithm to classify images. Such classifiers can
be used for face recognition or texture analysis.

A useful extension to the original operator is the so-called uniform pattern,[8] which can be
23
used to reduce the length of the feature vector and implement a simple rotation invariant
descriptor.

24
This idea is motivated by the fact that some binary patterns occur more commonly in texture
images than others. A local binary pattern is called uniform if the binary pattern contains at
most two 0-1 or 1-0 transitions. For example, 00010000 (2 transitions) is a uniform pattern,
but 01010100 (6 transitions) is not. In the computation of the LBP histogram, the histogram
has a separate bin for every uniform pattern, and all non-uniform patterns are assigned to a
single bin. Using uniform patterns, the length of the feature vector for a single cell reduces
from 256 to 59. The 58 uniform binary patterns correspond to the integers 0, 1, 2, 3, 4, 6, 7,
8, 12, 14,
15, 16, 24, 28, 30, 31, 32, 48, 56, 60, 62, 63, 64, 96, 112, 120, 124, 126, 127, 128, 129, 131,
135, 143, 159, 191, 192, 193, 195, 199, 207, 223, 224, 225, 227, 231, 239, 240, 241, 243, 247,
248, 249, 251, 252, 253, 254 and 255.
Haar Cascade Algorithm

The first real-time face detector also used the Haar classifiers, which we are introducing here.
Finding objects in pictures and videos is done by a machine learning programme known as a
Haar classifier or a Haar cascade classifier.

Haar Cascade Algorithm Explanation:

This involves Four Stages that include:

Haar Features

Calculation Integral

Images Creation

Adaboost Usage

Cascading Classifiers Implementation

1. Haar Features Calculation: Gathering the Haar features is the first stage. Haar features
are nothing but a calculation that happens on adjacent regions at a certain location in a
separate detecting window. The calculation mainly includes adding the pixel intensities in
every region and between the sum differences calculation.

hese features can be difficult to determine for a large image. This is where integral
images come into play because the number of operations is reduced using the integral image.

25
2. Creating Integral Images

Without going into too much of the mathematics behind it (check out the paper if you’re
interested in that), integral images essentially speed up the calculation of these Haar features.
Instead of computing at every pixel, it instead creates sub-rectangles and creates array
references for each of those sub-rectangles. These are then used to compute the Haar features.

It’s important to note that nearly all of the Haar features will be irrelevant when doing object
detection, because the only features that are important are those of the object. However, how
do we determine the best features that represent an object from the hundreds of thousands of
Haar features? This is where Adaboost comes into play.

3. Adaboost Training

Adaboost essentially chooses the best features and trains the classifiers to use them. It uses a
combination of “weak classifiers” to create a “strong classifier” that the algorithm can use
to detect objects.

Weak learners are created by moving a window over the input image, and computing Haar
features for each subsection of the image. This difference is compared to a learned threshold
that separates non-objects from objects. Because these are “weak classifiers,” a large number
of Haar features is needed for accuracy to form a strong classifier.

4. Implementing Cascading Classifiers

The cascade classifier is made up of a series of stages, where each stage is a collection of
weak learners. Weak learners are trained using boosting, which allows for a highly accurate
classifier from the mean prediction of all weak learners.

Based on this prediction, the classifier either decides to indicate an object was found
(positive) or move on to the next region (negative). Stages are designed to reject negative
samples as fast as possible, because a majority of the windows do not contain anything of
interest.

It’s important to maximize a low false negative rate, because classifying an object as a non-
object will severely impair your object detection algorithm. A video below shows Haar
cascades in action. The red boxes denote “positives” from the weak learners.

26
3.3 SYSTEM ARCHITECTURE

3.4.1 USE CASE DIAGRAM

27
3.4.2 CLASS DIAGRAM

3.4.3 COMPONENT DIAGRAM

28
3.4.4 DEPLOYMENT DIAGRAM

29
CHAPTER 4

SYSTEM

IMPLEMENTATION

4.1 MODULE DESCRIPTION

There are 5 components in the system. They are

(i) Image Acquisition


(ii) Image Preprocessing
(iii) Image Segmentation
(iv) Feature Extraction
(v) Classification.

In Image Acquisition, real-time CCTV videos are captured. The captured video is converted
into images and is cropped to a specific size. The cropped RGB images are converted to
grayscale in Image Preprocessing. Image Segmentation is the third component. It consists of
segmenting the converted grayscale images using K means filtering. This helps to get rid of
problems like backgrounds, illumination of light, etc. Feature Extraction is extracting or
showing the portion of the segmented images so that classification becomes easy. The last
module includes the classification in which Tensor Flow and Support vector Deep is used.

1. Image Acquisition Image

Acquisition, the initial step in the process of gathering CCTV videos, encompasses the
collection of video footage from diverse sources, primarily CCTV cameras installed in public
locations.

In this phase, video recordings are systematically obtained from a wide array of surveillance
cameras strategically positioned across public spaces, including streets, transportation hubs,
commercial establishments, educational institutions, and government facilities. These
cameras serve as vigilant guardians, capturing visual data of activities unfolding in their
vicinity. 30
2. Image Preprocessing

Image preprocessing plays a crucial role in preparing data for machine learning tasks, and one
common technique is converting RGB images into grayscale images.

RGB images represent colors using three channels: red, green, and blue. On the other hand,
grayscale images combine these channels into a single channel, typically representing
intensity or brightness.

The conversion of RGB to grayscale is often employed to enhance datasets for machine
learning applications. Grayscale images simplify the data by removing color information,
which can help improve the accuracy of the results. By reducing the complexity of the data,
grayscale images can also aid in noise reduction and make the background more neutral,
allowing the model to focus on relevant features.

Moreover, converting images to grayscale can enhance brightness uniformity across images,
which is beneficial for consistency in analysis and interpretation.

In addition to grayscale conversion, data augmentation techniques are commonly used to


generate additional training data from existing datasets. This approach helps prevent
overfitting by exposing the model to a wider range of variations in the data. Data
augmentation techniques include transformations such as rotation, scaling, flipping, and
adding noise, among others.

Overall, image preprocessing techniques such as converting RGB to grayscale and data
augmentation play vital roles in improving the quality and diversity of training data for
machine learning models. These techniques contribute to more robust and accurate model
performance across various tasks, ranging from image classification to object detection and
beyond.

3. Image Segmentation

Image segmentation is a fundamental process in computer vision that involves dividing a


digital image into multiple segments or regions. The primary objective of image segmentation
is to simplify or alter the representation of the image in a manner that makes it more
interpretable and meaningful for subsequent analysis.

30
By breaking down the image into distinct segments, image segmentation helps differentiate
between objects of interest and their background or other surrounding elements. This is
particularly useful in applications where specific objects or regions within an image need to
be identified, analysed, or manipulated.

One commonly used method for segmenting grayscale images is the K-means clustering
algorithm. K-means segmentation involves partitioning the image into K clusters based on the
similarity of pixel values. The algorithm iteratively assigns each pixel to the cluster with the
nearest mean value, and then updates the cluster means based on the newly assigned pixels.
This process continues until convergence, resulting in the segmentation of the image into K
distinct regions.

By applying K-means segmentation to grayscale images, we can effectively partition the


image into meaningful regions based on pixel intensity values. This segmentation facilitates
further analysis and processing of the image, such as object detection, recognition, or
classification.

Overall, image segmentation plays a crucial role in computer vision tasks by enabling the
identification and delineation of objects or regions of interest within an image. Through
techniques like K-means segmentation, we can effectively extract meaningful information
from digital images, paving the way for a wide range of applications in fields such as medical
imaging, autonomous driving, remote sensing, and more.

4. Feature Extraction

Feature extraction is a crucial step in image processing and computer vision, particularly
following image segmentation. Once an image has been segmented into meaningful regions,
feature extraction involves identifying and extracting relevant information or characteristics
from these regions to facilitate subsequent analysis or classification tasks.

The primary objective of feature extraction is to transform the segmented objects or regions
into representations that effectively capture their main features and attributes. These features
may include shape, texture, color, or other visual properties that are discriminative and
informative for distinguishing between different objects or classes within the image.

31
Feature extraction is a fundamental component of many deep learning and computer vision
algorithms, as it enables the algorithm to learn meaningful representations directly from the
data. By extracting relevant features from segmented regions, the algorithm can better
understand and interpret the underlying patterns and structures present in the image.

Common techniques used for feature extraction include histogram-based methods, edge
detection, texture analysis, and various forms of feature descriptors such as SIFT (Scale-
Invariant Feature Transform) or HOG (Histogram of Oriented Gradients). These techniques
aim to capture distinctive characteristics of the segmented objects in a compact and
informative manner.

Overall, feature extraction plays a crucial role in image analysis and classification tasks by
transforming segmented regions into meaningful representations that facilitate accurate and
efficient interpretation by machine learning algorithms. By extracting relevant features, these
algorithms can effectively differentiate between objects or classes within an image, enabling a
wide range of applications in fields such as object recognition, image retrieval, and medical
image analysis.

5. Classification

In this project, we leverage the concept of Convolutional Neural Networks (CNNs), a


powerful method in the field of deep learning, particularly for image classification tasks.
CNNs are well- suited for analyzing visual data due to their ability to automatically learn
hierarchical representations from raw input data.

The final module of our system incorporates classification, where we employ TensorFlow, a
widely-used open-source library for numerical computation, particularly tailored for deep
learning applications. TensorFlow is known for its user-friendly Python interface, making it
accessible to developers of various skill [Link] of the key features of TensorFlow is its
capability to create dataflow graphs, which essentially describe how data moves through a
series of processing nodes. Each node in the graph represents a mathematical operation, while
the connections between nodes represent multidimensional data arrays, known as tensors.
This graph-based approach allows for efficient computation and optimization of complex
neural network architectures.

32
By leveraging TensorFlow's capabilities, we can implement deep learning algorithms,
including CNNs, with ease and efficiency. TensorFlow provides a rich set of tools and
functionalities for building, training, and deploying deep learning models, enabling
developers to focus on model architecture and experimentation rather than low-level
implementation [Link], by integrating TensorFlow into our system, we can harness
the power of deep learning for image classification tasks, leveraging CNNs to automatically
learn and extract relevant features from input images. This approach empowers our system to
effectively classify and analyze visual data, facilitating a wide range of applications in fields
such as computer vision, object recognition, and image understanding.

4.1 ALGORITHM OF PROPOSED WORK

1. Read the source image into input.

2. For pre-processing step, the input image is converted to GREY format from RGB format.

3. GREY format dataset is analyzed into red, green and blue plane which helps analyzing
each pixel individually.

4. Histogram is generated which helps in differentiating red, green and blue plane from
which net deterministic value for each pixel differentiation.

5. Training parameters are obtained from histogram differentiation which are integrated with
intelligence i.e. particle swarm optimization algorithm.

6. Various models for various planes are generated. Then parameters of pixels obtained from
histogram technique are compared with results.

7. A 3D matrix is obtained from results where each dimension refers to a particular


geological boundary.

8. Non pixel data generated from convolution is removed then it is integrated with DBN.

9. DBN decides the maxima and minima in convolution models supplied to it as input.

10. DBN technique integrates the similar color pattern on a particular pixel boundary of our
convolution model. Similarly it does for other dimension and our color pattern on that
particular image is generated which is our final output.

33
4.2 FLOWCHART

INPUT IMAGE

RGB TO GRAY IMAGE

CLUSTERING

FEATURE EXTR4 ACTION

CLASSIFICATION

34
CHAPTER 5

SYSTEM

STUDY

5.1 FEASIBILTY STUDY

In this phase of the project, a comprehensive feasibility analysis is conducted to assess the
viability of the proposed system and to formulate a business proposal outlining the project's
general plan and cost estimates. This analysis is crucial to ensure that the proposed system
aligns with the company's objectives and is financially viable.

To conduct the feasibility study, it is essential to understand the major requirements of the
system and the information needs of the stakeholders involved. Various methods are
employed to gather pertinent information, including:

Developing and administering questionnaires to stakeholders, such as potential users of the


information system, to understand their requirements and preferences.

Observing and monitoring users of the current system to identify their needs, as well as their
level of satisfaction or dissatisfaction with the existing system.

Collecting, examining, and analyzing documentation related to the operations of the current
system, including reports, procedures, manuals, and other relevant materials.

Modeling, observing, and simulating the work activities associated with the current system to
gain insights into its functioning and potential areas for improvement.

The goal of the feasibility study is to explore alternative information systems solutions,
evaluate their feasibility, and recommend the most suitable option for the organization.
Feasibility is assessed across several dimensions, including:

• ECONOMICAL FEASIBILITY
• TECHNICAL FEASIBILITY

• SOCIAL FEASIBILITY

• OPERATIONAL FEASIBILITY

By thoroughly assessing these feasibility components, the project team can make informed
decisions and develop a business proposal that outlines a viable plan for implementing the

35
proposed system while minimizing risks and maximizing benefits.

36
5.2 ECONOMICAL FEASIBILITY

The economic feasibility study is conducted to assess the financial implications of


implementing the system within the organization. Given the limited funds available for
research and development, it is crucial to ensure that expenditures are justified and that the
developed system remains within budgetary constraints. To achieve this, careful consideration
is given to the cost-effectiveness of the technologies and resources utilized in the project.

One key factor contributing to the economic feasibility of the system is the availability of free
or open-source technologies. By leveraging these readily accessible resources, the project
team can significantly reduce costs associated with software licensing and development tools.
This allows the organization to allocate its limited funds more efficiently towards the
customization and implementation of the system rather than expensive software investments.

Additionally, while some components of the system may require customization to meet
specific organizational requirements, the majority of technologies used are freely available.
This further contributes to cost savings and ensures that the project remains within budgetary
constraints.

By carefully managing expenses and prioritizing cost-effective solutions, the


organization can develop a system that delivers value without exceeding its financial
limitations.
Moreover, by keeping expenditures in check and maximizing the use of freely
available technologies, the economic impact of the system on the organization can be
optimized, ultimately leading to a more sustainable and financially viable solution.

5.3 TECHNICAL FEASIBILITY

The technical feasibility study focuses on evaluating the technical requirements of the system
to ensure that it does not place excessive demands on the available technical resources. It is
imperative that any system developed maintains a modest requirement, minimizing the need
for significant changes or upgrades to existing infrastructure. This approach helps to avoid
placing undue burden on the client and ensures smooth implementation and operation of the
system.

By conducting a thorough assessment of the technical aspects of the proposed system,


including hardware and software requirements, compatibility with existing systems, and
scalability, the project team can identify potential challenges and address them proactively.
37
The goal is to develop a solution that seamlessly integrates with the client's infrastructure and
minimizes disruptions to ongoing operations.

Additionally, the system should be designed with efficiency and optimization in mind to
maximize resource utilization and minimize performance bottlenecks. This may involve
adopting lightweight and scalable technologies, optimizing code and algorithms, and
implementing caching and load-balancing mechanisms where necessary.

Furthermore, the technical feasibility study considers factors such as system reliability,
security, and maintainability. The system should be robust enough to handle peak loads and
unexpected failures, while also providing adequate safeguards to protect against security
threats and vulnerabilities. Moreover, it should be designed with ease of maintenance and
future upgrades in mind to ensure long-term viability and sustainability.

By ensuring that the developed system has modest technical requirements and can be
seamlessly integrated into the client's existing infrastructure with minimal changes, the project
team can mitigate risks and uncertainties associated with implementation, thereby increasing
the likelihood of project success.

5.4 SOCIAL FEASIBILITY

The aspect of user acceptance is crucial in determining the success of the system
implementation. This involves not only ensuring that the system meets the functional
requirements but also focusing on user training and familiarity to promote acceptance and
adoption.

User acceptance hinges on the effectiveness of the methods employed to educate users about
the system and familiarize them with its functionalities. Training sessions should be
structured to empower users with the knowledge and skills needed to use the system
efficiently and effectively. These sessions should cover topics such as system navigation, data
input and retrieval, and troubleshooting common issues.

Moreover, it is essential to create a supportive environment where users feel comfortable and
confident in using the system. Users should not perceive the system as a threat but rather as a
valuable tool that enhances their work processes and productivity.

38
This can be achieved by emphasizing the benefits and advantages of the system and
highlighting how it addresses their needs and challenges.

Furthermore, fostering a culture of open communication and feedback is vital for promoting
user acceptance. Users should feel encouraged to provide constructive criticism and
suggestions for improvement, as they are the ultimate beneficiaries of the system. Their input
can provide valuable insights into areas where the system may need refinement or
enhancement, ultimately leading to a more user-friendly and effective solution.

By prioritizing user training, fostering confidence and acceptance, and embracing user
feedback, the project team can increase the likelihood of successful system adoption and
utilization. This approach not only enhances user satisfaction but also maximizes the system's
value and impact on organizational operations.

5.5 OPERATIONAL FEASIBILITY

User acceptance, a critical aspect of system implementation, relies on the ability, desire, and
willingness of stakeholders to utilize, support, and operate the proposed computer information
system. These stakeholders encompass various groups such as management, employees,
customers, and suppliers, each with unique perspectives and requirements.

Management stakeholders are interested in systems that align with organizational objectives,
enhance efficiency, and facilitate informed decision-making. They seek systems that provide
accurate and timely information to support strategic planning and resource allocation.

Employees, as end-users of the system, desire solutions that are easy to operate, intuitive, and
minimize the occurrence of errors. They value systems that streamline their workflows,
automate repetitive tasks, and enhance productivity. Training and support mechanisms are
crucial to ensure employees feel confident and competent in using the system effectively.

Customers, external stakeholders in many cases, expect systems that deliver high-quality
products and services, prompt responses to inquiries and requests, and personalized
experiences. A user-friendly system that enables seamless interactions and transactions
contributes to customer satisfaction and loyalty.

39
Suppliers, integral partners in the supply chain, require systems that facilitate efficient
communication, collaboration, and transaction processing. They seek reliable systems that
streamline procurement processes, manage inventory effectively, and ensure timely delivery
of goods and services.

Overall, stakeholders are interested in systems that fulfill their specific needs and
expectations, produce desired outcomes, and contribute to the overall objectives of the
organization. By prioritizing user-centric design, effective training and support, and
continuous improvement based on stakeholder feedback, organizations can enhance user
acceptance and maximize the success of system implementations. This approach fosters a
positive user experience, drives operational efficiency, and ultimately contributes to
organization success.

40
CHAPTER
6 CODE
import tkinter as tk

from tkinter import Message ,Text


import
cv2,os
import shutil
import csv
import numpy as np
from PIL import Image, ImageTk
import pandas as pd
import datetime
import time
import [Link] as ttk
import [Link] as
font

window = [Link]()

[Link]("FaceRecognizer")
dialog_title = 'QUIT'
dialog_text = 'Are you sure?'
#answer = [Link](dialog_title, dialog_text)

#[Link]('1280x720')
[Link](background='#59b57c')

#[Link]('-fullscreen', True)

window.grid_rowconfigure(0, weight=1)
window.grid_columnconfigure(0, weight=1)

41
#path = "[Link]”
#Creates a Tkinter-compatible photo image, which can be used everywhere Tkinter expects an
image object.

#img = [Link]([Link](path))

#The Label widget is a standard Tkinter widget used to display a text or image on the
screen. #panel = [Link](window, image = img)

#[Link](side = "left", fill = "y", expand = "no")

#cv_img = [Link]("[Link]")

#x, y, no_channels = cv_img.shape

#canvas = [Link](window, width = x, height =y

#[Link](side="left")

#photo = [Link](image = [Link](cv_img))

# Add a PhotoImage to the Canvas

#canvas.create_image(0, 0, image=photo, anchor=[Link])

#msg = Message(window, text='Hello, world!')

# Font is a tuple of (font_family, size_in_points, style_modifier_string)

message = [Link](window, text="Face Recognization" ,bg="#8dc3c9" ,fg="white" ,width=50


,height=3,font=('times', 30, 'italic bold'))

[Link](x=200, y=20)

lbl = [Link](window, text="Enter ID",width=20 ,height=2 ,fg="red" ,bg="#8d8fc9"

,font=('times', 15, ' bold ') )

[Link](x=400, y=200)

42
txt = [Link](window,width=20 ,bg="#8d8fc9" ,fg="red",font=('times', 15, ' bold '))

[Link](x=700, y=215)

lbl2 = [Link](window, text="Enter Name",width=20 ,fg="red" ,bg="#8d8fc9" ,height=2

,font=('times', 15, ' bold '))

[Link](x=400, y=300)

txt2 = [Link](window,width=20 ,bg="#8d8fc9" ,fg="red",font=('times', 15, ' bold ') )

[Link](x=700, y=315)

lbl3 = [Link](window, text="Notification : ",width=20 ,fg="red" ,bg="#8d8fc9" ,height=2

font=('times', 15, ' bold underline '))

[Link](x=400, y=400)

message=[Link](window,text="",bg="#8d8fc9",fg="red",width=30,height=2,

activebackground = "#8d8fc9" ,font=('times', 15, ' bold '))

[Link](x=700, y=400)

message2=[Link](window,text="",fg="red",bg="#8d8fc9",activeforeground=

"green",width=30 ,height=2 ,font=('times', 15, ' bold '))

[Link](x=700, y=650)

def email_send():

import smtplib
43
from [Link] import MIMEMultipart

from [Link] import MIMEText

from [Link] import MIMEBase

from email import encoders

fromaddr ="qrcode2611@[Link]"

toaddr =

'velpulabhanuprasad@[Link]' msg =

MIMEMultipart( )

msg['From'] = fromaddr

msg['To'] = toaddr

msg['Subject'] = "unknown person alert"

body = "Unknown Person Detected"

[Link](MIMEText(body, 'plain'))

filename = "[Link]"
attachment = open("[Link]", "rb")

p = MIMEBase('application', 'octet-stream')

p.set_payload((attachment).read())

encoders.encode_base64(p)

p.add_header('Content-Disposition', "attachment; filename= %s" % filename)

44
[Link](p)

45
s = [Link]('[Link]', 587)

[Link]()

[Link](fromaddr, "vhjj ckro lcdj hwec")

text = msg.as_string()

[Link](fromaddr, toaddr, text)

[Link]()

def clear():
[Link](0, 'end')
res = ""
[Link](text= res)

def clear2():
[Link](0, 'end')
res = ""
[Link](text= res)

def is_number(s):
try:
float(s)
return True
except ValueError:
pass
46
try:

import unicodedata
[Link](s)
return True
except (TypeError,
ValueError): pass
return False

def TakeImages():

Id=([Link]())

name=([Link]())

if(is_number(Id) and

[Link]()): cam =

[Link](0)

harcascadePath="haarcascade_frontalface_default.xml"

detector=[Link](harcascadePath)

sampleNum=0

while(True):

ret, img = [Link]()

gray= [Link](img,

cv2.COLOR_BGR2GRAY)

faces=[Link](gray,1.3,5)

for (x,y,w,h) in faces: [Link](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

[Link]("TrainingImage\"+name+"."+Id+'.'+str(sampleNum)+".jpg",

47
gray[y:y+h,x:x+w])

48
#display the frame

[Link]('frame',img)

#wait for 100 miliseconds

if [Link](100) & 0xFF == ord('q'):

break

# break if the sample number is morethan 100

elif sampleNum>60:

break

[Link]()

[Link]()

#res = "Images Saved for ID : " + Id +" Name : "+ name

row=[Id,name]

with open('Details\[Link]','a+')as

csvFile: writer = [Link](csvFile)

[Link](row)

[Link]()

[Link](text= res)

else:

if(is_number(Id)):

res = "Enter Alphabetical Name"

[Link](text= res)

if([Link]()):

res = "Enter Numeric Id"

[Link](text=res)

def TrainImages():

49
recognizer=cv2.face_LBPHFaceRecognizer.create()#recognizer=

[Link].LBPHFaceRecognizer_create()#$[Link]()

harcascadePath="haarcascade_frontalface_default.xml"

detector=[Link](harcascadePath)

faces,Id=getImagesAndLabels("TrainingImage")

[Link](faces, [Link](Id))

[Link]("TrainingImageLabel\[Link]")

res="Image Trained"#+",".join(str(f) for f in Id)

[Link](text= res)

def getImagesAndLabels(path):

#get the path of all the files in the folder

imagePaths=[[Link](path,f) for f in [Link](path)]

#print(imagePaths)

#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=[Link](imagePath).convert('L')

#Now we are converting the PIL image into numpy array

50
imageNp=[Link](pilImage,'uint8')

#getting the Id from the image

Id=int([Link](imagePath)[-1].split(".")[1])

# extract the face from the training image

sample [Link](imageNp)

[Link](Id)

return faces,Ids

def TrackImages():

Id=""

aa=""

date=""

timeStamp=""

recognizer=[Link].LBPHFaceRecognizer_create()#[Link]()

[Link]("TrainingImageLabel\[Link]")

harcascadePath="haarcascade_frontalface_default.xml"

faceCascade =

[Link](harcascadePath);

df=pd.read_csv("Details\[Link]")

cam=[Link](0)

font = cv2.FONT_HERSHEY_SIMPLEX

col_names = ['Id','Name','Date','Time']

#attendance = [Link](columns = col_names)

while True:

ret,im=[Link]()

51
gray=[Link](im,cv2.COLOR_BGR2GRAY)

52
faces=[Link](gray, 1.2,5)

for(x,y,w,h) in faces:

[Link](im,(x,y),(x+w,y+h),(225,0,0),2)

Id, conf =

[Link](gray[y:y+h,x:x+w]) if(conf <

50):

ts=[Link]()

date=[Link](ts).strftime('%Y-%m-%d')

timeStamp = [Link](ts).strftime('%H:%M:%S')

aa=[Link][df['Id'] == Id]['Name'].values

tt=str(Id)+"-"+aa

import playsound

#[Link]('beep.mp3',True)

#[Link][len(attendance)] =

[Id,aa,date,timeStamp]

else:

Id='Unknown'

tt=str(Id)

[Link]('[Link]',im)

import playsound

[Link]('sound.mp3',True)

email_send()

if(conf>75):

53
noOfFile=len([Link]("ImagesUnknown"))+1

[Link]("ImagesUnknown\Image"+str(noOfFile)+".jpg",im[y:y+h,x:x+w])

54
[Link](im,str(tt),(x,y+h),font,1,(255,255,255),2)

[Link]('im',im)

if([Link](1)==ord('q')):

break

[Link]()

[Link]()

#print(attendance)

res=attendance

[Link](text= res)

clearButton = [Link](window, text="Clear", command=clear ,fg="red" ,bg="#8d8fc9"

,width=20 ,height=2 ,activebackground = "Red" ,font=('times', 15, ' bold '))

[Link](x=950, y=200)

clearButton2 = [Link](window, text="Clear", command=clear2 ,fg="red" ,bg="#8d8fc9"

,width=20 ,height=2, activebackground = "Red" ,font=('times', 15, ' bold '))

[Link](x=950, y=300)

takeImg = [Link](window, text="Take Images", command=TakeImages ,fg="red"

,bg="#8d8fc9" ,width=20 ,height=3, activebackground = "Red" ,font=('times', 15, ' bold '))

[Link](x=200, y=500)

trainImg = [Link](window, text="Train Images", command=TrainImages ,fg="red" ,bg="#8d8fc9" ,width=20

,height=3, activebackground = "Red" ,font=('times', 15, ' bold '))

[Link](x=500, y=500)

trackImg =[Link](window, text="Track Images", command=TrackImages ,fg="red" ,bg="#8d8fc9" ,width=20

,height=3, activebackground = "Red" ,font=('times', 15, ' bold '))

[Link](x=800, y=500)

55
quitWindow = [Link](window, text="Quit", command=[Link] ,fg="red" ,bg="#8d8fc9" ,width=20

,height=3, activebackground = "Red" ,font=('times', 15, ' bold '))

[Link](x=1100, y=500)

[Link]

56
CHAPTER 7

SYSTEM

TESTING

The purpose of testing is to discover errors. Testing is the process of trying to discover every
conceivable fault or weakness in a work product. It provides a way to check the functionality
of components, sub assembles, assemblies and/or a finished product It is the process of
exercising software with the intent of ensuring that the Software system meets its
requirements and user expectations and does not fail in an unacceptable manner. There are
various types of test. Each test type addresses a specific testing requirement.

TYPES OF TESTS

7.1 Unit testing


Unit testing involves the design of test cases that validate that the internal program logic is
functioning properly, and that program inputs produce valid outputs. All decision branches
and internal code flow should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before integration. This is a
structural testing, that relies on knowledge of its construction and is invasive. Unit tests
perform basic tests at component level and test a specific business process, application, and/or
system configuration. Unit tests ensure that each unique path of a business process performs
accurately to the documented specifications and contains clearly defined inputs and expected
results.

7.2 Integration testing


Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the basic
outcome of screens or fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the combination of
components is correct and consistent. Integration testing is specifically aimed at exposing the
problems that arise from the combination of components

57
7.3 Functional test

Functional tests provide systematic demonstrations that functions tested are available as
specified by the business and technical requirements, system documentation, and user
manuals.

Functional testing is centered on the following items:

Valid Input : identified classes of valid input must be accepted.

Invalid Input : identified classes of invalid input must be

rejected. Functions : identified functions must be exercised.

Output : identified classes of application outputs must be

exercised. Systems/Procedures: interfacing systems or procedures must be

invoked.

Organization and preparation of functional tests is focused on requirements, key functions, or


special test cases. In addition, systematic coverage pertaining to identify Business process
flows; data fields, predefined processes, and successive processes must be considered for
testing. Before functional testing is complete, additional tests are identified and the effective
value of current tests is determined.

7.4 System Test

System testing ensures that the entire integrated software system meets requirements. It tests a
configuration to ensure known and predictable results. An example of system testing is the
configuration-oriented system integration test. System testing is based on process descriptions
and flows, emphasizing pre-driven process links and integration points.

7.5 White Box Testing White Box Testing is a testing in which in which the software
tester has knowledge of the inner workings, structure and language of the software, or at
least its purpose. It is purpose. It is used to test areas that cannot be reached from a black
box level.

7.6 Black Box Testing


Black Box Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. Black box tests, as most other kinds of tests,

58
must be written from a definitive source document, such as specification or requirements
document, such as specification or requirements document. It is a testing in which the
software under test is treated, as a black box. you cannot “see” into it.

59
7.7 Unit Testing:

Unit testing is usually conducted as part of a combined code and unit test phase of the
software lifecycle, although it is not uncommon for coding and unit testing to be conducted as
two distinct phases.

Test strategy and approach


Field testing will be performed manually and functional tests will be written in detail.

Test objectives

7.7.1 All field entries must work properly.

7.7.2 Pages must be activated from the identified link.

7.7.3 The entry screen, messages and responses must not be delayed.

Features to be tested

7.7.4 Verify that the entries are of the correct format

7.7.5 No duplicate entries should be allowed

7.7.6 All links should take the user to the correct page.

7.8 Integration Testing

Software integration testing is the incremental integration testing of two or more integrated
software components on a single platform to produce failures caused by interface defects. The
task of the integration test is to check that components or software applications, e.g.
components in a software system or – one step up – software applications at the company
level – interact without error.

Test Results: All the test cases mentioned above passed successfully. No defects encountered.

7.9 Acceptance Testing


User Acceptance Testing is a critical phase of any project and requires significant participation
by the end user. It also ensures that the system meets the functional requirements.

Test Results: All the test cases mentioned above passed successfully. No defects encountered.

60
CHAPTER 8

SOFTWARE DESCRIPTION

A. Python

Python is a remarkably powerful dynamic, object-oriented programming language that is used


in a wide variety of application domains. It offers strong support for integration with other
languages and tools, and comes with extensive standard libraries. To be precise, the following
are some distinguishing features of Python:

• Very clear, readable syntax.


• Strong introspection capabilities.
• Full modularity.
• Exception-based error handling.
• High level dynamic data types.
• Supports object oriented, imperative and functional programming styles.
• Embeddable.
• Scalable
• Mature
With so much of freedom, Python helps the user to think problem centric rather than language
centric as in other cases. These features makes Python a best option for scientific computing.

B. Open CV

Open CV is a library of programming functions for real time computer vision originally
developed by Intel and now supported by Willogarage. It is free for use under the open source
BSD license. The library has more than five hundred optimized algorithms. It is used around
the world, with forty thousand people in the user group. Uses range from interactive art, to
mine inspection, and advanced robotics. The library is mainly written in C, which makes it
portable to some specific platforms such as Digital Signal Processor. Wrappers for languages
such as C, Python, Ruby and Java (using Java CV) have been developed to encourage
adoption by a wider audience. The recent releases have interfaces for C++. It focuses mainly
on real- time image processing. Open CV is a cross-platform library, which can run on Linux,
Mac OS and Windows. To date, Open CV is the best open source computer vision library that
developers and researchers can think of.

61
C. Tesseract

Tesseract is a free software OCR engine that was developed at HP between 1984 and 1994.
HP released it to the community in 2005. Tesseract was introduced at the 1995 UNLV Annual
Test OCR Accuracy and is currently developed by Google released under the Apache
License. It can now recognize 6 languages, and is fully UTF8 capable. Developers can train
Tesseract with their own fonts and character mapping to obtain perfect efficiency.

8.1 ABOUT THE SOFTWARE “PYTHON”

Python is a high-level, interpreted, interactive and object-oriented scripting language. Python


is designed to be highly readable. It uses English keywords frequently where as other
languages use punctuation, and it has fewer syntactical constructions than other languages.

 Python is Interpreted − Python is processed at runtime by the interpreter. You do


not need to compile your program before executing it. This is similar to PERL and
PHP.

 Python is Interactive − You can actually sit at a Python prompt and interact with the
interpreter directly to write your programs.

 Python is Object-Oriented − Python supports Object-Oriented style or technique of


programming that encapsulates code within objects.

 Python is a Beginner's Language − Python is a great language for the beginner-level


programmers and supports the development of a wide range of applications from
simple text processing to WWW browsers to games.

HistoryofPython
Python was developed by Guido van Rossum in the late eighties and early nineties at the
National Research Institute for Mathematics and Computer Science in the Netherlands.

Python is derived from many other languages, including ABC, Modula-3, C, C++, Algol-68,
SmallTalk, and Unix shell and other scripting languages.

Python is copyrighted. Like Perl, Python source code is now available under the GNU
General Public License (GPL).

Python is now maintained by a core development team at the institute, although Guido van
Rossum still holds a vital role in directing its progress.

62
PythonFeatures
Python's features include −

 Easy-to-learn − Python has few keywords, simple structure, and a clearly defined
syntax. This allows the student to pick up the language quickly.

 Easy-to-read − Python code is more clearly defined and visible to the eyes.

 Easy-to-maintain − Python's source code is fairly easy-to-maintain.

 A broad standard library − Python's bulk of the library is very portable and cross-
platform compatible on UNIX, Windows, and Macintosh.

 Interactive Mode − Python has support for an interactive mode which allows
interactive testing and debugging of snippets of code.

 Portable − Python can run on a wide variety of hardware platforms and has the
same interface on all platforms.

 Extendable − You can add low-level modules to the Python interpreter. These
modules enable programmers to add to or customize their tools to be more
efficient.

 Databases − Python provides interfaces to all major commercial databases.

 GUI Programming − Python supports GUI applications that can be created and
ported to many system calls, libraries and windows systems, such as Windows MFC,
Macintosh, and the X Window system of Unix.

 Scalable − Python provides a better structure and support for large programs than
shell scripting.

Apart from the above-mentioned features, Python has a big list of good features, few are
listed below −

 It supports functional and structured programming methods as well as OOP.


 It can be used as a scripting language or can be compiled to byte-code for building
large applications.
 It provides very high-level dynamic data types and supports dynamic type checking.
 It supports automatic garbage collection.
 It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.
63
Python-EnvironmentSetup

Python is available on a wide variety of platforms including Linux and Mac OS X. Let's
understand how to set up our Python environment.

LocalEnvironmentSetup
Open a terminal window and type "python" to find out if it is already installed and which
version is installed.

 Unix (Solaris, Linux, FreeBSD, AIX, HP/UX, SunOS, IRIX, etc.)

 Win 9x/NT/2000

 Macintosh (Intel, PPC, 68K)

 OS/2

 DOS (multiple versions)

 PalmOS

 Nokia mobile phones

 Windows CE

 Acorn/RISC OS

 BeOS

 Amiga

 VMS/OpenVMS

 QNX

 VxWorks

 Psion

 Python has also been ported to the Java and .NET virtual machines

GettingPython
The most up-to-date and current source code, binaries, documentation, news, etc., is available
on the official website of Python [Link]

You can download Python documentation [Link] documentation is


available in HTML, PDF, and PostScript formats.

64
InstallingPython

Python distribution is available for a wide variety of platforms. You need to download only
the binary code applicable for your platform and install Python.

If the binary code for your platform is not available, you need a C compiler to compile the
source code manually. Compiling the source code offers more flexibility in terms of choice
of features that you require in your installation.

Here is a quick overview of installing Python on various platforms −

Unix and Linux Installation


Here are the simple steps to install Python on Unix/Linux machine.

 Open a Web browser and go to [Link]

 Follow the link to download zipped source code available for Unix/Linux.

 Download and extract files.

 Editing the Modules/Setup file if you want to customize some options.

 run ./configure script

 make

 make install

This installs Python at standard location /usr/local/bin and its libraries


at /usr/local/lib/pythonXX where XX is the version of Python.

Windows Installation
Here are the steps to install Python on Windows machine.

 Open a Web browser and go to [Link]

 Follow the link for the Windows installer [Link] file where XYZ is the
version you need to install.

 To use this installer [Link], the Windows system must support Microsoft
Installer 2.0. Save the installer file to your local machine and then run it to find out if
your machine supports MSI.

65
 Run the downloaded file. This brings up the Python install wizard, which is really
easy to use. Just accept the default settings, wait until the install is finished, and you
are done.

Macintosh Installation
Recent Macs come with Python installed, but it may be several years out of date.
See [Link] for instructions on getting the current version
along with extra tools to support development on the Mac. For older Mac OS's before Mac
OS X 10.3 (released in 2003), MacPython is available.

Jack Jansen maintains it and you can have full access to the entire documentation at his
website − [Link] You can find complete installation
details for Mac OS installation.

SettingupPATH
Programs and other executable files can be in many directories, so operating systems provide
a search path that lists the directories that the OS searches for executables.

The path is stored in an environment variable, which is a named string maintained by the
operating system. This variable contains information available to the command shell and
other programs.

The path variable is named as PATH in Unix or Path in Windows (Unix is case sensitive;
Windows is not).

In Mac OS, the installer handles the path details. To invoke the Python interpreter from any
particular directory, you must add the Python directory to your path.

SettingpathatUnix/Linux
To add the Python directory to the path for a particular session in Unix −

 In the csh shell − type setenv PATH "$PATH:/usr/local/bin/python" and press Enter.

 In the bash shell (Linux) − type export PATH="$PATH:/usr/local/bin/python" and


press Enter.

 In the sh or ksh shell − type PATH="$PATH:/usr/local/bin/python" and press Enter.

66
 Note − /usr/local/bin/python is the path of the Python directory

SettingpathatWindows
To add the Python directory to the path for a particular session in Windows −

At the command prompt − type path %path%;C:\Python and press Enter.

Note − C:\Python is the path of the Python directory

PythonEnvironmentVariables
Here are important environment variables, which can be recognized by Python −

[Link]. Variable & Description

1 PYTHONPATH

It has a role similar to PATH. This variable tells the Python interpreter where to
locate the module files imported into a program. It should include the Python
source library directory and the directories containing Python source code.
PYTHONPATH is sometimes preset by the Python installer.

2 PYTHONSTARTUP

It contains the path of an initialization file containing Python source code. It is


executed every time you start the interpreter. It is named as .[Link] in Unix
and it contains commands that load utilities or modify PYTHONPATH.

3 PYTHONCASEOK

It is used in Windows to instruct Python to find the first case-insensitive match in


an import statement. Set this variable to any value to activate it.

4 PYTHONHOME

It is an alternative module search path. It is usually embedded in the


PYTHONSTARTUP or PYTHONPATH directories to make switching module
libraries easy.

67
RunningPython
There are three different ways to start Python −

Interactive Interpreter
You can start Python from Unix, DOS, or any other system that provides you a command-
line interpreter or shell window.

Enter python the command line.

Start coding right away in the interactive interpreter.

$python # Unix/Linux
or
python% # Unix/Linux
or

C:> python # Windows/DOS

Here is the list of all the available command line options −

[Link]. Option & Description

1 -d

It provides debug output.

2 -O

It generates optimized bytecode (resulting in .pyo files).

3 -S

Do not run import site to look for Python paths on startup.

4 -v

verbose output (detailed trace on import statements).

68
5 -X

disable class-based built-in exceptions (just use strings); obsolete starting with
version 1.6.

6 -c cmd

run Python script sent in as cmd string

7 File

run Python script from given file

Script from the Command-line


A Python script can be executed at command line by invoking the interpreter on your
application, as in the following −

$python [Link] # Unix/Linux

or

python% [Link] # Unix/Linux

or

C: >python [Link] # Windows/DOS

Note − Be sure the file permission mode allows execution.

Integrated Development Environment


You can run Python from a Graphical User Interface (GUI) environment as well, if you
have a GUI application on your system that supports Python.

 Unix − IDLE is the very first Unix IDE for Python.

 Windows − PythonWin is the first Windows interface for Python and is an IDE with

69
a GUI.

70
 Macintosh − The Macintosh version of Python along with the IDLE IDE is available
from the main website, downloadable as either MacBinary or BinHex'd files.

If you are not able to set up the environment properly, then you can take help from your
system admin. Make sure the Python environment is properly set up and working perfectly
fine.

Note − All the examples given in subsequent chapters are executed with Python 2.4.3
version available on CentOS flavor of Linux.

We already have set up Python Programming environment online, so that you can execute all
the available examples online at the same time when you are learning theory. Feel free to
modify any example and execute it online.

Panda

Pandas is an open-source, BSD-licensed Python library providing high-performance, easy-to-


use data structures and data analysis tools for the Python programming language. Python
with Pandas is used in a wide range of fields including academic and commercial domains
including finance, economics, Statistics, analytics, etc. In this tutorial, we will learn the
various features of Python Pandas and how to use them in practice.

Audience
This tutorial has been prepared for those who seek to learn the basics and various functions
of Pandas. It will be specifically useful for people working with data cleansing and analysis.
After completing this tutorial, you will find yourself at a moderate level of expertise from
where you can take yourself to higher levels of expertise.

Prerequisites
You should have a basic understanding of Computer Programming terminologies. A basic
understanding of any of the programming languages is a plus. Pandas library uses most of the
functionalities of NumPy. It is suggested that you go through our tutorial on NumPy before
proceeding with this tutorial. You can access it from Pandas is an open-source Python
Library providing high-performance data manipulation and analysis tool using its powerful
data structures. The name Pandas is derived from the word Panel Data – an Econometrics
from Multidimensional data.

71
In 2008, developer Wes McKinney started developing pandas when in need of high
performance, flexible tool for analysis of data.

Prior to Pandas, Python was majorly used for data munging and preparation. It had very little
contribution towards data analysis. Pandas solved this problem. Using Pandas, we can
accomplish five typical steps in the processing and analysis of data, regardless of the origin
of data — load, prepare, manipulate, model, and analyze.

Python with Pandas is used in a wide range of fields including academic and commercial
domains including finance, economics, Statistics, analytics, etc.

KeyFeaturesofPandas

 Fast and efficient DataFrame object with default and customized indexing.

 Tools for loading data into in-memory data objects from different file formats.

 Data alignment and integrated handling of missing data.

 Reshaping and pivoting of date sets.

 Label-based slicing, indexing and subsetting of large data sets.

 Columns from a data structure can be deleted or inserted.

 Group by data for aggregation and transformations.

 High performance merging and joining of data.

 Time Series functionality.

Standard Python distribution doesn't come bundled with Pandas module.

NumPy

NumPy, which stands for Numerical Python, is a library consisting of multidimensional array
objects and a collection of routines for processing those arrays. Using NumPy, mathematical
and logical operations on arrays can be performed. This tutorial explains the basics of
NumPy such as its architecture and environment. It also discusses the various array
functions, types of indexing, etc. An introduction to Matplotlib is also provided. All this is
explained with the help of examples for better understanding.

72
Audience
This tutorial has been prepared for those who want to learn about the basics and various
functions of NumPy. It is specifically useful for algorithm developers. After completing this
tutorial, you will find yourself at a moderate level of expertise from where you can take
yourself to higher levels of expertise.

Prerequisites
You should have a basic understanding of computer programming terminologies. A basic
understanding of Python and any of the programming languages is a [Link] is a Python
package. It stands for 'Numerical Python'. It is a library consisting of multidimensional array
objects and a collection of routines for processing of array.

Numeric, the ancestor of NumPy, was developed by Jim Hugunin. Another package
Numarray was also developed, having some additional functionalities. In 2005, Travis
Oliphant created NumPy package by incorporating the features of Numarray into Numeric
package. There are many contributors to this open source project.

OperationsusingNumPy
Using NumPy, a developer can perform the following operations −

 Mathematical and logical operations on arrays.

 Fourier transforms and routines for shape manipulation.

 Operations related to linear algebra. NumPy has in-built functions for linear algebra
and random number generation.

NumPy–AReplacementforMatLab
NumPy is often used along with packages like SciPy (Scientific Python)
and Mat−plotlib (plotting library). This combination is widely used as a replacement for
MatLab, a popular platform for technical computing. However, Python alternative to MatLab
is now seen as a more modern and complete programming language.

It is open source, which is an added advantage of [Link] Python distribution doesn't


come bundled with NumPy module. A lightweight alternative is to install NumPy using
popular Python package installer, pip.

73
pip install numpy

The best way to enable NumPy is to use an installable binary package specific to your
operating system. These binaries contain full SciPy stack (inclusive of NumPy, SciPy,
matplotlib, IPython, SymPy and nose packages along with core Python.

74
CHAPTER 9

CONCLUSION AND FUTURE

SCOPE

9.1 Conclusion

The system introduces a novel module designed to generate an accurate background model
without producing inefficient pixels or artificial "ghost" trails. This advanced background
modeling technique ensures high-quality background representation, thereby enhancing the
overall performance of the surveillance system. Following the creation of the precise
background model, the Alarm Trigger (AT) module efficiently eliminates the need for
exhaustive examination of the entire background region. By doing so, it significantly reduces
computational complexity during subsequent motion detection phases, leading to improved
efficiency and resource utilization .Moreover, the proposed Object Extraction module plays a
pivotal role in detecting moving objects within the triggered alert region. By analyzing pixel-
level changes, it generates a moving object mask, effectively isolating objects of interest from
the background. This capability is instrumental in developing a robust system for monitoring
suspicious human activity and studying their behaviours .Furthermore, the algorithm is
tailored for online (real-time) video processing, ensuring timely detection and response to
potential security threats. Despite its sophisticated functionality, the computational complexity
of the algorithm remains low, making it suitable for deployment in resource-constrained
environments .In summary, the system's innovative modules collectively contribute to
enhancing surveillance capabilities by providing accurate background modeling, efficient
motion detection, and reliable object extraction. These advancements lay the foundation for
the development of effective systems for monitoring suspicious human behavior in real-time,
ultimately bolstering security measures and ensuring the safety of monitored environments.

75
9.2 Future Scope

Looking ahead, the future of surveillance systems holds promising advancements in both
storage capabilities and video capture technologies, paving the way for enhanced functionality
and effectiveness.

Firstly, with the increasing accessibility of high-capacity storage services, surveillance


systems can leverage these resources to store vast amounts of video data efficiently and cost-
effectively. Cloud-based storage solutions, in particular, offer scalable and readily accessible
storage options, enabling surveillance systems to archive extensive video footage without the
constraints of physical storage limitations. This facilitates long-term data retention, enabling
historical video analysis and ensuring compliance with regulatory requirements.

Secondly, advancements in video capture technologies promise to revolutionize surveillance


capabilities. High-tech modes of video capture, such as ultra-high-definition (UHD) cameras,
panoramic cameras, and 360-degree cameras, offer enhanced resolution, wider field-of-view,
and immersive situational awareness. These advanced cameras provide sharper, more detailed
images, allowing for improved identification and tracking of subjects within surveillance
areas. Additionally, emerging technologies like thermal imaging and LiDAR (Light Detection
and Ranging) enable surveillance systems to capture video data beyond the visible spectrum,
enhancing detection capabilities in low-light conditions and adverse weather environments.

Moreover, the integration of artificial intelligence (AI) and machine learning algorithms
further augments surveillance systems' capabilities by enabling real-time video analysis,
object recognition, and behavior detection. AI-powered analytics can automatically identify
and flag suspicious activities, streamline video review processes, and provide actionable
insights to security personnel.

By leveraging highly accessible storage services and deploying cutting-edge video capture
technologies, future surveillance systems will be equipped to address evolving security
challenges effectively. These advancements promise to enhance situational awareness,
improve response times, and ultimately contribute to safer and more secure environments.

76
CHAPTER 10

REFERENCES

[1]. Xiaojing Chen, Zen Qin, Le An, BirBhanu“An Online learnedElementary Grouping
model for multi-target tracking”, University of California, Riverside, In CVPR 2019.

[2]. RohitAgarwal, Sudhir Kumar, Rajesh M. Hegde“Algorithms for Crowd Surveillance


Using Passive Acoustic Sensors Over a Multimodal Sensor Network”, IEEE Sensors Journal,
Vol. 15, No. 3March 2019.

[3]. Md. ShakowatZamanSarker, Tan Wooi Haw and RajasvaranLogeswaran“Morphological


based technique for image segmentation” International Journal of Information Technology,
Vol. 14 No. 1.

[4]. SeemaKamath“Distributed algorithms for camera network localization and multiple


targets tracking using mobile robots” Master of Science Thesis, RPI Troy, New York, Nov
2019.

[5]. Loris Bazzani“Beyond Multi-target Tracking Statistical Pattern Analysis of People and
Groups”, UniversitydegliStudi di Verona Department of Informatics.” May3, 2019.

[6]. Numerod’ordre, Annee“Object Tracking and Re-identification in Multi-Camera


Environments”,Thesis University Lumiere Lyon, 17 June 2019.

[7].BrankoMarkoski,ZdravkoIvankovic,LadislavRatgeber,PredragPecev,DraganaGlusac“App
lication of AdaBoost Algorithm in Basketball Player Detection” University of Novi
Sad,ActaPolytechnicaHungarica Vol. 12, No. 1, 2019.

[8] “Super Normal Vector for Human Activity Recognition with Depth Cameras”, Xiaodong
Yang, Member, IEEE, and YingLi Tian, Senior Member, IEEE

[9] C. Lu, J. Jia, and C. Tang, “Range-Sample Depth Feature for Action Recognition”, CVPR,
2019.

77
[10] J. Shotton, A. Fitzgibbon, M. Cook, T. Sharp, M. Finocchio, [Link], A. Kipman, and
A. Blake, “Real- Time Pose Recognition in Parts from Single Depth Images”, CVPR, 2019.

[11] L. Seidenari, V. Varano, S. Berretti, A. Bimbo, and P. Pala, “Recognizing Actions from
Depth Cameras as Weakly Aligned Multi-Part Bag-of-Poses”, CVPR Workshop on Human
Activity Understanding from 3D Data, 2019.

[12] R. Poppe, “A Survey on Vision based Human Action Recognition”, Image and Vision
Computing, 2019.

[13] H. Gunes and M. Piccardi, ”Automatic Temporal Segment Detection and Affect
Recognition from Face and Body Display”, IEEETrans. Systems, Man, and Cybernetics - Part
B: Cybernetics, 2019.

[14] O. Oreifej and Z. Liu, ”HON4D: Histogram of Oriented 4D Normals for Activity
Recognition from Depth Sequences”, CVPR, 2019.

[15] J. Luo, W. Wang, and H. Qi, ”Group Sparsity and Geometry Constrained Dictionary
Learning for Action Recognition from Depth Maps”, ICCV, 2019.

[16] [Link], A. Klaser, C. Schmid, and C. Liu, ”Dense Trajectories and Motion Boundary
escriptors for Action Recognition”, International Journal on Computer Vision, 2019.

[17] L. Xia and J. Aggarwal,”Spatio-Temporal Depth Cuboid Similarity Feature for Activity
Recognition Using Depth Camera”, CVPR, 2019.

[18]AdvancedMotionDetection(AMD)technique:
[Link] 5242/?
reload=true

[19] Video surveillance performance : [Link]


technology/[Link]

[20] Background modelling strategy: [Link]


kground_subtraction.html

78
[21] Human Face identification and recognition: [Link]

[22] Online video processing strategy: [Link]


processing/

79
80

You might also like