Ask Your Question
1

ORB feature matching in Java

asked 2017-06-28 12:12:44 -0600

Mark1 gravatar image

So i am currently working on converting an opencv program in c++ to java to do 2d feature matching. I've been having trouble understanding what some of the lines are doing and how i might be able to find their java equivalent, any help would be appreciated thanks!

    // Calculate the ORB descriptor based on the keypoint
    Ptr<Feature2D> orb_feat = ORB::create();
    Mat descriptors;
    orb_feat->compute(input, keypoints, descriptors);
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2017-06-29 15:11:28 -0600

phillity gravatar image
// Calculate the ORB descriptor based on the keypoint
//Ptr<Feature2D> orb_feat = ORB::create();
DescriptorExtractor orb_feat = DescriptorExtractor.create(DescriptorExtractor.ORB);

//Mat descriptors;
Mat descriptors = new Mat();

//we need to convert the vector<KeyPoint> to MatOfKeyPoint for Java
MatOfKeyPoint kp = new MatOfKeyPoint();
kp.fromList(keypoints);

//orb_descriptor->compute(input_thinned, keypoints, descriptors);
orb_feat.compute(input, kp, descriptors);
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-06-28 12:12:44 -0600

Seen: 1,742 times

Last updated: Jun 29 '17