Suppose you're given an image (a perspective) of an ellipse of arbitrary orientation in space, and in addition the image shows the location of the ellipse center.
Is it possible to determine from the image, the ratio of the semi-minor axis length $b$, to the semi-major axis length $a$?
That is, I want to find the ratio $\dfrac{b}{a}$.
If that's not possible, would it be possible to determine this ratio if the image was orthographic?
It is assumed that the equation of the ellipse in the image is known, as well as the coordinates of the image of the center of the original 3D ellipse.
My attempt is outlined in my answer below.
Let's assume that the ellipse (in the image) is given by the parametric equation
$e(t) = c + v_1 \ \cos t + v_2 \ \sin t \tag{1} $
where $c \in \mathbb{R}^2$ is the center of the ellipse and $v_1, v_2 \in \mathbb{R}^2$ are the semi-minor/semi-major axes vectors (they can also be conjugate radii vectors)
In addition, let the image of the center of the $3D$ ellipse be the image point $P$.
It is assumed that the center of view in the image is known and is the origin of the image coordinate system.
That is, no shifting (translation) has been applied to the image ellipse. In addition, we'll assume that no scaling has been applied either. And finally, we'll assume that no rotation has been applied to the image.
Assuming the image plane lies between the imaged object (which is the $3D$ ellipse) and the perspective projection center, and assuming that
the positive distance between the projection center and the plane is $z_0$, then we can append the $z$-coordinate of the image plane (which is $-z_0$) to $e(t)$ so that it becomes a $3D$ curve lying in the plane $z = -z_0$.
Now construct the elliptical cone of view as follows:
In the coordinate frame of the camera, let $c' = [c ; -z_0] $ and append $v_1, v_2$ with $0$'s for their $z$ coordinates,
then the $3D$ parametric equation of the image ellipse is
$p(t) = c' + v_1 \cos t + v_2 \sin t \tag{2} $
And this can be written as
$ p(t) = A v \tag{3} $
where $A = [c' , v_1, v_2 ] $ and $ v = [ 1 , \cos t, \sin t ]^T $
Now note that $v$ satisfies $v^T Q v = 0$ where $Q = \begin{bmatrix} -1 && 0 && 0 \\ 0 && 1 && 0 \\ 0 && 0 && 1 \end{bmatrix} $
then
$p^T A^{-T} Q A^{-1} p = 0 \tag{4}$
is the equation of the cone of view. On the other hand, the center of the $3D$ ellipse lies on the line
$q = t w $ where
$ w = \begin{bmatrix} P \\ -z0 \end{bmatrix} \tag{5} $
and $ t \in \mathbb{R} $
Next, cut this cone of view with the plane $n^T (x - x_0) = 0$ where $x_0$ is fixed non-zero vector, and $n$ (the unit normal vector to the plane) is unknown yet.
Without any loss of generality, we can take $x_0$ to be $n$. This makes the equation of the cutting plane $n^T x = 1 $
Now, I am going to find the equation of the curve of intersection betwee the cone of view and the cutting plane.
To do that, I need to use the vector equation of the plane. So let the triple $w_1 , w_2 , n $ constitute an orthonormal basis $B$ of $\mathbb{R}^3$, then
Define $V = [w_1, w_2]$, then the vector equation of the cutting plane is
$ x = n + V u \tag{6}$
where $u = [u_1, u_2] \in \mathbb{R}^2 $ is the coordinate of a point on the cutting plane with respect to the basis $B$, the third coordinate being $0$.
Substitute this in equation $4$, (and let $ G = A^{-T} Q A^{-1} $), then
$(n + V u)^T G (n + V u) = 0 \tag{7}$
Expand,
$u^T V^T G V u + 2 u^T V^T G n + n^T G n = 0 \tag{8} $
The center of this conic is at
$\chi = n + V u0 \tag{9} $
where $ u_0 = - (V^T G V)^{-1} V^T G n \tag{10} $
Thus,
$ \chi = n - V (V^T G V)^{-1} V^T G n = ( I - V (V^T G V)^{-1} V^T G ) n \tag{11} $
It was shown here that
$(I - V (V^T G V)^{-1} V^T G) n = \dfrac{G^{-1} n}{n^T G^{-1} n }\tag{12}$
Therefore, we now have
$\dfrac{G^{-1} n}{ n^T G^{-1} n } = t w \tag{13} $
Hence,
$G^{-1} n = t (n^T G^{-1} n) w \tag{14}$
Since $t (n^T G^{-1} n) $ is a scalar, then $(14)$ implies that the cross product
$ w \times (G^{-1} n) = \mathbf{0} \tag{15}$
This in turn implies that
$ S_w G^{-1} n = \mathbf{0} \tag{16}$
where
$ S_w = \begin{bmatrix} 0 && - w_z && w_y \\ w_z && 0 && - w_x \\ - w_y && w_x && 0 \end{bmatrix} \tag{17}$
Equation $(16)$ gives $n$ (up to a scalar multiple), which we can normalize to produce the unit vector $n$.
Next, we substitute $n$ into equation $(8)$, which is the equation in the coordinates $u$ of a uniformly scaled version of the $3D$ imaged ellipse, and hence we can find the ratio of $\dfrac{b}{a}$
I've implemented all of the above in code using Excel VBA Script. I started with a $3D$ ellipse with set $a$ and $b$, projected it (perspective projection) onto a screen, and then followed the above steps to retrieve the ratio $\dfrac{b}{a}$. And the code produced the correct ratio.
The only problem here is we need to have the exact value of the focal length $z_0$ that was used when producing the image.
Assuming a different value than the actual value of $z_0$ will produce an incorrect value of the ratio $\dfrac{b}{a}$.
Additional experimentation with the code, shows that it is allowed for the image to be scaled and rotated. However shifting the image (i.e. applying a displacement to its points) alters the output, and produces an incorrect ratio of $\dfrac{b}{a} $.