# Image Analysis using cross ratios

I'm stuck trying to solve an exercise regarding an image analysis.

Consider a book that measures 16 cm $$\times$$ 24 cm lying on a table. Let the vertices of the book be denoted by A,B,C,D and the vertices of the table be denoted by A',B',C',D' so that the line segment(AD) has length 16 cm and the line segment (AB) has length 24 cm. Place the book such that A=A' and the lines

AD and A'D' coincide AB and A'B' coincide

What are the dimensions of the table?

Hint: Construct vanishing points and use cross ratios.

The plane spanned by the table is contained in the real projective plane.

We may consider the line CD which intersects the line A',B' at infinity and the line BC which intersects the line A'D' at infinity. Since we can interpret the point A=A' as 0 we get the following cross ratios:

$$cr(0,D,D',\infty)=\frac{D-0}{D-D'}$$

$$cr(0,B,B'\infty)=\frac{B-0}{B-B'}$$

I know that $$D-0=16$$ cm and $$B-0=24$$ cm. In order to solve the exercise I have to determine D-D' and B-B' but I do not see a way how to that since the values $$cr(0,D,D',\infty)$$ and $$cr(0,B,B',\infty)$$ are unknown. Is it possible to find these values or should I try to choose different points?

\Edit: I have added a picture which illustrates the configuration.

• Very difficult to solve without the actual picture where you're supposed to be constructing vanishing points :). – Maxim Jan 13 at 2:11

Keep in mind that there two relevant planes here: the real table and the picture (which I'd consider an essential part of the exercise, not a mere illustration). In the real table plane, you have the size of the book but not of the table. In the picture, no sizes seem to be given but you can measure whatever sizes you want.

Now the cross ratio is preserved by the projection from one plane to the other. Therefore if you measure the lengths in the picture , you can compute the cross ratios in the picture. And since these are the same as those for the real table, you can then use the known dimensions of the book to find the unknown dimensions of the table. To measure all required distances in the picture you need those points at infinity, which you can get from the intersections of lines which are parallel in real life, e.g. opposite table edges.

In general I tend to remember $$\operatorname{cr}(\infty,0;1,x)=x$$ or equivalently using homogeneous coordinates $$\operatorname{cr}\left(\begin{pmatrix}1\\0\end{pmatrix},\begin{pmatrix}0\\1\end{pmatrix};\begin{pmatrix}1\\1\end{pmatrix},\begin{pmatrix}x\\1\end{pmatrix}\right)=x$$

If you input the three basis points defining a projective scale in this order, you get the position of the third with respect to that scale. In other words, if you do $$\operatorname{cr}(\infty,A;B,B')$$ then you get the length $$AB'$$, measured in units of length $$AB$$, or phrased differently you get $$\frac{AB'}{AB}$$. But since you seem to have a relationship between a ratio of lengths and a cross ratio with infinity in it, you probably don't need this formula to solve your exercise. I'm citing it for the sake of people who keep forgetting a suitable order, as I used to do. I didn't double-check your formula there.

Suppose this is the picture of the image, with the vanishing points drawn in:

The green quadrilateral is the book, with the table outlined in red below it.

The cross ratio along the $$24$$ cm side of the book says $$\frac{24\text{ cm}+y}{24\text{ cm}}\lim_{t\to\infty}\frac{t+y}t=\frac{9.33+6.19}{9.33}\frac{16.64+6.19}{16.64}$$ giving the length of the table to be $$y+24\text{ cm}=54.77\text{ cm}$$ The cross ratio along the $$16$$ cm side of the book says $$\frac{16\text{ cm}+x}{x}\lim_{t\to\infty}\frac{t+16\text{ cm}}t=\frac{11.61+11.61}{11.61}\frac{21.28+11.61}{21.28}$$ giving the width of the table to be $$x+16\text{ cm}=23.65\text{ cm}$$ Using the actual numbers from the actual image would give the length and width of the actual table.