﻿cvSVD Method
http://www.emgu.com
Decomposes matrix A into a product of a diagonal matrix and two orthogonal matrices: A=U*W*VT Where W is diagonal matrix of singular values that can be coded as a 1D vector of singular values and U and V. All the singular values are non-negative and sorted (together with U and V columns) in descenting order.

Namespace: Emgu.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.4.2.1777 (2.4.2.1777)

# Syntax

C#
```public static void cvSVD(
IntPtr A,
IntPtr W,
IntPtr U,
IntPtr V,
SVD_TYPE flags
)```
Visual Basic
```Public Shared Sub cvSVD ( _
A As IntPtr, _
W As IntPtr, _
U As IntPtr, _
V As IntPtr, _
flags As SVD_TYPE _
)```
Visual C++
```public:
static void cvSVD(
IntPtr A,
IntPtr W,
IntPtr U,
IntPtr V,
SVD_TYPE flags
)```

#### Parameters

A
Type: System..::..IntPtr
Source MxN matrix
W
Type: System..::..IntPtr
Resulting singular value matrix (MxN or NxN) or vector (Nx1).
U
Type: System..::..IntPtr
Optional left orthogonal matrix (MxM or MxN). If CV_SVD_U_T is specified, the number of rows and columns in the sentence above should be swapped
V
Type: System..::..IntPtr
Optional right orthogonal matrix (NxN)
flags
Type: Emgu.CV.CvEnum..::..SVD_TYPE
Operation flags

# Remarks

SVD algorithm is numerically robust and its typical applications include: 1. accurate eigenvalue problem solution when matrix A is square, symmetric and positively defined matrix, for example, when it is a covariation matrix. W in this case will be a vector of eigen values, and U=V is matrix of eigen vectors (thus, only one of U or V needs to be calculated if the eigen vectors are required) 2. accurate solution of poor-conditioned linear systems 3. least-squares solution of overdetermined linear systems. This and previous is done by cvSolve function with CV_SVD method 4. accurate calculation of different matrix characteristics such as rank (number of non-zero singular values), condition number (ratio of the largest singular value to the smallest one), determinant (absolute value of determinant is equal to the product of singular values). All the things listed in this item do not require calculation of U and V matrices.