Field Motion Detection on Android

Home»Field Motion Detection on Android

Abstract:-
Motion detection [1] is the process of detecting a change in position of an object relative to its surroundings or the change in the surroundings relative to an object. 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 dark currents, pre-processing is useful to reduce the number of false positive alarms. This paper presents a simple algorithm to detect the entry of any foreign object onto the fields by detecting its motion using android phone and alerting the farmer regarding the same.
Keywords:- Android, fields, motion, camera view, simple messaging service(sms), email(electronic mail), phone.

I INTRODUCTION
Motion detection [1] is the process of detecting a change in position of an object relative to its surroundings or the change in the surroundings relative to an object. 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. As soon as the motion is detected, the first frame is compared with the frame where the motion is detected and their colour counts are compared. If the colour count (RGB values) is greater than the specified threshold, the software presumes that the motion is detected, captures the image and alerts the user (here farmer) through an email and/or sms and/or through phone call.
This application enables the android users to use their android device as a remote surveillance camera or as a spy cam with motion detection functionality that uses the built-in fixed camera to detect the movements in fields as the farmers cannot monitor the fields continuously and this application helps them to monitor automatically. The software alerts the farmer by giving him a call to the number specified in the program, an email with the attachment of the captured image when motion is detected, and an alert message that there is some motion in the fields. The application is resumed once the alerts are sent within the stipulated time. The images are stored in the SD card of the device.

 

II DESIGN
A Basic architecture


                                               Figure 1: Basic overview of Field Motion Detection Model

Fields are continuously monitored through the android phone camera view and if any object enters, it is detected by its motion in the field and immediately the image is captured and attached automatically with the email and/or sms is sent and/or an alert call is given to the SOS number, so that farmer becomes aware of what is happening in the field on his absence.

B Work-flow

 

                                                Figure 2: workflow for field motion detection

 

C Steps followed in the application
• Once the activity enters the Motion Detection activity, the motion page screen is displayed with a button to proceed for motion detection and settings in the menu.
• If settings is selected, the values for threshold, mobile number, email ID, and alerts activation like sms/email/call are set.
• If no settings are selected, the default values are taken from the activity and motion page screen is still displayed.
• If the Motion Detection button is selected, camera view is opened, it starts getting frames and colour counting of the first frame is calculated.
• For the consecutive frames also the colour counting is calculated.
• If the colour count is greater than the specified threshold in a specific frame, software assumes that there is a motion detected and captures that frame and sends through email and alerts the farmer through call and sms.

III RESULTS AND ANALYSIS
Various outputs obtained for the SSDSS application are discussed below with snapshots of the sequence of operations in figures 3 – 6. The performance results are also discussed.

Figure 3: Settings screen of the Motion Detection Activity

The settings screen page of the motion detection activity where we can either change the settings through the values entered or proceed to motion detection by clicking on the back button. If no values are set here the software takes the default values specified in the code.

 

 

                          Figure 4: Threshold Settings screen of the Motion Detection Activity

The threshold settings screen page of the motion detection activity where we can either change the threshold settings through the values entered or proceed to motion detection by clicking on the cancel button. If no threshold values are set here the software takes the default values specified in the code.

 

 

 

                   Figure 5: Mobile Number Settings screen of the Motion Detection Activity

The mobile number settings screen page of the motion detection activity where we can either change the contact or SOS number through the values entered or proceed to motion detection by clicking on the cancel button. If no value is set here the software takes the default value specified in the code.

 

 

 

                             Figure 6: Email ID Settings screen of the Motion Detection Activity

The email ID settings screen page of the motion detection activity where we can either change the email ID through the values entered or proceed to motion detection by clicking on the cancel button. If no value is set here the software takes the default value specified in the code.

Analysis:

Analysis of the applications could be done using Android Debug utility known as Traceview. Traceview is a graphical viewer for execution logs saved by application. Traceview helps to debug application and profile its performance [2].

Figure 7: Workflow of the MotionActivity3.

This workflow represents the workflow of the MotionActivity in the code and the performance of the application in terms of time taken in milliseconds. This workflow can be repeated for any number of activities and the time taken is plotted in terms of graph with the activities debugged.

IV CONCLUSION AND FUTURE WORK
Since farmers cannot monitor their fields continuously, we have designed this application to monitor automatically and alert the farmers when any motion in the fields is detected. This application is a contribution to the society especially for the farmers who work hard for the nation to fulfill our food needs and we have implemented this in android because of its portable, open source platform and the cost effectiveness. Hopefully, this application helps them.

Future work is to implement the same in a moving camera and monitor the exact movements and detect the motion and also detect what type of object entered the field and trace all its movements and capture in the form of a video and alert user the same.

V REFERENCES

1) Motion Detection:- http://en.wikipedia.org/wiki/Motion_detection#Electronic
2) Traceview analysis :
http://developer.android.com/tools/debugging/debugging-tracing.html

 

Posted by: Anusha V.. in Science , Computer | Date: 04/02/2016

Share this article

Other articles

Back to article listing

Find a Great Teacher

Tell us your learning needs in detail and get immediate response from qualified tutors

Terms & conditions agreed
Ask a Question
Top