mirror of
https://github.com/opencv/opencv.git
synced 2026-09-13 05:42:51 -05:00
fixed drawKeypoints (keypoint orientation)
This commit is contained in:
@@ -67,8 +67,9 @@ static inline void _drawKeypoint( Mat& img, const KeyPoint& p, const Scalar& col
|
|||||||
if( p.angle != -1 )
|
if( p.angle != -1 )
|
||||||
{
|
{
|
||||||
float srcAngleRad = p.angle*(float)CV_PI/180.f;
|
float srcAngleRad = p.angle*(float)CV_PI/180.f;
|
||||||
Point orient(cvRound(cos(srcAngleRad)*radius),
|
Point orient( cvRound( cos(srcAngleRad)*radius ),
|
||||||
cvRound(sin(srcAngleRad)*radius));
|
cvRound(-sin(srcAngleRad)*radius ) // "-" to invert orientation of axis y
|
||||||
|
);
|
||||||
line( img, center, center+orient, color, 1, CV_AA, draw_shift_bits );
|
line( img, center, center+orient, color, 1, CV_AA, draw_shift_bits );
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
|
|||||||
Reference in New Issue
Block a user