Bit hsl and hsi – National Instruments Image Acquisition Software User Manual

Page 46

Advertising
background image

Appendix A

StillColor

©

National Instruments Corporation

A-9

NI-IMAQ User Manual

used if you are performing averaging on your image. For example,
averaging an image 16 times requires four extra bits (16 =

) to represent

the increased dynamic range. In this case, using the 16-bit representation
may increase the dynamic range of your image.

Luminance, Intensity, Hue, or Saturation are defined using the Red, Green,
and Blue values in the following formulas:

Luminance = 0.299

×

Red + 0.587

×

Green + 0.114

×

Blue

Intensity = (Red + Green + Blue) / 3

Hue = ATN2 (Y, X)

where

Y = (Green - Blue) /

and

X = (2

×

Red - Green - Blue) /

Saturation =

where

Y = (Green - Blue) /

and

X = (2

×

Red - Green - Blue) /

32-Bit HSL and HSI

You can also pack the three 8-bit Hue, Saturation, and Luminance planes
(HSL) or the three Hue, Saturation, and Intensity planes (HSI) in one array
of 32-bit integers, which is equivalent to the 32-bit RGB representation.

2

4

2

6

X

2

Y

2

×

2

6

UM.book Page 9 Monday, July 13, 1998 9:49 AM

Advertising