|
|
ESP32 Camera module |
x 1 |
|
Screw thread maker |
|
|
arduino IDEArduino
|
|
|
Python |
Simple ESP32 CAM Object detection using Open CV
Object detection is a computer vision technique that involves identifying and locating objects within an image or video. It is a fundamental task in various applications, such as surveillance, autonomous driving, and image retrieval.
This time I will explain to you how to make a powerful object detection device that uses only an inexpensive ESP32 Camera module with a built-in FTDI USB to serial converter.

This means that there is no need for any soldering or connection of external components. We only need to connect the Module directly to the USB port of the PC. Basically the whole system consists of two parts
- Esp32 Camera module with arduino code installed
- and the second part is а pc software, actually Python code that uses Open CV, which is a powerful library for computer vision tasks, including identifying and localizing objects, as well as object detection. In our case are processed series of images received from the camera module.
This project is sponsored by PCBWay. They has all the services you need to create your project at the best price, whether is a scool project, or complex professional project. On PCBWay you can share your experiences, or get inspiration for your next project. They also provide completed Surface mount SMT PCB assemblY service at a best price, and ISO9001 quality control. Visit pcbway.com for more services

Now I will explain the installation method in order.
First we need to enable camera module support in the Arduino environment. For this purpose we go to Arduino IDE - File - Preferences - where we add the ESP32 URL to "Board Manager URLs" as follows:
(https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json)

Now click "Tool-->Board-->Board Manager", and search for "esp32". It is recommended to
install version 2.0.6 or newer ESP32 core. I installed the latest version.

Next, on Arduino IDE -> Tools -> ESP32 Arduino we choose: AI Thihker ESP32-Cam

With this, the procedure for entering support for the specific Camera Мodule in the Arduino IDE is completed.
Next we install the ESP32cam library from the attached .zip file.
We go to Sketch - Include Library - add ZIP library and select the given library

After this we upload the provided Arduino code. Just don't forget to enter the credentials of our Wi-Fi network beforehand in the code. Now in the Arduino Serial Monitor we check if the camera is initialized and working, and we also need to remember the IP address that was assigned to it in the local network because we will need it when starting the Python code

Next comes the installation of the Python environment section. For this purpose, we go to the Python page, download the latest version, and install it with default settings, noting that we need to mark the checkbox "add python .exe to path"

As I mentioned at the beginning, in order for Python code to work, several necessary libraries need to be installed, namely NumPy, OpenCV and cvlib libraries. For this purpose, we go to the command prompt and execute the following commands
-type: pip install numpy and press enter. After the installation is done.
-type: pip install opencv-python and press enter.
-type: pip install cvlib and press enter

Now we start the Python IDLE editor which is an integral part of the Python installation, or any other Python editor. We go to File - Open - and search for the provided Python code. Let me mention that together with the code, there are three more files that must be located in the same folder as the code. When we open the code, we need to enter the IP address from the camera that was previously given to the Arduino Serial Monitor.

We press RUN, and if we have completed the previous steps, a video from the camera appears on the screen for a few moments, on which various objects surrounded by a rectangular green frame are detected. The name of the detected object is written on the upper part of the frame.
And now let's see how it looks in real conditions. As can be seen from the examples, the system is capable of detecting objects with high precision.

In particular, this system uses a pre-trained object detection model. The file "coco.names" contains the names of the 90+ objects that the YOLOv3 model is trained to detect.
And finally a short conclusion. Object detection is having uses in almost all sorts of industries. It is used for tracking objects, people counting, automated CCTV surveillance, vehicle detection, etc. This is certainly the simplest and cheapest object detection system that can serve perfectly for the presentation of the possibilities of this technology, and for powerful object detection and identification even without using the Python Code we can use the AMB82-Mini IoT AI Camera, which will probably be the subject of analysis in one of my next videos.
Simple ESP32 CAM Object detection using Open CV
- Comments(0)
- Likes(2)
-
Engineer
Feb 19,2025
-
Matthew Beatty
Sep 09,2024
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Mirko Pavleski
-
Arduino 3D Printed self Balancing Cube
Self-balancing devices are electronic devices that use sensors and motors to keep themselves balanc...
-
Build simple Retro Style VFO (Variable frequency oscillator) with Crowoanel 1.28 inch Round Display
Today I received a shipment with a Small round LCD display from Elecrow. The device is packed in tw...
-
Human vs Robot – Rock Paper Scissors with MyCobot 280 M5Stack
Today I received a package containing the few Elephant Robotics products. The shipment is well pack...
-
How to Build a Simple Audio Spectrum Analyzer with Adjustable Settings
An audio spectrum analyzer is an electronic device or software tool that measures and visually disp...
-
How to Make a Digital Clock on a Vintage B&W TV using Arduino
These days I accidentally came across this small retro Black and White TV with a built-in Radio, so ...
-
Build a $10 Function Generator with Frequency Meter for Your Lab
A function generator is a piece of electronic test equipment used to generate various types of elec...
-
From Unboxing to Coding - Radar Clock on Elecrow’s 2.1 HMI Display
Today I received a shipment with a large round LCD display from Elecrow. The device is packed in two...
-
Making a Retro Analog NTP Clock with Unihiker K10 - Arduino IDE Tutorial
Some time ago I presented you a way to use standard Arduino libraries on the Unihiker k10 developme...
-
Build a Cheap & Easy HF Preselector - Antenna Tuner
HF antenna preselector is an electronic device connected between an HF radio antenna, and a radio r...
-
DIY Static Charge Monitor - Electrostatic Field Detector (Arduino & TL071)
A Static Charge Monitor also known as a Static Field Meter or Electrostatic Voltmeter is a device u...
-
XHDATA D-219 Radio Short Review with complete disassembly
Some time ago I received an offer from XHDATA to be one of the first test users of their new radio m...
-
How to make Simplest ever Oscilloscope Clock
An oscilloscope clock is a unique and creative way to display the time using an oscilloscope, which...
-
DIY Digital Barograph with BME280 and ESP32 - 24 Hour Pressure Trends
A barograph is a self-recording barometer that continuously measures and records atmospheric pressu...
-
Build a Raspberry Pi Pico SDR Radio with Waterfall Display
Software-defined radio (SDR) is a radio communication system where components that have traditional...
-
DIY Magnet Polarity Detector - How to Identify Poles with a Hall Sensor from a PC Fan
Recently, while working on a project, I needed to determine the polarity of several permanent magne...
-
Light Meter Project - Making Dfrobot Unihiker K10 Work with Standard Arduino Libraries
The other day I received a shipment with a UNIHIKER K10 development board from DFRobot, which I rec...
-
DIY Simple Arduino Whack-a-Mole Game
A "Whack-a-Mole" game is a classic arcade-style game where moles pop up randomly from holes, and th...
-
Wireless Power Transmission, Long-Distance and High-Efficiency with Class-E Tesla Coil
Wireless energy transfer also known as wireless power transmission is a method of getting useful el...
-
-
AEL-2011 Power Supply Module
332 0 1 -
AEL-2011 50W Power Amplifier
305 0 1 -
-
-
Custom Mechanical Keyboard
571 0 0 -
Tester for Touch Screen Digitizer without using microcontroller
237 2 2 -
Audio reactive glow LED wristband/bracelet with NFC / RFID-Tags
241 0 1 -
-
-







