darsia.imread_from_optical#

imread_from_optical(path, time=None, transformations=None, native=False, **kwargs)[source]#

Reading functionality from jpg, png, tif format to optical images.

Parameters:
pathPath or list of such

Path(s) to image(s).

timescalar or list of such

User-specified physical times; automatically detected from metadata if ‘None’.

transformationslist of callables

Transformations for 2d images.

nativebool

Keep the data type resulting from the transformations (the integers of the file, e.g. 8-bit or 16-bit, unless a transformation converts the type) instead of converting to float in the end. The conversion carries no further information, but takes 8 (8-bit) or 4 (16-bit) times the memory. Use Image.as_float where floats are needed. Only for single paths. keyword arguments: date (datetime): custom datetime; otherwise read from metadata color_space (str): custom color space; RGB is assumed otherwise any arguments accepted by Image

Returns:
OpticalImage (or list of such): converted image, list of such, or
space-time image, depending on the flag ‘series’.