Ask Your Question
0

Java BRIEF

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

PiMac gravatar image

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

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?

Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

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

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

Comments

Thank you for a fast answer.

PiMac gravatar imagePiMac ( 2017-08-02 05:58:26 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 429 times

Last updated: Aug 02 '17