function ero=test(I)
    [m, n] = size(I);
    ero=erosion(I, 1);
    res=1;
    while(max(max(ero(2:m-2, 2:n-2)))>0)
        ero=erosion(ero, 1);
        res=res+1;
        disp(res);
    end
end