Blobs.plot_box#

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

Plot a bounding box for the blob using Matplotlib

Parameters:
  • args – optional Matplotlib format string, such as "r--"

  • kwargs – arguments passed to plot_box

Plot the bounding box of a blob or blobs on the current Matplotlib axes.

Examples

>>> from machinevisiontoolbox import Image
>>> im = Image.Read("sharks.png")
>>> blobs = im.blobs()
>>> blobs.plot_box(color="yellow") # solid yellow box for all blobs
>>> blobs[0].plot_box('b--') # blue dashed box
>>> blobs[1].plot_box(color="blue", linestyle="--") # blue dashed box
>>> blobs[2].plot_box(color="g") # solid green box
>>> blobs[3].plot_box(color="r", linewidth=4)

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

../../_images/machinevisiontoolbox-Blobs-plot_box-1.png