CentralCamera.epiline#
- CentralCamera.epiline(p: ndarray, camera2: CentralCamera) ndarray[source]#
Compute epipolar line
- Parameters:
p (array_like(2) or ndarray(2,N)) – image plane point or points
camera2 (
CentralCamerainstance) – second camera
- Returns:
epipolar line or lines in homogeneous form
- Return type:
ndarray(3), ndarray(3,N)
Compute the epipolar line in
camera2induced by the image plane pointspin the current camera. Each line is given by\[\ell = \mat{F} {}^1 \hvec{p}\]which is in homogeneous form \(\ell_0 u + \ell_1 v + \ell_2 = 0\) and the conjugate point \({}^2 \vec{p}\) lies on this line.
Example:
>>> from machinevisiontoolbox import CentralCamera >>> from spatialmath import SE3 >>> camera1 = CentralCamera.Default(name='camera1') >>> camera2 = CentralCamera.Default(pose=SE3(0.1, 0.05, 0), name='camera2') >>> P = [-0.2, 0.3, 5] # world point >>> p1 = camera1.project_point(P) # project to first camera >>> camera1.epiline(p1, camera2) # epipolar line in second camera array([[-0.0001], [ 0.0001], [-0.0393]])
- References:
P. Corke, Robotics, Vision & Control for Python, Springer, 2023, Section 14.2.1.
- Seealso: