SlideShare a Scribd company logo
ISSN 22773061
1800 | P a g e A u g u s t 3 0 , 2 0 1 3
HMotion: An Algorithm for Human Motion Detection
Roselie B. Alday
College of Computer Studies
Lyceum of the Philippines University
roselie_alday@yahoo.com
ABSTRACT
Computer memory is expensive and the recording of data captured by a webcam needs memory. In order to minimize the
memory usage in recording data from human motion as recorded from the webcam, this algorithm will use motion
detection as applied to a process to measure the change in speed or vector of an object in the field of view. This
application only works if there is a motion detected and it will automatically save the captured image in its designated
folder.
Indexing terms/Keywords
Algorithm, motion detection, computer application, webcam application
Academic Discipline And Sub-Disciplines
Computer Science, Information Technology, Systems Development
SUBJECT CLASSIFICATION
Computer Science
TYPE (METHOD/APPROACH)
Application Development
Council for Innovative Research
Peer Review Research Publishing System
Journal: INTERNATIONAL JOURNAL OF COMPUTERS & TECHNOLOGY
Vol 10, No.7
editor@cirworld.com
www.cirworld.com, member.cirworld.com
ISSN 22773061
1801 | P a g e A u g u s t 3 0 , 2 0 1 3
INTRODUCTION
Human body tracking from monocular video sequences is a challenging task. The main task is to retrieve the pose of a
person starting from a video taken with a camera (Fossati, 2009).
At the heart of our study is the fact that human motions contain significant postures that are easily detected. All of the
approaches for motion detection in a continuous video stream are based on comparing of the current video frame with one
from the previous frames. One of the most common approaches is to compare the current frame with the previous one
which the researches adopted in this study. For this purpose the researchers used “difference and threshold filters”.
On this step an image was saved with white pixels on the place where the current frame is different from the previous
frame on the specified threshold value. The pixels were counted and if the amount will be greater than the predefined an
alarm level can signal about a motion event.
Most cameras produce a noisy image so the researchers got motion in such places where there is no motion at all. To
remove random noisy pixels, researchers used an Erosion filter. If the object is moving smoothly small changes from
frame to frame will be received. When the object is moving so slowly the algorithm will not give any result at all. The most
efficient algorithms are based on building the so-called background of the scene and comparing each current frame with
the background. There are many approaches to build the scene, but most of them are too complex. The researchers’
approach is to move the background frame to the current frame on the specified amount.
Scope and Limitations
The study will determine the difference of two pictures. The implementation of the program directed by these challenges
were discussed and analyzed. However, every study has its own limitation. This study covers the goal of capturing a
motion from webcam and saving it in the designated folder. This study does not cover recording video.
Research Literature
Zhang (2002) in his research stated that video tracking is a technique that is used to detect and track objects based on
some typical features of the objects, and monitor their activities by image sequences taken by video cameras. Video
tracking can be used in many areas especially in security-related areas such as airports, embassies, and battlefields.
Much research has been done with various hardware environments most based on fixed position still cameras.
Motion detection, according to Lee (2008) was a system that uses a more advanced mechanisms stressed that there is no
need for the supervisor of a security monitoring system to pay attention to it constantly. In current days, when a security
camera is installed, a human being has to be on alert all the time while the camera is on since any little movement can
require attention of the supervisor. But most of small objects do not need the supervisor's attention since they could be
birds, cats or dogs. In this new system the system only reports the unusual change to the supervisor by calculating the
motion and size of objects in the screen. Thus the supervisor can be liberated from the 24-hour concentration duty.
Instead he can be only be alerted when the real security threat such as a big moving object like a human intruder appears.
Roza in her 2009 study entitled “Motion detection and Real time Tracking” motion detection can be broken down into two
main subsystems, motion detection and tracking. Motion detection is the process of determining the movement of an
object from two or more successive images. Once the movement detection occurs, calculations are made from two
images to determine the type of movement made. The information from the calculations is then used in the tracking of the
objects. Tracking involves the prediction of the future position of an object and the movement of the cameras to follow the
objects.
Motion detection according to Bradshaw (2008) is one of the most useful features of the modern video security control
system. With this technology, each image received by the camera is processed by software and compared to the previous
image. If the system detects change that exceeds the threshold (a parameter set by the user), the system implements the
predefined action. The action could be simply that the video is saved, and/or a cell-phone text message or email is sent, or
a relay is activated to turn on lights on the alarm.
Fossati (2005) developed human body tracking from monocular sequences. The main task is to retrieve the pose of a
person from a video sequence taken with a single camera.
Theoretical Framework
The researchers following the following ina making a motion detection test using a webcam :
ISSN 22773061
1802 | P a g e A u g u s t 3 0 , 2 0 1 3
Figure 1 Theoretical Framework
Codes for the algorithm
//FORM (Code)
Private Declare Function capCreateCaptureWindow Lib "avicap32.dll" Alias "capCreateCaptureWindowA" (ByVal
lpszWindowName As String, ByVal dwStyle As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal
nHeight As Long, ByVal hwndParent As Long, ByVal nID As Long) As Long
Private Sub Command1_Click()
Picture2.Picture = Picture1.Picture
End Sub
Private Sub Command2_Click()
STARTCAM
Load Progress
Progress.Show
Progress.start
Unload Progress
Command2.Enabled = False
Command3.Enabled = True
Picture1.AutoRedraw = True
Picture2.AutoRedraw = True
Timer1.Enabled = True
Timer2.Enabled = True
End Sub
Private Sub Command3_Click()
STOPCAM
ProgressBar1.Value = 0
Command3.Enabled = False
Command2.Enabled = True
Picture1.Picture = LoadPicture("nosignal.bmp")
Picture2.Picture = LoadPicture("nosignal.bmp")
Label1.Caption = "0%"
End Sub
Private Sub Command4_Click()
Design and
development of
the program.
Set the
camera to
activate the
application
program.
Detection of
human movements
using webcam
and save to
designated folder.
ISSN 22773061
1803 | P a g e A u g u s t 3 0 , 2 0 1 3
List1.Clear
End Sub
Private Sub Form_Load()
Picture1.Width = 320 * Screen.TwipsPerPixelX
Picture1.Height = 240 * Screen.TwipsPerPixelY
Picture2.Width = 320 * Screen.TwipsPerPixelX
Picture2.Height = 240 * Screen.TwipsPerPixelY
Picture1.Picture = LoadPicture("nosignal.bmp")
Picture2.Picture = LoadPicture("nosignal.bmp")
End Sub
Private Function Different(ByVal a As Long, ByVal b As Long) As Boolean
'Checks different of two colors
ar = a Mod 256: a = a  256
ag = a Mod 256: a = a  256
ab = a Mod 256: a = a  256
br = b Mod 256: b = b  256
bg = b Mod 256: b = b  256
bb = b Mod 256: b = b  256
sense = 255 - Slider1.Value * 5
Different = (Sqr((ar - br) * (ar - br) + (ag - bg) * (ag - bg) + (ab - bb) * (ab - bb)) > sense) 'formula for counting different
End Function
Private Sub Form_Unload(Cancel As Integer)
STOPCAM
SaveSetting "MotionDetect", "Param", "s1", Str(Slider1.Value)
SaveSetting "MotionDetect", "Param", "s2", Str(Slider2.Value)
End Sub
Private Sub Timer1_Timer()
'getting picture from camera
SendMessage mCapHwnd, GET_FRAME, 0, 0
SendMessage mCapHwnd, COPY, 0, 0
Picture1.Picture = Clipboard.GetData: Clipboard.Clear
stepp = 3 'Grid dense
Dim qan, qann As Long
qan = 0
qann = 0
For i = 1 To Picture1.Width / Screen.TwipsPerPixelX Step stepp
For j = 1 To Picture1.Height / Screen.TwipsPerPixelY Step stepp
If Different(Picture1.Point(i * stepp * Screen.TwipsPerPixelX, j * stepp * Screen.TwipsPerPixelY),
Picture2.Point(Screen.TwipsPerPixelX * i * stepp, j * stepp * Screen.TwipsPerPixelY)) Then
Picture1.Circle (i * stepp * Screen.TwipsPerPixelX, Screen.TwipsPerPixelY * j * stepp), 1, RGB(255, 0, 0)
qann = qann + 1
End If
Next
ISSN 22773061
1804 | P a g e A u g u s t 3 0 , 2 0 1 3
Next
Label1.Caption = Int(qann * 100 / 910) & "%" 'Counting motion in pracentes
ProgressBar1.Value = Int(qann * 100 / 910)
End Sub
Sub STOPCAM()
DoEvents: SendMessage mCapHwnd, DISCONNECT, 0, 0
Timer1.Enabled = False
Timer2.Enabled = False
End Sub
Sub STARTCAM()
'Getting handle of camera window
mCapHwnd = capCreateCaptureWindow("WebcamCapture", 0, 0, 0, 320, 240, Me.hwnd, 0)
DoEvents
SendMessage mCapHwnd, CONNECT, 0, 0 'connecting to camera
SendMessage mCapHwnd, WM_CAP_DLG_VIDEOFORMAT, 0, 0 'Calling video format dialog
DoEvents
Slider1.Value = GetSetting("MotionDetect", "Param", "s1", "0")
Slider2.Value = GetSetting("MotionDetect", "Param", "s2", "0")
End Sub
Private Sub Timer2_Timer()
If ProgressBar1.Value > 1 - Slider2.Value * 2 Then
Beep
SavePicture Picture1.Picture, App.Path + "Detected" + Format(Date, "ddmmyyyy") + "__" + Format(Time, "hhmmss") +
".bmp"
List1.AddItem "Saved in " + Str(Time) + " " + Str(ProgressBar1.Value) + "% --> " + Format(Date, "ddmmyyyy") + "__" +
Format(Time, "hhmmss") + ".bmp"
End If
End Sub
//PROGRESS CODE
Public Sub start()
For i = 1 To 15
DoEvents
SendMessage mCapHwnd, GET_FRAME, 0, 0
SendMessage mCapHwnd, COPY, 0, 0
Form1.Picture2.Picture = Clipboard.GetData: Clipboard.Clear
DoEvents
ProgressBar1.Value = ProgressBar1.Value + 1
Next
End Sub
Private Sub Form_Load()
ProgressBar1.Value = 0
End Sub
ISSN 22773061
1805 | P a g e A u g u s t 3 0 , 2 0 1 3
Results
The method developed was used to identify and discriminate the body motion at the same time. If there is a detected
motion it will save to the designated folder and if there is no motion it will do nothing. Motion was detected through color
sensitivity. It was found out that there is motion if color sensitivity is 50% and above, which was saved upon detection.
Findings
The researchers found out that motion detection of human using webcam can be automatically detected using color
sensitivy. Motion detection works on the basis of frame differencing - meaning comparing how pixels (usually blobs)
change location after each frame. There are two ways motion can be detected : 1.) looking for a bulk change in the image,
and 2.) motion of the middle mass.
The problem with these motion detection methods is that neither detects very slow moving objects, determined by the
sensitivity of the threshold. But if the threshold is too sensitive, it will detect things like shadows and save there in
designated folder.
Motion Detection is applied to a process to measure the change in speed or vector of an object in the field of view. The
study entitled “Motion Detection of Human using webcam” This application only works if there is a motion detected and it
will automatically save the captured image in its designated folder and if there is no motion captured it will not saved.
Conclusions
The authors conclude that using a webcam can easily detect the motion of a human. It has been made toward the goal of
automatically detecting, identifying and tracking of captured image.
The system used the Difference and Threshold filters algorithm to compare and detect the difference of the two pictures.
She is a graduate of Bachelor of Science in Statistics at the University of the Philippines in 1986, Master in Computer
Science at De la Salle University, Manila in 2000 and is doing her dissertation in Phd in Education major in Mathematics
and a member of IACSIT since last year.
She had been in the teaching profession in more than 25 years and is the Dean of the College of Computer Studies of
Lyceum of the Philippines University in Batangas for 12 years. She had presented research papers locally and
internationaly, one of which is Philippine government funded at San Diego California last March 2010. She had visited 9
countries in a period of 11 years during study tours and benchmarking visits.She had been the President of PSITE IV-
Philippine Society of IT Education for 3 years and had been the PSITE National Secretary for another 3 years and is currently the
National Treasurer this year.

