dask.array.image.imread(filename, imread=None, preprocess=None)[source]

Read a stack of images into a dask array

filename: string

A globstring like ‘myfile.*.png’

imread: function (optional)

Optionally provide custom imread function. Function should expect a filename and produce a numpy array. Defaults to skimage.io.imread.

preprocess: function (optional)

Optionally provide custom function to preprocess the image. Function should expect a numpy array for a single image.

Dask array of all images stacked along the first dimension. All images
will be treated as individual chunks


>>> from dask.array.image import imread
>>> im = imread('2015-*-*.png')  
>>> im.shape  
(365, 1000, 1000, 3)