Click or drag to resize

CvInvokeInvert Method
Finds the inverse or pseudo-inverse of a matrix. This function inverts the matrix src and stores the result in dst . When the matrix src is singular or non-square, the function calculates the pseudo-inverse matrix (the dst matrix) so that norm(src*dst - I) is minimal, where I is an identity matrix.

Namespace:  Emgu.CV
Assembly:  Emgu.CV.World (in Emgu.CV.World.dll) Version: (
public static double Invert(
	IInputArray src,
	IOutputArray dst,
	DecompMethod method


Type: Emgu.CVIInputArray
The input floating-point M x N matrix.
Type: Emgu.CVIOutputArray
The output matrix of N x M size and the same type as src.
Type: Emgu.CV.CvEnumDecompMethod
Inversion method

Return Value

Type: Double
In case of the DECOMP_LU method, the function returns non-zero value if the inverse has been successfully calculated and 0 if src is singular. In case of the DECOMP_SVD method, the function returns the inverse condition number of src (the ratio of the smallest singular value to the largest singular value) and 0 if src is singular. The SVD method calculates a pseudo-inverse matrix if src is singular. Similarly to DECOMP_LU, the method DECOMP_CHOLESKY works only with non-singular square matrices that should also be symmetrical and positively defined. In this case, the function stores the inverted matrix in dst and returns non-zero. Otherwise, it returns 0.
See Also