More Related Content

PDF
Motion detection system
PDF
Smart web cam motion detection
PDF
Analysis of Human Behavior Based On Centroid and Treading Track
PDF
Object Tracking System Using Motion Detection and Sound Detection
PDF
Human Motion Detection in Video Surveillance using Computer Vision Technique
PDF
Detection of moving object using
PDF
IRJET- Moving Object Detection with Shadow Compression using Foreground Segme...
PDF
A Novel Approach for Tracking with Implicit Video Shot Detection
Motion detection system
Smart web cam motion detection
Analysis of Human Behavior Based On Centroid and Treading Track
Object Tracking System Using Motion Detection and Sound Detection
Human Motion Detection in Video Surveillance using Computer Vision Technique
Detection of moving object using
IRJET- Moving Object Detection with Shadow Compression using Foreground Segme...
A Novel Approach for Tracking with Implicit Video Shot Detection

What's hot (20)

PDF
[IJET-V1I3P20] Authors:Prof. D.S.Patil, Miss. R.B.Khanderay, Prof.Teena Padvi.
PDF
A NOVEL BACKGROUND SUBTRACTION ALGORITHM FOR PERSON TRACKING BASED ON K-NN
PDF
SENSITIVITY OF A VIDEO SURVEILLANCE SYSTEM BASED ON MOTION DETECTION
PDF
K026063069
PDF
Development of Human Tracking in Video Surveillance System for Activity Anal...
DOCX
Motion capture document
PDF
A Review on Motion Detection Techniques
PDF
A Study of Motion Detection Method for Smart Home System
PDF
Time-resolved mirrorless scintillation detector @ KSMPRS2018
PPTX
3D isocenters quality assurance in radiation treatment room using a motion c...
PDF
Heap graph, software birthmark, frequent sub graph mining.
PDF
Fast and High-Precision 3D Tracking and Position Measurement with MEMS Microm...
PDF
Automatic identification of animal using visual and motion saliency
PDF
Motion analysis in video surveillance using edge detection techniques
DOCX
Motion capture technology
PDF
An Innovative Moving Object Detection and Tracking System by Using Modified R...
PDF
Interactive Full-Body Motion Capture Using Infrared Sensor Network
PPTX
Human Action Recognition Using 3D Joint Information and HOOFD Features
PDF
Liver segmentation using U-net: Practical issues @ SNU-TF
PDF
IRJET-Cleaner Drone
[IJET-V1I3P20] Authors:Prof. D.S.Patil, Miss. R.B.Khanderay, Prof.Teena Padvi.
A NOVEL BACKGROUND SUBTRACTION ALGORITHM FOR PERSON TRACKING BASED ON K-NN
SENSITIVITY OF A VIDEO SURVEILLANCE SYSTEM BASED ON MOTION DETECTION
K026063069
Development of Human Tracking in Video Surveillance System for Activity Anal...
Motion capture document
A Review on Motion Detection Techniques
A Study of Motion Detection Method for Smart Home System
Time-resolved mirrorless scintillation detector @ KSMPRS2018
3D isocenters quality assurance in radiation treatment room using a motion c...
Heap graph, software birthmark, frequent sub graph mining.
Fast and High-Precision 3D Tracking and Position Measurement with MEMS Microm...
Automatic identification of animal using visual and motion saliency
Motion analysis in video surveillance using edge detection techniques
Motion capture technology
An Innovative Moving Object Detection and Tracking System by Using Modified R...
Interactive Full-Body Motion Capture Using Infrared Sensor Network
Human Action Recognition Using 3D Joint Information and HOOFD Features
Liver segmentation using U-net: Practical issues @ SNU-TF
IRJET-Cleaner Drone
Ad

