CentralCamera.project_line#
- CentralCamera.project_line(lines: Line3) ndarray[source]#
Project 3D lines to image plane
- Parameters:
lines (
Line3instance with N values) – Plucker line or lines- Returns:
2D homogeneous lines, one per column
- Return type:
ndarray(3,N)
The
Line3object can contain multiple lines. The result array has one column per line, and each column is a vector describing the image plane line in homogeneous form \(\ell_0 u + \ell_1 v + \ell_2 = 0\).The projection is
\[\ell = \vex{\mat{C} \sk{\vec{L}} \mat{C}^{\top}}\]where \(\mat{C}\) is the camera calibration matrix and \(\sk{\vec{L}}\) is the skew matrix representation of the Plucker line.
Example:
>>> from machinevisiontoolbox import CentralCamera >>> from spatialmath import Line3 >>> line = Line3.Join((-3, -4, 5), (5, 2, 6)) >>> line Line3([-34, 43, 14, -8, -6, -1]) >>> camera = CentralCamera() >>> camera.project_line(line) array([[ 0.7907], [-1. ], [-0.3256]])
- References:
P. Corke, Robotics, Vision & Control for Python, Springer, 2023, Section 13.7.1.
- Seealso:
CLine3project_pointproject_quadric