Dynamic Range and Strange Behaviour

Moderator: jsachs

Marpel
Posts: 693
Joined: September 13th, 2009, 3:19 pm
What is the make/model of your primary camera?: Nikon D810
Location: Port Coquitlam, British Columbia

Dynamic Range and Strange Behaviour

Post by Marpel »

4592-crop.jpg
4592-crop.jpg (8.43 KiB) Viewed 5335 times
4592.jpg
4592.jpg (10.19 KiB) Viewed 5337 times
I have been editing some early morning shots, taken on a Nikon and initially RAW processed in NX2. The extent of the NX2 processing was to do a little WB, turn off sharpening and extend the range so the histogram showed a full range. In the photo of interest, the channels, of course were not perfectly equal so the range was set to the edge of the whichever channel extended the farthest to ensure all channels were left unclipped. This was done as best as possible by eye as I find NX2 somewhat difficult to do this precisely. At the very least, I am confident there was no complete clipping at either end. I then saved the image as a 16 bit Adobe RGB TIFF and opened it in PWP (ver. 5).

I accessed the Levels and Colour Transform and the Dynamic Range slider showed 31.8% and 98.4%. As I was surprised the shadow end was so far over, I used the Readout Tool and measured the piling along the waterline towards the right side and took multiple readings within the piling, all of which showed 0,0,0. The measured area was about 18 X 30 pixels in size. My first questions are - How large/small an area does PWP measure to determine the initial Dynamic Range? and If the RGB channels are not equal so, say, Red is farther towards one end, for instance the shadow end, than the other two, does PWP recognize this and place the Dynamic Range reading to ensure this channel is not clipped or does it find the first spot where all channels are clipped? I would have thought it would be the former, however, I find NX2 will show clipping at the shadow end when even one channel is clipped while at the highlight end it will only show clipping when all channels are clipped, so I am unsure about this in PWP.

Another issue - I decided to only set the highlight end to 100% and left the shadow end at 31.8%. Once complete, I happened to notice a strange tone in the same area of the pilings that I had been using the Readout Tool. It was initially black, but changed to a strange brown in the finished image. As I thought it was a bug/problem related to the use of the Readout Tool, I closed the initial image, closed and re-opened PWP and did the same Transform (only extending the highlight to 100%) without using the Readout, but the result was the same change in colour. The even weirder thing is the change took place in the dark end, not the highlight end.

I have attached two images (if everything works out, I have not tried this before). One is the reduced full size image, to give you an idea of the size relationship of the pilings and the second is a crop of the pilings with the strange colour. Although the original is 16 bit Adobe RGB TIFF, these two are JPEGs.

Marv
jsachs
Posts: 4219
Joined: January 22nd, 2009, 11:03 pm

Re: Dynamic Range and Strange Behaviour

Post by jsachs »

When computing the dynamic range in Levels and Color, the darkest and lightest 0.01% of the pixels are essentially ignored - this helps avoid locking onto individual pixels that are white or black due to dust, stuck pixels, etc.

Adjustment is made using the HSV V channel or HSL L channel, not on the individual RGB channels so there is no clipping.

If you take black pixels and increase their brightness from 0% to 31%, they will become red. This happens because hue and saturation in either HSV or HSL are undefined for black so arbitrarily the hue is set to zero which corresponds to red.

You can avoid all of these complications by using the Brightness Curve transformation and stretching the histogram to fill the full range (or whatever subset of the full range you want). Selecting histogram expansion (in the curve options) lets you see parts of the histogram that have very low levels so you don't accidentally clip highlights or shadows.
Jonathan Sachs
Digital Light & Color
Marpel
Posts: 693
Joined: September 13th, 2009, 3:19 pm
What is the make/model of your primary camera?: Nikon D810
Location: Port Coquitlam, British Columbia

Re: Dynamic Range and Strange Behaviour

Post by Marpel »

Thanks Jonathan,

Although I understand the first part of your response, I am not sure of some of the rest.

After doing some math, it appears the area that I measured (about 18 X 30 pixels) with the Readout Tool, was indeed less than 0.01% (the image is just over 6000 X 4000 = 24,000,000 pixels and 0.01% is 2,400 pixels or 60 X 40 in size - interesting, seems to be a rather large area, but I guess because the image is relatively so much larger....), so you were bang on there. And, thanks for the suggestion to use an expanded histogram in the Brightness Curve to ensure against inadvertently clipping pixels.

However, your reference to taking black pixels and going from 0 to 31% confuses me, because I did not change the dark end of the image, all I did was leave the 31.8% as it was and moved the highlight end slider from 98.4% to 100%. The result was those black pixels, which were apparently ignored in Levels and Colour, being changed to a lighter, brownish colour, as in the cropped image in the attachment, which does not seem logical.

