void KpVec2Mat(const KpVec& vecPts , Mat_d& matPts) { int numPts = vecPts.size(); matPts.resize(numPts, 2); for (int i = 0; i < numPts; i++) { matPts.data[2 * i] = vecPts[i].pt.x; matPts.data[2 * i + 1] = vecPts[i].pt.y; } }
void DepthPIRF::FAST(IplImage& img,KpVec& FeatureVec) { FastFeatureDetector detector(50); detector.detect( Mat(&img), FeatureVec ); for(int i=0;i<FeatureVec.size();i++) FeatureVec[i].class_id=i; }