1. A method implemented by a processor, of providing an orientation of a camera on a mobile device, comprising: obtaining an orientation measurement from a sensor relative to the orientation of the sensor; determining a transformation matrix that maps the orientation measurement to the camera; and computing the orientation of the camera using the orientation measurement and the transformation matrix.