1
0
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:
Vadim Pisarevsky
2015-05-05 15:56:06 +03:00
parent 5b9182ba43
commit 63a63e3eaa
5 changed files with 32 additions and 5 deletions
+1
View File
@@ -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);