Efficient Image-Based Localization Using Context