Closed billyrudi closed 3 years ago
Tank you. Is it compatible with arduino ide?
Well you would decode each JPG frame into a bitmap image, buffer it for a frame, and then do a pixel by pixel comparison, counting the number of changed pixels. Take a look at the motion package for linux, it is quite good. That package applies a blurring algorithm before doing the comparison to reduce false positives due to noise.
While my ESP32-CAM is waiting for a client to connect to stream video, I'd like it to be a motion detector and email me when it detects motion. I wonder what would work better: 1) comparing snapshots for change (and possibly missing something while processing or doing other actions), or 2) using a PIR. I love the idea of not using the PIR, but I guess I'd like to test both.
I was actually intending to do something similar with my webcam code if you want to compare notes. I will be starting the software motion detect feature soon.
I was thinking of creating a FreeRTOS task that retrieved a frame at a low resolution using YUV422 pixel encoding and comparing the individual pixels. The frame rate does not need to be very high.
I have done something along these lines recently which may be of interest: https://github.com/alanesq/CameraWifiMotion
It is based on the motion detecting code created by https://eloquentarduino.github.io/2020/01/motion-detection-with-esp32-cam-only-arduino-version/ although I have modified it a lot.
This issue appears to be stale. Please close it if its no longer valid.
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