Mat
The Mat class is one of the most important classes in the OpenCV library, and its name is short for matrix. In the sphere of computer vision, any image is, as we mentioned previously, a matrix with a given width, height, number of channels, and depth. Therefore, OpenCV uses the Mat class to represent images. In fact, the Mat class is an n-dimensional array that can be used to store single or multiple channels of data with any given data type, and it contains many members and methods to create, modify, or manipulate it in many ways.
The Mat class has many constructors. For example, we can create an instance of it that has a width (columns) of 800, and a height (rows) of 600, with three channels that contain 8-bit unsigned int values, as ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access