Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

Unhandled exception at using detect function(ORB)

$
0
0
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(). edit: I try to do with BRISK and de problem is the same in the call of detect crash. With brisk i did the next one: Ptr < BRISK > detector = BRISK::create(); vector kp; detector->detect(img,kp); This is turning exasperating. Sorry for my english and thanks for the answer.

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>