在Matlab/Python中对两幅图像的相似性指标进行了细化

2024-10-01 07:30:20 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图分析两幅图像:原始图像和使用傅立叶变换生成的近似图像。在

示例:

原件: enter image description here

近似值:

enter image description here

如何找到一个值来表示这两个图像之间的相似性。我曾尝试在Matlab中使用SSIM,但它给出的值是0.67,我个人认为这是不准确的。在

ref = imread('download (1).png');

A = imread('download.png')


subplot(1,2,1); imshow(ref); title('Reference Image');
subplot(1,2,2); imshow(A);   title('Blurred Image');

Calculate the global SSIM value for the image and local SSIM values for each pixel. Return the global SSIM value and display the local SSIM value map.
[ssimval, ssimmap] = ssim(A,ref);

fprintf('The SSIM value is %0.4f.\n',ssimval);

figure, imshow(ssimmap,[]);
title(sprintf('ssim Index Map - Mean ssim Value is %0.4f',ssimval));

enter image description here

像wise一样,一些在线工具,比如这个:https://deepai.org/machine-learning-model/image-similarity给出了一个6的距离值。(0为最佳)


Tags: the图像imagerefpngtitlevaluedownload