1. A method of real-time camera tracking comprising: receiving, at a processor, a sequence of depth map frames from a moving mobile depth camera each depth map frame comprising a depth value at each image element that depth value being related to a distance from the mobile depth camera to a surface in the environment captured by the mobile depth camera; accessing, by the processor, a 3D model of surfaces in the environment; tracking the position and orientation of the mobile depth camera by computing, at the processor, for each of a plurality of the depth map frames, an updated position and orientation of the mobile depth camera according to an alignment of the image elements of the depth map frame and a surface depicted in the 3D model of the environment, the alignment being based at least in part on at least one of: an energy of a function of a camera pose registration parameter vector being equal to one half of the sum over image elements of the square of a truncated signed distance given by the 3D model at the position of the current image element transformed by a current pose estimate; or an energy of a function of a camera pose registration parameter vector being equal to the sum over image elements of the squares of the differences between, a depth component of the 3D points in a view space of the image elements of a previous frame, times a rigid transformation from the view space of the previous frame to that of a current frame, and the 3D points in a view space of an image element of the current frame, given a function which represents the projection of a 3D view space coordinate to a 2D image coordinate, where the projection of the 3D view space coordinate is given by a corresponding depth value of the image element of the previous frame times the rigid transformation from the view space of the previous frame to that of the current frame.