function im = ignore_border(im,r)
    
if r==0
    return
end

[h,w] = size(im);
dh = max(round(h*r),1);
dw = max(round(w*r),1);

im(1:dh,:) = 0;
im(h-dh+1:end,:) = 0;
im(:,1:dw) = 0;
im(:,w-dw+1:end) = 0;
