Ask Your Question


asked 2017-08-02 05:32:00 -0500

PiMac gravatar image

updated 2017-08-02 05:57:52 -0500

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();
    Mat descriptors = new Mat();
    brief.compute(gray, keypoints, descriptors);

    Features2d.drawKeypoints(gray, keypoints, copyMat);

This results in OpenCV Error: Bad argument (Specified descriptor extractor type is not supported.)

Is there a mistake in my code or is BRIEF really not supported?


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-08-02 05:51:58 -0500

berak gravatar image

no, not your fault, BRIEF was moved into opencv_contrib with opencv3, you probably don't have it.

you could try to build from src with opencv main and contrib repo, there was an attempt to get java bindings for classes there, but you can't use DescriptorExtractor.create(DescriptorExtractor.BRIEF);

edit flag offensive delete link more


Thank you for a fast answer.

PiMac gravatar imagePiMac ( 2017-08-02 05:58:26 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-08-02 05:32:00 -0500

Seen: 215 times

Last updated: Aug 02 '17