From 8a61375875e541471d35564861ca4fdddb5f0d2d Mon Sep 17 00:00:00 2001 From: Maria Dimashova Date: Mon, 30 May 2011 09:11:27 +0000 Subject: [PATCH] fixed drawKeypoints (keypoint orientation) --- modules/features2d/src/draw.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/features2d/src/draw.cpp b/modules/features2d/src/draw.cpp index ff0c74b..45ee586 100755 --- a/modules/features2d/src/draw.cpp +++ b/modules/features2d/src/draw.cpp @@ -67,8 +67,9 @@ static inline void _drawKeypoint( Mat& img, const KeyPoint& p, const Scalar& col if( p.angle != -1 ) { float srcAngleRad = p.angle*(float)CV_PI/180.f; - Point orient(cvRound(cos(srcAngleRad)*radius), - cvRound(sin(srcAngleRad)*radius)); + Point orient( cvRound( cos(srcAngleRad)*radius ), + cvRound(-sin(srcAngleRad)*radius ) // "-" to invert orientation of axis y + ); line( img, center, center+orient, color, 1, CV_AA, draw_shift_bits ); } #if 0 -- 2.7.4