0% found this document useful (0 votes)
79 views

Fall Detection

The document discusses a project on fall detection. It aims to develop a system that can capture video, extract frames, detect falls and change an alarm. It covers introduction, literature review, requirements, design, implementation and testing. The system will detect if elderly or patients have fallen and alert caregivers.

Uploaded by

Mudassir Awan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

Fall Detection

The document discusses a project on fall detection. It aims to develop a system that can capture video, extract frames, detect falls and change an alarm. It covers introduction, literature review, requirements, design, implementation and testing. The system will detect if elderly or patients have fallen and alert caregivers.

Uploaded by

Mudassir Awan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 44

Fall Detection

Muddasir Awan

Maria Naseer

DEC 2018

Department of Computer Science

COMSATS UNIVERSITY ISLAMABAD

ATTOCK CAMPUS– PAKISTAN

ii
NUMBER
PROJECT
OF 2
ID
MEMBERS

TITLE Fall Detection

SUPERVISOR NAME Moazzam Maqsood

MEMBER REG. NO. EMAIL ADDRESS


NAME

Muddasir
SP17/MCS/47 [email protected]
Awan

Maria
SP17/MCS/08 [email protected]
Naseer
CHECKLIST:

Number of pages in this report

I/We have enclosed the soft-copy of this document along-with the codes and scripts
created by myself/ourselves
YES / NO
My/Our supervisor has attested the attached document
YES / NO

I/We confirm to state that this project is free from any type of plagiarism and misuse of
copyrighted material.
YES / NO

MEMBER
S
SIGNATUR
ES

Supervisor’s
ii
Signature
ii
Declaration

“No portion of the work referred to in the dissertation has been submitted in support of an
application for another degree or qualification of this or any other university/institute or
other institution of learning”.

MEMBERS’ SIGNATURES

1
Acknowledgements

Starting with the name of ALMIGHTY ALLAH who is most kind and merciful. We are

thankful

to ALLAH that he provides us the resources and make us able to use these resources of

different type and help his people. We would like to thanks Mr. Muzzam Maqsood who

support us and help us in this project. He always motivates us to be different from others by

exchanging some new and different ideas. We would like to say thanks to our kind supervisor

because he always guides us, helps us in solving all the issues. He always encouraged us to

work hard and think smartly. We would like to express our special thanks to COMSATS

ATTOCK and department of computer science who gave us opportunity to do this project.

2
Abstract
Today, it has become unbelievable to be in a world without technology. Every day there are

new ideas and advancements in the technology.

3
Contents
Acknowledgements..........................................................................................................................2
Abstract.............................................................................................................................................3
Tables of Table..................................................................................................................................7
Chapter 1..........................................................................................................................................8
Introduction......................................................................................................................................8
1.1. Introduction...........................................................................................................................9
1.2. Problem Statement................................................................................................................9
1.3. Proposed System..................................................................................................................10
1.4. Solution of the Problem.......................................................................................................10
1.5. Features................................................................................................................................10
1.6. Goals and Objectives............................................................................................................11
1.7. Scope....................................................................................................................................11
1.8. Benefits................................................................................................................................11
Chapter 2........................................................................................................................................13
Literature Review............................................................................................................................13
2.1. Literature Review.................................................................................................................13
Related work...............................................................................................................................14
Chapter 3 Requirements Specifications........................................................................................15
3.1. Functional Requirements.....................................................................................................16
3.1.1. Capture Video...................................................................................................................16
3.1.2. Extract Video Frames........................................................................................................16
3.1.3. Change Alarm....................................................................................................................16
3.1.4. Detect Fall.........................................................................................................................17
3.2. Non-Functional Requirements.............................................................................................17
3.2.1. Performance......................................................................................................................17
3.2.2. Security.............................................................................................................................17
3.2.3. User Friendly.....................................................................................................................17
3.2.4. Accuracy and Consistency.................................................................................................17
Chapter 4 Design.............................................................................................................................19
4.1. Use case Diagram.................................................................................................................20
4.2. Activity Diagrams..................................................................................................................21

