[−][src]Function opencv::core::solve
pub fn solve(
src1: &dyn ToInputArray,
src2: &dyn ToInputArray,
dst: &mut dyn ToOutputArray,
flags: i32
) -> Result<bool>
Solves one or more linear systems or least-squares problems.
The function cv::solve solves a linear system or least-squares problem (the
latter is possible with SVD or QR methods, or by specifying the flag
#DECOMP_NORMAL ):
If #DECOMP_LU or #DECOMP_CHOLESKY method is used, the function returns 1
if src1 (or ) is non-singular. Otherwise,
it returns 0. In the latter case, dst is not valid. Other methods find a
pseudo-solution in case of a singular left-hand side part.
Note: If you want to find a unity-norm solution of an under-defined
singular system , the function solve
will not do the work. Use SVD::solveZ instead.
Parameters
- src1: input matrix on the left-hand side of the system.
- src2: input matrix on the right-hand side of the system.
- dst: output solution.
- flags: solution (matrix inversion) method (#DecompTypes)
See also
invert, SVD, eigen
C++ default parameters
- flags: DECOMP_LU