I have an image of a wall taken from a phone camera from a known height h from the ground.

Assume that the camera was held perfectly parallel to the wall and that the bottom of the image is perfectly aligned with the bottom of the wall.

Is there a way to find out the point in the image that corresponds to the height h ? (i.e if I drew an imaginary line (that's parallel to the ground) from the camera lens to the wall, at what point would the intersection of the line on the wall show up in the image ?

I know the focal length of the camera, if that helps.


Focal length is irrelevant in this instance, if the camera image plane is parallel to the wall, and the bottom of the image is aligned to the bottom of the wall as you state, then the amount of wall in the picture will be twice the camera height.

The part of the image that corresponds to the wall at height h  will be h /2c  multiplied by the image height in pixels (where c is the camera height).

So if the camera is at a height of 1m, then you have 2m of wall in the photo. If h = 1.5m and your image is 2000 pixels high then h will be 1500 pixels up from the bottom of the image.


If the camera is parallel with the wall then the centre pixel should be at the same height as the centre of the camera sensor as long as the camera acts normal. By normal I mean that the camera have a lens that does not distort the image, e.g. with a tilt-shift lens.

If the camera is not parallel with the wall, this is no longer true.

  • Exactly. If parallel, the centre of the image would be the spot directly opposite the camera
    – MikeW
    Aug 12 '13 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.