for (y=cy-range;y<cy+range;y++)
{
for (x=cx-range;x<cx+range;x++)
{
total=0;
for(q=y-r;q<y+r;q++)
{
for (p=x-r;p<x+r;p++)
{
if ( (p-x)*(p-x)+(q-y)*(q-y) < r*r )
total=total+BWImg[q*imgx+p];
}
}
if(total>max)
{
posx=x;
posy=y;
max=total;
}
}
}
--
FROM 223.166.142.*