Fortunately you didn't ask for the Hue-value. That isn't such as easy as Brightness & Saturation.
For Brightness (v) you only have to get the maximum of rgb. So u compare theses three values and the maximum is v.
For saturation u also need the minimum of rgb.
The this algorithm:
if(v != 0) s = ((max-min)/max)*255;
else s = 0;
As u can see both (max & min) have to be float-variables.
But when u tell, for what you need these values, maybe I can help you better.
Best regards
Christian
Maybe somebody can help me with my problems?
Watch out for cameraproblems.
p.s.: To get the rgb:
Make a handle on your picture, get the pixel and the use
TInt r = pixel->Red();
TInt g = pixel->Green();
TInt b = pixel->Blue();