Viewers also liked (12)

PPTX
HUMAN MOTION DETECTION AND TRACKING FOR VIDEO SURVEILLANCE
PPTX
HUMAN MOTION DETECTION AND TRACKING FOR VIDEO SURVEILLANCE
PDF
"Challenges in Object Detection on Embedded Devices," a Presentation from CEVA
PDF
Motion Human Detection & Tracking Based On Background Subtraction
PDF
A Moving Target Detection Algorithm Based on Dynamic Background
PDF
Interfacing of MATLAB with Arduino for Object Detection Algorithm Implementat...
PPTX
Image Processing Applied To Traffic Queue Detection Algorithm
PDF
Face detection and recognition
PDF
Touch screen home automation
PPTX
Slideshare.Com Powerpoint
PPTX
Kinect
PPTX
Slideshare ppt
HUMAN MOTION DETECTION AND TRACKING FOR VIDEO SURVEILLANCE
HUMAN MOTION DETECTION AND TRACKING FOR VIDEO SURVEILLANCE
"Challenges in Object Detection on Embedded Devices," a Presentation from CEVA
Motion Human Detection & Tracking Based On Background Subtraction
A Moving Target Detection Algorithm Based on Dynamic Background
Interfacing of MATLAB with Arduino for Object Detection Algorithm Implementat...
Image Processing Applied To Traffic Queue Detection Algorithm
Face detection and recognition
Touch screen home automation
Slideshare.Com Powerpoint
Kinect
Slideshare ppt
Ad

