Search code examples
opencvimage-processingfeature-detectionsift

SIFT not working when the image is angled in z direction, is there any way i can make this possible?


This is my template image: https://drive.google.com/open?id=151q9lliGc5ySFe96rY6YM4wbVjvbr9uv This is my test image where in which i am trying to find template image https://drive.google.com/open?id=1ncop46vbTVTjcwp51GrcQfGX4w1WrzDI

I am able to find good match when the test image is pretty much straight and not angled something like this https://drive.google.com/open?id=1SY68YXxIpDNyK5UfgRdjomI5bkKKqLWE

but whenever it is angled or slant as in my first test image, i am failing to identify good match points

I am using SIFT for extracting keypoints and descriptors and FLANN based search for matching the keypoints, I am pretty much doing everything according to this https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_feature2d/py_matcher/py_matcher.html

what can be done to improve the accuracy of finding a match?


Solution

  • Ordinary feature detectors such as SIFT have limited angular invariance up to 30 degrees. In your case you need much more, so you can use ASIFT algorithm that is able to match features extracted from images which angular difference is much higher. Note that the computational requirements of this method are very high so you need really powerful hardware if you want to use it in real time. Unfortunately it is not included in OpenCV but there are plenty of implementations around the web, for instance on the mentioned website.