Home - Blog

OpenMV Cam: Technical Guide on Smart Vision Camera

Smart vision cameras are vision systems with in-built image sensors that capture images and get precise electrical info. Afterward, the cameras generate an event description and make decisions based on the digital image filters. OpenMV Cam is an example of an intelligent vision camera. It qualifies as one because of its communication interfaces, I/O lines, and low cost. 

Stick around as we learn more about the camera system. 

What is openmv?

An OpenMV cam project makes the vision of machines reachable to learners via a low-cost, open-source, and user-friendly platform. 

Often, you can program OpenMV Cam in Python3. Moreover, the camera has extensive image processing and machine learning functions. The functions include;

  • GIF and MJPEG video recording,
  • AprilTags,
  • QR and bar code decoding,
(QR and Barcode)

(QR and Barcode)

  • Color tracking,
  • Keypoints descriptors, and
  • Face detection. 

Additionally, based on Qt creators, an OpenMV camera has IDE (cross-platform), reinforcing programmable cameras. An OpenMV IDE works by;

  • First, allowing the user to view the frame buffer of the camera, 
  • Then, access its sensor controls, 
  • Finally, use a BLE/Wi-Fi/serial over USB to upload progress scripts to the camera. 

It also has tools that process images that help produce key points, thresholds, tags, etc. 

OpenMV Cam describes

Definition 

OpenMV Camera is an entire microcontroller board with a programmable camera via MicroPython. 

The OpenMV CAM function

  • Running machine vision algorithms on the camera helps detect faces, track colors, etc.
  • Furthermore, it has an embedded functionality, making it easy to direct I/O pins in the real world. Controlling I/O pins may require you to trigger taking videos and pictures of executing machine vision algorithms or external events. 
  • Also, instead of programming OpenMV Camera in C/C++, you can do so in high-level MicroPython scripts. You’ll quickly work with high-level data structures and sophisticated outputs generated from machine vision algorithms. 

OpenMV Cam m7 describe

Definition 

OpenMV Cam M7 is also a low-power, compact microcontroller board helping implement machine vision applications in the real world. 

Openmv cam m7 function

The OpenMV intelligent M7 Cam Vision camera works similarly to OpenMV Cam, i.e., detecting colors, tracking faces, etc.

Features of the OpenMV Cam

Some features and specifications of the OpenMV Cam Cortex M7 processor include;

  • First, it has a 12-bit DAC mode and 12-bit ADC.
  • Then, it comprises two high-power 850nm IR LEDs and an RGB LED. 
  • Thirdly, it has ten I/O pins. Of the ten pins, there are PWM and interrupts and three I/O pins for servo control. The SPI bus can operate up to 54Mbs, allowing easy image data streaming.
  • The I/O pin’s output is 3.3V, but they cannot tolerate 5V. 
  • Additionally, it runs at 216MHz with 2Mb of external flash and 512Kb RAM. 
  • The image sensor (OV7725) can generate 320 × 240 16-bit or 640 × 480 8-bit grayscale images at 30 FPS. 
  • Also, it can interface with other sensors and microcontrollers using an asynchronous serial bus (TX/RX), CAN bus, and I2C bus. 
  • It has a standard M12 lens mount with a 2.8mm lens, and a microSD card socket of 100Mbs write/read. You can additionally buy expert lenses and link them to the OpenMV Cam. 
  • Lastly, it has a full-speed (12Mbs) USB that interfaces to a computer. Thus, when you plug in your cam, it’ll seem like a USB flash drive and virtual COM port. 

Interface Library

OpenMV has an inbuilt Remote Python/Procedure Call (RPC) library that permits the connection of the Cam to devices. The electronic devices can range from a microcontroller, e.g., Arduino, Raspberry Pi, a Singe board computer (SBC), or a computer. 

Interface Library (Remote Python/Procedure Call) Operation

It works over:

  • Wi-Fi via a Wi-Fi shield up to 12Mbs,
  • USB Virtual COM Port (VCP) up to 12Mbs,
  • CAN bus up to 1Mbs,
  • SPI bus up to 54Mbs (you can also have 40Mb/s or 80Mb/s with short wires),
  • I2C bus = 1Mbs (when using pull-up resistors), and
  • UART (Async Serial) = 7.5Mbs. 

You can also easily stream JPG or RAW image data and get image processing results using the RPC library. Also, when controlling hardware of lower level, e.g., motor driving, you can use OpenMV to hold a different microcontroller. 

Lastly, you may choose one of the libraries below from OpenMV to enable interfacing with other systems. 

Arduino Interface Library for I2C, UART, SPI, and CAN Comms

Features 

  • CAN supports via the CAN peripheral on the ESP32 or MCP2515 over SPI. 
  • It works in all variants of Arduino. 

Using Generic Python Interface on SPI/I2C, Kvarser CAN, UART, Ethernet/Wi-Fi, and USB VCP Comms

It gives the Python code that connects an OpenMV Camera to your Linux (or Beaglebone/RaspberryPi), Mac, or Windows computer. 

Other features

It supports the following;

  • SPI/I2C on Linux SBCs, e.g., Beaglebone/Raspberry Pi. 
  • Kvarser CAN work on Linux and Windows. 
  • Wi-Fi/Ethernet on all systems.
  • USB VCP on all systems since USBs directly connect to OpenMV Cams.
  • TTL/RS485/RS422/RS232 UARTs on all systems. 

Precautions for serial ports

Using the code below, you can open the OpenMV Cam VCP and read the serial port’s text lines. 

Fortunately, the code works on Linux, Mac, or Windows. Just change the port’s name to match the USB VCP port name. The cam display will appear as /dev/ on Linux or Mac. 

Note; 

Ensure you set the DTR line to false when opening the port of the USB VCP with a different language/serial library. Failure to do so can make the OpenMV Cam overpower the printed output. 

Applications

OpenMV has the following applications;

  • Line or edge detection,
  • Frame differencing,
  • Video recording,
  • AprilTag tracking,
  • Multi-blob color tracking (in creating color makers of different color ranges),
  • Image capture,
  • Template matching,
  • Shape detection, e.g., rectangle, 
  • Circle detection,
  • Linear barcode decoding,
  • Data matrix detection/ decoding,
  • QR code detection/decoding,
  • Optical flow,
  • TensorFlow Lite models for microcontroller support, 
  • Eye tracking,
  • Face detection, and
face detection and recognition

(face detection and recognition) 

  • Marker tracking. 

Conclusion

OpenMV helps achieve machine vision functions like face detection, RAW video recording, or detecting color codes. Its wide range of applications stems from having outstanding features. 

If you want more about intelligent vision cameras, particularly OpenMV Cam, do not hesitate to contact us. 

Avatar photo
Hommer Zhao
Hi, I am Hommer, the founder of WellPCB. So far, we have more than 4,000 customers worldwide. If you have any questions, you can feel free to contact me. I really appreciate any help you can provide.

Services