Table of Contents

Class CvToolbox

Namespace
Emgu.CV.Util
Assembly
Emgu.CV.dll

Utilities class

public static class CvToolbox
Inheritance
CvToolbox
Inherited Members

Methods

CopyMatrix<D>(nint, D[][])

Copy a jagged two dimensional array from the unmanaged memory

public static void CopyMatrix<D>(nint src, D[][] dest)

Parameters

src nint

The src array

dest D[][]

Pointer to the destination unmanaged memory

Type Parameters

D

The data type of the jagged two dimensional

CopyMatrix<TData>(TData[][], nint)

Copy a jagged two dimensional array to the unmanaged memory

public static void CopyMatrix<TData>(TData[][] source, nint dest)

Parameters

source TData[][]

The source array

dest nint

Pointer to the destination unmanaged memory

Type Parameters

TData

The data type of the jagged two dimensional

CopyVector<TData>(TData[], nint, int)

Copy a generic vector to the unmanaged memory

public static int CopyVector<TData>(TData[] src, nint dest, int bytesToCopy = -1)

Parameters

src TData[]

The source vector

dest nint

Pointer to the destination unmanaged memory

bytesToCopy int

Specify the number of bytes to copy. If this is -1, the number of bytes equals the number of bytes in the src

Returns

int

The number of bytes copied

Type Parameters

TData

The data type of the vector

GetColorCvtCode(Type, Type)

Given the source and destination color type, compute the color conversion code for CvInvoke.cvCvtColor function

public static ColorConversion GetColorCvtCode(Type srcColorType, Type destColorType)

Parameters

srcColorType Type

The source color type. Must be a type inherited from IColor

destColorType Type

The dest color type. Must be a type inherited from IColor

Returns

ColorConversion

The color conversion code for CvInvoke.cvCvtColor function

GetMatrixFromArrays<T>(T[][])

Convert arrays of data to matrix

public static Matrix<T> GetMatrixFromArrays<T>(T[][] data) where T : struct

Parameters

data T[][]

Arrays of data

Returns

Matrix<T>

A two dimension matrix that represent the array

Type Parameters

T

The data type of the matrix

GetMatrixFromPoints(MCvPoint2D64f[][])

Convert arrays of points to matrix

public static Matrix<double> GetMatrixFromPoints(MCvPoint2D64f[][] points)

Parameters

points MCvPoint2D64f[][]

Arrays of points

Returns

Matrix<double>

A two dimension matrix that represent the points

GetMinMax(IEnumerable<MCvPoint3D64f>, out MCvPoint3D64f, out MCvPoint3D64f)

Compute the minimum and maximum value from the points

public static void GetMinMax(IEnumerable<MCvPoint3D64f> points, out MCvPoint3D64f min, out MCvPoint3D64f max)

Parameters

points IEnumerable<MCvPoint3D64f>

The points

min MCvPoint3D64f

The minimum x,y,z values

max MCvPoint3D64f

The maximum x,y,z values

Memcpy(nint, nint, int)

memcpy function

public static void Memcpy(nint dest, nint src, int len)

Parameters

dest nint

the destination of memory copy

src nint

the source of memory copy

len int

the number of bytes to be copied