CentralCamera.plot_wireframe#

CentralCamera.plot_wireframe(X: ndarray, Y: ndarray, Z: ndarray, *fmt, objpose: SE3 | None = None, pose: SE3 | None = None, nsteps: int = 21, **kwargs) None#

Plot 3D wireframe in virtual image plane (base method)

Parameters:
  • X (ndarray(N,M)) – world X coordinates

  • Y (ndarray(N,M)) – world Y coordinates

  • Z (ndarray(N,M)) – world Z coordinates

  • objpose (SE3, optional) – transformation for the wireframe points, defaults to None

  • pose (SE3, optional) – pose of the camera, defaults to None

  • nsteps (int, optional) – number of points for each wireframe segment, defaults to 21

  • kwargs – arguments passed to plot

The 3D wireframe is projected to the camera’s virtual image plane. Each wire link in the wireframe is approximated by nsteps points, each of which is projected, allowing straight edges to appear curved.

Example:

>>> from machinevisiontoolbox import CentralCamera, mkcube
>>> from spatialmath import SE3
>>> camera = CentralCamera.Default()
>>> X, Y, Z = mkcube(0.2, pose=SE3(0, 0, 1), edge=True)
>>> camera.plot_wireframe(X, Y, Z, 'k--')

(Source code, png, hires.png, pdf)

../../../_images/machinevisiontoolbox-Camera-CentralCamera-plot_wireframe-1.png
Seealso:

mkcube spatialmath.base.cylinder spatialmath.base.sphere spatialmath.base.cuboid