Making OpenCV Code Run Fast
OpenCV is the de facto standard framework for computer vision developers, with 16+ year history, approximately one million lines of code, thousands of algorithms and tens of thousands of unit tests. While OpenCV delivers decent performance out-of-the-box for some classical algorithms on desktop PCs, it lacks sufficient performance when using some modern algorithms, such as deep neural networks, and when running on embedded platforms. We examine current and forthcoming approaches to performance optimization of OpenCV, including the existing OpenCL-based transparent API, newly added support for OpenVX, and early experimental results using Halide.
We demonstrate use of the OpenCL-based transparent API on a popular CV problem – pedestrian detection. Because OpenCL does not provide good performance-portability, we explore additional approaches. We discuss how OpenVX support in OpenCV accelerates image processing pipelines and deep neural network execution. We also present early experimental results using Halide, which provides a higher level of abstraction and ease of use, and is being actively considered for future support in OpenCV.
Vadim Pisarevsky is software engineering manager at Intel Corp. Vadim has graduated from Nizhniy Novgorod State Univ in 1998 with MSc degree in math. He has been a chief architect and leader of OpenCV development team since the beginning of the project in 2000 at Intel. From 2008 till 2016 he has been a principal engineer at Itseez Inc., who have been doing computer vision projects for various customers all over the world using OpenCV, and who also played a big role in creating OpenVX standard. Since 2016 Vadim is back to Intel, keep working on OpenCV as the team lead. He is the co-author of several publications and patents.