fixed KeyPoint::convert(keypoints,point2f) (ticket #1282; thanks to cooperz for the patch)

This commit is contained in:
Vadim Pisarevsky 2011-08-06 19:42:29 +00:00
parent dd1315b22a
commit 3f40a1d8c3

View File

@ -119,6 +119,7 @@ void KeyPoint::convert(const std::vector<KeyPoint>& keypoints, std::vector<Point
void KeyPoint::convert( const std::vector<Point2f>& points2f, std::vector<KeyPoint>& 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);
}