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) .
转载于:https://www.cnblogs.com/zdfffg/p/11557734.html
相关资源:JAVA上百实例源码以及开源项目