Commit eed11303 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #11966 from alalek:core_solve_method_check

parents 9d8495f8 5385086f
...@@ -1100,6 +1100,9 @@ bool cv::solve( InputArray _src, InputArray _src2arg, OutputArray _dst, int meth ...@@ -1100,6 +1100,9 @@ bool cv::solve( InputArray _src, InputArray _src2arg, OutputArray _dst, int meth
CV_Assert( type == _src2.type() && (type == CV_32F || type == CV_64F) ); CV_Assert( type == _src2.type() && (type == CV_32F || type == CV_64F) );
method &= ~DECOMP_NORMAL; method &= ~DECOMP_NORMAL;
CV_Check(method, method == DECOMP_LU || method == DECOMP_SVD || method == DECOMP_EIG ||
method == DECOMP_CHOLESKY || method == DECOMP_QR,
"Unsupported method, see #DecompTypes");
CV_Assert( (method != DECOMP_LU && method != DECOMP_CHOLESKY) || CV_Assert( (method != DECOMP_LU && method != DECOMP_CHOLESKY) ||
is_normal || src.rows == src.cols ); is_normal || src.rows == src.cols );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment