0

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. Out of 900 keypoints 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

seriousgeek
  • 992
  • 3
  • 13
  • 29
  • You cannot necessarily drop in one Detector in place of another without adjusting its parameters accordingly. If the kaze detector gives you fewer features then you need to tune its parameters. It has a threshold e.g. which can be set to a lower value. Also the detector is not always "better", but certainly always faster. But yes, in my experience the quality of keypoints should be at least on par with SIFT. – oarfish Jun 29 '16 at 14:48
  • @oarfish But i guess there is no direct way to calibrate the parameters in Java. Is the threshold by default set to a higher value for AKAZE? – seriousgeek Jun 29 '16 at 15:03
  • Possibly, I do not know the Java API , but it would be fairly useless if no parameters could be configured. The thresholds of the two detectors may not have thee meaning, so it you can't really compare them directly. I don't recall what they mean exactly. – oarfish Jun 29 '16 at 15:20

1 Answers1

0

This IEEE analysis paper shows that SIFT performs better than KAZE and AKAZE.

https://ieeexplore.ieee.org/document/8346440

AKAZE generally detects more features than KAZE.

KAZE detected least number of feature-points.

and

SIFT is found to be the most accurate feature-detector-descriptor for scale, rotation and affine variations (overall).

BRISK is at second position with respect to the accuracy for scale and rotation changes.

AKAZE's accuracy is comparable to BRISK for image rotations and scale variations in the range of 40% to 400%. Beyond this range its accuracy decreases.

and

The overall accuracy of SIFT and BRISK is found to be highest for all types of geometric transformations and SIFT is concluded as the most accurate algorithm.

I suggest if you're looking for overall accuracy and higher feature points, stick with SIFT if computational cost is not a factor.

Apologies for answering this 7 years after you posted the question.

Ethan Allen
  • 14,425
  • 24
  • 101
  • 194