Why is sift.compute() slower on MSER keypoints than on SIFT keypoints

147 views Asked by At

Testing the performance of the sift extractor from openCV on a 1080x1080 image resulted in some unexpected results:

img = cv.imread("myImage.jpg", 0)  # gray
mser = cv.MSER_create()
sift = cv.SIFT_create()

kp = sift.detect(img)   # len(kp) == 5804
des = sift.compute(img, kp)  # time: 0.22s

kp = mser.detect(img)   # len(kp) == 2511
des = sift.compute(img, kp)  # time: 1.62s

Why is sift.compute() slower on MSER detected keypoints, compared to SIFT detected keypoints? Notice that MSER detects less keypoints than SIFT.

1

There are 1 answers

0
Daan Seuntjens On

I've plotted the keypoints which makes clear that the MSER keypoints cover a larger area than the SIFT keypoints. This could be an explanation why it is slower.

MSER:

sift

SIFT:

mser