I have a school project and I need to do perimeter control in an open area.

So I have a drone up in the air to provide live video feed into my computer but I have no idea how to detect when something enters the area/perimeter.

Is there any software to do this?

  • 1
    I used Python+OpenCV to do something like pyimagesearch.com/2015/05/25/… but unfortunately 1) it detects motion in the whole video, not only a specific area 2) It would probably get confused by any small movement/vibration of the drone.
    – Nicolas Raoul
    Dec 16, 2016 at 6:33
  • 1
    What is the shape of the perimeter? If rectangular it will make things easier. Is it always at the same place on the video, or does the program have to recognize where is the perimeter as well?
    – Nicolas Raoul
    Dec 16, 2016 at 6:34

2 Answers 2


If you have a static positioned webcam, you can use Linux as an os with the program "motion" - it detects changes in the webcam view, and then can run a script when motion is detected. Lots of other options like sensitivity level, watching only a certain area of the image for change, how long change must be taking place from reference frame for it to be considered "motion", how long to reset after an alert, etc. Both Free and free...


(See also same answer from user ivanivan - realised that his answer existed after I posted this:)

What about motion?

From the output of apt show motion

Download-Size: 238 kB

Description: V4L capture program supporting motion detection
 Motion is a program that monitors the video signal from
 one or more cameras and is able to detect if a significant
 part of the picture has changed. Or in other words, it can
 detect motion.
 Motion is a command line based tool. It has no graphical
 user interface. Everything is setup either via the
 command line or via configuration files.
 The output from motion can be:
    - jpg/ppm image files
    - mpeg/mp4/swf/flv/mov/ogg video sequences
 Also, motion has its own minimalistic web server. Thus,
 you can access the webcam output from motion via a browser.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.