1
Overview
What Is OpenCV?
OpenCV [OpenCV] is an open source (see http://opensource.org) computer vision library available from
http://opencv.org. The library is written in C and C++
1
and runs under Linux, Windows, Mac OS X, iOS,
and Android. Interfaces are available for Python, Java, Ruby, Matlab, and other languages.
OpenCV was designed for computational efficiency with a strong focus on real-time applications:
optimizations were made at all levels, from algorithms to multicore and CPU instructions. For example,
OpenCV supports optimizations for SSE, MMX, AVX, NEON, OpenMP, and TBB. If you desire further
optimization on Intel architectures [Intel] for basic image processing, you can buy Intel’s Integrated
Performance Primitives (IPP) libraries [IPP], which consist of low-level optimized routines in many
different algorithmic areas. OpenCV automatically uses the appropriate instructions from IPP at runtime.
The GPU module also provides CUDA-accelerated versions of many routines (for Nvidia GPUs) and
OpenCL-optimized ones (for generic GPUs).
One of OpenCV’s goals is to provide a simple-to-use computer vision infrastructure that helps people build
fairly sophisticated vision applications quickly. The OpenCV library contains over 500 functions that span
many areas, including factory product inspection, medical imaging, security, user interface, camera
calibration, stereo vision, and robotics. Because computer vision and machine learning often go hand-in-
hand, OpenCV also contains a full, general-purpose Machine Learning Library (MLL). This sub-library is
focused on statistical pattern recognition and clustering. The MLL is highly useful for the vision tasks that
are at the core of OpenCV’s mission, but it is general enough to be used for any machine learning problem.
Who Uses OpenCV?
Most computer scientists and practical programmers are aware of some facet of the role that computer
vision plays. But few people are aware of all the ways in which computer vision is used. For example, most
people are somewhat aware of its use in surveillance, and many also know that it is increasingly being used
for images and video on the Web. A few have seen some use of computer vision in game interfaces. Yet
few people realize that most aerial and street-map images (such as in Google’s Street View) make heavy
use of camera calibration and image stitching techniques. Some are aware of niche applications in safety
monitoring, unmanned aerial vehicles, or biomedical analysis. But few are aware how pervasive machine
vision has become in manufacturing: virtually everything that is mass-produced has been automatically
inspected at some point using computer vision.
1
The legacy C interface is still supported, and will remain so for the foreseeable future.

Get Learning OpenCV, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.