MATLAB: Is an image pixellated when zooming in but not when displaying by indexed bounds

MATLAB

I have a large image (1920 x 1200). I display it with "imagesc". When I zoom into the image, it's very pixelated. So, I'm doing,
>> I = imread('myImage.jpg');
>> imagesc(I)
and then I zoom into a small region.
However, when I take the zoomed "x" and "y" bounds, and then display the image using:
>> imagesc(I(xbegin:xend,ybegin:yend))
The resulting region appears much less pixelated than when zoomed in.
Additionally, when I take the zoomed-in view (pixelated one) and export the view, the resulting image is of higher quality (looks like the indexed view).
Why is this so?

Best Answer

This is likely happening because you are using software OpenGL.
When using software OpenGL, MATLAB is used without hardware-accelerated graphics rendering of your graphics card. For this reason, images can appear more blocky when displayed.
It is possible that your installation of MATLAB is set up to use the software version of OpenGL. You can check by executing the following in the MATLAB Command Window:
>> opengl info
Then, check if the 'Software' parameter of the output is 'true'. To use hardware OpenGL, you can execute the following:
>> opengl('save','hardware')
Then, restart MATLAB and these changes should take effect. After zooming in when hardware graphics are enabled, the zoomed-in image should look the same as the image where the bounds were specified.
If you would ever like to switch back to using software OpenGL, you can execute:
>> opengl('save','sofwtare')
and restart MATLAB.
This should resolve the issue.