CatadioptricCamera.plot#
- CatadioptricCamera.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
Truealpha (float, optional) – transparency of icon, defaults to 1
solid (bool, optional) – icon comprises solid faces, defaults to
Falsecolor (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 apose- 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 forcamera.posedefaults to the instance’s own pose if not given.Unbound,
CentralCamera.plot(pose=..., ...)– called on the class itself, with no camera instance involved (selfisNone). 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 byimages2C.poseis required in this form.
Note
If
poseis not given, it defaults to the pose ofself– this only applies to the bound form.