Hi, i'm trying to get the keypoints in a image using the detector ORB but always gets an exception, my code is the next one.
vector < KeyPoint > kp;
int nfeatures = 500;
float scaleFactor = 1.2f;
int nlevels = 8;
int edgeThreshold = 15;
int firstLevel = 0;
int WTA_K = 2;
int scoreType = ORB::HARRIS_SCORE;
int patchSize = 31;
int fastThreshold = 20;
Ptr < ORB > detector = ORB::create(
nfeatures,
scaleFactor,
nlevels,
edgeThreshold,
firstLevel,
WTA_K,
scoreType,
patchSize,
fastThreshold );
detector->detect(img, kp);
cout << "Found " << kp.size() << " Keypoints " << std::endl;
Mat out;
drawKeypoints(img, kp, out, Scalar::all(255));
imshow("Kpts", out);
img is declared early, the problem is when do detector->detect(img, kp); and i don't know what problem is, i'm trying other form of do it but all crash in the call of detect().
Sorry for my english and thanks for the answer.