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 MatExpr Ones(int rows, int cols, MatType type)

Parameters

rows int

Number of rows.

cols int

Number of columns.

type MatType

Created matrix type.

Returns

MatExpr

Ones(Size, MatType)

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

public static MatExpr Ones(Size size, MatType type)

Parameters

size Size

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

type MatType

Created matrix type.

Returns

MatExpr

Ones(MatType, params int[])

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

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

Parameters

type MatType

Created matrix type.

sizes int[]

Array of integers specifying the array shape.

Returns

MatExpr

Ones(MatShape, MatType)

Returns an array of all 1's of the specified shape and type (OpenCV 5, MatShape).

public static MatExpr Ones(MatShape shape, MatType type)

Parameters

shape MatShape

Created matrix shape.

type MatType

Created matrix type.

Returns

MatExpr