I have a program in which i'm trying to see if the image is white or not it works in debug mode but in release it doesn't work
int image_blanche(char * str, double prctage){
Mat img=imread(str);
int compt=0;
for(int i=0;i<img.rows;i++){
for(int j=0;j<img.cols;j++){
if (img.at<uchar>(i,j)==0){
compt=compt+1;
}
}
}
if (compt< img.rows*img.cols*prctage)
{
return 1;
}
else if (compt> img.rows*img.cols*prctage){
return 0;
}
}