How do I change the resolution of an image produced by imagesc?
18 views (last 30 days)
How can I change the resolution of the image part of the figure produced by imagesc? I was going to try using imresize but I can't figure out how to make it work. I'm trying to purposefully reduce the quality of a data set as part of a simulation.
Image Analyst on 10 Apr 2015
If you use imresize() to shrink your image, but it is still bigger than the axes on your screen (for example a 500 by 700 image is being shown on 200 by 300 pixels on your screen, then you will not notice any difference upon display, but you will if you look at the actual variable in the variable inspector. Is that what is happening?
See my Zoom demo, attached. Actually it's an adapted demo personally given to me by the imaging team at the Mathworks.
More Answers (1)
Chris McComb on 10 Apr 2015
To use imresize, you first read the image in:
a = imread('image.jpg');
Then, you apply imresize as follows (for example to reduce resolution by 50%):
b = imresize(a, 0.5);
Your reduced image is stored to b.