Plot Contour

image_segmentation.visualizations.plot_contour.plot_contour(img: numpy.ndarray, masks: List[Tuple[numpy.ndarray, str, str]], ax: matplotlib.pyplot.axes, cmap: str = 'gray') matplotlib.pyplot.axes[source]

Plot multiple contours over image.

Parameters:
  • img – Image RGB or Gray scale

  • masks – List of tuples mask, name and color. Mask in 2D.

  • ax – matplotlib ax

  • cmap – cmap for imshow

Returns:

matplotlib ax

Return type:

ax