如何在matlab中测量两个二维复杂场之间的相似度? [英] how to measure he similarity between two 2D complex fields in matlab?
问题描述
我有一个矩阵运算 Y = B * A * X;
;其中 A = exp(1i。* pi * rand(50,50)); B =转置(A);
I have a matrix operation Y=B*A*X;
; where A=exp(1i.*pi*rand(50,50)); B=transpose(A);
X是随机输入
X=exp(1i.*pi*rand(50,50));
所以我计算了Y.
现在我发现另一个Y说Y1表示另一个 X1 = exp(1i。* pi * rand(50,50));
Y和Y1是复数输出。如何衡量这些文件之间的相似性?
Now I find another Y say Y1 for another X1=exp(1i.*pi*rand(50,50));
Y and Y1 are complex outputs. How can I measure the similarity between these fileds ?
有人可以帮忙。我试过了
Can someone please help. I have tried
rsme = sqrt(mean(abs(Y1(:)) - abs(Y(:))。^ 2);
但我想这是一个错误的措施?
rsme=sqrt(mean(abs(Y1(:))-abs(Y(:)).^2);
But I guess it is a wrong measure ?
推荐答案
均方误差(MSE)是一种常见的相似性估计技术:
The mean-squared error (MSE) is a common similarity estimation technique:
MSE=mean((abs(Y(:))-abs(Y1(:))).^2)
matlab中有一个名为 immse <的构建函数/ code>给出相同的结果:
There is a build function in matlab called immse
that gives the same result:
MSE=immse(Y,Y1)
结构相似性指数(SSIM)也是一种可用的技术:
The Structural Similarity Index (SSIM) is also an available technique:
ssimval = ssim(Y,Y1)
其中Y1是参考图像。
这篇关于如何在matlab中测量两个二维复杂场之间的相似度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!