1 | initial version |
yes, the DenseFeatureDetector is gone in 3.0. but it's no biggie to create your own grid of KeyPoints:
int step = 10; // 10 pixels spacing between kp's
vector<KeyPoint> kps;
for (int i=step; i<img.rows-step; i+=step)
{
for (int j=step; j<img.cols-step; j+=step)
{
// x,y,radius
kps.push_back(KeyPoint(float(j), float(i), float(step)));
}
}
Ptr<xfeatures2d::SIFT> sift = xfeatures2d::SIFT::create();
sift->compute(img,kps,features);