Closed wdouglas1999 closed 2 years ago
Hi sorry for late responding. Did you find the solution ? For motion detection, you can use a very simple method that compare two consecutive images to find the region.
Hi, thank you for your reply. No, I did not find a solution. Do you have any example I may use? Thank you.
Not now, but in recent days, we will give a simple example.
Could you keep looking for movement for a set time to see if it's not a false trigger? Something like this where the device is woken by a PIR input and then checks 3 seconds later to see if the input is still triggering. You could do it in a loop and exit if the PIR goes low. You need a sensor that doesn't keep the input high too long after movement is detected.
unsigned long timer_millis = millis();
while (millis() - timer_millis < 3000) { //Test for movement for 3 seconds after warning
if (digitalRead(PIR_PIN)) { // If still movement...
do_something();
}
}
(full example: https://robotzero.one/ttgo-security-camera-pir/ )
Or did you want to check for the presence of a face after movement is detected? There's code here that might help: https://robotzero.one/unlock-door-face-detection-sonoff/
Hi @wdouglas1999,
Is your problem solved?
Hi, I have not yet solved this issue due to time constraints. However I have seen an Arduino based project focusing on this type of movement detection using various methods. I was looking for something I could use in IDF environment though. This is the link to the project I mentioned. https://eloquentarduino.github.io/2020/01/motion-detection-with-esp32-cam-only-arduino-version/
Hi @wdouglas1999,
Please check this API get_moving_point_number()
in ESP-DL.
I hope this can meet your requirement.
Very interesting, I will look into it for sure. Thank you.
Hi @wdouglas1999 ,
We'll provide an example in ESP-WHO later.
Hey, I am looking into detecting movement as well. The Function get_moving_point_number() is very well explained, but I dont seem to find where the source code is. Can someone point me into the right direction? Thank you in advance
Good day, I use a PIR sensor to detect movement , but i receive many false triggers. I would like to know if there is a way to use your code to be able to compare consecutive images to confirm movement. I do not require facial recognition. Is there any library I could use with documentation available? Thank you.