FishEyeCamera.plot#

FishEyeCamera.plot(pose: SE3 | None = None, scale: float = 1, shape: str = 'camera', label: bool = True, alpha: float = 1, solid: bool = False, color: str = 'r', projection: str = 'ortho', frame: bool = False, ax: Axes | None = None) Axes[source]#

Plot 3D camera icon in world view (base method)

Parameters:
  • pose (SE3) – camera pose, required when called unbound (see below)

  • scale (float) – scale factor, defaults to 1

  • shape (str, optional) – icon shape: ‘frustum’ [default], ‘camera’

  • label (bool, optional) – show camera name, defaults to True

  • alpha (float, optional) – transparency of icon, defaults to 1

  • solid (bool, optional) – icon comprises solid faces, defaults to False

  • color (str, optional) – icon color, defaults to ‘r’

  • projection (str, optional) – projection model for new axes, defaults to ‘ortho’

  • ax (Axes3D, optional) – axes to draw in, defaults to current 3D axes

Raises:

ValueError – called unbound (eg. CentralCamera.plot(...)) without a pose

Returns:

axes drawn into

Return type:

Axes3D

Plot a 3D icon representing the pose of a camera into a 3D Matplotlib plot. Two icons are supported: the traditional frustum, and a simplistic camera comprising a box and cylinder.

This method can be called two ways:

  • Bound, camera.plot(...) – draws an icon for camera. pose defaults to the instance’s own pose if not given.

  • Unbound, CentralCamera.plot(pose=..., ...) – called on the class itself, with no camera instance involved (self is None). Useful for drawing icons at a set of poses that don’t correspond to any single camera instance – e.g. plotting the calibration frames returned by images2C. pose is required in this form.

Note

If pose is not given, it defaults to the pose of self – this only applies to the bound form.