zebra show overexpose better when rgb zebra is used - page 2 - General Discussion and Assistance - CHDK Forum

zebra show overexpose better when rgb zebra is used

  • 28 Replies
  • 8886 Views
Re: zebra show overexpose better when rgb zebra is used
« Reply #10 on: 01 / May / 2011, 13:34:12 »
Advertisements
Another RGB Zebra oddity:

I don't know when this happened, which build number this transposition of code crept into, but now the RGB Zebra mode displays these colors when the following 2-channels each are blown-out:

R+B = Y
R+G = M

They've been reversed. Since I've not used RGB Zebra due to it failing to display the CYM colors unless the over-exposure threshold is increased far too much, I don't know how long ago the code got switched around like that. It used to be correct. R+B showed M(agenta), and R+G showed Y(ellow).

Since this requires fixing, perhaps someone can fix all the errors this time around? Make it really useful at long last? Would be nice.


Re: zebra show overexpose better when rgb zebra is used
« Reply #11 on: 02 / May / 2011, 06:20:21 »
Bonjour,

I don't know why you are expecting precise zebra but ...


I want photograph hair on sunlight, cosplay with shiny clothes(because it look much better in sun) and only with rgb zebra when no warning is show, i can be sure that the  shine parts of hair or clothes is not overexpose.but if it can 10% more exposure is better.so wy not make it better if its possible. and default zebra is not usefull.

zebra should be precise as possible because even the CMOS BSi Sensor have many noise on ISO 125.when the Sensor is as good as a DSLR, then i have no problem to exposure all 2/3 darker to be sure what i want is not overexpose in important parts

when exposure darker as necessary give you much more noise on the small sensor.So when its possible to get better zebra results give better pictures.

thats same important as a casette player need for record a good levelmeter.A CD recorder need not so good levelmeter because have much better dynamic.



maybe you can tell how chdk formula look in float, so i can compare.thats a1ex write

>R = Y + 1.403V'
>G = Y - 0.344U' - 0.714V'
>B = Y + 1.770U'

but chdk add a value of 2048 to all, this mean +0.5 in red and green values.

in red 5742/4096 is 1.401.thats same as a1ex write.but chdk code add 0.5.

R = Y * 1.401 +0.5
« Last Edit: 02 / May / 2011, 06:23:24 by Bernd R »
Ixus 1000 HS

*

Offline hwntw

  • ***
  • 158
Re: zebra show overexpose better when rgb zebra is used
« Reply #12 on: 02 / May / 2011, 06:47:21 »
 
Quote
so why not make it better if its possible. and default zebra is not useful?
zebra should be precise as possible.
So when its possible to get better zebra results give better pictures.

As a general principle, having a CHDK feature that works well is preferable to one that does not.
I like the attitude of Bernd about Zebra and support him. I hope others do too.
Now that Exmem works with 8Meg on my Ixus 95 Ixus 960 and G9, there is a good opportunity to make Zebra fully functional and usable on these and other models (thanks Whim). I am able to test any coding changes by a Dev.
 I take the point of Reyalp about calibration and I think that calibration generally (colour, lens distortion, etc) is a potentially useful area for CHDK coding efforts.

Best,

Colin
« Last Edit: 02 / May / 2011, 06:51:12 by hwntw »
Ixus 300HS S100


Windows 10

Re: zebra show overexpose better when rgb zebra is used
« Reply #13 on: 03 / May / 2011, 10:44:02 »
I do more tests and i see the +2048 does not change much.

the rgb zebra view code is correct i think in chdk, the reason that colors get earlier overexpose is the Canon colorboost feature.so it happen that red, green, blue reach 240-250 but white only reach 200-220 max.

My Camera have no setting to reduce color satureation.But i find that when i choose in "my colors" Canon menu the setting N "Neutral reduce Color and Contrast" rgb zebra work perfekt.

white reach 240-250 max and other colors too.still the non rgb mode of zebra is wrong and so overexpose is possible, but in N mode this Problem is not so extreme with overexpose colors

@NewbieToobie

What camera you have ?
I think when you do a testshoot of Granger chart and your Camera have a Option my color N then it work ok in rgb zebra.

