From 2780747fec3c924e2b1e5f1aaba8a2171392cdd8 Mon Sep 17 00:00:00 2001 From: Maria Dimashova Date: Wed, 9 Jun 2010 16:57:07 +0000 Subject: [PATCH] fixed L2 used in BruteForceMatcher --- modules/features2d/include/opencv2/features2d/features2d.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/features2d/include/opencv2/features2d/features2d.hpp b/modules/features2d/include/opencv2/features2d/features2d.hpp index cc99e1fae4..1c6d56d757 100644 --- a/modules/features2d/include/opencv2/features2d/features2d.hpp +++ b/modules/features2d/include/opencv2/features2d/features2d.hpp @@ -1499,7 +1499,7 @@ struct CV_EXPORTS L2 ResultType diff = a[i] - b[i]; result += diff*diff; } - return result; + return sqrt(result); } }; @@ -1739,7 +1739,7 @@ public: // Matches test keypoints to the training set // image The source image // points Test keypoints from the source image - // class_ids A vector to be filled with keypoint class_ids + // indices A vector to be filled with keypoint class indices virtual void match( const Mat& image, vector& points, vector& indices ) = 0; // Clears keypoints storing in collection