Search code examples
computer-visionsift

SIFT descriptors on subimages do not sum up to those on the whole image?


I use SIFT detectors and extractors in OpenCV 2.3 and find out that the number of keypoints detected on subimages do not sum up to the number of keypoints on the whole image.

Specifically, if I use SIFT detectors on an image A, the detector detects N SIFT key points. If I divide A into four subregions A_1, A_2, A_3, A_4 and run detector on those regions respectively, the detector detects N_1, N_2, N_3, N_4 SIFT key points correspondingly. Surprisingly, N_1 + N_2 + N_3 + N_4 IS NOT EQUAL TO N !

Is this phenomenon correct for SIFT algorithms? Or is this due to the poor implementation of OpenCV 2.3?


Solution

  • The SIFT detector uses a set of Gaussian filters on the image. The results of these filters will not be the same near the edges of the image subregions. If you will look at key point locations, you will see that most changed points are those near the image subrigions.

    Furthermore, in the SIFT algorithm there is a key point non maxima supression phase in which key point strength is compared to the strongest key point and discarded if to weak. in the full image the global maximum will be used, while in the region based use each point will be tested with the maxima of the sane sub region, leading to a small difference.