4
4.3. Sequence Diagram...............................................................................................................22
4.4. Block Diagram.......................................................................................................................23
Chapter 5........................................................................................................................................24
Implementation..............................................................................................................................24
5.1 Implementation.....................................................................................................................25
5.2. Tools.....................................................................................................................................25
5.3. Software Requirements........................................................................................................25
5.4. Hardware Requirements......................................................................................................25
5.5 User Interface........................................................................................................................26
5.6 Code View..............................................................................................................................27
5.7 Algorithm for Fall Detection..................................................................................................28
5.9 Fall Detected..........................................................................................................................29
Chapter 6 Testing............................................................................................................................31
6.1. System Testing......................................................................................................................32
6.2. Testing Phycology.................................................................................................................32
6.3. Objectives of Testing............................................................................................................33
6.4. Basics of software testing.....................................................................................................33
6.5. Testing’s type........................................................................................................................34
6.6. Test Cases.............................................................................................................................36
Chapter 7........................................................................................................................................38
Conclusion and Future Work..........................................................................................................38
7.1. Conclusion............................................................................................................................38
7.2. Future Work.........................................................................................................................39
8. References..............................................................................................................................40

5
Table of Figures

Tables of Table.........................................................................................................................................8
Chapter 1.................................................................................................................................................9
Introduction............................................................................................................................................9
Chapter 2...............................................................................................................................................14
Literature Review..................................................................................................................................14
Chapter 3 Requirements Specifications..............................................................................................17
Chapter 4 Design...................................................................................................................................21
Chapter 5...............................................................................................................................................28
Implementation.....................................................................................................................................28
Chapter 6 Testing...................................................................................................................................35
Chapter 7...............................................................................................................................................43
Conclusion and Future Work.................................................................................................................43
8. References..................................................................................................................................45

6
Tables of Table

7
Chapter 1
Introduction

8
1.1. Introduction
At present taking care of new born babies, infants or senior citizens with serious

diseases for example paralysis or dementia has become a challenging and more demanding

task than ever before. Traditional methods of hiring nanny for babies and care givers for

elders are adopted mostly over the entire globe. But they fail to in spite their level best efforts

to serve them as they are human beings and there is a certain chance of negligence that may

result in serious damage or to some extent could end up leading towards death. They need

proper attention and care 24 h a day which is not possible for a single person to handle

efficiently without a helper.

In modern age, we have to accept and adopt revolutionary inventions in technologies

and make full use of them to decrease human efforts in our daily life multitasking. So far we

have some kind of human fall detection system implemented through sensor based

technologies and no doubt they are performing well. But we are going to implement the same

technology, but with some different approaches to eradicate the limitations imposed by the

currently available systems.

1.2. Problem Statement


There were some limitations associated with sensor based fall detection systems as they came

in a form of wearable wrist bands or chest pack. One have to wear them all the time and carry

along them everywhere. Somehow it imposes a limitation on users willingness as elders with

dementia (a decline in memory with increase in age) usually forget to wear them. And

children usually chew or temper with those wearables or unintentionally drop them

somewhere and later on we can’t find them which costs us a lot. Those wearables contain

internal rechargeable batteries which they need to charge after some hours of usage.

9
We want to remove those dependencies by implementation of same mechanism through video
input gained by a video camera or already saved videos.

1.3. Proposed System


The proposed system will be using a video camera and computer vision toolbox

integrated with MATLAB and image processing algorithm to detect a defined fall pattern and

generate a notification.

1.4. Solution of the Problem


To resolve the problems associated with sensor based wrist bands we are going to

use video camera that will be mounted on the wall or fixed at a suitable position where the

targeted humans are easy to be seen and monitored without facing any kind of obstacles.

Video captured through camera will be scanned and analyzed with image

processing algorithms and each frame will be checked to find fall pattern in it. If a

particular fall pattern is identified the system will generate a notification to alert the care

giver.

1.5. Features
• Users can use it as an independent separate system.

• A User can check any video frame at any time to check the position of elders or children

to decide whether to call for medical assistance or not.

• Users get notified through alarm or message.

