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: yP = yP* ( zP + d)/d; -3M = yF* ( zF +
d)/d. Putting zP = zF we get
yP = -3M yP* / yF* = -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 g1 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 x1* = -d/m.
A line g2, also in the ground plane but orthogonal to g1 has gradient -1/m, so its image points lie on a line that cuts the horizon at x2* = md. Therefore d 2 = - x1* x2*. We can then determine d as follows: the lines g1* through the image points ( 167 | -331 ) and ( -166 | -226) and g2* through the points
( 167 | -270 ) and ( 59 | -336 ) are images of orthogonal lines g1, g2 in the ground plane. Solving the equations, we get:
x1* = -882.74 and x2* = 608.82, so d = 733pix.
Lengths in the ground plane: For two points P,Q in the ground plane, the mapping equations give: xP - xQ = -3M ( xP* yQ* -
xQ* yP*) / ( yP* yQ*) and zP - zQ = -3M (d yQ* - d yP*) / ( yP* yQ*). Using Pythagoras' rule |PQ| 2 = (xP - xQ) 2 + (zP - zQ) 2 we can determine the length |PQ| of a line segment in the ground plane from the image coordinates xP*, yP*, xQ* and yQ*.
For the horizontal distances xP and zP + d from P to the point ( 0 | -3M | d ) on the ground plane directly below the observer we have the simple rule xP = -3M xP* / yP* and zP + d = -3M d / yP*.
For example, for the foot of the levelling staff, xP* = -13pix and yP* = -45pix , we calculate the coordinates
xP = -0.87M and zP + 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 xP*, yP*, xQ* and yQ* of two points P and Q in the line in which the plane E intersects the ground plane. The mapping equations then give a xP* (zP + d) / d + zP + d = k, zP + d = -3M d / yP*, a xQ* (zQ + d) / d + zQ + d = k and zQ + d = -3M d / yQ*. Solving, we get
a = d ( yP* - yQ*) / ( xP* yQ* - xQ* yP*) and
k = -3M (a xP* + d ) / yP*. For example, for the right-hand wall with P*( 95 | -299 ) and Q*( 608.82 | 0 ), we obtain the parameters a = -d / xQ* = -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 xP* + b yP* + c d) ( zP + d) = k d and thus the real-world coordinates xP = k xP* / (a xP* + b yP* + c d), yP = k yP* / (a xP* + b yP* + c d) and zP + d = k d / (a xP* + b yP* + c d).
English translation by Hugh Casement; back to the picture