OpenCV is focused primarily on high-performance computing platforms/microprocessors, but it can execute several types of image processing applications

Benchmarking OpenCV on STM32 MCUs

submited by
Style Pass
2021-07-02 16:00:08

OpenCV is focused primarily on high-performance computing platforms/microprocessors, but it can execute several types of image processing applications on MCUs.

Image processing has become a part of our lives. Nobody is surprised by facial recognition or driving lane detection. Today, the most common library for these purposes is OpenCV. Currently, OpenCV is focused primarily on high-performance computing (HPC) platforms/microprocessors. Although higher-end microcontrollers have resources comparable to the Pentium II, running OpenCV on them is still very uncommon.

Some time ago, we proved that there is a possibility of using OpenCV on STM32 (and other microcontrollers of a similar class). Our goal was to demonstrate the use of this library on similar hardware platforms. Although we got very low performance, we did not investigate the reasons for that at the time. In this work, we have corrected the obvious shortcomings of the first tests. This allows us to achieve acceptable performance. This article presents the results of performance measurements for various examples in using OpenCV on the STM32F7 platform.

All examples in the article are based on Embox RTOS and can be reproduced by following the instructions in the repository with the examples. We use the -Os optimization flag for the examples on the board. All examples use enabled CPU cache. Data files can be located on an SD card. We keep the images in the QSPI flash that is on the demo board to simplify basic instructions when playing back the results.

Leave a Comment