May 2020
Intermediate to advanced
530 pages
17h 8m
English
In the OpenCV library, an image is treated as a multidimensional matrix of values. There is a special cv::Mat type for this purpose. There are two base functions: the cv::imread() function loads the image, and the cv::imwrite() function writes the image to a file, as illustrated in the following code snippet:
#include <opencv2/opencv.hpp>..cv::Mat img = cv::imread(file_name);cv::imwrite(new_file_name, img);
Also, there are functions to manage images located in a memory buffer. The cv::imdecode() function loads an image from the memory buffer, and the cv::imencode() function writes an image to the memory buffer.
Scaling operations in the OpenCV library can be done with the cv::resize() function. This function takes an input image, ...
Read now
Unlock full access