[−][src]Struct opencv::core::SVD
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
impl SVD
[src]
pub fn as_raw_SVD(&self) -> *const c_void
[src]
pub fn as_raw_mut_SVD(&mut self) -> *mut c_void
[src]
impl SVD
[src]
pub fn default() -> Result<SVD>
[src]
the default constructor
initializes an empty SVD structure
pub fn new(src: &dyn ToInputArray, flags: i32) -> Result<SVD>
[src]
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
pub fn compute_ext(
src: &dyn ToInputArray,
w: &mut dyn ToOutputArray,
u: &mut dyn ToOutputArray,
vt: &mut dyn ToOutputArray,
flags: i32
) -> Result<()>
[src]
src: &dyn ToInputArray,
w: &mut dyn ToOutputArray,
u: &mut dyn ToOutputArray,
vt: &mut dyn ToOutputArray,
flags: i32
) -> Result<()>
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
pub fn compute(
src: &dyn ToInputArray,
w: &mut dyn ToOutputArray,
flags: i32
) -> Result<()>
[src]
src: &dyn ToInputArray,
w: &mut dyn ToOutputArray,
flags: i32
) -> Result<()>
@todo document
Overloaded parameters
computes singular values of a matrix
Parameters
- 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
pub fn back_subst_multi(
w: &dyn ToInputArray,
u: &dyn ToInputArray,
vt: &dyn ToInputArray,
rhs: &dyn ToInputArray,
dst: &mut dyn ToOutputArray
) -> Result<()>
[src]
w: &dyn ToInputArray,
u: &dyn ToInputArray,
vt: &dyn ToInputArray,
rhs: &dyn ToInputArray,
dst: &mut dyn ToOutputArray
) -> Result<()>
performs back substitution
pub fn solve_z(
src: &dyn ToInputArray,
dst: &mut dyn ToOutputArray
) -> Result<()>
[src]
src: &dyn ToInputArray,
dst: &mut dyn ToOutputArray
) -> Result<()>
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:
Parameters
- src: left-hand-side matrix.
- dst: found solution.
Trait Implementations
impl Boxed for SVD
[src]
unsafe fn from_raw(ptr: *mut c_void) -> Self
[src]
fn into_raw(self) -> *mut c_void
[src]
fn as_raw(&self) -> *const c_void
[src]
fn as_raw_mut(&mut self) -> *mut c_void
[src]
impl Drop for SVD
[src]
impl SVDTrait for SVD
[src]
fn as_raw_SVD(&self) -> *const c_void
[src]
fn as_raw_mut_SVD(&mut self) -> *mut c_void
[src]
fn u(&mut self) -> Mat
[src]
fn set_u(&mut self, mut val: Mat)
[src]
fn w(&mut self) -> Mat
[src]
fn set_w(&mut self, mut val: Mat)
[src]
fn vt(&mut self) -> Mat
[src]
fn set_vt(&mut self, mut val: Mat)
[src]
fn back_subst(
&self,
rhs: &dyn ToInputArray,
dst: &mut dyn ToOutputArray
) -> Result<()>
[src]
&self,
rhs: &dyn ToInputArray,
dst: &mut dyn ToOutputArray
) -> Result<()>
impl Send for SVD
[src]
Auto Trait Implementations
impl RefUnwindSafe for SVD
[src]
impl !Sync for SVD
[src]
impl Unpin for SVD
[src]
impl UnwindSafe for SVD
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,