Convert subpixel keypoint to pixel value

SIFT returns subpixel keypoint location (eg pixel values are floats). Is there a way to properly convert it to pixel location? Is simply rounding the x and y values the correct solution to this? seems like it might round to an incorrect pixel.

yes, you can simply round those values. that’ll give the nearest pixel.