Integrating ESP32 Camera with Android for Enhanced Object Detection

Good morning,I have a project in which I am using Android application for object detection Currently my phone camera opens when I open the application and it starts detecting the objects But I want to integrate the esp32 cam with android so that esp32 video stream come to android and should be shown at phone's screen Basically it uses phone camera for object detection now it should use esp32 cam Can anyone help?
Solution:
You can run a Webserver on a ESP32 CAM Module. And access it from Android App which can be made by using simple MIT App Inventor. So that the Mobile App will access a video stream over HTTP as a client. Also, you can add additional capabilities like the object detection algorithm running on ESP32 to acces camera stream connected to it.
Jump to solution
12 Replies
Solution
Umesh Lokhande
Umesh Lokhande8mo ago
You can run a Webserver on a ESP32 CAM Module. And access it from Android App which can be made by using simple MIT App Inventor. So that the Mobile App will access a video stream over HTTP as a client. Also, you can add additional capabilities like the object detection algorithm running on ESP32 to acces camera stream connected to it.
aymen ammari
aymen ammari8mo ago
Wich app you are using, it mabe has a sitting to change cam source and his choosing phone cam us default
Ben
Ben8mo ago
I haven't worked with Android applications before, but I tried connecting the ESP32-CAM. I used the example called 'CameraWebServer,' which gave me an address. I put this address into my Python script, and it worked. I'm not sure if I answered your question correctly.
Ben
Ben8mo ago
@wafa_athmani Have you tried calibrating the ESP32-CAM? I ask because I need its parameters for my project. I've already tried, but the results aren't accurate.
wafa_athmani
wafa_athmani8mo ago
Actually i tried your solution by using flask library and then used kodular WebViewer، i completely changed the app but works very nicely and smoothly thank you for the idea
Ben
Ben8mo ago
The ESP32-CAM can only capture frames, it does not support functionalities such as opencv
Umesh Lokhande
Umesh Lokhande8mo ago
To use OpenCV and runing inference (ML). I suggest using RPi with HQ Camera module
wafa_athmani
wafa_athmani8mo ago
import time import esp32_camera # Replace with your ESP32-CAM library camera = esp32_camera.Camera() camera.set_resolution((320, 240)) # Adjust as needed camera.capture_frame() img_data = camera.frame format (assuming RGB format) img = Image.frombytes('RGB', camera.frame.shape[:2], img_data) img.save('f3.png', 'PNG') camera.deinit() print("Image captured and saved as f3.png!") This is the code i used to take a pic , i hope it would help you
Ben
Ben8mo ago
RPi is too expensive compared to the ESP32CAM. Can I still use it for capturing frames? I plan to process the data on my laptop and then send it to the ESP32 via WiFi
Ben
Ben8mo ago
And my system doesn't necessarily need to be real-time strict
Ben
Ben8mo ago
I've already tried to calibrate the camera. I need the parameters you obtained to compare them with mine.
Umesh Lokhande
Umesh Lokhande8mo ago
Yes, most of my experience is with RPi and its camera modules. But I'm not sure about ESP32 CAM and its limitations at this moment especially, with capturing frames.
Want results from more Discord servers?
Add your server