OpenCV – Image processing & computer vision for phyCAM

With our Ezpire module for OpenCV (Open Source Computer Vision Library), you get the world's leading library for real-time image processing, ready to use with your phyCAM camera modules. The necessary libraries, Python bindings, and demo scripts are directly integrated into our phytec-vision-image. Use OpenCV as a basis for object recognition, filtering, machine vision, or as a bridge to AI applications on NXP i.MX processors.

What is OpenCV?

OpenCV is an open-source library with thousands of algorithms for computer vision and machine learning. It is the de facto industry standard for analyzing and manipulating images and extracting information from them.

In the PHYTEC context, OpenCV serves as the central software layer between pure image acquisition (via V4L2 or GStreamer) and the intelligent application logic. Whether it's classic image processing (such as edge detection or color conversion) or complex machine vision tasks (such as face recognition) – our Vision BSPs ensure that OpenCV is optimally aligned with the hardware accelerators of the SoC architecture used.

OpenCV out-of-the-box

We take the hassle out of compiling complex dependencies. OpenCV (including the Python modules) is already fully integrated into our phytec-vision-images (Vision-BSPs) and pre-configured for our Video Kits. You receive an environment with ready-to-run demo scripts.

  • Pre-compiled libraries: The Vision image contains the complete OpenCV framework, optimized for the respective target architecture (ARM Cortex-A).

  • Python & C++ Support: Access OpenCV functions conveniently via Python scripts or use the C++ API for maximum performance.

  • V4L2 & GStreamer Integration: OpenCV seamlessly accesses the V4L2 video streams of the phyCAM modules. The scripts process the image data and output it directly to a connected display via the Wayland Window Manager.

  • Prepared use cases: We provide sample Python scripts, e.g. for simple live image display or basic object recognition such as face detection.

Technical Deep Dive

Before OpenCV can access the image data stream, configuration is performed in the camera and the processor's camera interface using the media-ctrl tool. Retrieving and forwarding the image data from the video device is conveniently configured using a GStreamer pipeline. These tasks include:

  • Configure using the media-ctrl tool
  • pick up via GStreamer
  • calling up OpenCV functions

are implemented in a Python script.

A critical aspect of embedded vision is debayering (the conversion of RAW Bayer data to RGB). If the processor used does not have an integrated hardware ISP, this conversion must be performed in software, which can quickly lead to high CPU load. To make this as efficient as possible, our systems utilize ARM NEON coprocessors. Instead of having OpenCV handle the computationally intensive software conversion, optimized GStreamer pipelines can be used upstream. These convert the image data extremely quickly and at a low hardware level, and only then pass the finished RGB stream to OpenCV for the actual image analysis.

If the processor has an ISP (Image Signal Processor), debayering can also be performed in real time, thanks to the ISP support in the PHYTEC BSPs.

On processors with dedicated neural networks (NPUs), such as the i.MX 8M Plus, OpenCV often serves as an essential pre-processing stage. The high-resolution camera images are efficiently filtered via OpenCV before being passed on to inferencing engines (such as TensorFlow Lite or NXP eIQ) for object detection or classification.

Recommended Hardware

To evaluate our System on Modules and phyCAM modules in practice, we offer tailored solutions. Embedded Vision Development Kits These bundles contain everything you need to get started: System on Module (SoM), Baseboard, camera, lens and a pre-installed Vision BSP with all OpenCV examples.

For demanding image processing and AI applications, we particularly recommend these platforms:

Our benchmark for embedded vision – with dual ISP and dedicated AI unit (NPU) for extremely high-performance OpenCV and machine learning setups.

The next generation of architecture, equipped with massive AI computing power and the latest MIPI-CSI interfaces for high-resolution streaming and analysis.

You can find more Vision setups for other SoCs and form factors on our website. Imaging Kit Overview Page.

The PHYTEC phyCAM portfolio
OpenCV integration unfolds its full potential through our Extensive range of industrial-grade camera modules (phyCAM series)Whether rolling shutter or global shutter, monochrome or color, 1 megapixel to 4k resolutions – our hardware and software drivers are perfectly matched.

Which setup best suits your requirements? Camera modules, for example, can be easily exchanged via the standardized phyCAM interface. 

Talk to us – We will gladly help you choose the right hardware.

Links & Resources / Getting Started

All OpenCV example scripts are integrated into our phytec-vision-image. Here's how to get started in just a few steps:

  • Using a PHYTEC Vision Development Kit: The Vision image is pre-installed at the factory. You can boot directly and get started.

  • With standard kits or SBCs: Download the phytec-vision image yourself. To do this, go to the product page of your board (e.g., eBiMX 8M Plus) and switch to the tab. Downloads.

Here's how to find the OpenCV tutorials:

  1. On your board's product page, navigate to Downloads > Image Processing > Quick Start Guides with cameras.

  2. Open the Getting Started Guide phyCAM.

  3. In the section OpenCV Scripts You will find detailed instructions on how to prepare the sensors via v4l2-ctl and start the included Python scripts.