KeyPoint 转point2f
void KeyPointsToPoints(vector<KeyPoint> kpts, vector<Point2f> &pts)
{
for (int i = 0; i < kpts.size(); i++) {
pts.push_back(kpts[i].pt);
}
}
point2f 转KeyPoint
void PointsToKeyPoints(vector<Point2f>pts,vector<KeyPoint> &kpts)
{
for (size_t i = 0; i < pts.size(); i++) {
kpts.push_back(KeyPoint(pts[i], 1.f));
}
}