10
1.6. Goals and Objectives
• By developing the application we want to make our targeted users independent of

wearing sensor based wristbands and chest packs or wearing them on head all the

time.

• Reducing the overall cost for wearing more than one wrist bands for every single

targeted human instead we can monitor multiple humans through single camera and

detect fall.

• Reducing human efforts to monitor them all the time and allowing them to do their job

free of tension.

• Letting them notify whenever a false alarm generates and they can check the extracted

video frame and decide what to do without wasting any time.

1.7. Scope
• The developed system can be implemented for indoor environment.

• Single person monitored in our system.

• We assume that no other moving objects are involved in our considered environment.

• External factors are ignored in the development of the system as they are assumed to

be non-variable.

• Fair light is available for a better and clear view of our targeted object.

1.8. Benefits
• Real-time human activity monitoring 24/7 h.
• Human efforts are reduced.
• Overall cost is reduced.

11
• Elders/children are not bound to wear sensor-based devices all the time.
• Quick response will make sure that the fall is reported as soon as possible to
provide medical assistance.

12
Chapter 2.

Literature Review

2.1. Literature Review

Most recently, some research has been done to detect falls using image sensors. For example,
a simple method consists to analyze the bounding box demonstrating the person in a single
image. This can only be done if the camera is placed sideward, and can fail because of
blocking objects. Therefore, in genuine situation, the camera will be placed higher in the
room to not suffer of obstructing objects and to have a larger field of view. In this case,

13
depending on the relative position of the person, the field of view of the camera, a bounding
box will not be sufficient to distinguish a fall from a person sitting down. To overcome this
problem, some researchers have mounted the camera on the ceiling. Some of them detect a
fall by analyzing the shape and the 2D velocity of the person, and define inactivity zones like
the bed. Infrared sensor can also be used to detect falls. But due to their limitations as elders
often forget to wear them which causes severe damages if they fall, we don’t consider them
as useful as they should have been.

We came up with a solution that track the person using an ellipse, and analyze the resulting
trajectory to detect inactivity outside the normal zones of inactivity like chairs or sofas.
Additionally, we are presenting here a new method based on the Motion History Image and
some changes in the shape of the person.

Related work
Recently, some research has been done to detect falls using image sensors. For instance, a simple

method consists to analyze the bounding box representing the person in a single image. This can

only be done if the camera is placed sideways, and can fail because of blocking objects.

Therefore, in realistic situation, the camera will be placed higher in the room to not suffer of

occluding objects and to have a larger field of view. In this case, depending on the relative

position of the person, the field of view of the camera, a bounding box will not be sufficient to

discriminate a fall from a person sitting down. To overcome this problem, some researchers have

mounted the camera on the ceiling. Lee and Mihailidis detect a fall by analyzing the shape and

the 2D velocity of the person, and define inactivity zones like the bed. Nait Charif and McKenna

track the person using an ellipse, and analyze the resulting trajectory to detect inactivity outside

the normal zones of inactivity like chairs or sofas. Infrared sensor can also be used to detect falls.

In their work, six smith and Johnson classify falls with a neural network using the 2D vertical

velocity of the person. However, 2D vertical velocity could not be sufficient to discriminate a real

fall from a person sitting down abruptly.

14
Chapter 3 Requirements Specifications

15
3.1. Functional Requirements

3.1.1. Capture Video


• System should be able to capture video through camera installed or already

captured videos. Already saved videos help to check the working of algorithms

without setting up video camera in short time. While working with live video stream

is a bit difficult, as it requires time and accuracy to mount the camera on proper

position so that no blocking objects can interfere the monitoring process.

3.1.2. Extract Video Frames


• System should be able to scan captured videos frames for image processing.

• Extraction of video frames within specific period is very important and crucial as

delaying may result in lack of accuracy and response that is the main purpose of our

project to deliver the result within time.

3.1.3. Change Alarm


• System should allow user to change or stop system notifications generated when a

fall occurs.

16
• A user of the system is privileged or have full access to choose the system alarm

of his choice as different people have problems with standard alarm tones due to

their annoying or disturbing behavior.

