1. A method of calculating pose of an entity comprising: receiving, at a processor, at least one image where the image is of a scene captured by an entity comprising a mobile camera; applying image elements of the at least one image to a trained machine learning system to obtain a plurality of associations between image elements and three-dimensional (3D) points in a scene space, the trained machine learning system optimizing an energy function comprising the 3D points in the scene space predicted by at least one tree in at least one random decision forest and 3D coordinates in camera space; determining whether a pose of the entity has been calculated; based on a determination that the pose has been calculated, refining the pose of the entity from the plurality of associations and the optimized function; and based on a determination that the pose of the entity has not been calculated, calculating an initial pose of the entity from the plurality of associations and the optimized function; and generating map display data based at least in part on the initial pose of the entity, wherein the energy function comprises: 
 E ( H )=Σ iϵ1 ρ(min mϵM i ∥m−Hx i ∥ 2 ) wherein id is an index of the image elements, ρ is an error function, mϵM i represents the predicted 3D points in the scene space, x i are the 3D coordinates in the camera space, and H is the pose of the entity.