OpenMV- Machine Vision for Beginners

Summary of OpenMV- Machine Vision for Beginners


OpenMV is an open-source, low-cost machine vision platform designed for beginners. Programmable in Python3, it features extensive image processing capabilities like face detection, color tracking, and QR code decoding. The system includes a cross-platform IDE for script management and supports various sensors (OV2640, OV7725) with on-board storage. Powered by STM32F ARM Cortex-M processors, the hardware utilizes 4-layer PCBs and offers versatile I/O headers for expansion shields.

Parts used in OpenMV Machine Vision Platform:

  • STM32F ARM Cortex-M Digital Signal Controllers
  • Omnivision Image Sensors (OV2640 and OV7725)
  • 4-layer PCB
  • Serial Wire Debugging (SWD) interface
  • DFU bootloader
  • 2.54mm I/O Headers
  • uSD Card or internal Flash storage
  • 16MB SDRAM (on OpenMV2)
  • Cross-platform IDE based on Qt Creator
  • Extension Shields (e.g., SPI LCD)
The OpenMV project aims at making machine vision more accessible to beginners by developing a user-friendly, open-source, low-cost machine vision platform.
OpenMV- Machine Vision for Beginners

OpenMV cameras are programmable in Python3 and come with an extensive set of image processing functions such as face detection, keypoints descriptors, color tracking, QR and Bar codes decoding, AprilTags, GIF and MJPEG recording and more.

Additionally, OpenMV includes a cross-platform IDE (based on Qt Creator) designed specifically to support programmable cameras. The IDE allows viewing the camera’s frame buffer, accessing sensor controls, uploading scripts to the camera via serial over USB (or WiFi/BLE if available) and includes a set of image processing tools to generate tags, thresholds, keypoints etc…

The OpenMV project is a THP semifinalist and was successfully funded via Kickstarter back in 2015 and has come a long way since then.

Overview:

  • Scriptable in Python3.
  • On board uSD Card or internal Flash storage for scripts, images and video.
  • RGB, YUV and JPEG Omnivision sensors (OV2640 and OV7725).
  • Recording and Streaming GIF and MJPEG to SD or external WiFi shield.
  • Extension Header breaks out UART, I2C, SPI, PWM, DAC and ADC.
  • User-friendly Python IDE to view the framebuffer and upload scripts to the camera.
  • 16MB SDRAM on-board enables uClinux to run on OpenMV2.
  • Image processing library includes:
    • Line, circle, rectangle detection.
    • Face detection with VJ (compatible with OpenCV’s cascades)
    • ORB keypoints detector, descriptor, matching and tracking.
    • QR and Bar codes decoding and AprilTags support.
    • Template matching with Normalized Cross Correlation (NCC)
    • Misc functions: kmeans, filters, scaling, sub-image, blitting and alpha blending.

The Hardware:

  • Processor: Based on STM32F ARM Cortex-M Digital Signal Controllers (DSCs) running at 168-216MHz. Features a single precision FPU, DSP instructions and a DCMI (Digital Camera Interface). The low-cost, the HW camera interface and the FPU and DSP made this particular controller a perfect match for the project.
  • Image Sensor: OpenMV1 supports many single package lens/sensors, such as the OV965x and OV2640 while OpenMV2 and OpenMV3 support a single sensor with an external lens.
  • PCB: Although it costs more, a 4-layer PCB is used for all cameras for better signal integrity and EMI issues. Additionally, using 4-layers made it possible to fit everything on the 1.0×1.3 inches OpenMV1 board. The first PCB prototypes were all ordered from OSHPark.
  • Debugging and Flashing Firmware: The Serial Wire Debugging (SWD) is broken out on all cameras for debugging with GDB and the DFU is easily accessible to upload new firmware images via USB. Additionally, the camera includes a bootloader that can be used from the IDE to easily upload new firmware images.
  • I/O Headers and Shields: The main 2.54mm headers break out SPI, I2C, USART, PWM, CAN, DAC and ADC. These headers allow interfacing extension boards (or Shields) to OpenMV to extend its capabilities.  For example, using SPI LCD with OpenMV camera to view the framebuffer:

Read more: OpenMV- Machine Vision for Beginners

Quick Solutions to Questions related to OpenMV Machine Vision Platform:

  • How can users program the OpenMV cameras?
    OpenMV cameras are programmable using Python3.
  • What image processing functions does the platform support?
    The platform supports face detection, color tracking, QR and Bar codes decoding, AprilTags, and GIF/MJPEG recording.
  • Does the OpenMV IDE allow viewing the camera frame buffer?
    Yes, the user-friendly Python IDE allows viewing the camera's frame buffer and accessing sensor controls.
  • What processor is used in the OpenMV hardware?
    The hardware uses STM32F ARM Cortex-M Digital Signal Controllers running at 168-216MHz.
  • Can scripts be uploaded via WiFi or BLE?
    Yes, scripts can be uploaded to the camera via serial over USB or WiFi/BLE if available.
  • What types of sensors are supported by OpenMV2 and OpenMV3?
    OpenMV2 and OpenMV3 support a single sensor with an external lens.
  • Why was a 4-layer PCB chosen for all cameras?
    A 4-layer PCB was used for better signal integrity and to address EMI issues.
  • What communication protocols are broken out on the main headers?
    The main 2.54mm headers break out SPI, I2C, USART, PWM, CAN, DAC, and ADC.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter