Abstract
In today’s advancing market, the growing
performance and decreasing price of em-
bedded processors are opening many doors
for developers to design highly sophisticat-
ed solutions for different end applications.
The complexities of these systems can cre-
ate bottlenecks for developers in the form of
longer development times, more complicated
development environments and issues with
application stability and quality. Developers
can address these problems using sophisti-
cated software packages such as OpenCV,
but migrating this software to embedded
platforms poses its own set of challenges.
This paper will review how to mitigate some
of these issues, including C++ implemen-
tation, memory constraints, floating-point
support and opportunities to maximize per-
formance using vendor-optimized libraries
and integrated accelerators or co-processors.
Finally, we will introduce a new effort by
Texas Instruments (TI) to optimize vision sys-
tems by running OpenCV on the C6000™
digital signal processor (DSP) architecture.
Benchmarks will show the advantage of us-
ing the DSP by comparing the performance
of a DSP+ARM
®
system-on-chip (SoC)
processor against an ARM-only device.
OpenCV on TI’s DSP+ARM
®
platforms: Mitigating the
challenges of porting OpenCV
to embedded platforms
Introduction
OpenCV is a free and open-source computer vision library that offers a broad range of func-
tionality under the permissive Berkeley Software Distribution (BSD) license. The library itself
is written in C++ and is also usable through C or Python language applications. Thousands
of developers use OpenCV to power their own specialized applications, making it the most
widely-used library of its kind. The OpenCV project is under active development, with regular
updates to eliminate bugs and add new functionality. The mainline development effort targets
the x86 architecture and supports acceleration via Intel’s proprietary Integrated Performance
Primitives (IPP) library. A recent release also added support for graphics processing unit (GPU)
acceleration using NVIDIA’s Compute Unifi ed Device Architecture (CUDA) standard.
OpenCV’s greatest asset is the sheer breadth of algorithms included in its standard distri-
bution. Figure 1 on page 2 shows an incomplete list of some of the key function categories in-
cluded in OpenCV. These range from low-level image fi ltering and transformation to sophisti-
cated feature analysis and machine learning functionality. A complete listing of every function
and use case is beyond the scope of this article, but we will consider the unique requirements
of developers in the embedded vision space. For these developers, OpenCV represents an
attractively comprehensive toolbox of useful, well-tested algorithms that can serve as building
blocks for their own specialized applications. The question then becomes whether or not
OpenCV can be used directly in their embedded systems.
Despite its original development focus for use with PC workstations, OpenCV can also
be a useful tool for embedded development. There are vendor-specifi c libraries that offer
OpenCV-like capabilities on various embedded systems, but few can match OpenCV’s ubiquity
in the computer vision fi eld or the sheer breadth of its included algorithms. It should come as
no surprise that OpenCV has already been ported to the ARM
®
architecture, a popular CPU
choice for embedded processors. It’s certainly possible to cross-compile the OpenCV source
code as-is and use the result with embedded devices, but memory constraints and other
architectural considerations may pose a problem. This white paper will examine some of the
specifi c obstacles that must be overcome for OpenCV to achieve acceptable performance on
Joseph Coombs,
Applications engineering,
Texas Instruments
Rahul Prabhu,
Applications engineering,
Texas Instruments
WHITE PAPER
评论8