Given known reference points, how do I calculate the approximate height of a point from a photograph I have a photo with three towers. I know that the base of all three towers are at the same elevation, and at the top they each comes to a point. Two of the towers are the same height, though they appear to be different heights in the image, due to perspective.
I know the x/y/z coordinates of the peaks of the two known towers. I know the x/z coordinates of the third tower. I am trying to find the y (height) coordinate of the peak of the third tower. All three peaks are clearly visible within the photo, but despite knowing that the bases are all at the same eleveation (lets call it y:0) They are not visible in the photo. I don't think this should have any affect, as the are known to be equall I should only have to deal with the x/y/z of the three peaks, and I think I can safely ignore anything else.
For clarity: X = East/West, Y = Elevation and Z = North/South
Tower 1 Peak (X, Y, Z) :   0, 129, 0
Tower 2 Peak (X, Y, Z) :  16, 129, 97
Tower 3 Peak (X, Y, Z) : -40, ???, 78
The following are the X/Y pixel coordinates of the three peaks in the photo:
Tower 1 Peak (X, Y): 1235, 227
Tower 2 Peak (X, Y): 1445, 528
Tower 3 Peak (X, Y): 2042, 397
Please note that the pixel coordinates are taken with 0,0 being the top left corner of the image.
Is it even possible to calculate the approximate height of the third tower? If so, how might I go about doing do?
 A: Counting degrees of freedom, I'd say it's unlikely you can fix the camera's location in space well enough from the information you have given here. You have measured 8 quantities (namely the image coordinates of the three tower tops and the vanishing point), but the degrees of freedom you have to fix are:


*

*Where in space was the camera located when the picture was taken? (3 degrees of freedom)

*Were did the camera's optical axis point? (2 degrees of freedom)

*How was the camera turned about the optical axis? (1 degree of freedom)

*What is the focal length of the camera, measured in the image coordinate uints? (1 degree of freedom)

*Where in the image coordinate system is the optical axis? (2 degrees of freedom)


That's nine degrees of freedom all in all, which is one more than the number of numbers you have measured. And what you actually need is a tenth degree of freedom about the situation:


*

*Where on the vertical line representing tower 3 is your third image point? (1 degree of freedom)


If you know the towers themselves to be exactly vertical, it is possible that you can just about get a fix by measuring the coordinates of the vertical vanishing point in the image. But it's going to be a messy and possibly not very robust robust calculation.
