PDA

View Full Version : Converting an 8-to 16-bit grayscale before adjusting ?



Ken Lee
1-Oct-2016, 19:53
I always presumed that if we convert an 8-bit grayscale image to 16 bit before performing any adjustments, Photoshop will "fill-in" the gaps in the tonal scale as adjustments are made. Now I wonder if this is true.

The histogram tool is a bit small for me to determine the nature of the file. Is there a better tool ?

Ken Lee
2-Oct-2016, 07:25
I did an experiment where I converted an 8-bit grayscale image to 16-bit, then added adjustments. The histogram continued to show banding. I saved the image, and the histogram still showed banding.

Then, I re-sized the image ever so slightly: that caused the banding in the histogram to go away. I presume that Photoshop reworked the tonal scale at that point.

Alan9940
2-Oct-2016, 07:48
Ken,

AFAIK converting an 8-bit file to 16-bit can be beneficial because PS now performs its computations at that level. However, 8-bit is and will be 256 levels even when converted to 16-bit; no data will be magically added. Therefore, any destructive editing operation will still be removing data from a file that didn't start with much. Best to start with a 16-bit file, edit at that level, then repurpose for output.

Sasquatchian
2-Oct-2016, 21:04
The ONLY time it's ever beneficial to convert to 16 from 8 bits is where you are generating gradations or new skies from scratch. And you still have to add a small amount of noise even in 16 bit mode. Simply converting to 16 bit just spreads the existing data out further but can't add any real detail to your image, it only puts an 8 bit file in a 16 bit container. The slight resample - and you do have to resample and not just resize - will indeed smooth out a histogram, but it won't actually have any beneficial impact on real posterization in the image. You have to add noise for that.

Leigh
2-Oct-2016, 21:24
If you convert an 8-bit file to 16 bits, you still have 256 distinct colors, no more.

If you use a color slider on a pixel AFTER the conversion, that adjustment will be made on the 16-bit data word.
But only on that one pixel.

If you select multiple pixels of the same color simultaneously, the adjustment would be for those only.

If you adjust multiple pixels having different colors simultaneously, the result will depend on the software.

- Leigh

Kirk Gittings
3-Oct-2016, 07:19
We used to discuss this about using older scanners which could only deliver 8 bit files. There was some consensus, if I remember right, that there was some benefit to changing it to 16 bit immediately after the scan and before doing work in PS, but not as good as just scanning in 16 bit. I did this for a few years on B&W files because I had 8 bit scanners. I "believed" there was a benefit, but don't remember seeing or attempting any critical comparison.

Ken Lee
3-Oct-2016, 07:43
http://www.kennethleegallery.com/images/forum/8BitOriginal.jpg

http://www.kennethleegallery.com/images/forum/16BitAfterAdjustments.jpg

http://www.kennethleegallery.com/images/forum/16BitAfterResizing.jpg

In my humble test, the histogram was smoothed out only after resizing the image: I changed the size by 1 pixel.

Apparently the process of resizing the whole image causes intermediate tones to be re-computed.

This test relies on the histogram tool, which may be deceptive. If it's a reliable indicator, it suggests that after we import an 8-bit file we should convert to 16-bit and resize it - however modestly - before performing any adjustments.

Sasquatchian
3-Oct-2016, 08:04
"In my humble test, the histogram was smoothed out only after resizing the image: I changed the size by 1 pixel.

Apparently the process of resizing the whole image causes intermediate tones to be re-computed.

This test relies on the histogram tool, which may be deceptive. If it's a reliable indicator, it suggests that after we import an 8-bit file we should convert to 16-bit and resize it - however modestly - before performing any adjustments."

You've pretty much proven to yourself that your own test is invalid. What's the point here anyway? First of all, you're obsessing about histograms, which, while a useful tool on the back of a digital camera or during the initial scanning stage on a good scanner, don't tell you much of anything about the quality of an image, being NOTHING more than a simple graph of the distribution of pixel values in an image or a selection within an image. The only thing you've shown is that by re-sampling, you close the gaps in a histogram and you seem surprised by this. Of course it will, but it won't actually smooth over visible posterization in the image. Adding noise to the image will smooth out a histogram too but will not necessarily make a better looking image except where you need a small amount to smooth gradations.

People used to get excited about histograms twenty years ago and a certain color management "expert" really obsessed over them, and almost always losing sight of the real final goal, which has nothing to do with the histogram, well, unless you're into printing histograms.

jp
3-Oct-2016, 08:42
In CC, I can resize the adjustment histogram to be bigger in a curves layer by dragging the left edge of the popout box even more to the left. I have not tried resizing the histogram in the upper right that's part of the photography workspace.

I bet there are other things you can do to apply the 16bitness. Perhaps adding a layer and resaving?

Sas; Ken is a master of midtones and of course the histograms would be important. I think they are important because it's how I make good tones in B&W scans which I scan sorta flat on purpose and tune in photoshop.

Ken Lee
3-Oct-2016, 09:06
Sorry for any confusion: occasionally I use a digital point and shoot camera - or an iPhone - and just couldn't figure out how to convert the image to a more lossless bit-depth.

I found one method. As JP points out, there are probably many.

