| 491 | // See also LinSolve() which will solve any linear system. |
| 492 | |
| 493 | static const VEC LinSolveLu( |
| 494 | MAT& mat, // in, but gets destroyed |
| 495 | VEC& b) // in, but gets destroyed |
| 496 | { |
| 497 | CV_Assert(mat.isContinuous() && b.isContinuous()); |
| 498 | #if ((CV_VERSION_MAJOR < 3) || (CV_VERSION_MAJOR == 3) && (CV_VERSION_MINOR < 1)) //&& (CV_VERSION_REVISION == 0) |
| 499 | using cv::hal::LU; |
| 500 | #else |
| 501 | using cv::LU; |
| 502 | #endif |
| 503 | if (!LU(Buf(mat), mat.cols * sizeof(mat(0)), mat.rows, |
| 504 | Buf(b), sizeof(mat(0)), 1)) |
| 505 | Err("LinSolveLu failed"); |
| 506 | return b; |
| 507 | } |
| 508 | |
| 509 | // Return the similarity transform to align shape to to anchorshape. |
| 510 | // This returns the transformation matrix i.e. the pose. |
no test coverage detected