MATLAB: How to increase number of rows and cols without changing the image size

digital image processingimage processingmatlab function

Is there a function to increase the number of rows and cols without changing the image size?
Example: I have an image that is 301X301 with pixel size 1mm. How do I increase the number of pixels to 1024X1024 with pixel size (301/1024)mm? Effectively maintaining the image size.
imresize only change the number of pixels, not pixel size. Am i right?

Best Answer

That's correct. How big you consider a pixel to be in "real world units" depends on the calibration you're using. It could be one micron, one kilometer, or one light year. If I have a length that is 1 meter long in MATLAB, and it happens to be 1000 pixels long, then I can multiply the number ob pixels by 1/1000 to get the distance in meters. If I resize the image so that that length is now 2000 pixels long, then my calibration factor will have to be 1/2000 now in order to still get a real world distance of one meter again.
Related Question