If you have a option to reduce saturation, you should reduce it until single color of r g b reach same max level as white.
« Last Edit: 03 / May / 2011, 10:46:57 by Bernd R »
Ixus 1000 HS


*

Offline Lebeau

  • ***
  • 187
Re: zebra show overexpose better when rgb zebra is used
« Reply #14 on: 03 / May / 2011, 11:56:14 »
Humm !
I don't know for your cam but mine, when exposed to direct sun, I see an overexposed vertical line on the viewport inline with the sun (ex: when I take a video of a sunrise). Therefore, the zebra is biased by the sensor-to-vide-conversion :(

Re: zebra show overexpose better when rgb zebra is used
« Reply #15 on: 04 / May / 2011, 14:04:11 »
Humm !
I don't know for your cam but mine, when exposed to direct sun, I see an overexposed vertical line on the viewport inline with the sun (ex: when I take a video of a sunrise). Therefore, the zebra is biased by the sensor-to-vide-conversion :(

I of course want not photograph the sun.maybe you do this test.photograph somebody with blond or red hair who stand in the sunlight.the sun is side or behind you, so no photograph direct in sun

with default zebra you see overexpose the shine in hair.with rgb zebra and neutral you get correct expose picture
« Last Edit: 04 / May / 2011, 14:05:42 by Bernd R »
Ixus 1000 HS

*

Offline Lebeau

  • ***
  • 187
Re: zebra show overexpose better when rgb zebra is used
« Reply #16 on: 04 / May / 2011, 15:20:09 »
...with default zebra you see overexpose the shine in hair.with rgb zebra and neutral you get correct expose picture
Now, I understand.

I would first suspect the value of "over".
Code: [Select]
        over = 255-conf.zebra_over;
