The present invention provides a method, apparatus, and computer program product for obtaining the location of, for example, a mobile device. An image of a target in a defined space is obtained, the target encoding data from which its location in the defined space may be determined. The position of a reference point in the image which represents the location of, for example, a mobile device, is determined relative to the target. The location of the mobile device in the defined paces is then determined by combining the location of the target in the defined space with an appropriately scaled version of the relative position of the reference point to the target in the image.