opencv: cv::SVD Class Reference

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

# cv::SVD Class Reference

`#include <core.hpp>`

List of all members.

## Public Types
enum | { MODIFY_A = 1, NO_UV = 2, FULL_UV = 4 }
## Public Member Functions
void | backSubst (const Mat &rhs, CV_OUT Mat &dst) const
| performs back substitution, so that dst is the solution or pseudo-solution of m*dst = rhs, where m is the decomposed matrix
SVD & | operator() (const Mat &src, int flags=0)
| the operator that performs SVD. The previously allocated SVD::u, SVD::w are SVD::vt are released.
| SVD ()
| the default constructor
| SVD (const Mat &src, int flags=0)
| the constructor that performs SVD
## Static Public Member Functions
static void | backSubst (const Mat &w, const Mat &u, const Mat &vt, const Mat &rhs, CV_OUT Mat &dst)
| performs back substitution
template<typename _Tp , int m, int n, int nm, int nb>
static void | backSubst (const Matx< _Tp, nm, 1 > &w, const Matx< _Tp, m, nm > &u, const Matx< _Tp, n, nm > &vt, const Matx< _Tp, m, nb > &rhs, Matx< _Tp, n, nb > &dst)
static void | compute (const Mat &src, CV_OUT Mat &w, int flags=0)
| computes singular values of a matrix
template<typename _Tp , int m, int n, int nm>
static void | compute (const Matx< _Tp, m, n > &a, Matx< _Tp, nm, 1 > &w)
template<typename _Tp , int m, int n, int nm>
static void | compute (const Matx< _Tp, m, n > &a, Matx< _Tp, nm, 1 > &w, Matx< _Tp, m, nm > &u, Matx< _Tp, n, nm > &vt)
static void | compute (const Mat &src, CV_OUT Mat &w, CV_OUT Mat &u, CV_OUT Mat &vt, int flags=0)
| decomposes matrix and stores the results to user-provided matrices
static void | solveZ (const Mat &src, CV_OUT Mat &dst)
| finds dst = arg min_{|dst|=1} |m*dst|
## Public Attributes
Mat | u
Mat | vt
Mat | w

## Detailed Description

Singular Value Decomposition class

The class is used to compute Singular Value Decomposition of a floating-point matrix and then use it to solve least-square problems, under-determined linear systems, invert matrices, compute condition numbers etc.

For a bit faster operation you can pass flags=SVDMODIFY_A|... to modify the decomposed matrix when it is not necessarily to preserve it. If you want to compute condition number of a matrix or absolute value of its determinant - you do not need SVD::u or SVD::vt, so you can pass flags=SVDNO_UV|... . Another flag SVD::FULL_UV indicates that the full-size SVD::u and SVD::vt must be computed, which is not necessary most of the time.

## Member Enumeration Documentation

anonymous enum

Enumerator:

  MODIFY_A |
  NO_UV |
  FULL_UV |

## Constructor & Destructor Documentation

cv::SVD::SVD | ( | ) | `[inline]`

the default constructor

cv::SVD::SVD | ( | const Mat & | src,
|  | int | flags = `0`
| ) |  | `[inline]`

the constructor that performs SVD

## Member Function Documentation

static void cv::SVD::backSubst | ( | const Mat & | w,
|  | const Mat & | u,
|  | const Mat & | vt,
|  | const Mat & | rhs,
|  | CV_OUT Mat & | dst
| ) |  | `[static]`

performs back substitution

void cv::SVD::backSubst | ( | const Mat & | rhs,
|  | CV_OUT Mat & | dst
| ) |  | const

performs back substitution, so that dst is the solution or pseudo-solution of m*dst = rhs, where m is the decomposed matrix

template<typename _Tp , int m, int n, int nm, int nb>

void cv::SVD::backSubst | ( | const Matx< _Tp, nm, 1 > & | w,
|  | const Matx< _Tp, m, nm > & | u,
|  | const Matx< _Tp, n, nm > & | vt,
|  | const Matx< _Tp, m, nb > & | rhs,
|  | Matx< _Tp, n, nb > & | dst
| ) |  | `[inline, static]`

static void cv::SVD::compute | ( | const Mat & | src,
|  | CV_OUT Mat & | w,
|  | int | flags = `0`
| ) |  | `[static]`

computes singular values of a matrix

static void cv::SVD::compute | ( | const Mat & | src,
|  | CV_OUT Mat & | w,
|  | CV_OUT Mat & | u,
|  | CV_OUT Mat & | vt,
|  | int | flags = `0`
| ) |  | `[static]`

decomposes matrix and stores the results to user-provided matrices

template<typename _Tp , int m, int n, int nm>

void cv::SVD::compute | ( | const Matx< _Tp, m, n > & | a,
|  | Matx< _Tp, nm, 1 > & | w,
|  | Matx< _Tp, m, nm > & | u,
|  | Matx< _Tp, n, nm > & | vt
| ) |  | `[inline, static]`

template<typename _Tp , int m, int n, int nm>

void cv::SVD::compute | ( | const Matx< _Tp, m, n > & | a,
|  | Matx< _Tp, nm, 1 > & | w
| ) |  | `[inline, static]`

SVD& cv::SVD::operator() | ( | const Mat & | src,
|  | int | flags = `0`
| ) |  |

the operator that performs SVD. The previously allocated SVD::u, SVD::w are SVD::vt are released.

static void cv::SVD::solveZ | ( | const Mat & | src,
|  | CV_OUT Mat & | dst
| ) |  | `[static]`

finds dst = arg min_{|dst|=1} |m*dst|

## Member Data Documentation

Mat cv::SVD::u

Mat cv::SVD::vt

Mat cv::SVD::w

The documentation for this class was generated from the following files:

- /usr/ports/pobj/OpenCV-2.2.0/OpenCV-2.2.0/modules/core/include/opencv2/core/core.hpp
- /usr/ports/pobj/OpenCV-2.2.0/OpenCV-2.2.0/modules/core/include/opencv2/core/mat.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines