This chapter describes the main data structures and basic procedures that will be used in subsequent chapters:
These are some of the most frequent operations that we will have to perform on images. Most of the functionality covered here is in the core module of the library.
The fundamental data type in OpenCV is
Mat, as it is used to store images. Basically, an image is stored as a header plus a memory zone containing the pixel data. Images have a number of channels. Grayscale images have a single channel, while color images typically have three for the red, green, and blue components (although OpenCV stores them in a reverse ...