tracking: fix rounding error in trackerKCF

pull/1304/head
berak 8 years ago
parent ffdec47924
commit 006dcae896
  1. 4
      modules/tracking/src/trackerKCF.cpp

@ -223,8 +223,8 @@ namespace cv{
// create gaussian response // create gaussian response
y=Mat::zeros((int)roi.height,(int)roi.width,CV_64F); y=Mat::zeros((int)roi.height,(int)roi.width,CV_64F);
for(unsigned i=0;i<roi.height;i++){ for(unsigned i=0;i<(unsigned)roi.height;i++){
for(unsigned j=0;j<roi.width;j++){ for(unsigned j=0;j<(unsigned)roi.width;j++){
y.at<double>(i,j)=(i-roi.height/2+1)*(i-roi.height/2+1)+(j-roi.width/2+1)*(j-roi.width/2+1); y.at<double>(i,j)=(i-roi.height/2+1)*(i-roi.height/2+1)+(j-roi.width/2+1)*(j-roi.width/2+1);
} }
} }

Loading…
Cancel
Save