Add to cart
Board Type : GerberFile :
Layer : Dimensions :
PCB Qty :
Different PCB Design
PCB Thickness : PCB Color :
Surface Finish : Castellated Hole :
Copper Weight : 1 oz Production Time :
Total: US $
Elecrow community is a shared platform and we are not responsible for any design issues.

PCB Assembly

PCBA Qty: BomFile:
NO. OF UNIQUE PARTS: NO. of Components:
Assembly Cost: US $
Elecrow community is a shared platform and we are not responsible for any design issues.
Add to cart
3dPrintingFile : Size :
Unit : Volumn :
3D Printing Qty : Material :
Total: US $12.99
Elecrow community is a shared platform and we are not responsible for any design issues.
Add to cart
Acrylic Type : AcrylicFile :
Dimensions: Engrave:
Acrylic Qty :
Acrylic Thickness:
Acrylic Color:
Total: US $12.99
Elecrow community is a shared platform and we are not responsible for any design issues.
Add to cart
CNC Milling File : Size:
Unit: Volumn:
CNC Milling Qty : Material:
Type of Aluminum: Surface Finish:
Tolerance:
Surface Roughness:
Total: US $12.99
Elecrow community is a shared platform and we are not responsible for any design issues.
closed
user-img

Mirko Pavleski

Published: Sep 05,2024

Simple ESP32 CAM Object detection using Open CV

This is certainly the simplest and cheapest object detection system that can serve perfectly for the presentation of the possibilities of this technology.

ccc ccc
Copyright Info

Attribution-ShareAlike (CC BY-SA)

Read More⇒
  322
  1
  0
cover-img
 
  • thumbnail-img
 

Hardware Components

  • ESP32 Camera module

    X 1

Tools, APP Software Used etc.

  • Arduino IDE

    Arduino IDE

    Arduino

Story

 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.

  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.

Code
  • Required files

    Required_files_46388949666d9980e873c0.zip
    Download(0)
user-img

Mirko Pavleski

+ Follow

Topic

View All
esp32 cam python object detectio object recognit
  • Comments( 0 )
  • Like( 1 )
/1000
Upload a photo:
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP

You May Also Like

View All