1. A method, comprising: receiving a query image; processing the query image to obtain visual features; determining a feature from the visual features obtained by processing the query image; determining a viewing direction for the query image from a pre-determined set of viewing directions; generating a direction-based hash based on the feature in the query image and the viewing direction; identifying sub-volumes of a point cloud database that match the direction-based hash; and matching the sub-volumes against the query image features to find a match.