frudawski

hyperspec2srgb

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:

ParameterDescription
srgbIs 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
lamDefines the wavelengths of the hyperspectral image, vector.

Examples

Plot sRGB image derived from hyperspectral image data:

load hyperspec
srgb = hyperspec2srgb(hyperspec);
image(srgb)
axis equal off

Result:

Reference

IEC 61966-2-1:1999: 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.

Leave a comment

* I accept the use of cookies as well as the terms in the privacy policy. I accept that data provided by me is processed and saved. I know that comments are saved and published after review.