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 out of the box with your phyCAM camera modules. The required libraries, Python bindings, and demo scripts are integrated directly into our phytec-vision-image. Use OpenCV as the foundation for object detection, filtering, machine vision, or as a seamless bridge to AI applications on NXP i.MX processors.
What is OpenCV?
OpenCV is an open-source library featuring 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 raw image capture (via V4L2 or GStreamer) and intelligent application logic. Whether you are dealing with classic image processing (like edge detection or color conversion) or complex machine vision tasks (like face recognition) – our Vision BSPs ensure that OpenCV is optimally tuned to the hardware accelerators of the respective SoC architecture.
What We Deliver: OpenCV Out of the Box
We save you the effort of compiling complex dependencies. OpenCV (including the Python modules) is already 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 a curated 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: GStreamer OpenCV plugins are included in the BSP. These specialized filter components integrate directly into GStreamer media pipelines. They enable real-time video processing, such as object detection or filtering, by efficiently transferring video frames between GStreamer and OpenCV. GStreamer itself 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 Python example scripts, e.g., for simple live image display or basic object detection like face tracking.
Technical Deep Dive
Before OpenCV can access the image data stream, the camera and the processor's camera interface must be configured using the media-ctl tool. Fetching and forwarding the image data from the video device is conveniently configured using a GStreamer pipeline. These tasks — configuring via media-ctl, fetching via GStreamer, and calling the OpenCV functions — are seamlessly combined and executed within a single Python script.
- 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 (converting raw Bayer data into RGB). If the processor lacks an integrated hardware ISP, this conversion must be done in software, which can quickly lead to high CPU load. To make this as efficient as possible, our systems leverage ARM NEON coprocessors. Instead of letting OpenCV handle the compute-intensive software conversion, optimized GStreamer pipelines can be placed upstream. These convert the image data extremely fast and close to the hardware, passing only the finished RGB stream to OpenCV for the actual image analysis. If the processor features an ISP (Image Signal Processor), debayering can also be performed in real time with zero CPU load, thanks to the ISP support built into the PHYTEC BSPs.
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, will take place.
On processors with dedicated neural processing units (NPUs), such as the i.MX 8M Plus, OpenCV often serves as an essential pre-processing stage. High-resolution camera images are efficiently filtered via OpenCV before being passed on to inferencing engines (like 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 Embedded Vision Development Kits These bundles contain everything you need to get started: a System on Module (SoM), baseboard, camera, lens, and a pre-installed Vision BSP including all OpenCV examples.
For demanding image processing and AI applications, we particularly recommend these platforms:
Our reference for Embedded Vision – featuring a 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 compute power and the latest MIPI-CSI interfaces for high-resolution streaming and analysis.
You can find additional vision setups for other SoCs and form factors on our Imaging Kit Overview Page.
The PHYTEC phyCAM Portfolio
The OpenCV integration unlocks its full potential when paired with our extensive range of industrial-grade camera modules (phyCAM series).Whether you need a rolling shutter or global shutter, monochrome or color, from 1 megapixel up to 4K resolutions — our hardware and software drivers are perfectly matched.
Which setup best suits your requirements? Thanks to the standardized phyCAM interface, camera modules can be easily interchanged.
Reach out to us – we are happy to help you select the right hardware.
Links & Resources / Getting Started
All OpenCV example scripts are integrated into our phytec-vision-image. Here is how you can get started in just a few steps:
With a PHYTEC Vision Development Kit: he Vision Image comes pre-installed from the factory. You can boot up and start right away.
With Standard Kits or SBCs: Download the phytec-vision-image yourself. Simply visit the product page of your board (e.g., i.MX 8M Plus) and navigate to the Downloads.
How to find the OpenCV instructions:
Navigate to your board's product page: Downloads > Image Processing > Quick Start Guides with cameras.
Open the Getting Started Guide phyCAM.
In the OpenCV Scripts You will find detailed instructions on how to prepare the sensors via v4l2-ctl and start the included Python scripts.