Quaternion Function Reference

imreadq

Read an image file into a quaternion array.

Syntax

A = imreadq(filename, fmt)

Description

imreadq reads an image file into a pure quaternion array. It supports the same parameter profiles as the MATLAB® function imread, but returns a quaternion array with elements of type uint8 or uint16 depending on whether the image file contained 8-bit or 16-bit samples.

The function supports only RGB images, and returns a pure quaternion array. The parameter profiles supported are the same as for the MATLAB® function imread but not all parameter profiles may make sense. This is because the MATLAB® function is used to perform the file read, and the data is then converted into pure quaternion format. No scaling or casting of the component values is done.

The function supports the same image file types as the MATLAB® function imread.

Examples

>> A = imreadq('random.png')
 
A = 128x128 pure quaternion array with uint8 components

See Also

MATLAB® function: imread
QTFM functions: imwrite, image

© 2008-2013 Stephen J. Sangwine and Nicolas Le Bihan

License terms.