All fixed, at least worked on. Sorry for delay.


2013/8/27 Vadim Pisarevsky <notifications@github.com>

> In modules/optim/src/simplex.cpp:
>
> > +    Ptr<DownhillSolver> createDownhillSolver(const Ptr<Solver::Function>& f, InputArray initStep, TermCriteria termcrit){
> > +        DownhillSolver *DS=new DownhillSolverImpl();
> > +        DS->setFunction(f);
> > +        DS->setInitStep(initStep);
> > +        DS->setTermCriteria(termcrit);
> > +        return Ptr<DownhillSolver>(DS);
> > +    }
> > +    void DownhillSolverImpl::getInitStep(OutputArray step)const{
> > +        step.create(1,_step.cols,CV_
> 64FC1);
> > +        _step.copyTo(step);
> > +    }
> > +    void DownhillSolverImpl::setInitStep(InputArray step){
> > +        //set dimensionality and make a deep copy of step
> > +        Mat m=step.getMat();
> > +        dprintf(("m.cols=%d\nm.rows=%d\n",m.cols,m.rows));
> > +        CV_Assert(MIN(m.cols,m.rows)==1 && m.type()==CV_64FC1);
>
> the implementation is overly complex. use the following code after assert:
>
> if(m.rows == 1)
>    m.copyTo(_step);
> else
>    transpose(m, _step);
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Itseez/opencv/pull/1282/files#r6002151>
> .
>