Marv
jsachs
Posts: 4219
Joined: January 22nd, 2009, 11:03 pm

Re: Dynamic Range and Strange Behaviour

Post by jsachs »

Levels and Color applies a curve that sets the dynamic range of the output image to exactly what you ask for - namely 31% to 100%, so any pixels darker than what it detects as the black point are lightened. Normally this is not an issue, but if it picks the wrong black or white point there can be artifacts.
Jonathan Sachs
Digital Light & Color
Marpel
Posts: 693
Joined: September 13th, 2009, 3:19 pm
What is the make/model of your primary camera?: Nikon D810
Location: Port Coquitlam, British Columbia

Re: Dynamic Range and Strange Behaviour

Post by Marpel »

Thanks Jonathan for the follow-up reply.

Although I think I understand your explanation, it seems bizarre that increasing the DR at the light end by only 1.6% can have such a marked effect on some of the darkest pixels in the image.

However, thanks for your patience and your explanations.

Marv
den
Posts: 856
Joined: April 25th, 2009, 6:33 pm
What is the make/model of your primary camera?: Canon EOS-350D/Fuji X100T
Location: Birch Bay near Blaine, WA USA

Re: Dynamic Range and Strange Behaviour

Post by den »

Would it be possible to make your raw file available? ...perhaps via yousendit.com and advising the url?

My curiosity is aroused!!!
jsachs
Posts: 4219
Joined: January 22nd, 2009, 11:03 pm

Re: Dynamic Range and Strange Behaviour

Post by jsachs »

Because of the way Levels and Color works, the dark end is being increased by 31%. Levels and Color works by computing a brightness curve automatically and then applying it to the image. The curve is horizontal from 0 to the black point it determines automatically so everything below the black point it discovers is lightened. Otherwise there would be a big kink in the curve which could produce other shadow artifacts. If you create your own curve you can avoid all the pitfalls of automatic black and white point detection.
Jonathan Sachs
Digital Light & Color
Marpel
Posts: 693
Joined: September 13th, 2009, 3:19 pm
What is the make/model of your primary camera?: Nikon D810
Location: Port Coquitlam, British Columbia

Re: Dynamic Range and Strange Behaviour

Post by Marpel »

Den,

I don't have a problem supplying you with the raw file, however, the only time I have ever used yousendit, the url of the receiver was given to me and I used it to send the file. I presume, if I am providing a url, that I would have to set up an account or something like that?
The other thing is, wouldn't the issue with this particular image be related to how I processed it in NX2 before bringing it into PWP (so the DR was at 31.6 and 98.4 upon arrival to PWP)? And wouldn't you have to emulate the processing to arrive at those settings? I may be way off on that hypothesis though.
Anyway, if you can give me some guidance on the yousendit thing, I would be happy to send you the raw file.

Jonathan,

Yeah, still confused by your explanation. I just don't see how the image would change as it did when I did not move the shadow end slider and only moved the highlight end from 98.4 to 100. But that's probably my untechnical mind looking at things.

Marv
couman
Posts: 82
Joined: April 25th, 2009, 8:44 am

Re: Dynamic Range and Strange Behaviour

Post by couman »

Marv,

I'm not sure I fully understand the problem, but it might be helpful, when making adjustments to the brightness curve, if you switch to the double histogram mode. In that mode, you can observe both the input and output histograms as you make changes. Also note that you can add control points to "pin" portions of the histogram so that they do not change. [If you don't add control points, shifting the upper end of the histogram will also shift the lower end in the same direction.] Finally, you may want to look at the difference in behavior between use of a smooth curve and that obtained when a straight line is specified.
Bob Coutant
den
Posts: 856
Joined: April 25th, 2009, 6:33 pm
What is the make/model of your primary camera?: Canon EOS-350D/Fuji X100T
Location: Birch Bay near Blaine, WA USA

Re: Dynamic Range and Strange Behaviour

Post by den »

Marv...

re: yousendit.com --- forget about it... things have changed since I last used the site. you do have to sign up for a free account before it will upload a file... previously you could use the 'Send a file now' box using your own email address for the To/From without signing up. You would then receive a email notification with a link to the uploaded file that you could post for others to download. Also it appears that the site is not compatible with the IE9 browser at least with my settings... though the Firefox 9.0.1 browser will work.

I was not going to duplicate the NX2 processing but examine ways in PWP for avoiding R,G, and B channel clipping for this particular image.

Question: did you convert from AdobeRGB to sRGB colors for the image versions posted in the Original Post?
Post Reply