History of OpenCV from v1 to v4

OpenCV started as the brainchild of Gray Bradsky, once a computer vision engineer at Intel, around the early 2000s. Bradsky and a team of engineers, mostly from Russia, developed the first versions of OpenCV internally at Intel before making v0.9 of it open source software (OSS) in 2002. Bradsky then transitioned to Willow Garage, with the former founding members of OpenCV. Among them were Viktor Eurkhimov, Sergey Molinov, Alexander Shishkov, and Vadim Pisarevsky (who eventually started the company ItSeez, which was acquired in 2016 by Intel), who began supporting the young library as an open source project.

Version 0.9 had a predominantly C API and already sported image data manipulation functions and pixel access, image processing, filtering, colorspace transformations, geometric and shape analysis (for example, morphologic functions, Hough transforms, contour finding), motion analysis, basic machine learning (K-means, HMM), camera pose estimation, basic linear algebra (SVD, Eigen decomposition), and more. Many of these functions lasted through the ages, even into today's versions of OpenCV. Version 1.0 was released in 2006, and it marked the beginning of the library as the dominant force in OSS computer vision. In late 2008, Bradsky and Adrian Kaehler published the best-selling Learning OpenCV book based on OpenCV v1.1pre1, which was a smashing worldwide success, and served for years to come as the definitive guide to OpenCV's C API.

For its completeness, OpenCV v1 became a very popular framework for vision work in both academic and industrial applications, especially in the robotics domain, although it was just a small departure from v0.9 in terms of feature offering. After the release of v1.0 (late 2006), the OpenCV project went into years of hibernation, as the founding team was occupied with other projects and the open source community wasn't as established as it became years later. The project released v1.1pre1 in late 2008 with minor additions; however, the foundation of OpenCV as the most well-known vision library came with version 2.x, which introduced the very successful C++ API. Versions 2.x lasted 6 years (2009-2015) as the stable branch of OpenCV, and the branch was maintained even until very recently, in early 2018 (the last version, 2.4.13.6, was released in February 2018), almost 10 years later. Version 2.4, released in mid-2012, had a very stable and successful API, lasted for three years, and also introduced a very wide offering of features.

Versions 2.x introduced the CMake build system, which was also used at the time by the MySQL project, to align with its goal to be completely cross-platform. Apart from the new C++ API, v2.x also brought the concept of modules (in v2.2, circa 2011), which can be built, included, and linked separately, based on the project assembly necessity, forsaking v1.x's cv, cvaux, ml, and so on. The 2D feature suit was extended, as well as the machine learning capabilities, built-in face recognition cascade models, 3D reconstruction functionality, and most importantly the coverage of Python bindings. Early investment in Python made OpenCV the best tool for vision prototyping available at that time, and probably still today. Version 2.4, released in mid-2012, continued development until 2018, with v2.5 never released due to fears of breaking API changes and simply rebranded as v3.0 (ca. mid-2013). Version 2.4.x continued to bring more important features such as Android and iOS support, CUDA and OpenCL implementations, CPU optimizations (for example, SSE and other SIMD architectures), and an incredible amount of new algorithms.

Version 3.0, first released out of beta in late 2015, was first received with lukewarm adoption from the community.  They were looking for a stable API, since some APIs had breaking changes and a drop-in replacement was impossible. The header structure also changed (from opencv2/<module>/<module>.hpp to opencv2/<module>.hpp), making the transition even harder. Version 2.4.11+ (February 2015) had instrumentation to bridge the API gap between the versions, and documentation was installed to help developers transition to v3.0 (https://docs.opencv.org/3.4/db/dfa/tutorial_transition_guide.html). Version 2.x maintained a very strong hold, with many package management systems (for example, Ubuntu's apt) still serving it as the stable version of OpenCV, while version 3.x was advancing at a very fast pace.

After years of cohabitation and planning, version 2.4.x gave way to version 3.x, which boasted a revamped API (many abstractions and base classes introduced) and improved GPU support via the new Transparent API (T-API), which allowed the use of GPU code interchangeably with regular CPU code. A separate repository for community-contributed code was established, opencv-contrib, removing it from the main code as a module in v2.4.x, with improved build stability and timing. Another big change was the machine learning support in OpenCV, which was greatly improved and revised from v2.4. Version 3.x was also pushed for better Android support and optimizations for CPU architectures beyond Intel x86 (for example, ARM, NEON) via the OpenCV HAL (Hardware Acceleration Layer), which later merged into the core modules. The first emergence of deep neural networks in OpenCV was recorded in v3.1 (December 2015) as a contrib module, and almost two years later in v3.3 (August 2017) was upgraded to a core module, opencv-dnn. The 3.x versions brought tremendous improvements to optimization and compatibility with GPU and CPU architectures, with support from Intel, Nvidia, AMD, and Google, and became OpenCV's hallmark as the optimized computer vision library.

Version 4.0 marks the mature state of OpenCV as the major open source project it is today. The old C API (of which many functions date back to v0.9) was let go and instead C++11 was made mandatory, which also rid the library of its cv::String and cv::Ptr hybrids. Version 4.0 keeps track of further optimization for CPUs and GPUs; however, the most interesting addition is the Graph API (G-API) module. G-API brings the spirit of the times to OpenCV, with support for building compute graphs for computer vision, with heterogeneous execution on CPU and GPU, following the very big success of Google's TensorFlow deep learning library and Facebook's PyTorch. With long-standing investment in deep learning and machine learning, Python and other languages, execution graphs, cross-compatibility, and a wide offering of optimized algorithms, OpenCV is established as a forward-looking project with very strong community support, which makes it fifteen years later the leading open computer vision library in existence.

The history of this book series, Mastering OpenCV, is intertwined with the development history of OpenCV as the major library for open source computer vision. The first edition, released in 2012, was based on the everlasting v2.4.x branch. This dominated the OpenCV scene in 2009-2016. The second edition, released in 2017, hailed the dominance of OpenCV v3.1+ in the community (started in mid-2016). The third edition, the one you are reading now, welcomes OpenCV v4.0.0 into the fold, released in late October 2018.