dask.array.image.imread

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

Read a stack of images into a dask array

Parameters
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.

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

Examples

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