Visualization

imagemks.visualization.make_boundary_image(L, A, thickness=1, color=(255, 255, 85))

Marks borders of segmentation on the original image so that borders can be evaluated. Similar to skimage.segmentation.mark_boundaries. This function allows specifying a border thickness. This makes borders visible in high resolution images.

Parameters
  • L ((M,N) array of dtype long) – The labeled image that is a segmentation of A.

  • A ((M,N) or (M,N,3) array of any numerical dtype) – The original image. Grayscale and color are supported. thickness : Thickness of the borders in pixels. Default is 1. color : Tuple of 3 uint8 RGB values.

Returns

marked_image – The original image with marked borders, 3 color channels.

Return type

ndarray