no there isn't any command to do this automatically, but you can do it manually by either using the zoom function in the matlab figure or selecting a bounding box around the image region to display e.g. figure(4); image(uint8(I(a:b,c:d)+128); axis image; axis off; colormap(gray(256));title('edges'); i.e. the +128 is to view negative edges