Perspective image of a rectangle 
The image above shows a perspective image of a rectangle, taken by a pinhole camera that is pointed to the center of the rectangle (This means that the axis of the pinhole camera is assumed to pass through the center of the viewed rectangle, or equivalently that the line connecting the center of the rectangle and its image is perpendicular to the viewing plane).
If the side length $\overline{AB}$ is known to be $6$ units, can we find the side length $\overline{BC}$ ?
Additionally, assume that in the image $AB$ is not parallel to $CD$ and $BC$ is not parallel to $AD$.

Let $ABCD$ be the ordered vertices of the given quadrilateral, $O$ the intersection point of its diagonals and $V$ the position of the point of view (i.e. the pinhole), which lies on the perpendicular through $O$ to plane $ABCD$. We also know that line $VO$ passes through the centre of a rectangle $A'B'C'D'$ whose vertices lie on the rays opposite to $VA$, $VB$, $VC$, $VD$.
Choose any $A'$ on the ray opposite to $VA$, for instance:
$$
A'=2V-A.
$$
Then it is easy to show that the midpoint $M$ of $A'C'$ lies on line $VO$ only if
$$
C'=V+{1\over k}(V-C),
\quad\text{where}\quad
k={OC\over OA}.
$$
Proof. Point $C'$ lies on line $CO$, hence there exists $t$ such that $C'=V+t(V-C)$. On the other hand $C=O+k(O-A)$, hence:
$$
M={A'+C'\over2}={(3+t)V-A-tC\over2}=
{(3+t)V-t(1+k)O+(tk-1)A\over2}.
$$
But $M$ lies on line $VO$ only if $M=\alpha O+(1-\alpha) V$ for some real number $\alpha$. And this is the case only if $tk-1=0$. Plugging then $t=1/k$ into the expression for $C'$ we obtain the desired result. $\square$
In an analogous way, one can prove that $M$ is also the midpoint of $B'D'$ if:
$$
B'=V + {m (1 + k)\over k(1 + m)} (V - B),\quad 
D'= V + {1 + k\over k(1 + m)}(V-D),\quad 
\text{where}\ 
m={OD\over OB}.
$$
The quadrilateral $A'B'C'D'$ so constructed is a parallelogram, but not necessarily a rectangle. We get a rectangle by imposing a further condition, for instance $A'C'=B'D'$. This gives a quadratic equation in the unknown $z=OV$, which can then be solved: two solutions are possible, on either side of plane $ABCD$.
Once $V$ is found one can compute the sides of rectangle $A'B'C'D'$: a simple proportion will then give you the unknown side of the original rectangle.

EXAMPLE.
Let's take for simplicity $ABCD$ in the $xy$ plane in such a way that $O=(0,0,0)$:
$$
A=(-2, -2, 0),\ 
B=(1, -4, 0),\ 
C=(3, 3, 0),\ 
D=(-1, 4, 0),\ 
V=(0,0,z).
$$
We then have $k=3/2$, $m=1$ and:
$$
A'=(2, 2, 2z),\ 
B'=\left(-{5\over6}, {10\over3}, {11\over6}z\right),\ 
C'=\left(-2, -2, {5\over3}z\right),\ 
D'=\left({5\over6},-{10\over3}, {11\over6}z\right). 
$$
Equation $A'C'=B'D'$ boils down to $z^2=137$, that is $z=\pm\sqrt{137}$. We can then compute:
$$
A'B'={7\over3}\sqrt{5\over2},\quad
B'C'={11\over3}\sqrt{5\over2}.
$$
If the real length of $A'B'$ is $6$, a simple proportion will then give the real length of $B'C'$ as $\displaystyle{66\over7}$.
EDIT.
Tinkering a bit with Mathematica I could find a simple formula for $z=OV$:
$$
z^2={ (1 + k)^2 m^2 OB^2-k^2 (1 + m)^2 OA^2
\over (k - m) (k m-1)}.
$$
Of course if the right hand side turns out to be negative then no real solution exists.
