How to project a 3d-line (represented in Plücker coordinates) into 2d image

3k Views Asked by At

I have a fully calibrated camera setup (that means $K$ and $P = [R|t]$ are known) and want to project a 3d line into the camera image.

The 3d line is defined via world coordinates $A$ and $B$ (as $4x1$ homogeneous vectors) and represented with Plücker coordinates:

$$ L = A\cdot B^T - B\cdot A^T\\ L_{coord} = \{l_{12},l_{13},l_{14},l_{23},l_{42},l_{34}\} $$

How is than the projection performed? I assume as the projection matrix for points is $3x4$ the new projection matrix should something like $3x6$. I could not find a good resource about this topic.

3

There are 3 best solutions below

2
On BEST ANSWER

I found what I was looking for in "Harley & Zisserman" (I must overlooked it). The projected line in the image can be calculated by: $$ [l]_x = P\cdot L\cdot P^T $$

and

$$ [l]_x =\begin{bmatrix} 0&-c&b&\\ c&0&-a\\ -b&a&0 \end{bmatrix} $$

where $(a,b,c)$ are coefficients in the line equation $ax+by+c=0$ and $P$ is the standard projection matrix.

1
On

Start by computing the plane spanned by the line and the point of the camera. If you don't know how to compute such a join using Plücker coordinates, I can expand on this. The projection of the line is the intersection of that plane with the plane of your image.

If you can choose the embedding of your drawing plane, embed it at $z=0$ in such a way that the $x$ and $y$ axes line up with those of the surrounding 3d space. That way, a point which has homogeneous coordinates $[x:y:0:w]$ in 3d space has homogeneous coordinates $[x:y:w]$ on the plane, you just leave out the third coordinate. Which means that a generic plane with the homogeneous equation $ax+by+cz+dw=0$ will intersect your plane in the line $ax+by+dw=0$, so $[a:b:d]$ would be the in-plane representation of the intersection.

You can also perform all of these steps symbolically using variables as the coordinates of the line. Then the result should be a vector of polynomials in these coordinates, which you can rewrite as a transformation matrix.

1
On

You could have simply projected the points A and B to image points a and b

$$a=PA$$ $$b=PB$$

Then compute the 2D line from the 2D image points with cross product.