machinevisiontoolbox.Camera.FishEyeCamera.project_point

FishEyeCamera.project_point(P, pose=None, objpose=None)[source]

Project 3D points to image plane

Parameters:
  • P (array_like(3), array_like(3,n)) – 3D world point or points

  • pose (SE:class:`~spatialmath..pose3d.SE3`3, optional) – camera pose with respect to the world frame, defaults to camera’s pose attribute

  • objpose (SE3, optional) – 3D point reference frame, defaults to world frame

  • visibility (bool) – test if points are visible, default False

Raises:

ValueError – [description]

Returns:

image plane points

Return type:

ndarray(2,n)

Project world points to the fisheye camera image plane.

The elevation angle range is from \(-pi/2\) (below the mirror) to maxangle above the horizontal plane. The mapping from elevation angle \(\theta\) to image plane radius is given by:

Projection

\(r(\theta)\)

equiangular

\(r = k \theta\)

sine

\(r = k \sin \theta\)

equisolid

\(r = k \sin \frac{\theta}{2}\)

stereographic

\(r = k \tan \frac{\theta}{2}\)

World points are given as a 1D array or the columns of a 2D array of Euclidean coordinates. The computed image plane coordinates are Euclidean and given as a 1D array or the corresponding columns of a 2D array.

If pose is specified it is used for the camera pose instead of the attribute pose. The object’s attribute is not updated.

The points P are by default with respect to the world frame, but they can be transformed by specifying objpose.

Seealso:

plot_point