OpenCV && C++ 02 - Create a Blank Image & Display

2020-12-13 14:17

阅读:305

Mat::Mat(int rows, int cols, int type, const Scalar& s)

This constructor will create a Mat object with specified number of rows and number of cols and initialize each element with the value given in s.

@param rows Number of rows in a 2D array.
@param cols Number of columns in a 2D array.
@param type Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or CV_8UC(n), ..., CV_64FC(n) to create multi-channel (up to CV_CN_MAX channels) matrices.
@param s An optional value to initialize each matrix element with. To set all the matrix elements to the particular value after the construction, use the assignment operator Mat::operator=(const Scalar& value) .


评论


亲,登录后才可以留言!