• Users can stop the notification alarm by stopping the detection process at once and

then restart the detection.

3.1.4. Detect Fall


• System should be able to detect a fall accurately and immediately.

3.2. Non-Functional Requirements

3.2.1. Performance
The system should be efficient and simple to use. User should be able to use it
efficiently and in compact manner without facing any difficulties. The system should
respond a request with in 2sec.

3.2.2. Security
Only caregiver can operate the system.

3.2.3. User Friendly


Application should have user friendly interface. All widgets should be placed

properly. The system should be easy to use for all users. User interface is easy to

understand.

3.2.4. Accuracy and Consistency


System should be accurate and consistent in detecting genuine falls.

17
18
Chapter 4 Design

19
4.1. Use case Diagram

Figure 4.1 Use Case

4.1.1. Load Video


Mark User uses the interface and from there he chooses to load a saved or live

streaming video by pressing the load video button

4.1.2 Change notification


User can change notification message of his/her own choice.

20
4.1.3 Detect Fall
This use case takes a video as an input and apply fall detection algorithm and then

show its results

4.1.4. Stop Detection


User can stop detection process at any time.

21
4.2. Activity Diagrams

4.2.1. User Activity Diagram

Figure 4.2 User Activity

4.3. Sequence Diagram

22
Figure 4.3 Sequence Diagram

23
4.4. Block Diagram

Figure 4.4 Block Diagram

24
Chapter 5.
Implementation

'

25
5.1 Implementation
In the development of software’s life cycle implementation is an important phase

where the developer gives physical existence to thought and ideas. The result of a

successful implementation is our desired application. During this phase developers makes

source code of the conceptual model.

5.2. Tools
• MATLAB r2013a

5.3. Software Requirements


• Operating System: Windows (7,8.1,10)

• Language: C/C++

5.4. Hardware Requirements


• Intel (R) Core (TM) i5/i7.

26
5.5 User Interface

User interface has five buttons and four windows. Button labeled with “Background” opens

the video directory and button labeled with “Start” caption starts detection process and the

last button labeled with “Stop” caption will stop the detection process.

It contains two check boxes labeled as “Video” and “Camera” respectively are used to select

video source.

27
5.6 Code View

28
5.7 Algorithm for Fall Detection

29
5.8 Object Tracking

30
5.9 Fall Detected

31
Chapter 6 Testing

32
6.1. System Testing
It is an experimental examination that is directed to give backer’s data about the

nature of the item below test. Procedure of testing is used to identify errors in the software

that is built. Testing plays a basic role in assuring quality and reliability of programming.

The consequences of testing are used later on amidst support too.

6.2. Testing Phycology


The enthusiasm behind testing is to show that a project is working properly without

any error. The main aim of testing is to find errors that might be available in the system.

Hence one has to not initiate testing with the plan of demonstrating that a system works,

yet the goal is to demonstrate that a project does not work. The procedure of testing is used

for executing a project with the aim of finding errors.

33
6.3. Objectives of Testing
• The main goal of testing is to expose a large group of errors, intentionally and with

least effort and time.

• Testing is technique for executing a system with the aim of finding a mistake.

• A great testing is one that has a high probability of finding errors, on the off chance

that it exists.

6.4. Basics of software testing


There are two basics of software testing

• Black box testing

• White box testing

6.4.1 Black box Testing


It is a testing strategy for a software in which ability of the software program is

examined without looking at its internal code structure, understanding of internal paths

and internal information of the software program. This type of testing is totally based on

the software requirement. We simply focus on the inputs and outputs of the software

program gadget without bothering the external information of the software program.

Following Steps are in the black box testing.

• Specifications and requirements are examined first.

• For all inputs the tester determines the expected output.

• Test cases are constructed by the software tester with the selected inputs.

34
• The test cases are executed by the software tester.

• Actual outputs are compared with the expected outputs by the tester.

• If there is any defect in the software than it is fixed by developer and re-tested by

tester.

6.4.2 White box Testing


White box testing is also known as clear box testing or glass box testing. In

white box texting the internal structure or working of an application is tested. The

