1 | initial version |
Yes I think it's a bug :
// create gaussian response
y=Mat::zeros((int)roi.height,(int)roi.width,CV_64F);
for(unsigned i=0;i<roi.height;i++){
for(unsigned j=0;j<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);
}
}
when you roi.height is a double value (int)roi.height is not equal roi.height then in loop pixels outside are scanned. Loop should be : for(unsigned i=0;i<(int)roi.height;i++){ for(unsigned j=0;j<(int)roi.width;j++){
2 | No.2 Revision |
Yes I think it's a bug :
// create gaussian response
y=Mat::zeros((int)roi.height,(int)roi.width,CV_64F);
for(unsigned i=0;i<roi.height;i++){
for(unsigned j=0;j<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);
}
}
when you roi.height is a double value (int)roi.height is not equal roi.height then in loop pixels outside are scanned. Loop should be : for(unsigned i=0;i<(int)roi.height;i++){ for(unsigned j=0;j<(int)roi.width;j++){
About issue now I cannot find it https://github.com/opencv/opencv_contrib/issues. If you don't report it you can do it
3 | No.3 Revision |
Yes I think it's a bug :
// create gaussian response
y=Mat::zeros((int)roi.height,(int)roi.width,CV_64F);
for(unsigned i=0;i<roi.height;i++){
for(unsigned j=0;j<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);
}
}
when you roi.height is a double value (int)roi.height is not equal roi.height then in loop pixels outside are scanned.
Loop should be :
:
for(unsigned i=0;i<(int)roi.height;i++){
for(unsigned j=0;j<(int)roi.width;j++){j=0;j<(int)roi.width;j++){
About issue now I cannot find it https://github.com/opencv/opencv_contrib/issues. If you don't report it you can do it
4 | No.4 Revision |
Yes I think it's a bug :
// create gaussian response
y=Mat::zeros((int)roi.height,(int)roi.width,CV_64F);
for(unsigned i=0;i<roi.height;i++){
for(unsigned j=0;j<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);
}
}
when you roi.height is a double value (int)roi.height is not equal roi.height then in loop pixels outside are scanned.
Loop should be :something like this:
y=Mat::zeros(static_cast<int>(roi.height),static_cast<int>(roi.width),CV_64F);
for(unsigned i=0;i<(int)roi.height;i++){
i=0;i<y.height;i++){
for(unsigned j=0;j<(int)roi.width;j++){
j=0;j<y.width;j++){
About issue now I cannot find it https://github.com/opencv/opencv_contrib/issues. If you don't report it you can do it
5 | No.5 Revision |
Yes I think it's a bug :
// create gaussian response
y=Mat::zeros((int)roi.height,(int)roi.width,CV_64F);
for(unsigned i=0;i<roi.height;i++){
for(unsigned j=0;j<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);
}
}
when you roi.height is a double value (int)roi.height is not equal roi.height then in loop pixels outside are scanned.
Loop should be something like this:
y=Mat::zeros(static_cast<int>(roi.height),static_cast<int>(roi.width),CV_64F);this:
y=Mat::zeros(static_cast<int>(roi.height),static_cast<int>(roi.width),CV_64F);
for(unsigned i=0;i<y.height;i++){
for(unsigned j=0;j<y.width;j++){
About issue now I cannot find it https://github.com/opencv/opencv_contrib/issues. If you don't report it you can do it
6 | No.6 Revision |
Yes I think it's a bug :
// create gaussian response
y=Mat::zeros((int)roi.height,(int)roi.width,CV_64F);
for(unsigned i=0;i<roi.height;i++){
for(unsigned j=0;j<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);
}
}
when you roi.height is a double value (int)roi.height is not equal roi.height then in loop pixels outside are scanned. Loop should be something like this:
y=Mat::zeros(static_cast<int>(roi.height),static_cast<int>(roi.width),CV_64F);
for(unsigned i=0;i<y.height;i++){
i=0;i<y.rows;i++){
for(unsigned j=0;j<y.width;j++){
j=0;j<y.cols;j++){
About issue now I cannot find it https://github.com/opencv/opencv_contrib/issues. If you don't report it you can do it