From ffd283b7d5cd1f3966518cc10bd25b0fce517a0d Mon Sep 17 00:00:00 2001 From: Alexander Mordvintsev Date: Wed, 11 Jul 2012 16:26:52 +0000 Subject: [PATCH] fixed SURF orientations, broken in r8892 (see also r8895, r8887 and #2043) --- modules/nonfree/src/surf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nonfree/src/surf.cpp b/modules/nonfree/src/surf.cpp index 1367cc6292..3ba4528c98 100644 --- a/modules/nonfree/src/surf.cpp +++ b/modules/nonfree/src/surf.cpp @@ -681,8 +681,8 @@ struct SURFInvoker if( !upright ) { descriptor_dir *= (float)(CV_PI/180); - float sin_dir = std::sin(descriptor_dir); - float cos_dir = std::cos(descriptor_dir); + float sin_dir = -std::sin(descriptor_dir); + float cos_dir = std::cos(descriptor_dir); /* Subpixel interpolation version (slower). Subpixel not required since the pixels will all get averaged when we scale down to 20 pixels */