Similar to HMotion: An Algorithm for Human Motion Detection (20)

PDF
H028038042
PPTX
Forest PPT New.pptxsaftery of projecttog
PDF
F011113741
PDF
Real Time Detection of Moving Object Based on Fpga
PDF
D018112429
PDF
IRJET- Moving Object Detection using Foreground Detection for Video Surveil...
PDF
A Novel Background Subtraction Algorithm for Person Tracking Based on K-NN
PDF
Dq3211691171
PDF
IRJET- A Review Analysis to Detect an Object in Video Surveillance System
PDF
Abnormal activity detection in surveillance video scenes
PDF
Automated traffic sign board
PDF
IRJET- Full Body Motion Detection and Surveillance System Application
PDF
IRJET- Border Security using Computer Vision
PDF
Proposed Multi-object Tracking Algorithm Using Sobel Edge Detection operator
PDF
Survey on video object detection & tracking
PDF
IRJET- Behavior Analysis from Videos using Motion based Feature Extraction
DOCX
Motion Object Detection Using BGS Technique
DOCX
Motion Object Detection Using BGS Technique
PDF
A NOVEL METHOD FOR PERSON TRACKING BASED K-NN : COMPARISON WITH SIFT AND MEAN...
PDF
Trajectory Based Unusual Human Movement Identification for ATM System
H028038042
Forest PPT New.pptxsaftery of projecttog
F011113741
Real Time Detection of Moving Object Based on Fpga
D018112429
IRJET- Moving Object Detection using Foreground Detection for Video Surveil...
A Novel Background Subtraction Algorithm for Person Tracking Based on K-NN
Dq3211691171
IRJET- A Review Analysis to Detect an Object in Video Surveillance System
Abnormal activity detection in surveillance video scenes
Automated traffic sign board
IRJET- Full Body Motion Detection and Surveillance System Application
IRJET- Border Security using Computer Vision
Proposed Multi-object Tracking Algorithm Using Sobel Edge Detection operator
Survey on video object detection & tracking
IRJET- Behavior Analysis from Videos using Motion based Feature Extraction
Motion Object Detection Using BGS Technique
Motion Object Detection Using BGS Technique
A NOVEL METHOD FOR PERSON TRACKING BASED K-NN : COMPARISON WITH SIFT AND MEAN...
Trajectory Based Unusual Human Movement Identification for ATM System

