Method OnesMat
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
OnesMat(int, int, MatType)
Returns an array of all 1's of the specified size and type as Mat.
Unlike Ones(int, int, MatType), this method returns a Mat directly,
so a single using statement is sufficient to manage its lifetime.
public static Mat OnesMat(int rows, int cols, MatType type)
Parameters
Returns
OnesMat(Size, MatType)
Returns an array of all 1's of the specified size and type as Mat.
Unlike Ones(Size, MatType), this method returns a Mat directly,
so a single using statement is sufficient to manage its lifetime.
public static Mat OnesMat(Size size, MatType type)
Parameters
sizeSizeAlternative to the matrix size specification Size(cols, rows).
typeMatTypeCreated matrix type.