Blobs.plot_axes#

Blobs.plot_axes(*args, **kwargs: Any) None[source]#

Plot equivalent ellipse axes of blobs using Matplotlib

Parameters:

kwargs – line style parameters passed to plot

Plot the major and minor axes of a blob or blobs on the current Matplotlib axes. These are the axes of the equivalent ellipse and the intersection point is the blob’s centroid.

Example:

>>> from machinevisiontoolbox import Image
>>> im = Image.Read("sharks.png")
>>> blobs = im.blobs()
>>> blobs.plot_axes() # axes for all blobs, different colors
>>>
>>> blobs[0].plot_axes("c--") # cyan dashed line
>>> blobs[1].plot_axes(color="cyan", linestyle="--") # cyan dashed line
>>> blobs[2].plot_axes(color="red")
>>> blobs[3].plot_axes(color="orange", linewidth=3)

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

../../_images/machinevisiontoolbox-Blobs-plot_axes-1.png
Seealso:

plot_ellipse plot_box plot_centroid