简体   繁体   English

Matlab:比较具有不同尺寸和像素大小的2个图像

[英]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 图像1:尺寸[512 x 512],像素尺寸:0.41 mm

Image 2: size [210 x 210] with pixel dimension 1 mm I tried to use: imresize 图像2:尺寸为[210 x 210],像素尺寸为1 mm我尝试使用: 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! 欢迎任何建议!

if you meant to test if the two images are identical, instead of resizing the images, you can use filters with different bandwidths. 如果您打算测试两个图像是否相同,而不是调整图像大小,则可以使用具有不同带宽的滤镜。 or a higher level feature, such as sift feature, can usually take care of sizing issues because it picks the most interesting scale internally. 或者更高级别的功能,例如筛选功能,通常可以处理大小调整问题,因为它在内部选择了最有趣的比例。

vlfeat is a good toolbox if you use matlab. 如果你使用matlab,vlfeat是一个很好的工具箱。

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. 无论如何,也许最好使用这里提到的方法之一将较小的版本重新调整为更大的版本: http//www.mathworks.com/help/images/ref/imresize.html然后比较它们。 For example, I would enlarge the smaller image using 'lanczos3' method. 例如,我会使用'lanczos3'方法放大较小的图像。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM