Page 1 of 2
Clipped pixels
Posted: June 8th, 2015, 12:19 pm
by Charles2
Set Shadow clip at 0 in Preferences.
Color | Extract channel
Extracting red, green, and blue channels successively, the preview for a certain shot shows many clipped pixels, but the result shows few clipped pixels. Intended behavior?
And apparently, a pixel is clipped if any of R,G,B is 0.
Re: Clipped pixels
Posted: June 9th, 2015, 1:16 am
by tomczak
I think that the reason may be that clipping warning operates on HSV-V channel: shadows clip when HSV-V=0, which also means that all three RGB channels for that pixel also need to be zero. There may be more shadow pixels in each of the RGB channels that are zero just in that channel, but non-zero in at least one of the two others.
With highlights clipping this is different as HSV-V=255 happens when any of RGB channels is maxed out, which indicates clipping in at least one RGB channel, not necessarily all three of them (which is great).
Both cases, shadow and highlights clipping done on HSV-V make a lot of practical sense to me: I care about single channel highlight clipping much more then single channel shadow blocking.
Here is an applet that can illustrate the relationship between HSV and RGB channels when they go to zero or max values:
http://colorizer.org/
Re: Clipped pixels
Posted: June 9th, 2015, 1:28 am
by Charles2
tomczak wrote:I think that the reason may be that clipping warning operates on HSV-V channel: shadows clip when HSV-V=0, which also means that all three RGB channels for that pixel also need to be zero. There may be more shadow pixels in each of the RGB channels that are zero just in that channel, but non-zero in at least one of the two others.
I should make it clear that in this case the clipped pixels are in the shadows -- and the oddity is that many more are shown clipped in the preview window than in the result.
Re: Clipped pixels
Posted: June 9th, 2015, 7:37 am
by jsachs
Sorry, the description of shadow clipping was incorrect. A shadow pixel is clipped only if the average of the three channels is less than the threshold - not when any individual channel is less than the threshold. It is normal for a single channel to be zero for images with very saturated dark colors. For highlights, a pixels is clipped if any channel is clipped.
Re: Clipped pixels
Posted: June 9th, 2015, 10:35 am
by tomczak
So for a shadow pixel, if the threshold is set to the default zero, if any of the RGB channel values for this pixel is not zero, the pixels is not clipped?
Re: Clipped pixels
Posted: June 9th, 2015, 11:12 am
by jsachs
Yes, although technically, the average can still be zero through round-off if the channels sum to 2 or less.
This can be changed if it makes more sense to clip on any channel being zero, but that's the way it works now. Shadow clipping on any channel being zero would clip any fully saturated color in the HSV color space, regardless of brightness, so this does not correspond to the normal concept of shadow clipping. The other option to clip shadows on HSV value (i.e. on the maximum of the 3 channels).
Re: Clipped pixels
Posted: June 11th, 2015, 5:36 am
by tomczak
I think that the blocking warning for shadows as average of RGB works well as it is. Clipping shadows based on HSV-V may be even better, but I'm not sure which one is more practical. Blocking shadows as any RGB channel goes to the threshold value, may not be such a good idea, as Jonathan explained.
Trying to understand it better, I set shadow blocking threshold to pixel value=20 and run it on a test image that consist of 33 wedges - gray as well as a single R,G,B saturated colour (with a smooth gray gradient on top), each differing by 8 pixel value, to see what happens:
It seems to me that for fully saturated dark primary colours (which probably rarely happen in nature), the shadow clipping based on average will clip some more pixels than the straight HSV-V would (you could use Readout tool to see what clips). Neutral gray clips at V=20, as expected, but R,G,B saturated patches clip at 60 (since the other two channels are zero, the average is 20).
Re: Clipped pixels
Posted: June 11th, 2015, 5:51 am
by tomczak
Another nit-picking observation: if highlight clipping is set to 255, the pixels that are e.g. 255,0,0 (saturated bright red), clip, but the green and blue (0,255,0 and 0,0, 255) don't - the threshold need to be 254 and 253 for them to clip. Why?
Re: Clipped pixels
Posted: June 11th, 2015, 6:08 am
by jsachs
Clipping is actually based on the data sent to the monitor and not the original image data, so it can be affected slightly by the choice of monitor profile. If you set monitor profile to None, it will clip accurately.
Re: Clipped pixels
Posted: June 11th, 2015, 8:20 am
by tomczak
Thanks, it does.
p.s. To change Monitor Profile to None, I also needed to change On Startup to Ignore... otherwise it didn't budge.