user10799430
user10799430

Reputation:

confusion regarding "imresize" in MATLAB?

I have read on below weblink that the "imresize" command can be used to change resolution of an image? Is it true? Because apparently keyword "imresize" suggests change of size?

Does this size means storage( Kbs size) or display size?

https://www.electronicsforu.com/electronics-projects/software-projects-ideas/image-processing-using-matlab-basic-operations-part-2-4

Upvotes: -2

Views: 405

Answers (1)

If_You_Say_So
If_You_Say_So

Reputation: 1293

I would be cautious in saying that imresize can change the resolution. It depends on how you define resolution but the way that I define image resolution is that resolution is the ability to distinguish between two neighboring fine objects in the image. This can be determined by for example calculating the FWHM of the profile of a very thin line, or a point, taken in your image. imresize changes the number of pixels and pixel density of the image but can it actually separate two objects from each other if they are indistinguishable in the original image? While you can sharpen the image by using imresize I think you cannot enhance the resolution of an image with it. Let's say I have a sharp "high resolution" image of a bird taken with a high resolution camera like this:

Original image

This image has 400 x 400 pixels. So if it has 3 bytes per pixel, this image's size is 3x400x400 bytes (468.75 KB). Now I downsample the image by im_downsampled = imresize(im, 0.1) such that the resulting image would have 40 x 40 pixels (image size 40x40x3 bytes or ~4.7 KB) like this

Original image downsampled

The resulting image is blurred and the size has been reduced. Now can I recover the image to its original resolution by doing im_upsampled = imresize(im_downsampled, 10)? Well, let's see:

Recovered image

As you can see while the image looks smoother, fine structures cannot be recovered. The resulting image im_upsampled has the same size as the original image (400x400x3 bytes), however the resolution has already been missed. I hope that the file sizes I mentioned clarify the confusion on image KB size.

Upvotes: 1

Related Questions