"over" is compared to viewport pixels to signal overexposure. It use the same "over" for "Y" and "RGB".
Code: [Select]
if (conf.zebra_multichannel)
{
uu = (signed char)img_buf[v];
vv = (signed char)img_buf[v+2];
sel=0;
if (!((conf.zebra_mode == ZEBRA_MODE_ZEBRA_1 || conf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f))
{
if (clip8(((yy<<12) +           vv*5742 + 2048)>>12)>over) sel  = 4; // R
if (clip8(((yy<<12) - uu*1410 - vv*2925 + 2048)>>12)>over) sel |= 2; // G
if (clip8(((yy<<12) + uu*7258           + 2048)>>12)>over) sel |= 1; // B
}
;
buf[s]=buf[s+1]=cls[sel];
buf[s+2]=buf[s+3]=cls[sel];
}
else if (((conf.zebra_mode == ZEBRA_MODE_ZEBRA_1 || conf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f))
buf[s]=buf[s+1]=COLOR_TRANSPARENT;
else
buf[s]=buf[s+1]=(yy>over)?cl_over:(yy<conf.zebra_under)?cl_under:COLOR_TRANSPARENT;
if (buf[s] != COLOR_TRANSPARENT && !zebra_drawn)
zebra_drawn = 1;

Comparing "Y" values and "RGB" values with "over" don't seam to be equivalent and, may be, it's because the "Y" component don't have the same scale (16-240) than "RGB" components (0-255).
en.wikipedia.org YCbCr

Is it sound good?

Re: zebra show overexpose better when rgb zebra is used
« Reply #17 on: 05 / May / 2011, 04:08:55 »
...with default zebra you see overexpose the shine in hair.with rgb zebra and neutral you get correct expose picture
Now, I understand.

I would first suspect the value of "over".
Code: [Select]
       over = 255-conf.zebra_over;
"over" is compared to viewport pixels to signal overexposure. It use the same "over" for "Y" and "RGB".
Code: [Select]
if (conf.zebra_multichannel)
{
uu = (signed char)img_buf[v];
vv = (signed char)img_buf[v+2];
sel=0;
if (!((conf.zebra_mode == ZEBRA_MODE_ZEBRA_1 || conf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f))
{
if (clip8(((yy<<12) +           vv*5742 + 2048)>>12)>over) sel  = 4; // R
if (clip8(((yy<<12) - uu*1410 - vv*2925 + 2048)>>12)>over) sel |= 2; // G
if (clip8(((yy<<12) + uu*7258           + 2048)>>12)>over) sel |= 1; // B
}
;
buf[s]=buf[s+1]=cls[sel];
buf[s+2]=buf[s+3]=cls[sel];
}
else if (((conf.zebra_mode == ZEBRA_MODE_ZEBRA_1 || conf.zebra_mode == ZEBRA_MODE_ZEBRA_2) && (y-x-timer)&f))
buf[s]=buf[s+1]=COLOR_TRANSPARENT;
else
buf[s]=buf[s+1]=(yy>over)?cl_over:(yy<conf.zebra_under)?cl_under:COLOR_TRANSPARENT;
if (buf[s] != COLOR_TRANSPARENT && !zebra_drawn)
zebra_drawn = 1;

Comparing "Y" values and "RGB" values with "over" don't seam to be equivalent and, may be, it's because the "Y" component don't have the same scale (16-240) than "RGB" components (0-255).
en.wikipedia.org YCbCr

Is it sound good?

yes, and its not only the diffrent range.

Maybe you can photograpgh the granger chart that is upload here,and look that no zebra blink in standard zebra.

http://farm6.static.flickr.com/5307/5673254230_96f2049213_b.jpg

You can see many light colors are white now, when you look at the jpg image.
now switch to rgb zebra and do same.image is correct exposure, all colors are here.best you use fast ev switch 1/6 EV chdk setting, so you can change ev fast.

when use mycolors neutral, diffrence is not so much.
it seem happen that Y + U + v in term convert to a color, get more than 256.Y only is below 256.so only the RGB zebra show correct.

you can see when photograph on granger chart too.pure red or green or blue colors, contain  very low Y.
when you are in standard mode you can enhance ev lots until pure red , or  green or blue colors do blink with zebra overexpose warning.

but when you look on image they are large overexpose.sure they are not change to white, but you get texture loss in real world when you use normal zebra.
Ixus 1000 HS


*

Offline Lebeau

  • ***
  • 187
Re: zebra show overexpose better when rgb zebra is used
« Reply #18 on: 07 / May / 2011, 13:35:19 »
I get a look to your jpg and your explanation. Well, I am not sure that clipping is The problem.

I still think that the color transformation process from RAW color space to YCbCr color space for viewport display already clip things. After that, YCbCr to RGB transform is possibly reclipping too.

I think the issue here is: Y is working with luminosity and RGB is including color and saturation therefore the first transformation (RAW rgb -> YCbCr) has already interpret something. Converting YCbCr to sRGB is reinterpreting also.
http://www.couleur.org/index.php?page=transformations#YCbCr

For example, take a russian site, use google translate to translate it in french and then retranslate it in english. I am not so sure it will be significant (meaningfull) :) May be you will start with a romantic text to finish with a conflictual editorial. :(

May be a RAW-based warning could be more useful. Like percentage of raw cells that is not within a raw range (exponentially corrected). A raw-based zebra could impair performance ?

P.S.: This image (http://en.wikipedia.org/wiki/File:AdditiveColor.svg) will zebra black and white areas in YCbCr and will zebra all the image area in RGB.
« Last Edit: 07 / May / 2011, 13:49:13 by Lebeau »

Re: zebra show overexpose better when rgb zebra is used
« Reply #19 on: 08 / May / 2011, 15:02:19 »
I get a look to your jpg and your explanation. Well, I am not sure that clipping is The problem.

I still think that the color transformation process from RAW color space to YCbCr color space for viewport display already clip things.

I do some test in windows paint.Here i define  a color 0 red 255 green blue.

Now i see a output

brightness 120
saturation 240
tone 80

Is that YUV ?

If so, then if zebra check only y channel, a overexpose can not detect, because brightness is only 120

Quote
P.S.: This image (http://en.wikipedia.org/wiki/File:AdditiveColor.svg) will zebra black and white areas in YCbCr and will zebra all the image area in RGB.

You mean with default zebra mode the red green and blue area is not zebra, but in rgb zebra mode it work better ?

this happen with my cam.And thats the reason i think that only use Y channel in zebra is not so good as using u v too, for calculate overexpose
only when i use rgb zebra then pure colors get overexpose.but more clear you can see when you test zebra on a pure color object, because Monitor contain dots, and camera record average thru aliasing filter.
Ixus 1000 HS

 

Related Topics