function  F = GetBinary(I, lowlimit, highlimit)
%GETBINARY(I,LOWLIMIT,HIGHLIMIT) accepts a gray image I,
%the function finds all image' pixels that are in the 
%domain [lowlimit , highlimit] and returns a binary matrix F 
%that is of the same size as I, 
%where 1 for pixels satisfying the domain condition and 0 otherwise
[M, N] = size(I);
F = logical(zeros(M,N));
for x=1:M
    for y=1:N
        if I(x,y)>= lowlimit & I(x,y)<= highlimit
            F(x,y) = 1;
        else
           F(x,y) =0; 
        end
    end
end