More from Lyceum of the Philippines University Batangas (16)

PDF
Students’ Performance and Satisfaction with the Cisco Academy Networking Pr...
PDF
To be or not to be : E - tea ching in the Graduate School in a Philippine Pe...
PDF
Genetic Algorithm for Solving Balanced Transportation Problem
PDF
TRACER STUDY OF BSCS GRADUATES OF LYCEUM OF THE PHILIPPINES UNIVERSITY FROM ...
PDF
DESIGN AND DEVELOPMENT OF AN ONLINE EXAM MAKER AND CHECKER
PDF
REDUCING MATH ANXIETY OF CCS STUDENTS THROUGH E-LEARNING IN ANALYTIC GEOMETRY
PDF
ONLINE HOTEL RESERVATION AND MANAGEMENT SYSTEM FOR THE COLLEGE OF INTERNATIO...
PDF
ONLINE PRACTICUM MONITORING SYSTEM FOR LYCEUM OF THE PHILIPPINES UNIVERSITY...
PDF
In Vitro Activity of Pandan ( Pandanus amaryllifolius ) Leaves Crude Extrac...
PDF
The Six-Month Internship Training Program for Medical Laboratory Science Ed...
PDF
Preparation of the Blood-Enriched Agar with the Use of Red Cell Suspension
PDF
Managerial Skills Development of Selected Private Institutions of Higher Le...
PDF
Outcomes of Curricular Enhancement in a Health Program: LPU CAMP Experience
PDF
Graduates’ Transition from Study to Employment of Radiologic Technology Gr...
PDF
Competencies of Career-Entry Medical Technology Graduates of Lyceum of Batan...
PDF
Curriculum Model for Medical Technology: Lessons from International Benchmar...
Students’ Performance and Satisfaction with the Cisco Academy Networking Pr...
To be or not to be : E - tea ching in the Graduate School in a Philippine Pe...
Genetic Algorithm for Solving Balanced Transportation Problem
TRACER STUDY OF BSCS GRADUATES OF LYCEUM OF THE PHILIPPINES UNIVERSITY FROM ...
DESIGN AND DEVELOPMENT OF AN ONLINE EXAM MAKER AND CHECKER
REDUCING MATH ANXIETY OF CCS STUDENTS THROUGH E-LEARNING IN ANALYTIC GEOMETRY
ONLINE HOTEL RESERVATION AND MANAGEMENT SYSTEM FOR THE COLLEGE OF INTERNATIO...
ONLINE PRACTICUM MONITORING SYSTEM FOR LYCEUM OF THE PHILIPPINES UNIVERSITY...
In Vitro Activity of Pandan ( Pandanus amaryllifolius ) Leaves Crude Extrac...
The Six-Month Internship Training Program for Medical Laboratory Science Ed...
Preparation of the Blood-Enriched Agar with the Use of Red Cell Suspension
Managerial Skills Development of Selected Private Institutions of Higher Le...
Outcomes of Curricular Enhancement in a Health Program: LPU CAMP Experience
Graduates’ Transition from Study to Employment of Radiologic Technology Gr...
Competencies of Career-Entry Medical Technology Graduates of Lyceum of Batan...
Curriculum Model for Medical Technology: Lessons from International Benchmar...

