fixed vector resize in the ORB detector
authorVadim Pisarevsky <no@email>
Tue, 24 May 2011 13:31:50 +0000 (13:31 +0000)
committerVadim Pisarevsky <no@email>
Tue, 24 May 2011 13:31:50 +0000 (13:31 +0000)
modules/features2d/src/orb.cpp

index 8cf752c..43a69b9 100644 (file)
@@ -554,7 +554,7 @@ void ORB::operator()(const cv::Mat &image, const cv::Mat &mask, std::vector<cv::
   else
   {
     // Cluster the input keypoints
-    all_keypoints.reserve(params_.n_levels_);
+    all_keypoints.resize(params_.n_levels_);
     for (std::vector<cv::KeyPoint>::iterator keypoint = keypoints_in_out.begin(), keypoint_end = keypoints_in_out.end(); keypoint
         != keypoint_end; ++keypoint)
       all_keypoints[keypoint->octave].push_back(*keypoint);