MATLAB: How to improve pixel resolution in an image

imageImage Processing ToolboxMATLABpixelresizeresolution

Hi all
I have a 951*951 matrix of image after reconstruction. I want to resize them into 512*512 in Matlab.
At the same time, the pixel resolution should be changed to about 2 pixels/mm,which at the moment is 1 pixel /mm (i.e., width of image= 512mm snd ht- 512mm).
I tried with 'imresize'-I could change the size only. Is it possible to reduce the width & height of the image to be 250 mm while maintaining the same pixel numbers (512*512). Is there any way to do it? Also I wonder whether 'imresize' will distort the image quality( I mean making the image more softer)

Best Answer

If you have a 951 wide image with 1 mm per pixel, then the field of view is 951 mm. Now if you reduce this to 512 pixels, the field of view is still the same - 951 mm - so the resolution is now 951 mm / 512 pixels = 1.86 mm per pixel.
If you want 250 mm, then you need to crop out a 250x250 mm chunk from the 951x951 image. So use imcrop to extract a rectangle of that size from the desired location. Once you've done that, you can resize from 250 by 250 pixels to 512 x 512 pixels. Your field of view will stay 250 mm since you are still looking at the same stuff, but it will just have a different image matrix size (512x512). The image may look softer since you are more than doubling the size of a fixed 250x250 mm subimage.