public bool adaBlackPix(IplImage image)
{
int p, black = 0;
byte pix;
byte[] data = image.ImageDataUChar;
for (int x = 0; x < image.widthStep; x++)
{
for (int y = 0; y < image.height; y++)
{
p = y * image.widthStep + x;
pix = data[p];
if (pix == 0)
black++;
}
}
if (black < 1000)
return false;
else
return true;
}