From 3f40a1d8c33d4233642f04f6857f3389294972ef Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Sat, 6 Aug 2011 19:42:29 +0000 Subject: [PATCH] fixed KeyPoint::convert(keypoints,point2f) (ticket #1282; thanks to cooperz for the patch) --- modules/features2d/src/keypoint.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/features2d/src/keypoint.cpp b/modules/features2d/src/keypoint.cpp index 01717f76da..f71186d16f 100644 --- a/modules/features2d/src/keypoint.cpp +++ b/modules/features2d/src/keypoint.cpp @@ -119,6 +119,7 @@ void KeyPoint::convert(const std::vector& keypoints, std::vector& points2f, std::vector& keypoints, float size, float response, int octave, int class_id ) { + keypoints.resize(points2f.size()); for( size_t i = 0; i < points2f.size(); i++ ) keypoints[i] = KeyPoint(points2f[i], size, -1, response, octave, class_id); }