Sasquatchian
3-Oct-2016, 14:59
"and just couldn't figure out how to convert the image to a more lossless bit-depth. "

Lossless bit depth? Makes no sense. Any tonal manipulations you do are going to result in data loss, no matter what. It's whether or not the manipulations make it a better image or not that matter, not the state of the histogram.

Leigh
3-Oct-2016, 15:29
just couldn't figure out how to convert the image to a more lossless bit-depth.
Ken,

You have not "lost" anything. Neither have you added anything.

Set an egg on the counter. It's an egg.
Put the egg in an empty carton for a dozen eggs.
It's still an egg, with 11 adjacent empty holes.

That's what happens when you increase bit depth.
It's not like you're copying the information from one pixel into the new adjacent pixels.
The new adjacent pixels are empty, which is why they show up as empty in the histogram.

I'm afraid you're obsessing over an imaginary issue.

- Leigh

bob carnie
4-Oct-2016, 06:51
Nice explanation

What would be your description of the egg if you had a 16 bit file and dropped to 8 bit.




Ken,

You have not "lost" anything. Neither have you added anything.

Set an egg on the counter. It's an egg.
Put the egg in an empty carton for a dozen eggs.
It's still an egg, with 11 adjacent empty holes.

That's what happens when you increase bit depth.
It's not like you're copying the information from one pixel into the new adjacent pixels.
The new adjacent pixels are empty, which is why they show up as empty in the histogram.

I'm afraid you're obsessing over an imaginary issue.

- Leigh

Peter De Smidt
4-Oct-2016, 06:53
Likely less eggs.

Ken Lee
4-Oct-2016, 07:30
Apparently when the image is re-sized, Photoshop inserts intermediate values according to the bit-depth. Subsequent adjustments are made in the new bit-depth.

Some of the values in the new file come from the original 8 bit data and the rest are produced by interpolation and/or the scaling algorithm.

Whoever wrote or maintains the code will know best.

RSalles
4-Oct-2016, 08:47
Ken,

Pay attention to the first image. No matter what the histogram shows, the image with much more detail still is the first 8bit one.
I think the PS gap filling alternative is another kind of a guess, reminds me a filling of a bayer filter with their adjacent probabilities.
Look inside the shoes, there are details not visible in any other sample,

Cheers,

Renato

Ken Lee
4-Oct-2016, 09:15
Ken,

Pay attention to the first image. No matter what the histogram shows, the image with much more detail still is the first 8bit one.
I think the PS gap filling alternative is another kind of a guess, reminds me a filling of a bayer filter with their adjacent probabilities.
Look inside the shoes, there are details not visible in any other sample,

Cheers,

Renato

Sorry for any confusion. The first image is the original, the rest have had multiple random adjustments to the tonal curve.

Leigh
4-Oct-2016, 11:03
Apparently when the image is re-sized, Photoshop inserts intermediate values according to the bit-depth. Subsequent adjustments are made in the new bit-depth.
Some of the values in the new file come from the original 8 bit data and the rest are produced by interpolation and/or the scaling algorithm.
Correct.

Envision two adjacent pixels in the original 8-bit file, one white and one black.
Translated to 16-bits, you have one white pixel and one black pixel separated by 254 empty ones.

Re-sampling may fill in those 254 empty spaces with shades of gray, yielding a smooth gray scale.
OR
It might make half of them closest to white all white and the others all black.

It depends on the algorithm and the settings in use.

- Leigh

RSalles
4-Oct-2016, 17:55
Ken,
Even have been driven to error, I'm glad I've noted the difference, at least my eyes are not that bad, until now - I'm 58 y.o. today.

Leigh,

Correct, but in the original 16 bit image those 254 empty ones are filled with data. No PS can "invent" data do fill those gaps, only smooth transitions. That's why one have - if possible - start with the max amount of bits available and adapt the final output to the max. supported by the medium - example not loosing time to try to display 16 bits images on the web.
The thread reminds me another one about max lens resolution and MTF charts, all that ending with a photo displayed on Flickr,
:)

Cheers,

Renato

Leigh
4-Oct-2016, 18:01
Correct, but in the original 16 bit image those 254 empty ones are filled with data.
No PS can "invent" data [t]o fill those gaps, only smooth transitions.
It depends on the scene, the image, and the software.

A smooth transition from white to black (inventing a gray scale) might be valid in some cases.

If the original subject has an abrupt change in color, like a paint line, a transition would degrade the image.

There are no universal truths.

- Leigh

Alan1250
12-Oct-2016, 10:40
What is happening is that when the image resized the output pixels are derived by considering several input pixels at each output location. The math typically results in output values that have fractional components. (ie (181 + 182) / 2 = 181.5 ) Well, it's not a good idea to just round up or down and simply discard the fractional part. This would introduce it's own artifacts and could change the over-all intensity/color. So in image processing, what happens is that these round-off "errors" as they are called, are distributed to the neighboring output pixel positions as additional inputs. I suppose you could think of it as a micro-blurring process.

The end result is that you can get images that look the same, but have new pixel values that were not there to begin with.

Just about any operation that involves local pixel calculations, as opposed to strictly global ones (like brightness, contrast, etc.) will (and should) use such "error distribution" as part of the algorithm.