1 | initial version |
// 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);