The Main modules in OpenCV

As mentioned, OpenCV contains a number of Main modules that contain all of its core and default functionalities. Here is a list of those modules:

  • core: This contains all of the core OpenCV functionalities. For instance, all basic structures, including the Mat class (which we'll learn about in detail later) and matrix operations are some of the functionalities embedded into this module.
  • imgproc: This module contains all image-processing functionalities, such as filtering, transformations, and histograms.
  • imgcodecs: This module includes functions that are used for reading and writing images.
  • videoio: This is similar to the imgcodecs module, but this one is used to work with videos, as the name implies.
  • highgui: This module, which we'll use extensively throughout the book, contains all of the functionalities used for displaying results and GUI creation in general. Note that even though the highgui module is enough for the purpose of this book and learning about computer vision algorithms while visualizing the results as we move forward, it's still not meant for full-scale applications. Refer to the Further reading section at the end of this chapter for more references about proper GUI creation tools for full-scale computer vision applications.
  • video: Contains video analysis functionalities of OpenCV, such as motion detection and tracking, the Kalman filter, and the infamous CAM Shift algorithm (used for object tracking).
  • calib3d: This module includes calibration and 3D reconstruction functionalities. A well-known example of the capabilities of this module is the estimation of transformation between two images.
  • features2d: Supported keypoint-detection and descriptor-extraction algorithms are included in this module. As we'll learn in the upcoming chapters, this module contains some of the most widely used object detection and categorization algorithms.
  • objdetect: As the name implies, this module is used for object detection using OpenCV. We'll learn about the functionalities contained within this module in the final chapters of this book.
  • dnn: Similar to the objdetect module, this module is also used for object detection and classification purposes, among others. The dnn module is relatively new in the list of the Main modules of OpenCV, and it contains all of the capabilities related to deep learning.
  • ml: This machine learning module contains the classes and functions used to handle classification and regression. Simply put, all strictly machine learning-related capabilities are included in this module.
  • flann: This is OpenCV's interface to Fast Library for Approximate Nearest Neighbors (FLANN). FLANN contains a wide set of optimized algorithms that are used to deal with the nearest neighbor search of high-dimensional features in large datasets. The algorithms mentioned here are mostly used in conjunction with algorithms in other modules, such as features2d.
  • photo: An interesting module for photography-related computer vision, it contains classes and functions that are used to deal with tasks such as denoising, HDR imaging, and restoring a region in a photo using its neighborhood.
  • stitching: This module contains classes and functions used for image stitching. Note that stitching in itself is a very complex task and it requires functions for rotation estimation and image warping, all of which are also part of this very interesting OpenCV module.
  • shape: This module is used to deal with shape transformation, matching, and distance-related topics.
  • superres: Algorithms that fall into the category of resolution enhancement are included in the super-resolution module.
  • videostab: This module contains algorithms used for video stabilization.
  • viz: Otherwise known as the 3D Visualizer module, it contains classes and functions that are used to deal with displaying widgets on the 3D visualization window. This module will not be part of the topics discussed in this book, but we'll just mention it.

Apart from the modules that we just covered, OpenCV also contains a number of Main modules that are based on CUDA (an API created by Nvidia). These modules are easily distinguished by their names, which start with the word cuda. Since the availability of these modules totally depends on a specific type of hardware, and almost all of the functionalities inside those modules are covered, one way or another, by other modules, we're going to skip them for now. But it's worth noting that using the OpenCV cuda modules can significantly improve the performance of your applications, provided that the algorithms you need are implemented in them, and that your hardware meets the minimum requirements for them.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.186.79