Ask Your Question

Revision history [back]

click to hide/show revision 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);