The hyperspec2srgb function creates a sRGB colour image from a hyperspectral image matrix. For example from hyperspectral images of the spectral simulation tool LUMOS.
Usage:
srgb = hyperspec2srgb(im,lam)
Where:
Parameter | Description |
srgb | Is the returned srgb image colour matrix. |
im | Is the hyperspectral image input struct or matrix: – struct containing the field lambda and image – 3-dim matrix: rows \times columns \times wavelengths |
lam | Defines the wavelengths of the hyperspectral image, vector. |
Examples
Plot sRGB image derived from hyperspectral image data:
IM = readhyperspec('hyperspec.mat') srgb = hyperspec2srgb(IM); image(srgb) axis equal off
See also: readhyperspec
Result:
Reference
Multimedia systems and equipment - Colour measurement and management - Part 2-1: Colour management - Default RGB colour space - sRGB. International Electrotechnical Commission (IEC), Geneva, Switzerland, 1999.