Recently uploaded (20)

PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
master seminar digital applications in india
PDF
01-Introduction-to-Information-Management.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
RMMM.pdf make it easy to upload and study
PPTX
Pharma ospi slides which help in ospi learning
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Classroom Observation Tools for Teachers
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Renaissance Architecture: A Journey from Faith to Humanism
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Microbial disease of the cardiovascular and lymphatic systems
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Final Presentation General Medicine 03-08-2024.pptx
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
master seminar digital applications in india
01-Introduction-to-Information-Management.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Microbial diseases, their pathogenesis and prophylaxis
PPH.pptx obstetrics and gynecology in nursing
RMMM.pdf make it easy to upload and study
Pharma ospi slides which help in ospi learning
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Classroom Observation Tools for Teachers

HMotion: An Algorithm for Human Motion Detection

  • 1. ISSN 22773061 1800 | P a g e A u g u s t 3 0 , 2 0 1 3 HMotion: An Algorithm for Human Motion Detection Roselie B. Alday College of Computer Studies Lyceum of the Philippines University roselie_alday@yahoo.com ABSTRACT Computer memory is expensive and the recording of data captured by a webcam needs memory. In order to minimize the memory usage in recording data from human motion as recorded from the webcam, this algorithm will use motion detection as applied to a process to measure the change in speed or vector of an object in the field of view. This application only works if there is a motion detected and it will automatically save the captured image in its designated folder. Indexing terms/Keywords Algorithm, motion detection, computer application, webcam application Academic Discipline And Sub-Disciplines Computer Science, Information Technology, Systems Development SUBJECT CLASSIFICATION Computer Science TYPE (METHOD/APPROACH) Application Development Council for Innovative Research Peer Review Research Publishing System Journal: INTERNATIONAL JOURNAL OF COMPUTERS & TECHNOLOGY Vol 10, No.7 editor@cirworld.com www.cirworld.com, member.cirworld.com
  • 2. ISSN 22773061 1801 | P a g e A u g u s t 3 0 , 2 0 1 3 INTRODUCTION Human body tracking from monocular video sequences is a challenging task. The main task is to retrieve the pose of a person starting from a video taken with a camera (Fossati, 2009). At the heart of our study is the fact that human motions contain significant postures that are easily detected. All of the approaches for motion detection in a continuous video stream are based on comparing of the current video frame with one from the previous frames. One of the most common approaches is to compare the current frame with the previous one which the researches adopted in this study. For this purpose the researchers used “difference and threshold filters”. On this step an image was saved with white pixels on the place where the current frame is different from the previous frame on the specified threshold value. The pixels were counted and if the amount will be greater than the predefined an alarm level can signal about a motion event. Most cameras produce a noisy image so the researchers got motion in such places where there is no motion at all. To remove random noisy pixels, researchers used an Erosion filter. If the object is moving smoothly small changes from frame to frame will be received. When the object is moving so slowly the algorithm will not give any result at all. The most efficient algorithms are based on building the so-called background of the scene and comparing each current frame with the background. There are many approaches to build the scene, but most of them are too complex. The researchers’ approach is to move the background frame to the current frame on the specified amount. Scope and Limitations The study will determine the difference of two pictures. The implementation of the program directed by these challenges were discussed and analyzed. However, every study has its own limitation. This study covers the goal of capturing a motion from webcam and saving it in the designated folder. This study does not cover recording video. Research Literature Zhang (2002) in his research stated that video tracking is a technique that is used to detect and track objects based on some typical features of the objects, and monitor their activities by image sequences taken by video cameras. Video tracking can be used in many areas especially in security-related areas such as airports, embassies, and battlefields. Much research has been done with various hardware environments most based on fixed position still cameras. Motion detection, according to Lee (2008) was a system that uses a more advanced mechanisms stressed that there is no need for the supervisor of a security monitoring system to pay attention to it constantly. In current days, when a security camera is installed, a human being has to be on alert all the time while the camera is on since any little movement can require attention of the supervisor. But most of small objects do not need the supervisor's attention since they could be birds, cats or dogs. In this new system the system only reports the unusual change to the supervisor by calculating the motion and size of objects in the screen. Thus the supervisor can be liberated from the 24-hour concentration duty. Instead he can be only be alerted when the real security threat such as a big moving object like a human intruder appears. Roza in her 2009 study entitled “Motion detection and Real time Tracking” motion detection can be broken down into two main subsystems, motion detection and tracking. Motion detection is the process of determining the movement of an object from two or more successive images. Once the movement detection occurs, calculations are made from two images to determine the type of movement made. The information from the calculations is then used in the tracking of the objects. Tracking involves the prediction of the future position of an object and the movement of the cameras to follow the objects. Motion detection according to Bradshaw (2008) is one of the most useful features of the modern video security control system. With this technology, each image received by the camera is processed by software and compared to the previous image. If the system detects change that exceeds the threshold (a parameter set by the user), the system implements the predefined action. The action could be simply that the video is saved, and/or a cell-phone text message or email is sent, or a relay is activated to turn on lights on the alarm. Fossati (2005) developed human body tracking from monocular sequences. The main task is to retrieve the pose of a person from a video sequence taken with a single camera. Theoretical Framework The researchers following the following ina making a motion detection test using a webcam :
  • 3. ISSN 22773061 1802 | P a g e A u g u s t 3 0 , 2 0 1 3 Figure 1 Theoretical Framework Codes for the algorithm //FORM (Code) Private Declare Function capCreateCaptureWindow Lib "avicap32.dll" Alias "capCreateCaptureWindowA" (ByVal lpszWindowName As String, ByVal dwStyle As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hwndParent As Long, ByVal nID As Long) As Long Private Sub Command1_Click() Picture2.Picture = Picture1.Picture End Sub Private Sub Command2_Click() STARTCAM Load Progress Progress.Show Progress.start Unload Progress Command2.Enabled = False Command3.Enabled = True Picture1.AutoRedraw = True Picture2.AutoRedraw = True Timer1.Enabled = True Timer2.Enabled = True End Sub Private Sub Command3_Click() STOPCAM ProgressBar1.Value = 0 Command3.Enabled = False Command2.Enabled = True Picture1.Picture = LoadPicture("nosignal.bmp") Picture2.Picture = LoadPicture("nosignal.bmp") Label1.Caption = "0%" End Sub Private Sub Command4_Click() Design and development of the program. Set the camera to activate the application program. Detection of human movements using webcam and save to designated folder.
  • 4. ISSN 22773061 1803 | P a g e A u g u s t 3 0 , 2 0 1 3 List1.Clear End Sub Private Sub Form_Load() Picture1.Width = 320 * Screen.TwipsPerPixelX Picture1.Height = 240 * Screen.TwipsPerPixelY Picture2.Width = 320 * Screen.TwipsPerPixelX Picture2.Height = 240 * Screen.TwipsPerPixelY Picture1.Picture = LoadPicture("nosignal.bmp") Picture2.Picture = LoadPicture("nosignal.bmp") End Sub Private Function Different(ByVal a As Long, ByVal b As Long) As Boolean 'Checks different of two colors ar = a Mod 256: a = a 256 ag = a Mod 256: a = a 256 ab = a Mod 256: a = a 256 br = b Mod 256: b = b 256 bg = b Mod 256: b = b 256 bb = b Mod 256: b = b 256 sense = 255 - Slider1.Value * 5 Different = (Sqr((ar - br) * (ar - br) + (ag - bg) * (ag - bg) + (ab - bb) * (ab - bb)) > sense) 'formula for counting different End Function Private Sub Form_Unload(Cancel As Integer) STOPCAM SaveSetting "MotionDetect", "Param", "s1", Str(Slider1.Value) SaveSetting "MotionDetect", "Param", "s2", Str(Slider2.Value) End Sub Private Sub Timer1_Timer() 'getting picture from camera SendMessage mCapHwnd, GET_FRAME, 0, 0 SendMessage mCapHwnd, COPY, 0, 0 Picture1.Picture = Clipboard.GetData: Clipboard.Clear stepp = 3 'Grid dense Dim qan, qann As Long qan = 0 qann = 0 For i = 1 To Picture1.Width / Screen.TwipsPerPixelX Step stepp For j = 1 To Picture1.Height / Screen.TwipsPerPixelY Step stepp If Different(Picture1.Point(i * stepp * Screen.TwipsPerPixelX, j * stepp * Screen.TwipsPerPixelY), Picture2.Point(Screen.TwipsPerPixelX * i * stepp, j * stepp * Screen.TwipsPerPixelY)) Then Picture1.Circle (i * stepp * Screen.TwipsPerPixelX, Screen.TwipsPerPixelY * j * stepp), 1, RGB(255, 0, 0) qann = qann + 1 End If Next
  • 5. ISSN 22773061 1804 | P a g e A u g u s t 3 0 , 2 0 1 3 Next Label1.Caption = Int(qann * 100 / 910) & "%" 'Counting motion in pracentes ProgressBar1.Value = Int(qann * 100 / 910) End Sub Sub STOPCAM() DoEvents: SendMessage mCapHwnd, DISCONNECT, 0, 0 Timer1.Enabled = False Timer2.Enabled = False End Sub Sub STARTCAM() 'Getting handle of camera window mCapHwnd = capCreateCaptureWindow("WebcamCapture", 0, 0, 0, 320, 240, Me.hwnd, 0) DoEvents SendMessage mCapHwnd, CONNECT, 0, 0 'connecting to camera SendMessage mCapHwnd, WM_CAP_DLG_VIDEOFORMAT, 0, 0 'Calling video format dialog DoEvents Slider1.Value = GetSetting("MotionDetect", "Param", "s1", "0") Slider2.Value = GetSetting("MotionDetect", "Param", "s2", "0") End Sub Private Sub Timer2_Timer() If ProgressBar1.Value > 1 - Slider2.Value * 2 Then Beep SavePicture Picture1.Picture, App.Path + "Detected" + Format(Date, "ddmmyyyy") + "__" + Format(Time, "hhmmss") + ".bmp" List1.AddItem "Saved in " + Str(Time) + " " + Str(ProgressBar1.Value) + "% --> " + Format(Date, "ddmmyyyy") + "__" + Format(Time, "hhmmss") + ".bmp" End If End Sub //PROGRESS CODE Public Sub start() For i = 1 To 15 DoEvents SendMessage mCapHwnd, GET_FRAME, 0, 0 SendMessage mCapHwnd, COPY, 0, 0 Form1.Picture2.Picture = Clipboard.GetData: Clipboard.Clear DoEvents ProgressBar1.Value = ProgressBar1.Value + 1 Next End Sub Private Sub Form_Load() ProgressBar1.Value = 0 End Sub
  • 6. ISSN 22773061 1805 | P a g e A u g u s t 3 0 , 2 0 1 3 Results The method developed was used to identify and discriminate the body motion at the same time. If there is a detected motion it will save to the designated folder and if there is no motion it will do nothing. Motion was detected through color sensitivity. It was found out that there is motion if color sensitivity is 50% and above, which was saved upon detection. Findings The researchers found out that motion detection of human using webcam can be automatically detected using color sensitivy. Motion detection works on the basis of frame differencing - meaning comparing how pixels (usually blobs) change location after each frame. There are two ways motion can be detected : 1.) looking for a bulk change in the image, and 2.) motion of the middle mass. The problem with these motion detection methods is that neither detects very slow moving objects, determined by the sensitivity of the threshold. But if the threshold is too sensitive, it will detect things like shadows and save there in designated folder. Motion Detection is applied to a process to measure the change in speed or vector of an object in the field of view. The study entitled “Motion Detection of Human using webcam” This application only works if there is a motion detected and it will automatically save the captured image in its designated folder and if there is no motion captured it will not saved. Conclusions The authors conclude that using a webcam can easily detect the motion of a human. It has been made toward the goal of automatically detecting, identifying and tracking of captured image. The system used the Difference and Threshold filters algorithm to compare and detect the difference of the two pictures. She is a graduate of Bachelor of Science in Statistics at the University of the Philippines in 1986, Master in Computer Science at De la Salle University, Manila in 2000 and is doing her dissertation in Phd in Education major in Mathematics and a member of IACSIT since last year. She had been in the teaching profession in more than 25 years and is the Dean of the College of Computer Studies of Lyceum of the Philippines University in Batangas for 12 years. She had presented research papers locally and internationaly, one of which is Philippine government funded at San Diego California last March 2010. She had visited 9 countries in a period of 11 years during study tours and benchmarking visits.She had been the President of PSITE IV- Philippine Society of IT Education for 3 years and had been the PSITE National Secretary for another 3 years and is currently the National Treasurer this year.