AKAZE not producing good results compared to SIFT in openCV Java

asked 2016-06-29 09:33:37 -0600

Hello everyone, I'm new to the world of computer vision and presently I'm working on a project to compare two images to see if there is a match. I have read that AKAZE performs better compared to SIFT, but I have found otherwise. I'm using the Java implementation of openCV and I find that SIFT produces better feature points and thereby better matches as compared to AKAZE. Following is the code I use for detecting keypoints, computing descriptors and finding matches:

         MatOfKeyPoint objectKeyPoints1 = new MatOfKeyPoint();
          MatOfKeyPoint objectKeyPoints2 = new MatOfKeyPoint();

          FeatureDetector featureDetector1 = FeatureDetector.create(FeatureDetector.SIFT);
          FeatureDetector featureDetector2 = FeatureDetector.create(FeatureDetector.SIFT);

          featureDetector1.detect(image1, objectKeyPoints1);
          featureDetector2.detect(image2, objectKeyPoints2);

          DescriptorExtractor descriptorExtractor = DescriptorExtractor.create(DescriptorExtractor.SIFT);

          MatOfKeyPoint objectDescriptors1 = new MatOfKeyPoint();
          descriptorExtractor.compute(image1, objectKeyPoints1, objectDescriptors1);

          MatOfKeyPoint objectDescriptors2 = new MatOfKeyPoint();
          descriptorExtractor.compute(image2, objectKeyPoints2, objectDescriptors2);
          MatOfDMatch mtd=new MatOfDMatch();

          DescriptorMatcher descriptorMatcher = DescriptorMatcher.create(DescriptorMatcher.BRUTEFORCE)
          descriptorMatcher.match(objectDescriptors1,objectDescriptors2 , mtd);

The code is the same for AKAZE as well, just that I substitute SIFT with AKAZE in the code. I get around 178 matches for SIFT but just 10-20 matches for AKAZE.

Could you help me in identifying what could be a probable cause of this issue? Could this be anything related to the Java wrapper for openCV?

Thanks

edit retag flag offensive close merge delete