RGB_to_HSI - FORMULAE RGB to HSI Conversion: First, we...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
FORMULAE RGB to HSI Conversion: First, we convert RGB color space image to HSI space beginning with normalizing RGB values: R r RGB = ++ , G g = + + , B = b . Each normalized H, S and I components are then obtained by, () 1 1 2 2 0.5 cos rg rb h rbgb  ⋅−+−  =   −+ − −   [0, ] h π for bg 1 1 2 2 2c o s h =− −+− − [, 2] h for > ) , , min( 3 1 b g r s = ; [0,1] s ( ) /(3 255) iRGB =++ ; i . For convenience, h, s and i values are converted in the ranges of [0,360], [0,100], [0, 255], respectively , by: 180 / Hh ; and 100 Ss 255 Ii = × . HSI to RGB Conversion: /180 hH =⋅ ; ; i 100 / S s = 255 / I = ) 1 ( s i x = + = h h s i y 3 / cos ) cos( 1 ); ( 3 y x i z + = when 3 / 2 < h , b x = ; y r = and . z g = when 2 3 / 4 3 / < h , 3 / 2 = h h , and x r = ; y g = and . z b = when 2 3 / < h 4 , 3 / 4 = h h , and x g = ; y b = and . z r = The result r, g and b are normalized values, which are in the ranges of [0,1], therefore, they should be multiplied by 255 for displaying.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example: An image is shown here: With RGB values as: (100,100,100) (150,0,0) (0,150,0) (255,0,0) (255,255,255) (0,0,0) (100,150,200) (0,0,255) (100,200,150)    RGB to HSI Conversion: To compute HSI value of pixel (100,150,200) 1. Normalize: 0.222 R r RGB == ++ , 0.333 G g , 0.444 B b 2. Here b > g, so we compute H value by equation:
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

RGB_to_HSI - FORMULAE RGB to HSI Conversion: First, we...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online