Saturation in RGB? - AVS Forum
Forum Jump: 
 
Thread Tools
post #1 of 6 Old 01-19-2008, 08:40 PM - Thread Starter
AVS Special Member
 
alluringreality's Avatar
 
Join Date: Jul 2006
Posts: 3,197
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 44 Post(s)
Liked: 38
HCFR has a "saturation scale" measurement. For video levels of 16 to 235, how would you calculate 25%, 50%, and 75% saturation in RGB? Would the following be correct for a 100% luminance red?

0% sat - 235, 235, 235
25% sat - 235, 180, 180
50% sat - 235, 126, 126
75% sat - 235, 71, 71
100% sat - 235, 16, 16


If the above is correct, would the following be correct?

50% saturation, 75% luminance red - 180, 98, 98


Generally I'm not sure the "view images" option in HCFR is working correctly. 0% saturation is showing red, green, and blue all equal like a 50% gray, but 100% saturation is showing 255, 0, 0 for 100% red saturation even though I have 16-235 set.
alluringreality is offline  
Sponsored Links
Advertisement
 
post #2 of 6 Old 01-31-2008, 04:56 AM
Member
 
Georges G's Avatar
 
Join Date: Oct 2006
Posts: 128
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Hello
Quote:
Originally Posted by alluringreality View Post

HCFR has a "saturation scale" measurement. For video levels of 16 to 235, how would you calculate 25%, 50%, and 75% saturation in RGB? Would the following be correct for a 100% luminance red?

0% sat - 235, 235, 235
25% sat - 235, 180, 180
50% sat - 235, 126, 126
75% sat - 235, 71, 71
100% sat - 235, 16, 16

No, this is not correct. In 0-255 mode, the 0% sat is not (255,255,255). The 0% sat for a color is the gray level which have exactly the same global luminance than corresponding 100% saturated color. For red, the series is the following:

0% sat - 126,126,126
25% sat - 171,111,111
50% sat - 204,92,92
75% sat - 231,67,67
100% sat - 255,0,0

The gray level changes for each color. The darkest is blue, whose 0% sat level is 84,84,84 and the lightest is yellow, with 244,244,244.

Quote:


If the above is correct, would the following be correct?

50% saturation, 75% luminance red - 180, 98, 98

In 16-235 mode, the right values should be the following, for red:

0% sat - 125,125,125
25% sat - 163,111,111
50% sat - 191,95,95
75% sat - 214,73,73
100% sat - 235,16,16

Unfortunately, there is a bug in V2.0, the 16-235 flag is not taken into account for saturations. I'm working on it, it will be fixed in next version (coming very soon).
Quote:


Generally I'm not sure the "view images" option in HCFR is working correctly. 0% saturation is showing red, green, and blue all equal like a 50% gray, but 100% saturation is showing 255, 0, 0 for 100% red saturation even though I have 16-235 set.

Yes, in this particular case, it is true, you found a real bug. Thank you for your help !

Georges
Georges G is offline  
post #3 of 6 Old 01-31-2008, 08:08 AM
AVS Special Member
 
hwjohn's Avatar
 
Join Date: Oct 2006
Location: Down by the river
Posts: 1,018
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by Georges G View Post


No, this is not correct. In 0-255 mode, the 0% sat is not (255,255,255). The 0% sat for a color is the gray level which have exactly the same global luminance than corresponding 100% saturated color. For red, the series is the following:


Georges

Georges,
So, the problem with our original calculations was that we were allowing luminance as well as saturation to fluctuate?

In other words, we must hold luminance constant while we vary the saturation, correct?

AVS HD 709 - Free calibration disks
The 2007 Patriots: 18 -1
Tom who?
"...the small of napalm in the evening breeze, as I crouch behind a shopping cart in the parking lot..." - The Mall Ninja
hwjohn is offline  
post #4 of 6 Old 01-31-2008, 08:44 AM - Thread Starter
AVS Special Member
 
alluringreality's Avatar
 