name clear box or glass box indicates that the tester has full visibility of the internal

working and structure of the code. Programming skills are required to build test cases.

To exercise paths through the code tester chooses input and determine the

appropriated output.

6.5. Testing’s type


There are many types of testing. These types are given as follow.

6.5.1 Unit Testing


In unit testing individual unit or gathering of related units is tested. Unit

testing falls under the category of white box testing which means that code is

visible to the tester. Unit testing is done by the developer frequently. Developer

check each unit by executing the code that either it is giving the expected result or

not.

35
6.5.2 Link Testing
It does not test programming yet somewhat the mixture of every module in

framework. The important concern is the resemblance of every module. The maker

tests where units are planned with several parameters, length, sort etc.

6.5.3 Integration Testing


There is a need to perform integration testing after unit testing. In this type

of testing an assembly of sections is merged to create yield. Integration testing

might fall under both white box and black box testing. The purpose of integration

testing is to check whether units can be synchronized properly.

6.5.4 Acceptance Testing


Acceptance test is performed with realistic information of the client to check
that the product is working acceptably. Testing here is placed on outer conduct of the
framework. It is the way of finding mistakes and missing functions of the product and
also to figure out that the goals are met and the client requirements are fulfilled.

6.5.5 Performance Testing


This type of testing is performed to estimate the pace and capability of the
framework and to guarantee that it is creating results inside a predefined time as in
execution prerequisites.

6.5.6 Usability Testing


This testing is performed to check the point of view of customers. To evaluate the

following

• How the Graphical user interface is user‐friendly?

• How efficiently the customer can learn?

36
• How skillfully the customer can perform?

• How sufficient is it to utilize its framework?

6.5.7 Regression Testing


After adjustment of a segment or framework regression testing is performed to

ensure that the modification is working precisely and is not spoiling or forcing

different segments to deliver astonishing results.

6.6. Test Cases


The tests cases are performed during the project development which is verified

successfully as follows.

6.4.1. Test case 1. Load Video

Name: Loading Video

Test Test Condition Expected Result Actual Output Status


No.
Test 1. Press “Start” button Toast is displayed Please Toast is displayed Pass
without loading a Load a video first Please Select a valid
video first. video from directory

Test 2. Load a video with Toast is displayed Toast is displayed Pass


invalid format Video format not Video format not
supported supported
Test 3. Load video with Detection process starts Detection process Pass
valid format successfully starts successfully

6.4.2. Test case 2. Video Source


Name: Stop
Detection

37
Test Test Condition Expected Result Actual Output Status
No. Name: Alarm Check

Test
Test 1. TestonCondition
Click “Stop” Expected
Toast Result
is displayed Please ToastActual Output
is displayed Status
Pass
No. button while selected Detection process Detection process
“Start” stopped stopped
Test 1. Delete alarm file No alarm file found error No alarm file found Pass
Test 2. Again, click on Toast is displayed Toast is displayed Pass
from main directory
“Stop” No detection process is Noerror
detection process is
Button when running currently running currently
detection is stopped

6.4.3. Test case 3. Alarm Check

38
Chapter 7.

Conclusion and Future Work

7.1. Conclusion
This System is developed to facilitate the parents having new born babies and elders with

serious diseases like dementia or paralysis etc. To prevent them from getting serious injuries

if they fall from a height or on a slippery floor by immediately notifying the caregiver who

39
can call for medical assistance as soon as possible that will reduce the chances of severe

injuries or death.

7.2. Future Work


This System is developed for only one room but in future it can be developed to

accommodate more than one rooms at a time and also it can be used to generate an sms to the

caregiver on his/her mobile phone if he is not present at home.

40
8. References
[1.]
https://www.researchgate.net/publication/320505786_Automatic_Fall_Detection_Syst
em_of_Unsupervised_Elderly_People_Using_Smartphone
[2.]
https://www.researchgate.net/publication/328580975_A_Study_on_Fall_Recognition
_using_Sensor_Data_from_Smartphones
[4.] https://www.researchgate.net/project/Human-Activity-Recognition-21

You might also like