26. A non-transitory computer-readable medium comprising instructions, which when executed by a processor, cause the processor to perform steps in a method comprising: determining a set of candidate keypoints based on a first image captured with a camera; determining, for each candidate keypoint in the set of candidate keypoints, a corresponding first similarity score, wherein the first similarity score corresponding to each candidate keypoint is determined, in part, by comparing an image patch associated with the corresponding candidate keypoint to a plurality of corresponding image sections in the first image in a region around the image patch; and selecting a first subset of the candidate keypoints, wherein the first subset comprises a predefined number of candidate keypoints with lowest similarity scores.
30. The computer-readable medium of claim 26 , wherein determining the set of candidate keypoints based on the first image comprises: obtaining, from the first image, a hierarchy of images, wherein each image in the hierarchy of images has a corresponding image resolution; and determining a plurality of second subsets of candidate keypoints, wherein each second subset of candidate keypoints is associated with a distinct image in the hierarchy of images, and wherein, the set of candidate keypoints comprises the plurality of second subsets of candidate keypoints.