Table of Contents

Method Reshape

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Reshape(int, int)

Changes the shape and/or the number of channels of a 2D matrix without copying the data.

public UMat Reshape(int cn, int rows = 0)

Parameters

cn int

New number of channels. If the parameter is 0, the number of channels remains the same.

rows int

New number of rows. If the parameter is 0, the number of rows remains the same.

Returns

UMat

Reshape(int, int[])

Changes the shape and/or the number of channels of a 2D matrix without copying the data.

public UMat Reshape(int cn, int[] newDims)

Parameters

cn int

New number of channels. If the parameter is 0, the number of channels remains the same.

newDims int[]

New number of rows. If the parameter is 0, the number of rows remains the same.

Returns

UMat