Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comparing image on how much degrees tilted

I have an problem as seen below the one on top is the original image the one on the bottom is titlted to the left 90 degrees. Is there a way to calculate the change in angle. I have tried Hough's Transform, I can detect the location, however I cannot detect the angel that is changed. Is there an alternative to detect the degreeschanged.

enter image description here

enter image description here

like image 842
user288231 Avatar asked Feb 11 '11 14:02

user288231


1 Answers

I've done this before using a Symmetric Phase-Only Matched Filter. It was actually for fingerprint recognition, allowing rotation and scaling. Unfortunately, it's pretty complicated. You need to be comfortable with how to compute an FFT and with similar-level math. I did not do it in C#, but in MATLAB (and in synthesizable Verilog, but that's another story altogether). I would recommend using MATLAB or a similar math package first to be sure you have the algorithm right.

Hopefully, though, someone has already implemented this algorithm in a .NET image processing library somewhere.

The paper I used was the following. It is more math-based than algorithmic, so it will take some work to convert it to code:

Qin-Sheng Chen; Defrise, M.; Deconinck, F. "Symmetric phase-only matched filtering of Fourier-Mellin transforms for image registration and recognition," Pattern Analysis and Machine Intelligence, IEEE Transactions on , vol.16, no.12, pp.1156-1168, Dec 1994

Abstract: Presents a new method to match a 2D image to a translated, rotated and scaled reference image. The approach consists of two steps: the calculation of a Fourier-Mellin invariant (FMI) descriptor for each image to be matched, and the matching of the FMI descriptors. The FMI descriptor is translation invariant, and represents rotation and scaling as translations in parameter space. The matching of the FMI descriptors is achieved using symmetric phase-only matched filtering (SPOMF). The performance of the FMI-SPOMF algorithm is the same or similar to that of phase-only matched filtering when dealing with image translations. The significant advantage of the new technique is its capability to match rotated and scaled images accurately and efficiently. The innovation is the application of SPOMF to the FMI descriptors, which guarantees high discriminating power and excellent robustness in the presence of noise. This paper describes the principle of the new method and its discrete implementation for either image detection problems or image registration problems. Practical results are presented for various applications in medical imaging, remote sensing, fingerprint recognition and multiobject identification

like image 188
Justin Avatar answered Oct 08 '22 09:10

Justin