Hello, In the Module 1, is it possible to have ESP32-CAM recognizing faces with the browser closed, after having instructed it with 5 samples?
It seems to me that if I close the browser the ESP32 stop to analize faces.
I have modified the code in order to have the led flashing when a subject is recognized, but if I close the browser it seems not to run.
It runs only if I push the button “start streaming” on the web interface. How I can modify the code for having it running with the browser closed? It seems that when I close the browse the streaming stops.
Thank you and many thanks for your kind attention,
Hello Ezio, I hope you are doing well. Are you using the project presented at the end of our “Build ESP32-CAM Projects eBook“?
Or are you using the examples that comes in the first Module?
The face recognition runs only when you’re streaming video. That’s why it only runs with the browser opened.
I found this project, that might help you with what you want to do:
Thankyou very much for the hint, Sara.
I’ve had a look to the project, but it is not exactly what I want to do. The example requires to re-flash the esp32-cam with the modified web server version for acquiring new faces, and then flash back the code for the standalone face recognition. I would like to attempt to merge the two sketches in order to have a more usable implementation. The problem is how to manage a critical region for the camera access, avoiding that both the http handler for streaming and the code into loop() both access the camera at the same time.
The best idea that I have had for the moment is to check an external pin. If HIGH the web server starts and allow to acquire the faces, while the code in the loop() does not run. T
he pin should be tested during setup() in order to avoid race condition problems. If the pin is LOW the web server is not started and the code into the loop() works. In order to read the change status of the pin you have to reset. It is not yet an awesome solution. Any other more elegant ideas?
Actually I have also to find out how to delete the aknowledged faces because in the example is still another sketch to be uploaded and executed.
I’d like to modify the web interface in order to add a new button, but the html is gzipped and inserted into the sketch and I dont know how to modify it. Can you help me?
This video explains how to do that: https://www.youtube.com/watch?v=bIJoVyjTf7g
I hope this helps.