互相关系数混乱
我想在matlab中编写一个程序来计算模板(n较小)和较大的原始图片之间的相关系数。我的问题是,如果模板和原图的尺寸不一样,如何生成相关图?我知道有一个函数 xcorr 可以在 matlab 中使用,但我想自己编程。非常感谢!
I wanted to write a program in matlab to calculate the correlation coefficient between a template (with smaller n) and a larger original picture. My question is, how do I generate a correlation picture if the size of the template and the original picture is different? I understand that there is a function xcorr that I can use in matlab, but I wanted to program this myself. Thank you very much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信这个想法是计算模板和原始图片中相同大小的所有可能的子图像之间的相关性,有点像 2D 卷积。您在 MATLAB 中查找的函数是 XCORR2 信号处理的一部分工具箱。
I believe the idea is to compute the correlation between the template and all possible subimages of the same size in the original picture, sort of like 2D convolution. The function you are looking for in MATLAB is XCORR2 part of the Signal Processing Toolbox.