Contextual visual localization: cascaded submap classification, optimized saliency detection, and fast view matching