两幅图像之间的相关性 [英] Correlation among 2 images

查看:1763
本文介绍了两幅图像之间的相关性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到两个图像f1和f2之间的以下相关性,其中图像的大小是PXP。

I am trying to find the following correlation among two images f1 and f2 where the size of the image is PXP.

我为此编写了一个for循环程序相同,但我认为内置函数会更快。

I have written a for loop program for the same but I think an inbuilt function would be faster for the same.

matlab中的哪个函数可以帮我计算这个?

Which function in matlab can help me compute this ?

此外,如果两个图像的大小都是MXN,有人可以告诉我这个公式将如何改变,或者该功能是否能够处理它。

Also if the size of both the images are M X N can someone tell me how this formula will change or if the function will be able to handle it.

编辑:

是否有比 xcorr2 更快的功能,可以帮助我看到它也需要很多时候我只需要具有相关值的未移位图像....

Is there any faster function than xcorr2 that can help me seeing that it takes too much time when I only need to have the value for correlation the unshifted images....

推荐答案

这是用于的功能做两个图像(矩阵)之间的相关性(系数):

This is the function used to do correlation (coefficient) between two images (matrices):

r = corr2(A,B)
计算A和B之间的相关系数,其中A和B是相同大小的矩阵或向量。

r = corr2(A,B) computes the correlation coefficient between A and B, where A and B are matrices or vectors of the same size.

而xcorr2(A,B)解决了CROSS相关性。

while xcorr2 (A, B) solves for CROSS correlation.

这篇关于两幅图像之间的相关性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