function [flag] = predicate1(region,xb,m,n)
% checks the region
[a,b]=size(region);
region;
flag=0;
for k=1:a
   for l=1:a
     if (xb(k+m-1,l+n) < 177 | xb(k+m+1,l+n)< 177 | xb(k+m,l+n-1)< 177 | xb(k+m,l+n+1) < 177 ...
| xb(k+m-1,+n+l-1)< 177 | xb(k+m+1,n+l-1)< 177 | xb(k+m+1,l+n+1)< 177 | xb(m+k-1,l+n+1) < 177)
       if (region(k,l)  <177) 
         flag=1;
       end
      end
    end
end