Measuring distances: explanation of terms (for the perspective picture ..)

'*Paint coordinates*': The Windows drawing program Paint gives coordinates in pixels (pix), the top left corner of an image having the coordinates ( 0 | 0 ). The
x axis points to the right and the y axis down.

*Principal point*: The principal point of the image can be obtained as intersection point of the images of lines (inner frame of the picture) which are orthogonal to the image plane (i. e. parallel to the principal ray). Every such line consists of points ( x | y | z ) with x and y constant. From the mapping equations, it follows y* = kx* with k=y/x for the image points; they are situated on a straight line through the origin of the image. Result: H( 210 | 177 ) in 'paint coordinates' ( u | v ). Now the x*, y* coordinate system is introduced for the image: x* = u - 210, y* = 177 - v with pix as unit of measure and H as origin.

*Ground plane*: The surveyor's levelling staff in the picture is divided into five sections, they are assumed to be of equal length (don't look too carefully). The bear has decided to define the unit of length **1 metre** (1M) in the real world to be the original length of one of the five sections. Then the equation of the ground plane in the x, y, z coordinate system becomes y = -3M.

*Verticals*: The length |FP| of the corner of the wall (foot F, top P) can be calculated from the mapping equations: y_{P} = y_{P*} ( z_{P} + d)/d; -3M = y_{F*} ( z_{F} +
d)/d. Putting z_{P} = z_{F} we get
y_{P} = -3M y_{P*} / y_{F*} = -3M (-91pix) / (-299pix) = -0.91M and |FP| = 2.09M. In this way we can measure the length of any vertical if its intersection with the ground plane is known.

*Distance d*: Let ( x | -h | z )
be points on a line g_{1} lying in the ground plane, with z = mx + c, and gradient m ≠ 0. In the image that corresponds to the set of points {( xd/(d+z) | -hd/(d+z) )} = {(xd/(d+mx+c) | -hd/(d+mx+c) )}. These points are of the form ( x * | y * ) with y* = (mx*+d)h/(d+c), so they lie on a line that cuts the horizon y* = 0 at a point with first coordinate x_{1}* = -d/m.

A line g_{2}, also in the ground plane but orthogonal to g_{1} has gradient -1/m, so its image points lie on a line that cuts the horizon at x_{2}* = md. Therefore d^{ 2} = - x_{1}* x_{2}*. We can then determine d as follows: the lines g_{1}* through the image points ( 167 | -331 ) and ( -166 | -226) and g_{2}* through the points
( 167 | -270 ) and ( 59 | -336 ) are images of orthogonal lines g_{1}, g_{2} in the ground plane. Solving the equations, we get:
x_{1}* = -882.74 and x_{2}* = 608.82, so d = 733pix.

*Lengths in the ground plane*: For two points P,Q in the ground plane, the mapping equations give: x_{P} - x_{Q} = -3M ( x_{P*} y_{Q*} -
x_{Q*} y_{P*}) / ( y_{P*} y_{Q*}) and z_{P} - z_{Q} = -3M (d y_{Q*} - d y_{P*}) / ( y_{P*} y_{Q*}). Using Pythagoras' rule |PQ|^{ 2} = (x_{P} - x_{Q})^{ 2} + (z_{P} - z_{Q})^{ 2} we can determine the length |PQ| of a line segment in the ground plane from the image coordinates x_{P*}, y_{P*}, x_{Q*} and y_{Q*}.

For the horizontal distances x_{P} and z_{P} + d from P to the point ( 0 | -3M | d ) on the ground plane directly below the observer we have the simple rule x_{P} = -3M x_{P*} / y_{P*} and z_{P} + d = -3M d / y_{P*}.
For example, for the foot of the levelling staff, x_{P*} = -13pix and y_{P*} = -45pix , we calculate the coordinates
x_{P} = -0.87M and z_{P} + d = 48.87M.

*Vertical planes and their parameters*: A plane E, parallel to the y axis but not to the visual ray, has an equation of the form E: a x + z + d = k. To determine the parameters a and k it is generally sufficient to know the image coordinates x_{P*}, y_{P*}, x_{Q*} and y_{Q*} of two points P and Q in the line in which the plane E intersects the ground plane. The mapping equations then give a x_{P*} (z_{P} + d) / d + z_{P} + d = k, z_{P} + d = -3M d / y_{P*}, a x_{Q*} (z_{Q} + d) / d + z_{Q} + d = k and z_{Q} + d = -3M d / y_{Q*}. Solving, we get
a = d ( y_{P*} - y_{Q*}) / ( x_{P*} y_{Q*} - x_{Q*} y_{P*}) and
k = -3M (a x_{P*} + d ) / y_{P*}. For example, for the right-hand wall with P*( 95 | -299 ) and Q*( 608.82 | 0 ), we obtain the parameters a = -d / x_{Q*} = -1.204 and k = 6.207M.

*Calculating the coordinates of points in a general plane in the real world*:
The equation of a general plane can be written in the form a x + b y +c (z+d) = k. For a point P in the plane, the mapping equations give (a x_{P*} + b y_{P*} + c d) ( z_{P} + d) = k d and thus the real-world coordinates x_{P} = k x_{P*} / (a x_{P*} + b y_{P*} + c d), y_{P} = k y_{P*} / (a x_{P*} + b y_{P*} + c d) and z_{P} + d = k d / (a x_{P*} + b y_{P*} + c d).

English translation by Hugh Casement; back to the picture