PDA

View Full Version : How to Convert a picture into its RGB and HSI values?



Unregistered
November 20, 2003, 06:57:03
Hi,

I am stuck with some problems.

1) I need to extract the RGB and HSI values from a picture but I am unsure of how to go about it using c.

2) I am also unsure on how to specify a minimum saturation value for each pixels so that I can remove noise levels in my picture.

I am using a matrox card and I am trying to eliminate noise in an image i obtained by subtraction.

Any help will be appreciated.

agung99
August 18, 2004, 18:48:42
I = (R + G +B)/3
S = 1 - 3(min(R,G,B))/(R+G+B)
H = acos(0.5*((cR-cG)+(cR-cB)))/sqrt(pow((cR-cG),2)+(cR-cB)*(cG-cB));
if(Blue > Green)

You should read the geometry of IHS first

agung99
August 18, 2004, 18:49:49
I = (R + G +B)/3
S = 1 - 3(min(R,G,B))/(R+G+B)
H = acos(0.5*((R-G)+(R-B)))/sqrt(pow((R-G),2)+(R-B)*(G-B));
if(Blue > Green)
h = 2.0*3.14159265 - h;
You should read the geometry of IHS first