Join Date: Jul 2006
Posts: 3,197
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 44 Post(s)
Liked: 38
I suppose holding luminance for each of 0%, 25%, 50%, 75% would make sense, but I thought 100% red luminance was 0.213 for 709. I don't get where the gray comes from because that seems close to 0.5 as far as I can tell.
alluringreality is offline  
post #5 of 6 Old 01-31-2008, 10:01 AM
Member
 
Georges G's Avatar
 
Join Date: Oct 2006
Posts: 128
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by alluringreality View Post

I suppose holding luminance for each of 0%, 25%, 50%, 75% would make sense, but I thought 100% red luminance was 0.213 for 709. I don't get where the gray comes from because that seems close to 0.5 as far as I can tell.

Yes, it looks strange, but it isn't. If you look at real measures, primary colors and gray scale, you will find blue Y near 30% gray Y, red Y around 50% gray Y, and green Y around 80% gray Y. And if you sum those three Y values, you obtain 100% white Y value (a little less if you sum the three gray levels). But if you add 30%+50%+80%, you do not have 100%, you have 160 ! What's wrong ? In reality, it's simple. Between those two scales, percent levels and Y levels, you have a gamma factor. This factor in 0.45 in a sense, 1/0.45 in the other (the famous 2.22 gamma).

Red is 0.213, and 0.213 ^ 0.45 = 0.499, ie 50%. This is it

In the other sense: 30% ^ 2.22 + 50% ^ 2.22 + 80% ^ 2.22 is near 100% (90% more exactly: this is it too ).

Clearly, Y value for Red is 0.213 * YWhite. To obtain white, you send a RGB value (255,255,255). To obtain a gray whose Y measured value will be 0.213 * YWhite, the RGB triplet has three identical values which are 255 * ( 0.213 ^0.45 ), ie (127,127,127) in Rec709 (in Rec601 it is very little different). Pure red is of course (255,0,0), and measured Y value for both colors must be the same (not absolutely perfectly, because we do not have decimals in RGB triplets...). For intermediate saturations, well, it's some little maths

I hope it will make it clear now

Georges
Georges G is offline  
post #6 of 6 Old 01-31-2008, 10:28 AM
AVS Special Member
 
hwjohn's Avatar
 
Join Date: Oct 2006
Location: Down by the river
Posts: 1,018
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by Georges G View Post

Yes, it looks strange, but it isn't. If you look at real measures, primary colors and gray scale, you will find blue Y near 30% gray Y, red Y around 50% gray Y, and green Y around 80% gray Y. And if you sum those three Y values, you obtain 100% white Y value (a little less if you sum the three gray levels). But if you add 30%+50%+80%, you do not have 100%, you have 160 ! What's wrong ? In reality, it's simple. Between those two scales, percent levels and Y levels, you have a gamma factor. This factor in 0.45 in a sense, 1/0.45 in the other (the famous 2.22 gamma).

Red is 0.213, and 0.213 ^ 0.45 = 0.499, ie 50%. This is it

In the other sense: 30% ^ 2.22 + 50% ^ 2.22 + 80% ^ 2.22 is near 100% (90% more exactly: this is it too ).

Clearly, Y value for Red is 0.213 * YWhite. To obtain white, you send a RGB value (255,255,255). To obtain a gray whose Y measured value will be 0.213 * YWhite, the RGB triplet has three identical values which are 255 * ( 0.213 ^0.45 ), ie (127,127,127) in Rec709 (in Rec601 it is very little different). Pure red is of course (255,0,0), and measured Y value for both colors must be the same (not absolutely perfectly, because we do not have decimals in RGB triplets...). For intermediate saturations, well, it's some little maths

I hope it will make it clear now

Georges

Excellent, makes sense now. Thanks Georges!

AVS HD 709 - Free calibration disks
The 2007 Patriots: 18 -1
Tom who?
"...the small of napalm in the evening breeze, as I crouch behind a shopping cart in the parking lot..." - The Mall Ninja
hwjohn is offline  
Reply Display Calibration

User Tag List

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off