1 | initial version |
your integral img has int type(by default), you're accessing it as double.
so either specify the right type:
integral(img,isum,CV_64F); // omitting the type param makes an int image
or access it as int:
isum.at<int>(row,col);