Compacting keypoints vector