pub struct SVD { /* private fields */ }
Expand description

Singular Value Decomposition

Class for computing Singular Value Decomposition of a floating-point matrix. The Singular Value Decomposition is used to solve least-square problems, under-determined linear systems, invert matrices, compute condition numbers, and so on.

If you want to compute a condition number of a matrix or an absolute value of its determinant, you do not need u and vt. You can pass flags=SVD::NO_UV|… . Another flag SVD::FULL_UV indicates that full-size u and vt must be computed, which is not necessary most of the time.

See also

invert, solve, eigen, determinant

Implementations

the default constructor

initializes an empty SVD structure

the default constructor

initializes an empty SVD structure

Overloaded parameters

initializes an empty SVD structure and then calls SVD::operator()

Parameters
  • src: decomposed matrix. The depth has to be CV_32F or CV_64F.
  • flags: operation flags (SVD::Flags)
C++ default parameters
  • flags: 0

decomposes matrix and stores the results to user-provided matrices

The methods/functions perform SVD of matrix. Unlike SVD::SVD constructor and SVD::operator(), they store the results to the user-provided matrices:

Mat A, w, u, vt;
SVD::compute(A, w, u, vt);
Parameters
  • src: decomposed matrix. The depth has to be CV_32F or CV_64F.
  • w: calculated singular values
  • u: calculated left singular vectors
  • vt: transposed matrix of right singular vectors
  • flags: operation flags - see SVD::Flags.
C++ default parameters
  • flags: 0

decomposes matrix and stores the results to user-provided matrices

The methods/functions perform SVD of matrix. Unlike SVD::SVD constructor and SVD::operator(), they store the results to the user-provided matrices:

Mat A, w, u, vt;
SVD::compute(A, w, u, vt);
Parameters
  • src: decomposed matrix. The depth has to be CV_32F or CV_64F.
  • w: calculated singular values
  • u: calculated left singular vectors
  • vt: transposed matrix of right singular vectors
  • flags: operation flags - see SVD::Flags.
Overloaded parameters

computes singular values of a matrix

  • src: decomposed matrix. The depth has to be CV_32F or CV_64F.
  • w: calculated singular values
  • flags: operation flags - see SVD::Flags.
C++ default parameters
  • flags: 0

performs back substitution

solves an under-determined singular linear system

The method finds a unit-length solution x of a singular linear system A*x = 0. Depending on the rank of A, there can be no solutions, a single solution or an infinite number of solutions. In general, the algorithm solves the following problem: block formula

Parameters
  • src: left-hand-side matrix.
  • dst: found solution.

Trait Implementations

Wrap the specified raw pointer Read more
Return an the underlying raw pointer while consuming this wrapper. Read more
Return the underlying raw pointer. Read more
Return the underlying mutable raw pointer Read more
Executes the destructor for this type. Read more
performs a singular value back substitution. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.