HueSaturateLuminosity (HSL): Hue is a color range of degree from 0 to 360 which describe a pure color in angular quantity. Saturate is shade of gray to full color. Amount of saturation of color is known as chroma. Higher value of chroma is clear and bright. The strongest magnitude is value and its range correspond to brightness and balanced magnitude corresponds to the intensity. Hue color describe the pure color whereas saturate values determine pure color range strength and luminosity describe pure color range. The maximum saturation is at a medium grey intensity. A color with 100% saturation yields purest color and 0% yields grayscale. A color with 0% luminosity is black and 100% luminosity yields bright color.
Value of angles below are hue values on the color wheel.
- 0 degree – Red
- 60 degree – Yellow
- 120 degree – Green
- 180 degree – Cyan
- 240 degree – Blue
- 300 degree – Magenta
- 360 degree – Red-Magenta
RGB triplet saturation equation shown below where max, and min is calculated of between Red, Green, and Blue channel. It represents the strength of the color and the radius of the cone. RGB consist of equal amount of white light. When max rgb component is subtract with minimum RGB component and divided by max RGB component than grayscale intensity is eliminated. Thus, this new color has no white light and saturated and represent a single wavelength.
The RGB colors made stronger by increasing the saturation in HSL color space when converted from RGB to HSL and HSL to RGB.
RGB To HSL And RGB To HSLThe Hue, Saturation, and Intensity elements control wider color range for image enhancement. Video stream from camera is format of original RGB color space than transformed to HSL color space. In HSL color space, current Hue, Saturation, and Luminosity is linearly updated by multiplying coefficient values to each of the component to make image colors brighter and more colorful. After applied color gains to HSL components than HSL color space is converted back to RGB color space. In this process, the resulting enhanced image colors looks natural and brighter after applying multiplicative gain(weight) control to each HSL component.
The implemented rgb to HSL color space in video color processing module uses HSL algorithm, and it has been designed with a standard Xilinx AXI4 streaming interface, so that it can be inserted as a module within any image processing pipeline.
First logic calculates maximum and minimum value of RGB values. The max and min RGB value is calculated according to logic implementation as shown in Figure Below.
Hue is calculated by determining the hue fraction from greatest RGB channel value. If current max channel color is Red than Hue numerator will be set to Green subtract Blue only if Green is greater than Blue else Blue is subtracted from Green and Hue degree set to 0 to 85.
If current channel max color is Green than Hue numerator will be set to Blue subtract Red only if Blue is greater than Red else Red is subtracted from Blue and Hue degree would be 86-171.
Similarly, if current channel max color is Blue than Hue numerator will be set to Red subtract Green only if Red is greater than Green else Green subtracted from Red and Hue degree would be 172-255.
Hue denominator would be RGB delta.
Once Hue fraction values are calculated than fraction values would be added to Hue degree which would give final Hue value. Saturate value is calculated from difference between RGB max and min over RGB max whereas Lightness value RGB max value.
The module has clock and reset ports. Port iRGB consist of Red, Green, and Blue color components with valid signal, which is used to convert to RGB pixels to HSL pixels.
The simulation results of RGB channel conversion to HSL color space is presented in wave diagram Figure below.
The implemented HSL rgb color space in video color processing module uses HSL to RGB conversion algorithm, and it has been designed with a standard Xilinx AXI4 streaming interface, so that it can be inserted as module within any image processing pipeline.
HSL to RGB module convert input HSL to RGB color space. The module has clock and reset ports. Port iRGB consist of Red, Green, and Blue RGB channels with valid signal, which is used to convert to RGB pixels to HSL pixels.
Comments