Trffwarevfrwfvw4tgwtegr [625168]
I
UNIVERSIT Y OF CRAIOVA
FACULT Y OF AUTOMAT OMATION , COMPUTER SCIENCE AND
ELECTRONIC S
DEPARTMENT OF
COMPUTER SCIENCE AND INFORMATION TECHOLOGY
DIPLOMA PROJECT
Alexandra -Marinela Fortan
COORD INATOR
Conf. Dr. Ing. Ileana -Diana Nicolae
July, 2017
CRAIOVA
II
UNIVERSIT Y OF CRAIOVA
FACULT Y OF AUTOMAT OMATION , COMPUTER SCIENCE AND
ELECTRONIC S
DEPARTMENT OF
COMPUTER SCIENCE AND INFORMATION TECHOLOGY
Detection of movement and contours in images acquired
by a surveillance camera
Alexandra -Marinela Fortan
COORD INATOR
Conf. Dr. Ing. Ileana -Diana Nicolae
July, 2017
CRAIOVA
III "Learning never exhausts the mind."
Leonardo Da Vinci
IV DECLARAȚIE DE ORIGINALITATE
Subsemnat a Alexandra -Marinela Fortan , student a la specia lizarea Calculatoare in limba engleza din
cadrul Facultății de Automatică, Calculatoare și Electronică a Universității din Craiova, certific prin
prezenta că am luat la cunoștință de cele prezentate mai jos și că îmi asum, în acest context,
originalitate a proiectului meu de licență:
• cu titlul Detection of movement and contours in images acquired by a surveillance camera ,
• coordonată de Conf. Dr. Ing. Ileana -Diana -Nicolae, ,
• prezentată în sesiunea Iulie 2017 .
La elaborarea proiectului de licență, se consi deră plagiat una dintre următoarele acțiuni:
• reproducerea exactă a cuvintelor unui alt autor, dintr -o altă lucrare, în limba română sau prin
traducere dintr -o altă limbă, dacă se omit ghilimele și referința precisă,
• redarea cu alte cuvinte, reformularea prin cuvinte proprii sau rezumarea ideilor din alte
lucrări, dacă nu se indică sursa bibliografică,
• prezentarea unor date experimentale obținute sau a unor aplicații realizate de alți autori fără
menționarea corectă a acestor surse,
• însușirea totală sau parțială a unei lucrări în care regulile de mai sus sunt respectate, dar care
are alt autor.
Pentru evitarea acestor situații neplăcute se recomandă:
• plasarea între ghilimele a citatelor directe și indicarea referinței într -o listă corespunzătoare la
sfărșitul lucrării,
• indicarea în text a reformulării unei idei, opinii sau teorii și corespunzător în lista de referințe
a sursei originale de la care s -a făcut preluarea,
• precizarea sursei de la care s -au preluat date experimentale, descrieri tehnice, figu ri, imagini,
statistici, tabele et caetera,
• precizarea referințelor poate fi omisă dacă se folosesc informații sau teorii arhicunoscute, a
căror paternitate este unanim cunoscută și acceptată.
Data, Semnătura candidat: [anonimizat],
V
UNIVERSITATEA DIN CRAIOVA
Facultatea de Automatică, Calculatoare și Electronică
Departamentul de Calculatoare și Tehnologia Informației
Aprobat la data de
…………………
Șef de departament,
Prof. dr. ing.
Marius BREZOVAN
PROIECTUL DE DIPLOMĂ
Numele și prenumele stude ntului/ -ei:
Fortan Alexandra -Marinela
Enunțul temei:
Detection of movement and contours in images acquired by a
surveillance camera.
Datele de pornire:
This is program for the detection of movement and contours in
images acquired by a surveillance camera.
Conținutul proiectului:
Material grafic obligatoriu:
Consultații:
Periodic
Conducătorul științific
(titlul, nume și prenume, semnătura): Prof. Dr. Ing. Ileana -Diana Nicolae
Data eliberării temei:
01.02.2017
Termenul estimat de predare a
proiectului:
04.07.2017
Data predării proiectului de către
student și semnătura acestuia:
VI
UNIVERSITATEA DIN CRAIOVA
Facultatea de Automatică, Calculatoare și Electronică
Departamentul de Calculatoare și Tehnologia Informației
REF ERATUL CONDUCĂTORULUI ȘTIINȚIFIC
Numele și prenumele candidatului/ -ei: Fortan Alexandra -Marinela
Specializarea: Calculatoare in liba engleza
Titlul proiectului: Detection of movement and contours in images acquired by
a surveillance camera
Locația în care s -a realizat practica de
documentare (se bifează una sau mai
multe din opțiunile din dreapta): În facultate □
În producție □
În cercetare □
Altă locație:
În urma analizei lucrării candidatului au fost constatate următoarele:
Nivelul doc umentării Insuficient
□ Satisfăcător
□ Bine
□ Foarte bine
□
Tipul proiectului Cercetare
□ Proiectare
□ Realizare
practică □ Altul
[se detaliază ]
Aparatul matematic utilizat Simplu
□ Mediu
□ Complex
□ Absent
□
Utilitate Contract de
cercetare □ Cercetare
internă □ Utilare
□ Altul
[se detaliază ]
Redactarea lucrării Insuficient
□ Satisfăcător
□ Bine
□ Foarte bine
□
Partea grafică, desene Insuficientă
□ Satisfăcătoare
□ Bună
□ Foarte bună
□
Realizarea
practică Contribuția autorului Insuficientă
□ Satisfăcătoare
□ Mare
□ Foarte mare
□
Complexitatea
temei Simplă
□ Medie
□ Mare
□ Complexă
□
Analiza cerințelor Insuficient
□ Satisfăcător
□ Bine
□ Foarte bine
□
Arhitectura Simplă Medie Mare Complexă
VII □ □ □ □
Întocmire a
specificațiilor
funcționale Insuficientă
□ Satisfăcătoare
□ Bună
□ Foarte bună
□
Implementarea Insuficientă
□ Satisfăcătoare
□ Bună
□ Foarte bună
□
Testarea Insuficientă
□ Satisfăcătoare
□ Bună
□ Foarte bună
□
Funcționarea Da
□ Parțială
□ Nu
□
Rezultate experimentale Experiment propriu
□ Preluare din bibliografie
□
Bibliografie Cărți
Reviste
Articole
Referințe web
Comentarii
și
observații
În concluzie, se propune:
ADMITEREA PROIECTULUI
□ RESPINGEREA PROIECT ULUI
□
Data, Semnătura conducătorului știi nțific,
VIII SUMMARY
Detection of movement and contours in images acquired by a camera is a process of detecting a
change in the position of an object relative to its surroundings or a change in the surroundings
relative to an object. It can be achieved by either mechanical or electronic methods.
In recent years, the number of applications using video cameras has consi derably increased,
for example, in video surveillance or military domain[1]. Because these algorithms require an
important processing power, it is really crucial to know how to accelerate their computations
by using new technologies such as multi -cores arc hitectures and distributed systems.
However,there is no perfect system or method which can overcome the various problems that
are faced during detection. The difficulties are generally associated with lighting condition of
the surrounding, illumination of the object itself which is to be detected, speed of its
movement or the type of object [2].
Generally, motion detection is useful in real time or active video surveillance systems [2].
The main focus is given to the processing of the captured video data to detect motion in it.
Two main methods, image subtraction and edge detection have been used for detection.
There have been different cases considered in order to compare the results. One detects the
motion by image subtraction only where as the other two i nclude edge detection in different
sequence.
Finally, all of these are implemented on two different scenarios where the number of moving
object is one or more. Moreover after a brief review has been designed,implemented and
tested for detection and tracki ng in static and dynamic images – successive video frames from
video file(eg. movies) or captured in real time with a video or even the web camera -based on
Intel open source computer functions library,using OpenCV libraries.
IX ACKNOWLEDGMENTS
My acknowle dgement goes to my coordinator, Conf. Dr. Ing. Ileana -Diana Nicolae for her kind
guidance, valuable suggestions, technical assistance and encouragements during the application
development .
X PROLOG
XI CUPRINSUL
1 INTRODU CTION ………………………….. ………………………….. …. ERROR! BOOKMARK NOT DEFINED.
1.1 SCOPE ………………………….. ………………………….. ………………………….. ………………………….. ………….. XV
1.2 MOTIVATION ………………………….. ………………………….. ………………………….. ………………………….. . XV
2 STATEMENTS ………………………….. ………………………….. …… ERROR! BOOKMARK NOT DEFINED.
2.1 MOTION DETECTION ………………………….. ………………………….. ERROR ! BOOKMARK NOT DEFINED .
2.1.1 METHODS ………………………….. ………………………….. ……………….. Error! Bookmark not defined.
2.1.2 GENERAL APPROACHES ………………………….. ………………….. Error! Bookm ark not defined.
2.2 EDGE DETECTION ………………………….. ………………………….. ….. ERROR ! BOOKMARK NOT DEFINED .
2.2.1 METHODS ………………………….. ………………………….. ……………….. Error! Bookmark not defined.
2.2.2 GENER AL APPROACHES ………………………….. ………………….. Error! Bookmark not defined.
3 PROJECT SPECIFICATIO N ………………………….. ………………………….. ………………………….. ………………. XVI
3.1 TECNOLOGY/TOOLS USED ………………………….. ………………… ERROR ! BOOKMARK NOT DEFINED .
3.1.1 JAVA ………………………….. ………………………….. ………………………… Error! Bookmark not defined.
3.1.2 JAVA PLATFORMS ………………………….. ………………………….. … Error! Bookmark not defined.
3.1.3 OPENCV ………………………….. ………………………….. …………………… Error! Bookmark not defined.
3.2 CODE ANDDOCUMENT ATION STANDARDS ………………….. ERROR ! BOOKMARK NOT DEFINED .
4 APPLICATION DESCRIPT ION ………………………….. …………. ERROR! BOOKMARK NOT DEFINED.
4.1 FUNCTIONALITIES ………………………….. ………………………….. … ERROR ! BOOKMARK NOT DEFINED .
4.2 ARHITECTURE ………………………….. ………………………….. ……….. ERROR ! BOOKMARK NOT DEFINED .
4.3 USER MANUAL ………………………….. ………………………….. ………. ERROR ! BOOKMARK NOT DEFINED .
5 ENVIRONEMENT CONFIGU RATIONS …………………………. ERROR! BOOKMARK NOT DEFINED.
5.1 JAVA DEVELOPEMENT KIT ………………………….. ……………….. ERROR ! BOOKMARK NOT DEFINED .
5.1.1 JAVA IDE ………………………….. ………………………….. …………………. Error! Bookmark not defined.
5.2 OPENCV ………………………….. ………………………….. ………………….. ERRO R! BOOKMARK NOT DEFINED .
6 CONCLUSIONS ………………………….. ………………………….. …… ERROR! BOOKMARK NOT DEFINED.
7 BIBLIOGRAPHY ………………………….. ………………………….. ….. ERROR! BOOKMARK NOT DEFINED.
8 REFERINȚE WEB ………………………….. ………………………….. ………………………….. …………………………. XXVII
A. CODUL SURSĂ ………………………….. ………………………….. ………………………….. ………………………….. . XXVIII
B. SITE -UL WEB AL PROIE CTULUI ………………………….. ………………………….. ………………………….. .. XXVIII
C. CD / DVD ………………………….. ………………………….. ………………………….. ………………………….. ……….. XXVIII
XII INDEX ………………………….. ………………………….. ………………………….. ………………………….. ……………………… XXIX
XIII LIST OF FIGURES
FIGURA 1. SELECTAREA PRIN CLICK DREAPTA A OPȚIUNII „UPDATE FIELD ” …. ERROR ! BOOKMARK NOT DEFINED .
FIGURA 2. ACTUALIZAREA ÎNTREGULUI TABEL ………………………….. …………… ERROR ! BOOKMARK NOT DEFINED .
XIV
LIST OF TABLES
TABELUL 1. NUME DE UTILIZATORI Ș I VALORILE REZUMAT A LE PAROLELOR ACESTOR A ERROR ! BOOKMARK NOT
DEFINED .
XV 1 INTRODUCTION
1.1 Scop e
Detection of movement and contours in images acquired by a camera is a project designed with the
purpose to enhance the services in the surveillance domain. As everyone knows a surveillance refers
to monitoring the behavior o f people, objects, or processes. The reasons for the use of surveillance
systems are very varied: research, observation or control of non -trustful objectives,security and social
control when monitoring systems of high confidence.
More and more companies, o rganizations and institutions are choosing video surveillance solutions to
monitor their work and objectives. Implementation of such a system has immediate results: employees
become more aware of the duties they have and are more attentive to the way they perform their tasks,
eliminating the dead times in the production process, mistakes can be detected and corrected, all
leading to making work more efficient and reducing, to eliminate, losses. Nor do we need to ignore
the issue of ensuring the security of goods and people more easily.
In view of all these considerations, it can be stated without reservation that the field of video
surveillance is a topical and of great interest in the modern society, and any contribution that brings
improvements or innovati on is welcome.
Motivat ion
Most of the existing video surveillance solutions on the market have features that are dependent on
the manufacturer and the technology generation to which they belong, therefore extending systems
may be difficult. Also, the inter connection between supervisory systems produced by different firms
is often impossible.
Each surveillance solution has its own management software, its own user interface (GUI) and its own
working mode, which leads to cumbersome management of both systems as a whole and their records.
Personnel in charge of system management should be trained to familiarize themselves with the
particularities of all systems used in the organization, which generates additional charges.
Several physical configurations for sur veillance systems can be identified, each with features that are
directly reflected in the design and development of the management.
Therefore a software system simplified,but one that includes motion detection and even contours is
even better than motion perception and more accurate, and came with an user manual, were you just
have to run it,can make the maintenance and consultation tasks much easier.
XVI
2 STATEMENT S
2.1 Motion detection
As it is known motion detection is a process of detecting a change in the position of an object relative
to its surroundings or a change in the surroundings relative to an object. Motion detection can be
achieved by either mechanical or electronic methods. [1]
When motion detection is accomplished by natural organisms, it is called motion perception which is
applied when there are used just video surveillance systems . These systems have become a vital
component for ensuring safety and security. The need for video surveillance and event recording has
become increasingly import ant, at the same time with the increasing security risk. As a result, many
organizations implement such systems for a wide range of applications.
It should be noted that these systems complement traditional security and safety systems (intrusion
detection, access control, fire detection), video surveillance systems working in collaborative
relationship with them, providing the real -time monitoring element and post -event visualization And
recording, displaying, and transmitting video information to its vario us recipients.
The rapid progress made by data networks and electronic and software technologies has led to a
diversification of the methods by which video surveillance systems can be implemented. The CCTV
industry has changed many of its core principles, moving from the fully analog to the fully digital
system centered around the network concept.
Current systems can use the technologies provided by PC -based computer systems (Personal
Computer).Thus, typical features are used to offer new features to classi cal (analogue) technology
such as remote viewing, digital hard disk storage (HDD), multitasking (on -line surveillance, archive
recording and consultation used simultaneously).
There are hundreds of DVR models on the market, produced by well -known companie s, as well as
products of small but specialized companies especially in this direction. The latter ones allow the
connection of a limited number of cam recorder models offered by certain manufacturers.
A major drawback of classic video surveillance systems is that video streams should be monitored by
security personnel, who are the ones who report unauthorized entries. Also, the central unit records
uninterrupted, which leads to a need for large storage space. Moreover, the records made by these
systems are very difficult to organize and consult when is desired
identifying an event.
XVII The above mentioned drawbacks can be largely eliminated by the implementation of motion detection
methods, developed further in this project.
2.1.1 Methods
Motion can be detected by:
– Infrared (passive and active sensors)
– Optics (video and camera systems)
– Radio Frequency Energy (radar, microwave and tomographic motion detection)
– Sound (microphones and acoustic sensors)
– Vibration (triboelectric, seismic, and inertia -switch sensors)
– Magnetism (magnetic sensors and magnetometers)
Mechanical method
The most basic form of mechanical motion detection is in the form of a switch or trigger. For
example, the keys of a typewriter employ a mechanical method of detecting motion. E ach key is a
manual switch that is either off or on. Each letter that appears is a result of motion on that
corresponding key and the switch being turned on.
Electronic method
The principal methods by which motion can be electronically identified are optic al detection and
acoustic detection . Infrared light or laser technology may be used for optical detection. Motion
detection devices, such as PIR motion detectors , have a sensor that detects a disturbance in the
infrared spectrum . Once detected, a signal ca n activate an alarm or a camera that can capture an image
or video of the motioner. [3][4] The chief applications for such detection are detection of unauthorized
entry, detection of cessation of occupancy of an area to extinguish lighting, and detection of a moving
object which triggers a camera to record subsequent events. A simple algorithm for motion detection
by a fixed camera compares the current image with a reference image and simply counts the number
of different pixels. Since images will naturally differ due to factors such as varying lighting, camera
flicker , and CCD dark currents , preprocessing is useful to reduce the number of false positive alarms.
More complex algorithms are necessary to detect motion when the camera itself is moving, or when
XVIII the motion of a specific object must be detected in a field containing other movement which can be
ignored. An example might be a painting surrounded by visitors in an art gallery . For the case of a
moving camera, models based on optical flow are used to di stinguish between apparent background
motion caused by the camera movement and that of independent objects moving in the scene.[ 5]
2.1.2 General approaches
Over the time there was proposed a high number of techniques for motion detection in a continuous
video stream . The most common approaches compute a background image and then threshold the
difference between each frame and its estimated background. This difference will automatically
unveil moving objects present in the scene. Background modeling and subtra ction approaches have
been extensively used and mainly rely on the use of color or luminance information (e.g. [ 10], [11]).
Or it can utilize color and edge information in order to improve the quality and reliability of the
results. [6] It requires several frames to compute an initial estimation of the background image. Since
the background is exposed to permanent changes, it has to be updated periodically. Typical
approaches update background model by means of Gaussian mixtures [ 7].In contrast to iterati ve
updating algorithms, [ 8] proposes a background estimation algorithm that utilizes a global
optimization to identify the periods of time in which background content is visible in a small block of
the image. Since foreground regions are excluded, no bias towards the foreground color will occur in
the reconstructed background. The main drawback of background -modeling techniques appears when
moving objects always overlap the same area. On the contrary to previous approaches, the difference
between consecuti ve images was also used to detect motion. For instance, there are proposed
techniques based on the difference between consecutive frames. [9] ,[12] In [9], moving objects are
detected by a combination of three edge maps:
a) a background edge map,
b) an edge map computed from the difference of two consecutive frames,
c) an edge map from the current frame.
In both approaches an interframe scheme that only considers two consecutive frames is proposed;
therefore, objects moving with a low dynamics are only detect ed by both an edge labeling process and
a parameters’ tuning process.
The proposed technique is based on the use of arithmetic operations between the current frame and
other two equidistant ones (backward and forward along the video sequence).It allows h andling
XIX scenes containing bodies moving at different speeds. The proposed technique consists of three stages.
Firstly, a coarse representation of moving edges is computed. Secondly, that representation is filtered
given rise to an image only containing tho se objects moving with a speed higher than the camera’s
capture rate. Finally, these two stages are applied iteratively in order to extract all the moving objects
present in the current frame.
2.2 Edge detection
2.2.1 Methods
2.2.2 General approaches
3 PROJECT SPECIFICATI ON
3.1 TEC HNOLOGY/TOOLS USED
3.1.1 JAVA
Java is a high -level language that has been developed by a Sun Microsystems company in
1995, and has made considerable progress throughout the community of software developers.
Originally this project started with the stated purpose of developing software performances
for consumer electronics.
Java has imposed itself on other technologies through its three basic features: simplicity,
robustness and portability. These three features have determined the use of Java language to
the detriment of C ++ language. With this language a number of intended platforms have been
built, implementing applications from all segments of software development.
This language together with its development and execution environment was designed to
solve some of the problems encountered by programmers. Java is trying to stay one
simple language to use even for unprofessional programmers who want to focus
on application functionality, and then on implementation techniques.
Unlike C ++, Java renounced at some confusing aspects such as overloading
operators, use of pointers and multiple inheritance. It introduced a "garbage collector"
to solve the issue of memory decomposition without the programmer's intervention,operation
that is performed automatically. Its implementation is intelligently done using a separate
thread execution.
XX Here are the most important features of the Java language:
– Simplicity: there were eliminated the facilities of the programming languages that can cause
writing an ambiguous co de, multiple inheritance, overloading operators and the use of
pointers.
– Ease: in creating complex applications which are used databases, graphic interfaces ,
threads, or network programming.
– Robustness: eliminates frequent sources that cause errors b y giving up using pointers,
automatically managing memory and eliminating loss of memory using the above mentioned
facility – "Garbage Collector"
– Complete object -oriented: eliminates the procedural programming style;
– Security: is a secure programming l anguage that provides security mechanisms
to the programs, materialized by: dynamic verification of the code for detecting
the dangerous sequences of code, imposing strict rules for running processes at
distance, etc.
– Architectural neutrality: the behavi or of applications written in this language does not
depends on the architecture of the physical machines on which it is running;
– Portability: is a language independent of the work platform, an application written in this
language does not need recompili ng to run on a machine that uses another system
operating, a very important aspect for software development companies is that this
brings substantial savings;
– It is compiled and interpreted -(this is the efficient solution that ensures portability)
– Performance: despite being slower than other programming languages which
generates native executables accordingly to the work platform, Java compiler provides a
high performance of the byte code so that the slightly lower operating speed
will not be an impediment to the development of complex applications, including 3D
graphics, animations, etc.
– It is very similar to C / C ++, which guarantees a very easy pass of the programmers from
C, C ++ to Java.
3.1.2 JAVA PLATFORMS
The Java programming language has b een used to develop technologies dedicated to issues in the
most diverse areas. These technologies have been grouped into so -called work platforms, which are
sets of Java -written libraries and various utility programs used to develop applications or compon ents
for a particular category of users.
Java platforms include:
XXI
J2SE (Standard Edition): It is the standard work platform that supports creating independent apps
and applets;
Also include the Java Web Start technology that provides a great and easy way to launch and install
locally written programs in Java directly on Web, providing the most convenient solution for
distributing and updating Java applications
J2ME (Micro Edition): Using Java, programming mobile devices is extremely simple, the J2ME
work platform provides support for writing programs dedicated to this purpose.
J2EE (Enterprise Edition): This platform provides the API needed to develop complex applications,
consisting of components that have to run in heterogeneous systems, with inform ation stored in
distributed databases, etc. There can also be find the support needed to create web based applications
and services components such as Servlets, JSP pages, etc .;
Java compiled and interpreted language
Depending on how applications are exec uted, programming languages are divided into two categories:
– Interpreted: instructions are read line by line by a program called interpreter and translated into
machine instructions. The advantage of this solution is the simplicity and portability of t he source
being interpreted directly. The disadvantage is the low execution speed. An example of interpreted
language is Basic.
– Compiled: The application source code is transformed by the compiler into a code that can be
executed directly by the processo r, called machine code. The advantage is that the execution speed is
very good, but portability is lost, the compiled code in a low -level format can only be on the work
platform on which it was compiled.
Java language combines the above -mentioned solutions , Java programs being both interpreted and
compiled. The compiler is responsible for transforming program sources into the so -called byte code,
as well as an interpreter to execute that byte code. The byte code is different from the machine code.
The machi ne code is a sequence of instructions specific to a particular processor and a particular work
platform represented in binary format so that it can be executed without requiring any processing.
Byte codes are instruction sets that resemble the written code in assembly language and are generated
by the compiler independent of the work environment.
XXII While the machine code is executed directly by the processor and can only be used on the platform on
which it was created, the byte code is interpreted by the Jav a environment and can therefore be run on
any platform on which the Java runtime environment is installed.
Through the Java Virtual Machine (JVM) we will understand the Java application execution
environment. For a byte code to be executed on a particular computer, it must have a Java virtual
machine installed. This is done automatically by the J2SDK distribution.
All Java applications contain a primary (primary) class where the main method “main” is to be found.
Application classes can be found in either in one file or multiple.
Source files must have the extension ".java". It is recommended that the file containing the source
code of the primary class should have the same name as the class, although this is not required.
To compile the source files, it is used the javac compiler from the J2SDK distribution.
The compiler call is for the file that contains the main application class or any file / files with the
extension ".java". The compiler creates a separate file for each class of the program. These have the
".class" extension and are, by default, placed in the same directory as the source files. Running the
application is done with the java interpreter, called for the compiler of the main class. The interpreter
receives as its argument the name of the mai n class.Running applications without a graphical interface
is done in a system window.Some of the predefined data structures used in the project are: arrayList,
List and Multimap.
The List structure is an ordered collection of data, also known as the seque nce.
The user of this interface has full control over the place where the new elements will be inserted.
It can access items based on the whole index (position in the list), and can search the items in the list.
Unlike sets, lists can allow duplicate or in valid items.
The List interface offers a special iterator called ListIterator that allows inserting and replacing
elements and in addition to the normal operation of the Iterator interface provides bidirectional access.
The List interface offers two method s for searching for a specified object. From the performance point
of view, these methods should be used with caution. In many implementations, they will perform
searches at a linear cost.
Also, this interface offers two methods for effectively inserting a nd deleting multiple items at an
arbitrary position in the list.
XXIII The ArrayList data structure is an implementation in the form of a resizable array of the List interface.
It implements all its methods including the optional ones and allows the existence of null elements.
Besides the implementation of the List interface, this class also has methods for controlling the board
size used internally for storing the list. (It is a data structure very similar to the Vector type, and this is
also predefined in Java) .
The size, isEmpty, get, set, iterator, and listIterator methods run in a constant time. For example,
adding "n" items to the list has a temporal complexity of O (n).
Each instance of ArrayList has a capacity. Capacity is the size of the array used to sto re the list items.
Always this picture has a size at least equal to the list.As elements are added to an ArrayList array, its
capacity increases automatically.
3.1.3 OPENCV
OpenCV (Open Source Computer Vision Library) is released under a BSD license and hence it ’s free
for both academic and commercial use. It has C++, C, Python and Java and MATLAB interfaces and
supports Windows, Linux, Mac OS, iOS and Android. OpenCV was designed for computational
efficiency and with a strong focus on real -time applications. Wri tten in optimized C/C++, the library
can take advantage of multi -core processing.
The library has more than 2500 optimized algorithms, which includes a comprehensive set of both
classic and state -of-the-art computer vision and machine learning algorithms. These algorithms can be
used to detect and recognize faces, identify objects, classify human actions in videos, track camera
movements, track moving objects, extract 3D models of objects, produce 3D point clouds from stereo
cameras, stitch images together to produce a high resolution image of an entire scene, find similar
images from an image database, remove red eyes from images taken using flash, follow eye
movements, recognize scenery and establish markers to overlay it with augmented reality, etc.
OpenC V has more than 47 thousand people of user community and estimated number of downloads
exceeding 14 million . The library is used extensively in companies, research groups and by
governmental bodies.
OpenCV’s deployed uses span the range from stitching street view images together, detecting
intrusions in surveillance video in Israel, monitoring mine equipment in China, helping robots
navigate and pick up objects at Willow Garage, detection of swimming pool drowning accidents in
Europe, running interactive art in Spain and New York, checking runways for debris in Turkey,
inspecting labels on products in factories around the world on to rapid face detection in Japan.
OpenCV leans mostly towards real -time vision applications and takes advantage of MMX and SSE
instructions when available. A full -featured CUDA and OpenCL interfaces are being actively
developed right now. There are over 500 algorithms and about 10 times as many functions that
compose or support those algorithms. OpenCV is written natively in C++ and has a templated
interface that works seamlessly with STL containers.
XXIV 3.2 CODE AND DOCUMENTATION STANDARDS
4 APPLICATION DESCRIPT ION
4.1 FUNCTIONALITIES
The application developed in this project combines Java technology with the features of OpenCV to
create a program that helps to d etect human and object motion.
There are many approaches for motion detection in a continuous video stream.
The optimization of the motion detection algorithms remains a research axis pointed to the complexity
of the mathematical algorithms studied as wel l as the difficulty of implementation while taking into
account the real -time aspect necessary to achieve to complex intelligent and real -time systems.
Among the most responsive methods of motion detection are:
The detection of motion by subtraction:
By the fact it is a simple algorithm which consists of comparing the successive images after a
preliminary treatment and of determining the position of the pixels whose intensity change is
remarkable if this set of pixels detected constitutes a homogeneous gro up then this group of elements
represents the change of position of a moving object in space.
During this project it will be implemented the algorithm of motion detection by subtraction of images
while describing in detail each step and the result obtain ed.
Step1: Opening a video file and retrieving frames
In this step we first load Native library OpenCV, then open the video file using the VideoCapture
object, which also opens the video stream of your camera, replacing the path of the video by Value 0:
VideoCapture camera = new VideoCapture (0);
Step2: Viewing the video on a window
Now that the video stream is recovered we must display it in a window.
The display of the images in a Jframe is done after the realization of a main step which is the
conversion of the Mat structure into a BufferedImage.
Step 3: Converting the RGB image to grayscale and eliminating noise
Mat outerBox = new Mat (frame.size (), CvType.CV_8UC1);
XXV Imgproc.cvtColor (frame, outerBox, Imgproc.COLOR_BGR2GRAY);
Imgproc.GaussianBlur (outerBox, outerBox, new Size (3, 3), 0);
In order to perform an RGB to Gray conversion we will create a new matrix with the dimensions
(Width and Height) of the matrix RGB frame and with a single channel.
We apply a low pass filter which will allow us to eliminate the isolated pixels, to do this we use the
GaussianBlur function with a kernel of size 3 × 3 pixels.
Step 4: Subtraction and binarization of the result
After subtracting the successive images we perform a binarization of the image using a dynamic
threshold in order to take into consideration the change in brightness:
Imgproc.adaptiveThreshold (diff_frame, diff_frame, 255,
Imgproc.ADAPTIVE_THRESH_MEAN_C, Imgproc.THRESH_BINARY_INV, 5, 2);
Step 5: Detect Homogeneous Objects
The objectiv e of this step is to detect the homogeneous objects in order to determine the center of
gravity of each of them, for this we will use the approach of the contours.
Here is the method for detecting outlines whose number of pixels is greater than a minimum n umber
that you determine:
public static ArrayList<Rect> detection_contours(Mat outmat) {
Mat v = new Mat();
Mat vv = outmat.clone();
List<MatOfPoint> contours = new ArrayList<MatOfPoint>();
Imgproc.findContours(vv, contours, v, Imgproc.RETR_LIST,
Imgproc.CHAIN_APPROX_SIMPLE);
double maxArea = 100;
int maxAreaIdx = -1;
Rect r = null;
ArrayList<Rect> rect_array = new ArrayList<Rect>();
XXVI for (int idx = 0; idx < contours.size(); idx++) { Mat contour = contours.get(idx);
double contourarea = Imgproc.contourArea(contour); if (contourarea > maxArea) {
maxAreaIdx = idx;
r = Imgproc.boundingRect(contours.get(maxAreaIdx));
rect_array.add(r);
}
}
v.release();
return rect_array;
}
4.2 ARHITECTURE
4.3 USER MANUAL ??????
5 ENVIRON MENT CONFIGURATIONS
5.1 JAVA DEVELOPEMENT KIT
5.1.1 JAVA IDE
5.2 OPENCV
6 CONCLUSIONS
7 BIBLIOGRAPHY
[1] – Human Motion Detection System (Video Motion Detection Module), Soo Kuo Yang, 2005
[2] – R. B. Wahyu, Tati R. Mengko, Bambang Pharmasetiawan and Andryan B. Suksmono.
XXVII [3] – Video motion detection (VMD)
[4] – Mechanisms of visual motion
[5] – Bewley, A., Guizilini, V., Ramos, F., & Upcroft, B. (2014). Online Self -Supervised Multi –
Instance egmentation of Dy namic Objects. In International Conference on Robotics and
Automation (pp. 296–1303). Hong Kong, China: IEEE. http://doi.org/10.1109/ICRA.2014.
6907020
[6] – Jabri, S. , Duric, Z., Wechsler, H., Rosenfel d, A.: Detection and Location of People in
Video Images Using Adaptive Fusion of Color and Edge Information. 15th. Int. Conf. On
Pattern Recognition, Barcelona, Spain, Sep. 2000
[7] – Lee, D.: Effective Gaussian mixture learning for video background sub traction. IEEE
Trans. on Pattern Analysis and Machine Intelligence 27 (2005) 827 -832
[8] – Farin, D., de With, P., Effelsberg, W.: Robust Background Estimation for Complex
Video Sequences. IEEE Int. Conf. on Image Processing, Barcelona, Spain, Sep. 2003 .
[9] – Kim, C., Hwang, J.: Fast and Automatic Video Object Segmentation and Tracking for
Content -Based Applications. IEEE Trans. on Circuits and Systems for Video Technology 12
(2002) 122 -129
[10] – Bichsel, M.: Segmenting Simply Connected Moving Obj ects in a Static Scene. IEEE
Trans. on Pattern Analysis and Machine Intelligence 16 (1994) 1138 -1142
[11] – . Francois, A., Medioni, G.: Adaptive Color Background Modeling for Real -Time
Segmentation of Video Streams. Int. Conf. on Imaging Science, Syste ms and Technology,
Las Vegas, NA, June 1999
[12] – Marqués, F., Molina, C.: Object Tracking for Content -Based Functionalities. SPIE Vis.
Commun. Image Processing, vol. 3024, San Jose, CA, Feb. 1997
XXVIII 8 REFERINȚE WEB
Recomandăm și aic i respectarea regulilor enunțate pentru secțiunea Error! Reference source
not found. .
[Alm08] – Pedro de Almeida, Patrik Fuhrer, Documentation Guidelines for Diploma and
Master Thesis, Universitatea din Fribourg, Elveția, 2008, disponibil on -line la adresa
http://diuf.unifr.ch/drupal/softeng/teaching/guidelines
[Olt07] – Th. Olteanu, C. Albu, Ghid pentru redactarea lucrării de diplomă sau a disertației
de masterat , Universitatea Română de Arte și Științe „Gheorghe Cristea”, 2007, disponibil
via web la adresa http://www.ugc.ro/tpl/GHID REDACTARE DIPLOMA LICENTA.pdf
A. CODUL SURSĂ
În această anexă se adaugă codul sursă al aplicației…
B. SITE -UL WEB AL PROIE CTULUI
Autorul prezintă în această anexă (opțională) site -ul web asociat proiectului său.
C. CD / DVD
Autor ul atașează în această anexă obligatorie, versiunea electronică a aplicației, a acestei
lucrări, precum și prezentarea finală a tezei.
XXIX
INDEX
B
Bibliografie ………………………….. ………………………. 9
C
CUPRINSUL ………………………….. …………………… xi
D
Dimensiuni ………………………….. ………………………. 3
F
Figuri ………………………….. ………………………….. ….. 4
Formulele m atematice ………………………….. ……….. 4
I
Ilustrațiile ………………………….. …………………………. 4 L
Legenda ………………………….. ………………………….. .. 6
LISTA FIGURILOR ………………………….. ………… xii
LISTA TABELELOR ………………………….. ……… xiii
R
Referințe web ………………………….. ………………….. 10
S
Structura documentului ………………………….. ………. 2
T
Tabele ………………………….. ………………………….. …. 5
Copyright Notice
© Licențiada.org respectă drepturile de proprietate intelectuală și așteaptă ca toți utilizatorii să facă același lucru. Dacă consideri că un conținut de pe site încalcă drepturile tale de autor, te rugăm să trimiți o notificare DMCA.
Acest articol: Trffwarevfrwfvw4tgwtegr [625168] (ID: 625168)
Dacă considerați că acest conținut vă încalcă drepturile de autor, vă rugăm să depuneți o cerere pe pagina noastră Copyright Takedown.
