Relative distance to rotated object

876 Views Asked by At

An object (with center $O_{2}$) has been rotated by an angle $\alpha$. There are two images of the object taken by a camera (centered at $O_{1}$), and two points $x_{1}$ and $x_{2}$ that are actually belong to the same physical object's point in different positions.

Given values:

  • rotation angle $\alpha$
  • $x_{1}$ and $x_{2}$
  • (possibly) focal length $f=O_{1}C$

...and I'd like to estimate the relative distance or depth for $X_{1}$ (how far it is from the camera plane), i.e., some value proportional to the real distance.

Now, if two object points are $(X_{1}, Y_{1})$ and $(X_{2}, Y_{2})$, then $X_{2}=X_{1}-Rcos\alpha$ and $Y_{2}=Y_{1}-Rsin\alpha$ where $R$ is rotation radius (unknown, because an object can be shaped arbitrary). So, $x_{2}$ depends on both distance and $R$, and I can't tell knowing only (supposedly large) $x_{2}$ whether the origin point is relatively close or just belongs to an extruded object part and is far away from rotation center.

enter image description here


Update:

I do get the fact that two different objects could cast the same projection, yes. But is rotation no help at all here? For example, if the object has been displaced (by a known vector), from position $A$ to position $B$ that would give me enough information to calculate distance/depth as $d=\frac{|X_{B} - X_{A}|f}{|x_{A} - x_{B}|}$ (that would actually be absolute distance). Now, in case of rotation I could extract just $X$-component of transformation if I knew $R$ (rotation radius), that would make the problem the same as a displacement one. Unfortunately, $R$ is unavailable (can it be estimated from the image somehow? I don't think so), but on the other hand, I'm not looking for an absolute distance value (not sure if that makes the problem easier).


Update:

These are the values I'm looking for ($X_{1}H_{1}, X_{2}H_{2}$).

enter image description here

1

There are 1 best solutions below

7
On

If all you have is the camera image ($x_1$ and $x_2$), the distance $O_1C$, and the rotation angle $\alpha$, the point $X_1$ could be at almost any distance from the camera. Even knowing that the center of rotation is on the line $O_1C$ does not help much. If rotation through angle $\alpha$ around $O_2$ takes the point $X_1$ to $X_2$, you know all the angles of the isoceles triangle $\triangle X_1O_2X_2$, but you do not know its size. For example, here is such a triangle $\triangle X_1O_2X_2$ and another similar (same angles) but larger triangle, $\triangle X_1'O_2'X_2'$, farther away from the camera:

enter image description here

The points $X_1'$ and $X_2'$ will produce exactly the same image in the camera as the points $X_1$ and $X_2$.

In fact, a dilation with center at $O_1$ takes $\triangle X_1O_2X_2$ to $\triangle X_1'O_2'X_2'$, that is, not only are $\triangle X_1O_2X_2$ and $\triangle X_1'O_2'X_2'$ similar, but $\triangle X_1O_1O_2$ and $\triangle X_1'O_1O_2'$ are similar (that is, $\angle X_2O_2O_1 = \angle X_2'O_2'O_1$) and $\triangle X_1O_1X_2$ and $\triangle X_1'O_1X_2'$ are similar as well. Therefore

$$\frac{|O_1X_1|}{|O_1X_2|} = \frac{|O_1X_1'|}{|O_1X_2'|}.$$

The distances measured from $O_1$ in the direction perpendicular to the camera image (parallel to $O_1C$) also are proportional, but since we do not scale up the triangle $\triangle x_1O_1x_2$ when we scale up $\triangle X_1O_2X_2$,

$$\frac{|x_1X_1|}{|x_1X_2|} \neq \frac{|x_1X_1'|}{|x_1X_2'|},$$

and we also will get inconsistent ratios if we measure the distances perpendicular to the camera's image. In the limit, as we view larger and larger objects at greater and greater distances, the ratios of distances will approach a constant, because $\frac{|CO_2'|}{|O_1O_2'|} \approx 1$ when $O_2'$ is very distant.