Click or drag to resize

Mat Constructor (Int32, Int32, MatType, Scalar)

constructs 2D matrix and fills it with the specified Scalar value.

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public Mat(
	int rows,
	int cols,
	MatType type,
	Scalar s
)

Parameters

rows
Type: SystemInt32
Number of rows in a 2D array.
cols
Type: SystemInt32
Number of columns in a 2D array.
type
Type: OpenCvSharpMatType
Array type. Use MatType.CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or MatType. CV_8UC(n), ..., CV_64FC(n) to create multi-channel matrices.
s
Type: OpenCvSharpScalar
An optional value to initialize each matrix element with. To set all the matrix elements to the particular value after the construction, use SetTo(Scalar s) method .
See Also