I want to extract SIFT descriptor from my choosen points. How can I convert vector<point2f> to vector<keypoint>? Here is my code segment. Image resolution is 256 by 256. Thanks in advance.
int main(...)
{
.......................
Mat image = imread("test0.png",CV_LOAD_IMAGE_GRAYSCALE);
std::vector<cv::Point2f> inputs;
inputs.push_back(cv::Point2f(0,0));
inputs.push_back(cv::Point2f(0,30));
inputs.push_back(cv::Point2f(0,90));
inputs.push_back(cv::Point2f(0,120));
vector<KeyPoint> keypoints;
// Here how can I convert vector<cv::Point2f> inputs to vector<KeyPoint> keypoints?
//Similarly, we create a smart pointer to the SIFT extractor.
Ptr<DescriptorExtractor> featureExtractor = DescriptorExtractor::create("SIFT");
// Compute the 128 dimension SIFT descriptor at each keypoint.
// Each row in "descriptors" correspond to the SIFT descriptor for each keypoint
Mat descriptors;
featureExtractor->compute(image, keypoints, descriptors);
.........................
}