Search code examples
imagematlabpixel

Matlab: Comparing 2 images with different dimension and pixel size


I have 2 images that I need to compare:

Image 1: size [512 x 512] with pixel dimension: 0.41 mm

Image 2: size [210 x 210] with pixel dimension 1 mm I tried to use: imresize

imresize(Image_1, [210 210]) % to change size/pixel

However it reduce the resolution and image is not clear at all. Any suggestion will be welcome!


Solution

  • You always have that problem with comparing two images of different resolutions. I would do a pre-processing of images to make them comparable, maybe something more than just making them of the same size. That pre-processing really depends on your images.

    Anyway, perhaps it would be better to re-size the smaller one to a larger version using one of the methods mentioned here: http://www.mathworks.com/help/images/ref/imresize.html and then compare them. For example, I would enlarge the smaller image using 'lanczos3' method.

    imresize(Image_2,[512 512],'lanczos3');