imread

imread(image_path, as_uint8=True)[source]

Read an image as numpy array.

Parameters
  • image_path (str or pathlib.Path) – File path (including extension) to read image.

  • as_uint8 (bool) – Read an image in uint8 format.

Returns

Image array of dtype uint8, MxNx3.

Return type

img (numpy.ndarray)

Examples

>>> from tiatoolbox import utils
>>> img = utils.misc.imread('ImagePath.jpg')