LONG POST.
Gary, I still think focal length plays a part in all of this. I think it effects the ratio between the vertical and horizontal. I've tried to reverse engineer several freight cars from perspective images and always come out knowing somethings off.
Jason
Finally had a chance to dig into Jason's examples and I'll see if I can muddle through a response that makes some sense. Jason is correct that focal length plays a role, though in a pretty subtle way.
1. If I apply the formulation I posted earlier to Jason's two test images, I do
not correctly predict that the two lines are the mid-points of the image. The reason is that there are two terms that contribute to how distance along the object projects to distance along the image, and my earlier analysis assumed that one of those terms was constant, which can be a bad approximation*. Read on for more details, if you care.
2. To produce a more correct analysis, I wrote some code that defines a rectangle in 3-d, a given distance from an observer, then projects it onto the sphere and traces its outline in altitude and azimuth (the image "plane" in the limit of small angular size). The tricky part is to determine what 3-d parameters are needed to reproduce a given 2-d image. It turns out that there is an inherent ambiguity in this mapping if you only have limited image information (for example, if you don't know the focal length, or equivalently, the angular size of your image). Here are my reconstructions of Jason's two examples derived by projecting 3-d rectangles onto the image plane:
Notes:
* The white lines show my reconstruction, where the axis labels are degrees of azimuth (horizontal) and altitude (vertical). If I assume a different angular extent for the image (equivalent to a different focal length) I need a different set of 3-d parameters to reconstruct the image correctly (see below).
* The only facts I used to generate the reconstruction were a) the overall image aspect ratio, and b) the ratio of the left and right edge lengths. I had to choose a focal length (relation between distance in image plane and angle "on the sky") to remove ambiguity in the 3-d reconstruction. I arbitrarily assumed the image had an azimuth extent of 20°.
Note: I assumed nothing about the location of the mid-line: this is a prediction of the reconstruction based on the perimeter information.* There is a tiny bit of vertical perspective that I have not attempted to reconstruct. I place my observer at the mid-plane of the object in the vertical direction.
3. Here is a description of the 3-d ambiguity. Since I don't know the actual angular extent of the object seen by my observer (I only know the linear size of the image), I have to make an assumption about it. Below I show two reconstructions that both have the same aspect ratio and left/right length ratios, but one has an azimuth extent of 20°, the other 10°:
The circles and lines at the bottom show the 3-d configurations of the two cases, as viewed from above. It's not hard to see that, in order to get the left/right ratio correct, I need the object edges to lie on the same set of circles relative to the observer. But since I don't know the angular extent of the image, I can achieve the left/right ratio with a family of objects. (The object height is just along for the ride, to give the correct image aspect ratio). The remarkable result is that, if I double the size of the smaller image, I reproduce the larger image essentially exactly,
including the position of the mid-line. So I could draw a coordinate grid on the image even without knowing the specific 3-d orientation. (Jason, if you have photos of the same car with the above two image properties, I could draw the coordinates on them and you could see if they overlay corresponding features in the two images. They should...)
We could remove the final ambiguity in the 3-d configuration by knowing one more fact about the system: either the angular extent of the image (which can be tricky to determine), or the ratio of the objects actual (3-d) width to height.
Sorry to hijack this thread, but the main message was delivered in the OP…
-gfh
*The effect I neglected earlier is the fact that the angle between the object plane and the observer changes along the image, which causes the projected distance scale to change. I was assuming that this angle was constant over the image (equivalent to assuming a narrow field of view). The other effect (which I was correctly calculating) is that the projected distance scales inversely with the objects distance from the observer. Note that the qualitative conclusions that the logos should be ~10-20% from the midline still hold. I might try a 3-d reconstruction of the photos if I can get the time. Requires a bit of a code rewrite though…