Blobs.plot_aligned_box#
- Blobs.plot_aligned_box(*args, **kwargs: Any) None[source]#
Plot aligned rectangles of blobs using Matplotlib
- Parameters:
kwargs – line style parameters passed to
plot
Compute the minimal enclosing box whose sides are parallel to the axes of the equivalent ellipse. Return a list of vertices (not closed) and a list of box centroids. Highlights the perimeter of a blob or blobs on the current plot.
Example:
>>> from machinevisiontoolbox import Image >>> im = Image.Read("sharks.png") >>> blobs = im.blobs() >>> blobs.plot_aligned_box() # aligned boxes for all blobs, different colors >>> >>> blobs[0].plot_aligned_box("c--") # cyan dashed line >>> blobs[1].plot_aligned_box(color="cyan", linestyle="--") # cyan dashed line >>> blobs[2].plot_aligned_box(color="red") >>> blobs[3].plot_aligned_box(color="orange", linewidth=3)
(
Source code,png,hires.png,pdf)
- Seealso: