incorrect SIFT keypoint orientation (Bug #2349)
Description
Hi,
using version 2.4.2 the orientation of the sift features is counter clockwise (see image sift-opencv242.png) (angle of the sift features are 5.0 and 84.97 degree for the upper keypoints, 275 and 354 degree for the lower keypoints). The visualization of the keypoints is done using drawKeypoints, which uses clockwise orientation. According to the documentation in feature2d.hpp the keypoint orientation should be [0,360) clockwise.
when changing modules/nonfree/src/sift.cpp line 282 fromX[k] = dx; Y[k] = dy; W[k] = (i*i + j*j)*expf_scale;
toX[k] = dx; Y[k] = -dy; W[k] = (i*i + j*j)*expf_scale;
the keypoint direction is clockwise and also the visualization using drawKeypoints is correct (see changed-sift-orientation.png). Angles are 275.0, 354.97 for the upper, 5.03 resp. 84.97 for the lower.
One remark to drawKeypoints: currently the size of the Keypoints has to be multiplied by 1.5*4 to display them correctly. Can't this be included to the drawKeypoints method?
Greetings
Stefan
Associated revisions
Merge pull request #2349 from jet47:fix-bug-3552
History
Updated by Andrey Kamaev over 12 years ago
Stefan, could you try to reproduce the bug on OpenCV master?
There were a serial of orientation-related fixes in 2D descriptors and most probably SIFT problem is already fixed.
- Assignee set to Maria Dimashova
- Target version set to 2.4.3
Updated by Stefan Fiel over 12 years ago
sorry for the delayed answer ...
seems to be fixed in the master branch
Updated by Andrey Kamaev over 12 years ago
- Status changed from Open to Done