OpenCV 4.0 and 4.1 - what's new?

OpenCV 4.0 and 4.1 - what's new?




We return to the story of the open source library of computer vision OpenCV . The project lives and develops, driven by a team of developers working for Intel, as well as the undying support of the community. At the end of 2018, the first stable release from the 4.x branch was released, and just a month ago a new update was released - version 4.1. We asked the authors of the library to list briefly what brought these two versions to the OpenCV functionality.

OpenCV 4.0


The release of OpenCV 4.0 completed the life cycle of version 3.x - a 3.4 branch was created to correct errors and minor improvements, from which minor 3.4.x versions will be created (by analogy with 2.4.x).

OpenCV 4.0 final

  • OpenCV is now a C ++ 11 library and requires a C ++ 11-compatible compiler;
  • Many of the functions of the obsolete C API (from OpenCV 1.0) have been removed, old constants and function declarations have been moved to separate header files ( imgproc_c.h ) and must now be explicitly enabled by the user ( #include & lt ; opencv/imgproc/imgproc_c.h & gt; );
  • All CUDA modules were transferred to the opencv_contrib ;
  • repository
  • Persistence API for writing and reading data to file has been rewritten in C ++, old functions have been deleted;
  • A new G-API module has been added, allowing to build graphs from image operations and apply various optimizations on them;
  • Support for the Deep Learning Deployment Toolkit has been added to the dnn module (including the opensource version ), including the use of Intel Movidius Neural Compute Stick or Intel Neural Compute Stick 2 at Raspberri Pi 3 ;
  • Network support has been added to the dnn module in the format ONNX (Open Neural Network Exchange);
  • Experimental support has been added to the dnn module via Vulkan ;
  • Added implementation of the real-time algorithm for processing 3D scenes/models KinectFusion (optimized for CPU and GPU/OpenCL);
  • Support for detecting and decoding QR codes has been added to the objdetect module (the decoder uses the QUirc library) - this summer as part of summer internship , work will be done to improve the quality and perhaps a mode of simultaneous detection and decoding of more than one QR code in the image will be added.;
  • A very efficient and at the same time highly accurate optical flow algorithm DIS transferred from opencv_contrib to the video module of the main repository.

OpenCV 4.1


  • Added dispatched optimized implementations of many algorithms in the core and imgproc ;
  • modules
  • Improvements in the dnn module:
    • Implemented network startup support on Intel Neural Compute Stick 2 (using DLDT);
    • Reduced maximum memory consumption, introduced support for many new networks from TensorFlow
  • Support for Android Media NDK API for reading video files/streams on Android devices from C ++ code (useful for testing algorithms);
  • Added new module for image quality analysis ( opencv_contrib/quality ). It implements both basic algorithms (PSNR, SSIM) and new specialized algorithms (such as the quality estimation algorithm without using the original BRISQUE images - Blind/Referenceless Image Spatial Quality Evaluator);
  • Several new algorithms have been implemented: Robust local optical flow, Quasi Dense Stereo, handheld camera calibration (Hand-Eye);

More information about the library can be found on the project site that has changed beyond recognition.

The number of patches is from 4.0.0 to 4.1.0: 462 (about 5.3 patches per day, not counting weekends and holidays). There are many changes, as you can see, and they are significant. If you have questions about the implemented functionality, or, on the contrary, not implemented - welcome to the comments, the OpenCV developers will try to answer them.

Source text: OpenCV 4.0 and 4.1 - what's new?