cv::Mat matrix(3, 3, CV_32FC1); // creates a matrix of size 3x3 with single precision floating-point numbers
cv::Mat image = cv::imread("example.png", cv::IMREAD_GRAYSCALE); // reads the image "example.png" as a grayscale image and stores it in the 'image' Mat object
cv::Mat matrix(3, 3, CV_32FC1); std::cout << "Rows: " << matrix.rows() << std::endl; // prints "Rows: 3" std::cout << "Cols: " << matrix.cols() << std::endl; // prints "Cols: 3"In conclusion, the Mat class is a powerful tool in C++ for image and matrix processing applications, provided by the OpenCV library.