espressif / esp-who

Face detection and recognition framework
Other
1.67k stars 466 forks source link

Motion Detection (AIV-708) #110

Open billyrudi opened 5 years ago

billyrudi commented 5 years ago

Hi, is it possible to detect motion only using video not pir or external sensor? How i can detect if the frame video is changing ? regards Paolo

mitchins commented 5 years ago

This is an interesting application. You can definitely treat a face being detected as a sort of motion. Is there a way to run a function on the image such as wave or something to detect changes?

XiaochaoGONG commented 5 years ago

Hi there are some APIs that would work for motion detection.

https://github.com/espressif/esp-face/blob/679b5340418bd9604c25735294dc536babca3db6/image_util/include/image_util.h#L305-L307

mitchins commented 5 years ago

Interesting. You’d probably want to create some sort of convolution so that a neighbourhood of a large size is considered. Could work like:

  1. Take image diff
  2. Calculate neighbourhood sums that meet the threshold, and if a large enough motion is detected
billyrudi commented 5 years ago

Hi ...but can you provide an example on ow do it? i'm not so experienced on this library.