1
$\begingroup$

Suppose you have a labelled triangle with known side lengths, and you take one image of this triangle using a known pinhole camera (i.e. the focal length is known), from a point with known coordinates, and also the orientation of the camera is known. How can you find the coordinates of the three vertices of the triangle? And are these coordinates unique, or is it possible that a single image will corresponds to more than one possible set of coordinates for the three vertices ?

My Attempt: Since the triangle vertices are labelled we have a known correspondence between the vertices and their images. If the vertices are $P_A, P_B, P_C$, and their images are $Q_A, Q_B, Q_C$, then

$P_A = P_0 + t_1 R Q_A $

$P_B = P_0 + t_2 R Q_B $

$P_C = P_0 + t_3 R Q_C $

note that since the focal length of the pinhole camera is known, then $Q_A, Q_B, Q_C$ are known vectors. Also, since the position of the pinhole and the orientation of the camera is known, then vector $P_0$ and matrix $R$ are also known. The unknowns are the scalars $t_1, t_2, t_3$ and the vectors $P_A, P_B, P_C $. This is where knowledge of the side lengths comes into play. The sides are $a = \| P_B P_C \| , b = \| P_A P_C \|$ , and $c = \| P_A P_B \|$. From the expressions above, and using the fact the $R$ is a rotation matrix, so it does not change of the length, then

$a^2 = (t_3 Q_C - t_2 Q_B)^T (t_3 Q_C - t_2 Q_B ) $

$b^2 = (t_3 Q_C - t_1 Q_A )^T (t_3 Q_C - t_1 Q_A) $

$ c^2 = (t_2 Q_B - t_1 Q_A)^T (t_2 Q_B - t_1 Q_A ) $

which are three quadratic equations in the three unknowns $t_1, t_2, t_3$ , that can be solved simultaneously by numerical methods.

Once $t_1,t_2, t_3$ are found, then we're done, because now we can compute the coordinates $P_A, P_B, P_C $.

$\endgroup$

1 Answer 1

2
$\begingroup$

It is possible for the 2 different triangles with equal side lengths to have the same image in the pinhole camera. Below are some screenshots of how it can be constructed. I am not sure if this is a unique setup, but I am thinking it is always possible.

Here is how I constructed the two triangles: First, I made the viewport in the bottom left, labeled "Front", a perspective view, which is (I am pretty sure) equivalent to your pinhole camera. [The standard is the "parallel" view, which is used for CAD drawing.] The camera position is at $(0,-100, 0)$ and the lens length is 50. These do not change for any of the images.

Then I made the blue triangle that is leaning forward toward the camera, with vertices $(-10, 0, 0), (10, 0,0),$ and $(0, -10, 10)$.

I drew the line from our camera position through the top point of the blue triangle, $(0, -100, 0)$ to $(0, -10, 10)$. All points on this line will be in the same image in the pinhole camera. Then I merely made a new red triangle by rotating the blue one back until the top point fell on this line. In this case, the new point is $(0.000,7.561,11.951)$ estimated.

In the images below, I have hid one triangle and then the other and you can see they do not change the image in the Front viewport. This process can be repeated by rotating a triangle about one of the sides as long as the axis of rotation is in the normal plane to the camera angle, (I think? Am I making other implicit assumptions I did not realize? ) so the vertex that is being moved lands on the other position in the line from the camera position to the original point. I am not sure if there are more examples in different ways, but I would bet there are some clever ways of making more.

Four views of two triangles, which Just the red triangle Just the blue triangle

$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .