Two things:
First, by default, imshow() uses nearest-neighbor interpolation for display. Things with fine features will be subject to this sort of aliasing.
% generate a grid of 1px wide lines
w = 301;
x = mod(1:w,10) == 1;
A = x | x';
% show the image
imshow(A)
In recent versions, you can specify a continuous display interpolant. While this may help for some images, images with regular patterns may still show some less-severe interference patterns.
% show the image with non-default display interpolation
imshow(A,'interpolation','bilinear')
Second, one has to ask why it's important that imshow() produces high-quality and accurate image displays. It's typically used for viewing.
Cases where it might be justified:
- Overlaying objects from plot(), contour(), patch() atop the image and then saving the figure/axes
Cases where people want to but really shouldn't:
- Displaying the image and then saving the figure/axes in order to save a copy of the image (use imwrite())
- Combining one or more images in the same figure and then saving the composite image (just composite them directly)
In cases where it's necessary to save the figure with a displayed image, tools like export_fig() (File Exchange) support antialiasing options which may help reduce the impact of any display limitations.