Commit 9ec2805e authored by Kirill Kornyakov's avatar Kirill Kornyakov

Workaround build issue on Mac

parent 59705536
......@@ -103,7 +103,10 @@ namespace cv{
_particles.row(i).copyTo(new_particles.row(num_particles));
}
}
Mat_<double> maxrow=_particles.row(std::max_element(_logweight.begin(),_logweight.end())-_logweight.begin());
//Mat_<double> maxrow=_particles.row(std::max_element(_logweight.begin(),_logweight.end())-_logweight.begin());
double max_element;
minMaxLoc(_logweight, 0, &max_element);
Mat_<double> maxrow=_particles.row(max_element);
for(;num_particles<new_particles.rows;num_particles++){
maxrow.copyTo(new_particles.row(num_particles));
}
......@@ -208,7 +211,9 @@ namespace cv{
}
void PFSolver::normalize(Mat_<double>& row){
double logsum=0.0;
double max=*(std::max_element(row.begin(),row.end()));
//double max=*(std::max_element(row.begin(),row.end()));
double max;
minMaxLoc(row, 0, &max);
row-=max;
for(int i=0;i<row.cols;i++){
logsum+=exp(row(0,i));
......
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