neuralib.imglib.color.grey2rgb

neuralib.imglib.color.grey2rgb(im, rgb)[source]

Converts a grayscale image to an RGB image by assigning intensity values to specified color channels.

Parameters:
  • im (ndarray) – Grey scale image (2d array)

  • rgb (int | tuple[int, ...]) – {0, 1, 2} indicates rgb, tuple represent merge color

Returns:

RGB image. Array[float, [H, W, 3]]

Return type:

ndarray