Table of Contents

Method Ones

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Ones(int, int, MatType)

Returns an array of all 1’s of the specified size and type.

public static UMat Ones(int rows, int cols, MatType type)

Parameters

rows int

Number of rows.

cols int

Number of columns.

type MatType

Created matrix type.

Returns

UMat

Ones(Size, MatType)

Returns an array of all 1’s of the specified size and type.

public static UMat Ones(Size size, MatType type)

Parameters

size Size

Alternative to the matrix size specification Size(cols, rows) .

type MatType

Created matrix type.

Returns

UMat

Ones(MatType, params int[])

Returns an array of all 1’s of the specified size and type.

public static UMat Ones(MatType type, params int[] sizes)

Parameters

type MatType

Created matrix type.

sizes int[]

Array of integers specifying the array shape.

Returns

UMat