# Poor feature detection performance with ORB and Akaze compared to sift

**URL:** <https://forum.opencv.org/t/poor-feature-detection-performance-with-orb-and-akaze-compared-to-sift/12616>\
**Category:** Python\
**Created:** [March 30, 2023, 11:24pm UTC](https://forum.opencv.org/t/poor-feature-detection-performance-with-orb-and-akaze-compared-to-sift/12616 "2023-03-30T23:24:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![joolivar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/joolivar/32/7540_2.png) [@joolivar](https://forum.opencv.org/u/joolivar)\
**Post date:** [March 30, 2023, 11:24pm UTC](https://forum.opencv.org/t/poor-feature-detection-performance-with-orb-and-akaze-compared-to-sift/12616/1 "2023-03-30T23:24:27Z")

</div>

Greetings, I may be doing something wrong, however, when doing a comparison of the different feature detection methods of ORB , AKAZE and sift I can’t find enough points to discriminate between images, I can only do it using GaussianBlur and canny.  
the link img

 ![](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/6/619504ddf247fff104859a01f0c930fb0c79ac3a.jpeg)  
################################  
import numpy as np  
import cv2 as cv  
from matplotlib import pyplot as plt

def procORB(img):  
orb = cv.ORB\_create()  
kp = orb.detect(img,None)  
return orb.compute(img, kp)  
def procSift(img):  
sift = cv.xfeatures2d.SIFT\_create(nfeatures=500)  
return sift.detectAndCompute(img,None)  
def procView(img,kp, title):  
img=cv.drawKeypoints(img, kp, None, color=(0,255,0), flags=0)  
plt.imshow(img),plt.legend(),plt.title(title),plt.show()  
def procAkaze(img):  
akaze = cv.AKAZE\_create()  
return akaze.detectAndCompute(img, None)  
def run():  
path=/media/joolivar/Lento/DATASET/piscinas/“”  
path\_img=“/media/joolivar/Lento/DATASET/piscinas/images (16).jpeg”  
img = cv.imread(path\_img, cv.IMREAD\_GRAYSCALE)  
gauss=cv.GaussianBlur(img,(5,5),0)  
canny = cv.Canny(gauss, 50, 150)  
img=np.hstack((img, canny))  
kp,des = procSift(img)  
procView(img,kp, ‘Sift’)  
kp,des = procORB(img)  
procView(img,kp, ‘ORB’)  
kp,des =procAkaze(img)  
procView(img,kp, ‘Akaze’)

run()

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [March 31, 2023, 6:23am UTC](https://forum.opencv.org/t/poor-feature-detection-performance-with-orb-and-akaze-compared-to-sift/12616/2 "2023-03-31T06:23:56Z")

</div>

> [@joolivar](#):
>
> to discriminate between images

is it even meant to do that ?

> [@joolivar](#):
>
> when doing a comparison of the different feature detection methods

hmm, you’re doing that as a human, by optically inspecting drawKeypoints() results ?

---

<div class="post-metadata">

**Author:** ![joolivar](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/joolivar/32/7540_2.png) [@joolivar](https://forum.opencv.org/u/joolivar)\
**Post date:** [March 31, 2023, 4:22pm UTC](https://forum.opencv.org/t/poor-feature-detection-performance-with-orb-and-akaze-compared-to-sift/12616/3 "2023-03-31T16:22:29Z")

</div>

When executing the python script it is clearly seen that it does not detect the border at all, but when executing canny the number of representative points of the image increases notoriously, that means that the detection method can be modified to improve the results and of course without point detection there is no discrimination in the images.

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [April 2, 2023, 6:20am UTC](https://forum.opencv.org/t/poor-feature-detection-performance-with-orb-and-akaze-compared-to-sift/12616/4 "2023-04-02T06:20:23Z")

</div>

> [@joolivar](#):
>
> it does not detect the border at all,

those features work on ‘patches’ (e.g. sift:15x15, orb:32x32), so they’ll spare the image borders

imo, your image is far too ‘constructed’, and the textures in it are not useful (preiodic, grid) to retrieve reliable features
