Mastering OpenCV 4 with Python
上QQ阅读APP看书,第一时间看更新

OpenCV modules

OpenCV (since version 2) is divided into several modules, where each module can be understood, in general, as being dedicated to one group of computer vision problems. This division can be seen in the next diagram, where the main modules are shown:

OpenCV modules are shortly described here:

  • core: Core functionality. Core functionality is a module defining basic data structures and also basic functions used by all other modules in the library.
  • imgproc: Image processing. An image-processing module that includes image filtering, geometrical image transformations, color space conversion, and histograms.
  • imgcodecs: Image codecs. Image file reading and writing.
  • videoio: Video I/O. An interface to video capturing and video codecs.
  • highgui: High-level GUI. An interface to UI capabilities. It provides an interface to easily do the following:
    • Create and manipulate windows that can display/show images
    • Add trackbars to the windows, keyboard commands, and handle mouse events 
  • video: Video analysis. A video-analysis module including background subtraction, motion estimation, and object-tracking algorithms.
  • calib3d: Camera calibration and 3D reconstruction. Camera calibration and 3D reconstruction covering basic multiple-view geometry algorithms, stereo correspondence algorithms, object pose estimation, both single and stereo camera calibration, and also 3D reconstruction.
  • features2d: 2D features framework. This module includes feature detectors, descriptors, and descriptor matchers.
  • objdetect: Object detection. Detection of objects and instances of predefined classes (for example, faces, eyes, people, and cars).
  • dnn: Deep neural network (DNN) module. This module contains the following:
    • API for new layers creation
    • Set of built useful layers
    • API to construct and modify neural networks from layers
    • Functionality for loading serialized networks models from different deep learning frameworks
  • ml: Machine learning. The Machine Learning Library (MLL) is a set of classes and methods that can be used for classification, regression, and clustering purposes.
  • flann: Clustering and search in multi-dimensional spaces. Fast Library for Approximate Nearest Neighbors (FLANN) is a collection of algorithms that are highly suited for fast nearest-neighbor searches.
  • photo: Computational photography. This module provides some functions for computational photography.
  • stitching: Images stitching. This module implements a stitching pipeline that performs automatic panoramic image stitching.
  • shape: Shape distance and matching. Shape distance and matching module that can be used for shape matching, retrieval, or comparison.
  • superres: Super-resolution. This module contains a set of classes and methods that can be used for resolution enhancement. 
  • videostab: Video stabilization. This module contains a set of classes and methods for video stabilization.
  • viz: 3D visualizer. This module is used to display widgets that provide several methods to interact with scenes and widgets.