The ESP32-CAM module is a cheap, low power consumption module and could be used as a surveillance camera, but it seems not strong enough to run some heavy computer vision tasks inside, so I have tried making a system to stream the images from ESP32-CAM module to PC via WebSocket, then we can do some post processing there, for example, in this project I do the object detection.
Demonstration:
Hardware wiring:The software contains 2 parts:
1. ESP32-CAM firmware.
This can be flashed to ESP32-CAM module via Arduino IDE.
The purpose of this firmware is to setup a udp server and a TCP client inside the ESP32-CAM.
The UDP server is to receive the command request from the remote control UDP client in PC.
The WebSocket server is to send the image which captured by the ESP32-CAM to the remote control Websocket client in PC.
2. Remote control software (Can be run on Ubuntu or Windows PC) : Tested on Ubuntu.
The purpose of this software is to control the ESP32-CAM module via UDP command, and also acts as a Websocket client to connect to ESP32-CAM and receive the images sent from the ESP32-CAM and do the post processing here.
Please follow the below github repository README to setup the environment in your PC.
Github link source code:
https://github.com/longpth/ESP32-CAM-ObjectDetection
SystemAfter connecting to the same network, the PC broadcasts the UDP package to request ESP32-CAM to start stream the captured images to the remote WebSocket client in PC. The post processing would be done here.
Comments