Date post: | 08-Jan-2017 |
Category: |
Engineering |
Upload: | vishnu-rc-vijayan |
View: | 41 times |
Download: | 3 times |
HSL & HSV COLOUR MODELS
- SALIL SULEY (66)DENCIN VAZHAPPILLY (67)
ROHAN VEMULA (68)VISHNU RC VIJAYAN (69)
SHREE WARANG (70)MAHESHKUMAR YADAV (71)
HSL COLOUR MODEL
Hue, saturation and lightness
Most commonly used cylindrical coordinate system for representing RED GREEN BLUE color model
It was developed in 1970 for computer graphics applications, color pickings and image editing softwares
TERMINOLOGIES
Hue : The angle around the central vertical axis corresponds to hue
Saturation : The distance from the central axis corresponds to saturation. (0%-Grey & 100%-Full sat)
Lightness :The distance along the central axis corresponds to lightness. (0%-Black & 100%-White)
PRINCIPLES
HSL tries to be more intuitive than the general Cartesian color representation
HSL helps us to bridge the RGB color model , understood by computers, to mix colors more like humans do
HSL COLOUR ATTRIBUTESHue:- It refers to pure spectrum of colours, without tint
or shade. colours with same hue are distinguished with their lightness.eg- light blue
Saturation:- measurement of how different from pure grey the colour is perceived saturation depends on the surrounding in which colour is seen
Luminosity:-brightness of area judged relative to brightness of similarly illuminated area which appears to be bright
HSL SCALEo Hue is represented as angle of colour circle, given as unit less number.
Red=0=360, Green=120,Blue=240
o Saturation & luminosity is represented in percentage, o 100% is full saturationo 0% is shade of greyo 100% luminosity is whiteo 50% luminosity is normalo 0% luminosity is black
HSL REPRESENTATION HSL is represented as two cones within the
cyclinder
LUMINOSITY
SATURATION
100 075 3350 10025 330 0
HSL AND RGB CONVERSION
HSL, HEX AND RGB CO-ORDINATES FOR PROMINENT COLOURS
ADVANTAGES OF HSL
The HSL model keeps the light and saturation aspects of the color model unique from each other, it tends to be more useful for those wishing to take advantage of these attributes in their work
Light can range from white to black in a HSL model (with the desired color in between), while the similar HSV color model can only range from the desired color to black
It is user-oriented. Therefore colour selection and image colour adjustment can be done faster with greater ease
DISADVANTAGES While choosing a single color, they ignore much of the complexity of
color appearance
Because hue is a circular quantity, represented numerically with a discontinuity at 360°, it is difficult to use in statistical computations or quantitative comparisons
Analysis requires the use of circular statistics
Since computational capacity has increased tremendously over the past few decades, better alternative colour models are available for greater visual accuracy and perceptual relevance
HSV COLOUR MODEL
HSV are the most common cylindrical-coordinate representations of points in an RGB colour model
HSV stands for hue, saturation, and value
Hue, Saturation, Value or HSV is a colour model that describes colours (hue or tint) in terms of their shade (saturation or amount of gray) and their brightness (value or luminance)
PRINCIPLE Cylindrical geometries with hue, their angular dimension, starting at
the red primary at 0°, passing through the green primary at 120° and the blue primary at 240°, and then wrapping back to red at 360°
The two representations rearrange the geometry of RGB in an attempt to be more intuitive and perceptually relevant ,based on the color wheel
Saturation (s) of the color ranges from 0 to 100%. Also sometimes, it called the "purity". The lower the saturation of a color, the more "grayness" is present and the more faded the color will appear
Value (v) of the color ranges from 0 to 100%. It is a nonlinear transfor(v), the brightness mation of the RGB color space. Note that HSV and HSB are the same
HSV SCALE Hue angles: 0=Red, 120=Green, 240=Blue. Saturation: 0 at the centre (no saturation,
which makes no real colouring) to 1 at the edge (full saturated colours).
Value: From 0 at the bottom (no colour, or black) to 1 at the top.
PROGRAM TO CONVERT RGB TO HSV
// r,g,b values are from 0 to 1 // h = [0,360], s = [0,1], v = [0,1] // if s == 0, then h = -1 (undefined)void RGBtoHSV( float r, float g, float b, float *h, float *s, float *v ) { float min, max, delta; min = MIN( r, g, b ); max = MAX( r, g, b ); *v = max; // v delta = max - min; if( max != 0 ) *s = delta / max; // s else {
// r = g = b = 0 // s = 0, v is undefined *s = 0; *h = -1; return; } if( r == max ) *h = ( g - b ) / delta; // between yellow & magenta else if( g == max ) *h = 2 + ( b - r ) / delta; // between cyan & yellow else *h = 4 + ( r - g ) / delta; // between magenta & cyan *h *= 60; // degrees if( *h < 0 ) *h += 360;}
REFERENCES
Websites
1. https://en.wikipedia.org/wiki/HSL_and_HSV2. www.lps.usp.br/hae/apostila/basico/HSI-wikipedia.pdf3. www.ics.uci.edu/~majumder/vispercep/colviz.pdf4. www.slideshare.net/EngHaitham/color-models-42915934