The objective of this project is to implement a smart motion detector which will control the flow of saving frames coming from the camera .
Abstract
The objective of this project is to implement a smart motion detector which will control the flow of saving frames coming from the camera .This will save disk spaces by sampling only the frames that are significant to the user , e.g. those who represent the events during the night shift.
Basic Approach
Since specified motion has to be detected in captured frames, it is obvious that some kind of tracking should be used. The decision fell on difference picture detection , which is based on simple but efficient algorithm of decision.
When knowing that the coming frame is different from the previous one the application notifies the user that there is an indication of change event and that there is a need of saving the current frame.
Decision algorithm
The Flow chart below demonstrates the way Security Camera works , the comparison is done under real time limitations , hence the need to simplicity while making the decision whether to save the frame.
Results
The Chart bellow shows four different ways of calculating the different pictures in all kind of regular motion cases like crossing the room , moving in a far point and running fast through the camera.
- Calculate the average energy per pixel that was changed
- Calculate the average energy per pixel
- Take the number of pixels that were changed
- In this one we do not taking any basic threshold per pixel ,but we sum all the changes in picture and decide by pre determined threshold (this one is for reference only)

The algorithm that was chosen is the one that takes the number of pixels that were changed in this frame , this algorithm gave very good results in figuring out whether difference comes from noise or it indicates a real case where there is a need of saving the frame.
The figure bellow demonstrates a classic case where in which somebody enters the room and the camera identifies that and notifies the users by prompting an icon in the bottom of the picture.
Conclusions
The results show that the implemented system achieves project’s objectives. It was tested with several different cameras and in variety of conditions – in all cases it outcome with desirable behavior , therefore we could use basic video card and simple camera and yet achieve good results .
The chosen algorithm is good for real time applications since it does not require too many memory accesses
Acknowledgments
We would like to thank Ari Shenhar for supervising this project, the laboratory staff – Johanan Erez and Ina Krinski for helping us during the work and Ollendorff Minerva Center Fund for their support.



