locate the object recognition Android OpenCV
Hi, with a reference image I just want to draw matches in the image of the video stream without use Features2d.drawMatches () because it not responding in my code
Mat descriptors,descriptors1 = new Mat();
keypoints = new MatOfKeyPoint();
keypoints1 = new MatOfKeyPoint();
detector = FeatureDetector.create(FeatureDetector.ORB);
detector.detect(img1, keypoints);
detector.detect(img2, keypoints1);
descriptor = DescriptorExtractor.create(DescriptorExtractor.ORB);
descriptor.compute(img1, keypoints, descriptors);
descriptor.compute(img2, keypoints1, descriptors1);
DescriptorMatcher matcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE_HAMMING);
MatOfDMatch matches = new MatOfDMatch();
matcher.match(mIntermediateMat, descriptors, matches);
// draw matches just only in image img2 ....... locate the object recognition
Maybe just to mention, that going another way, just because the code is not responding, isn't a very good way to program. It would be better to share your errors and ask us to help you solve it. Those functionalities are created with a reason, by people who actually understand the complete process. They can help you get more insight in the problem.
@StevenPuttemans my problem is i drawFeatures for a good matching so i need to create a new MatOfDmatch to push good matching but i didn't find a good code for that because Feature2d.drawMatches() need to MatOfDmatch and not List<Dmatch> did you have a solution that create a MatOfDmatch from others MatOfDmatch