3rdparty/OpenCV-2.3.0/samples/cpp/brief_match_test.cpp
void matches2points(const vector<DMatch>& matches, const vector<KeyPoint>& kpts_train,
                    const vector<KeyPoint>& kpts_query, vector<Point2f>& pts_train, vector<Point2f>& pts_query)
{
  pts_train.clear();
  pts_query.clear();
  pts_train.reserve(matches.size());
  pts_query.reserve(matches.size());
  for (size_t i = 0; i < matches.size(); i++)
  {
    const DMatch& match = matches[i];
    pts_query.push_back(kpts_query[match.queryIdx].pt);
    pts_train.push_back(kpts_train[match.trainIdx].pt);
  }

}
//Copy (x,y) location of descriptor matches found from KeyPoint data structures into Point2f vectors
Copy (x,y) location of descriptor matches found from KeyPoint data structures into Point2f vectors
Copy ( x y ) location of descriptor matches found from KeyPoint data structures into Point2f vectors
void matches2points(const vector<DMatch>& matches, const vector<KeyPoint>& kpts_train,
                    const vector<KeyPoint>& kpts_query, vector<Point2f>& pts_train, vector<Point2f>& pts_query)
{
  pts_train.clear();
  pts_query.clear();
  pts_train.reserve(matches.size());
  pts_query.reserve(matches.size());
  for (size_t i = 0; i < matches.size(); i++)
  {
    const DMatch& match = matches[i];
    pts_query.push_back(kpts_query[match.queryIdx].pt);
    pts_train.push_back(kpts_train[match.trainIdx].pt);
  }
}
void matches2points ( const vector < DMatch > & matches , const vector < KeyPoint > & kpts_train , const vector < KeyPoint > & kpts_query , vector < Point2f > & pts_train , vector < Point2f > & pts_query ) { pts_train . clear ( ) ; pts_query . clear ( ) ; pts_train . reserve ( matches . size ( ) ) ; pts_query . reserve ( matches . size ( ) ) ; for ( size_t i = 0 ; i < matches . size ( ) ; i ++ ) { const DMatch & match = matches [ i ] ; pts_query . push_back ( kpts_query [ match . queryIdx ] . pt ) ; pts_train . push_back ( kpts_train [ match . trainIdx ] . pt ) ; } }
Copy (x,y) location of descriptor matches found from KeyPoint data structures into Point2f vectors
Copy ( x y ) location of descriptor matches found from KeyPoint data structures into Point2f vectors