mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
extended MinProblemSolver::Function to 1) report the space dimensionality, 2) compute gradient if needed
This commit is contained in:
@@ -235,6 +235,7 @@ protected:
|
||||
inline void createInitialSimplex( const Mat& x0, Mat& simplex, Mat& step )
|
||||
{
|
||||
int i, j, ndim = step.cols;
|
||||
CV_Assert( _Function->getDims() == ndim );
|
||||
Mat x = x0;
|
||||
if( x0.empty() )
|
||||
x = Mat::zeros(1, ndim, CV_64F);
|
||||
|
||||
Reference in New Issue
Block a user