Orb angle is wrong (Patch #2043)
Description
Hi,
The bug is in orb.cpp/IC_Angle, instead of return fastAtan2((float)m_01, (float)m_10);
it should be: return fastAtan2(-(float)m_01, (float)m_10);
because the axis system is undirect (y toward the bottom).
It's clear on the attached picture, the second image is the same as the first one but rotated.
Notice that if you take the symetric angle for both then it's OK.
I tried to correct it but then it doesn't match anymore, you surely learned the bug and did a trick,
but the angle is still wrong.
Or drawKeyPoint is wrong and should represent the angle in the undirect sens (??!!)
Thank's for your work.
Mathieu.
Associated revisions
fixed SURF orientations, broken in r8892
(see also r8895, r8887 and #2043)
fixed SURF orientations, broken in r8892
(see also r8895, r8887 and #2043)
git-svn-id: file://localhost/home/tolik/svnrepo/trunk@9002 c5418bc3-7546-4aae-8bad-fa6f2f3e53e6
Merge pull request #2043 from ilya-lavrenov:tapi_hack
History
Updated by Kirill Kornyakov over 12 years ago
Maria, could you please check this fix? Or forward it to the original Orb authors??
- Tracker changed from Bug to Patch
- Description changed from Hi, The bug is in orb.cpp/IC_Angle, instead of return fastAtan2((float)m_0... to Hi, The bug is in orb.cpp/IC_Angle, instead of @return fastAtan2((float)m_... More
Updated by Maria Dimashova over 12 years ago
Hi! Thanks for the report. drawKeyPoints was fixed in r8887. You are right that y-axis inversion has to be made by a feature detector. After the fixing I got correct drawn keypoints of ORB (there was not the bug in ORB).
- Status changed from Open to Done
Updated by Vadim Pisarevsky over 12 years ago
- Target version set to 2.4.2
Updated by Alexander Mordvintsev over 12 years ago
Now the SIFT angles are shown incorrectly.
The following code gives the result, shown in sift_kp.png:
import numpy as np import cv2 img1 = cv2.imread('../c/box.png') img2 = np.rot90(img1).copy() ft = cv2.SIFT() kp1, desc1 = ft.detectAndCompute(img1, None) kp2, desc2 = ft.detectAndCompute(img2, None) col = (255, 255, 255) vis1 = cv2.drawKeypoints(img1, kp1, flags=4, color=col) vis2 = cv2.drawKeypoints(img2, kp2, flags=4, color=col) cv2.imshow('vis1', vis1) cv2.imshow('vis2', vis2) cv2.waitKey()
See "Associated revisions" for all relevant changes. It seems that we have to sync the visualized and actual angles for all oriented descriptors.
- Status changed from Done to Open
- Target version deleted (
2.4.2)
Updated by Alexander Mordvintsev over 12 years ago
- File sift_kp.png added
Updated by Maria Dimashova over 12 years ago
Thanks! Now detectors and descriptors have output and input keypoints with angles corresponding to the KeyPoint::angle specification from r9034.
- Status changed from Open to Done