-1

I'm trying to write my own software for security camera motion detection, but in the area of interest outside my house, there is a lot of vegetation motion that will obviously trigger recording if I use some of the more simple algorithms that rely just on the difference between images. Does anyone have any recommendations? I'm struggling to find motion detection information online. I'm guessing that I'll have to employ some edge detection, or maybe a filtering process. Cheers, Zan

Zan
  • 21
  • 3
  • Please read [ask]. Your post is too broad and asking for recommendations is also quite off-topic. I suggest you combine your camera with a PIR motion sensor. – Piglet Oct 15 '19 at 10:47

1 Answers1

0

Without having seen any of your recordings I would suspect that motion from the vegetation looks quite noisy and more random with only a few local edges as in contrast I would expect much stronger connected edges for people that move through the scenery. Also edges from objects moving on the floor will be mostly be oriented on specific directions for a longer period of time.

My first attempt would be

  1. median filter on input image to reduce noise
  2. difference image to previous (may be 2nd previous) image
  3. some edge detector
  4. build some edgelists based on the stronger
  5. filter out weak/short edges
  6. match edges from objects in last frame against the newly found
  7. apply some tracking of positions and other features
  8. classify object behaviour based on this features
    • consistent movement in one direction
    • consistently strong edges on the same object
    • object size
  9. to trigger your recording

Alternatively you can jump on the recent Hype of Deep Neural Networks. Look up online information and tools (and maybe embedded hardware) to train and run a CDNN.

Split your current videos into

  • videos there you do not want to be warned
  • videos there you do want to be warned

let the magic happen.

vlad_tepesch
  • 6,681
  • 1
  • 38
  • 80
  • Thanks! That's a pretty awesome answer. I've been looking at a mixture of gaussian background subtraction process, but I'm concerned that the vegetation is going to be a little bit too noisy - what do you think ? – Zan Oct 16 '19 at 05:20