I am learning OpenCV 3.x using java and came across problem using BRIEF detector:
DescriptorExtractor brief = DescriptorExtractor.create(DescriptorExtractor.BRIEF);
MatOfKeyPoint keypoints = new MatOfKeyPoint();
brief.compute(gray, keypoints, copyMat);
Features2d.drawKeypoints(copyMat, keypoints, copyMat);
I get error OpenCV Error: Bad argument (Specified descriptor extractor type is not supported.) Actually this code doesn't work with any of its static members. So I have tried the code below and there is no BRIEF only ORB which is FAST and BRIEF.
FeatureDetector fast = FeatureDetector.create(FeatureDetector.ORB);
MatOfKeyPoint keypoints = new MatOfKeyPoint();
fast.detect(gray, keypoints);
Features2d.drawKeypoints(copyMat, keypoints, copyMat);
Is there a mistake in my code?
Thanks.