问题描述
我只是想知道两幅图像之间的旋转角度(相同的图像,但只有不同的东西是旋转),但我已经陷入这个问题将近3周。 中给出的算法仅使用氡变换和相位相关方法,但它不起作用。任何人都可以帮助我吗?
I just want to find out the rotation angle between two images (same images but only different thing is rotation) but I'm stuck in this problem for almost 3 weeks. The algorithm given at http://en.wikipedia.org/wiki/Phase_correlation is only using the radon transform and phase correlation method but it doesn't work. Anyone can help me?
推荐答案
通常情况下,这种问题通过傅立叶 - 梅林算法解决,Matlab实现。
Typically, this kind of problem is solved with a Fourier-Mellin algorithm, Matlab implementation here.
一种潜在的方法是在相位相关之前使用对数极坐标变换。对数极坐标采样图以均匀缩放和旋转方式改变为沿径向和圆周轴的平移。请参阅本文中算法的完整描述:
A potential approach is the use of a log-polar transform prior to phase correlation. The log-polar sampling maps changes in uniform scaling and rotation into translations along the radial and circumferential axes. See the complete description of the algorithm in this paper:
如果你有图像处理工具箱r2014a或更高版本,有一个内置功能,就是这样,它被称为
If you have the image processing toolbox r2014a or later, there is a built-in function that does exactly that, it's called imregcorr
如果您没有工具箱,可以(用于纯旋转)。对于缩放和旋转,是对数极坐标变换。
If you don't have the toolbox, you can download the function to map an image in polar coordinates (for pure rotations). For scale and rotation, here is an implementation of the log-polar transform.
这篇关于在matlab中使用相位相关找出旋转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!