Pages: [1] 2   Go Down

Author Topic: Histogram "gaps"  (Read 2354 times)

mdijb

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 666
    • mdiimaging.com
Histogram "gaps"
« on: August 18, 2019, 04:12:36 pm »

During my processing of images, some steps cause the histogram to change.  Instead of appearing continuous, "gaps" (for lack of a better term) appear.  Attached are images that display what is happening. I have been told that these gaps mean that data is being lost.

So:
1-Is data being lost?  Is the histogram change significant?  Can someone explain why these gap are occurring?

2-Is the image being degraded when they appear?

3- Will these gaps result in reduced image quality on the screen as well as in the print?

MDIJB
Logged
mdiimaging.com

Slobodan Blagojevic

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 18090
  • When everyone thinks the same, nobody thinks
    • My website
Re: Histogram "gaps"
« Reply #1 on: August 18, 2019, 07:03:45 pm »

Are you in 8-bit or 16-bit mode?

mdijb

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 666
    • mdiimaging.com
Re: Histogram "gaps"
« Reply #2 on: August 18, 2019, 07:10:48 pm »

16 bit mostly.

MDIJB
Logged
mdiimaging.com

digitaldog

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 20646
  • Andrew Rodney
    • http://www.digitaldog.net/
Re: Histogram "gaps"
« Reply #3 on: August 18, 2019, 07:31:33 pm »

Be sure to click on the triangle or the Histogram isn't accurate (it's cached).
And:

Everything you thought you wanted to know about Histograms
Another exhaustive 40 minute video examining:

What are histograms. In Photoshop, ACR, Lightroom.
Histograms: clipping color and tones, color spaces and color gamut.
Histogram and Photoshop’s Level’s command.
Histograms don’t tell us our images are good (examples).
Misconceptions about histograms. How they lie.
Histograms and Expose To The Right (ETTR).
Are histograms useful and if so, how?

Low rez (YouTube): http://www.youtube.com/watch?v=EjPsP4HhHhE
High rez: http://digitaldog.net/files/Histogram_Video.mov
Logged
http://www.digitaldog.net/
Author "Color Management for Photographers".

nirpat89

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 661
    • Photography by Niranjan Patel
Re: Histogram "gaps"
« Reply #4 on: August 18, 2019, 07:40:12 pm »

Click on that little triangle on the top right, the histogram should improve.  Something to do with cached data vs actual current document. 
Logged

fdisilvestro

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1853
    • Frank Disilvestro
Re: Histogram "gaps"
« Reply #5 on: August 19, 2019, 01:09:24 am »

First step is to update the histogram as other have suggested. In any case, Photoshop adjustments are performed with integer maths, which will cause gaps in the histogram, and I would say:  "Do not worry about it"

JaapD

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 303
Re: Histogram "gaps"
« Reply #6 on: August 19, 2019, 01:14:13 pm »

The integer math does not necessarily clarify the gaps. Gaps are a result of missing codes. Integer math results in truncation what could result in identical neighbor codes.
Simple example: dividing the integer range 4,5,6,7,8 by 2 results in 2,3,3,4,4. So no missing codes.

Regards,
Jaap.
Logged

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Re: Histogram "gaps"
« Reply #7 on: August 19, 2019, 01:19:25 pm »

The integer math does not necessarily clarify the gaps. Gaps are a result of missing codes. Integer math results in truncation what could result in identical neighbor codes.
Simple example: dividing the integer range 4,5,6,7,8 by 2 results in 2,3,3,4,4. So no missing codes.
Try dividing it by 0.5.

fdisilvestro

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1853
    • Frank Disilvestro
Re: Histogram "gaps"
« Reply #8 on: August 19, 2019, 03:12:40 pm »

The integer math does not necessarily clarify the gaps. Gaps are a result of missing codes. Integer math results in truncation what could result in identical neighbor codes.
Simple example: dividing the integer range 4,5,6,7,8 by 2 results in 2,3,3,4,4. So no missing codes.

Regards,
Jaap.

Now try to multiply 2,3,3,4,4 by 2 and you get 4,6,6,8,8. See the gaps? Integer maths not only create the gaps, it also does not take you back to the same values if you do the opposite operation. (BTW, dividing is reducing exposure, multiplying is increasing exposure)

In any case, I repeat: Do not worry about it!

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Re: Histogram "gaps"
« Reply #9 on: August 19, 2019, 04:00:20 pm »

Now try to multiply 2,3,3,4,4 by 2 ...

I said divide by 0.5. Po-tay-toe, Po-tah-toe.

mdijb

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 666
    • mdiimaging.com
Re: Histogram "gaps"
« Reply #10 on: August 19, 2019, 05:15:37 pm »

Thanks for the replies.  I sort of understand the math, but my real basic question remains--do i need to worry about this if the gaps occur?  One respondent has indicated  that I do not.  Do others agree with this?

MDIJB
Logged
mdiimaging.com

fdisilvestro

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1853
    • Frank Disilvestro
Re: Histogram "gaps"
« Reply #11 on: August 19, 2019, 05:18:45 pm »

I said divide by 0.5. Po-tay-toe, Po-tah-toe.


Yes, I know it is the same, just in case someone says that 0.5 is not integer.

earlybird

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 331
Re: Histogram "gaps"
« Reply #12 on: August 19, 2019, 05:24:26 pm »

Assuming one is starting with a continuous tone image, an easy way to purposefully cause its histogram to display gaps is to run a posterize adjustment.

If you expect an image to have a continuous tone character and gaps in the histogram appear after you have applied processes then it seems like evidence that you may be, to some degree, losing some of tonal nuances.

Does it matter? I think I would want to formulate my opinion on a case by case basis.
Logged

fdisilvestro

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1853
    • Frank Disilvestro
Re: Histogram "gaps"
« Reply #13 on: August 19, 2019, 05:25:52 pm »

Thanks for the replies.  I sort of understand the math, but my real basic question remains--do i need to worry about this if the gaps occur?  One respondent has indicated  that I do not.  Do others agree with this?

MDIJB

Even many raw files have gaps in the histogram. Nikon NEF have gaps in the red and blue channel in all histograms. High ISO images have gaps since high ISO is achieved by multiplication most of the time. It would take a while before gaps translate into banding, and if it happens, just add a tiny amount of noise.

digitaldog

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 20646
  • Andrew Rodney
    • http://www.digitaldog.net/
Re: Histogram "gaps"
« Reply #14 on: August 19, 2019, 05:34:46 pm »

Thanks for the replies.  I sort of understand the math, but my real basic question remains--do i need to worry about this if the gaps occur?  One respondent has indicated  that I do not.  Do others agree with this?

MDIJB
Addressed in video.
Logged
http://www.digitaldog.net/
Author "Color Management for Photographers".

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Re: Histogram "gaps"
« Reply #15 on: August 19, 2019, 05:45:12 pm »

Thanks for the replies.  I sort of understand the math, but my real basic question remains--do i need to worry about this if the gaps occur?

 In 8-bit precision files, sometimes the gaps can cause visible contouring in the image. This was the bane of some of us during the bad old days before Photoshop adopted 15-bit-plus-one-state precision, at which point, most of us stopped worrying about it. It was especially problematic in large color spaces like CIELab and ProPhotoRGB, but that's history.

Jim

Bart_van_der_Wolf

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 8914
Re: Histogram "gaps"
« Reply #16 on: August 19, 2019, 07:02:40 pm »

In 8-bit precision files, sometimes the gaps can cause visible contouring in the image. This was the bane of some of us during the bad old days before Photoshop adopted 15-bit-plus-one-state precision, at which point, most of us stopped worrying about it. It was especially problematic in large color spaces like CIELab and ProPhotoRGB, but that's history.

Yes, that's correct. But it still means that it's better to e.g. convert between colorspaces in '16'-b/ch mode, and use dithering when changing to 8-b/ch mode. This can help in a print pipeline that's usually 8-b/ch. An application like Qimage will do that by default.

Cheers,
Bart
Logged
== If you do what you did, you'll get what you got. ==

digitaldog

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 20646
  • Andrew Rodney
    • http://www.digitaldog.net/
Re: Histogram "gaps"
« Reply #17 on: August 19, 2019, 08:47:10 pm »

Yes, that's correct. But it still means that it's better to e.g. convert between colorspaces in '16'-b/ch mode, and use dithering when changing to 8-b/ch mode. This can help in a print pipeline that's usually 8-b/ch. An application like Qimage will do that by default.

Cheers,
Bart
According to Chris Cox (former Adobe Photoshop engineer):

If you have an 8 bit source and need to apply extreme adjustments – then there might be some advantage to converting to 16 bit and dithering when converting back to 8 bit.
In general, starting with an 8 bit image – you’ve already lost most of your detail.
Dithering only happens when converting DOWN depths.   There is no point (or purpose) in dithering when converting from 8 to 16, or 16 to 32.
Chris

As far as automatic:
Camera Raw/LR has always added dither automatically when sending rendered images to Ps and saving them to disk  (JPEG, TIFF, PSD, etc.), for both 8-bit and 16-bit bit depths.

Also from Adobe:
The dither step is only added when quantizing from higher bit depths to lower bit depths.  For example, when we’re going to display an image inside of ACR/Lr, we need to send an output image at 8 bits.  But our internal processing is done at 16-bit or 32-bits, and the source data that we start from (say, a raw file) is also high bit depth.
When you save a JPEG file from ACR/Lr, the same thing happens.  JPEGs are 8 bits, so quantization from 16/32 bits still occurs, so there is still benefit from applying dither.
Logged
http://www.digitaldog.net/
Author "Color Management for Photographers".

D Fuller

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 608
    • AirStream Pictures
Re: Histogram "gaps"
« Reply #18 on: August 20, 2019, 05:57:47 pm »

According to Chris Cox (former Adobe Photoshop engineer):

If you have an 8 bit source and need to apply extreme adjustments – then there might be some advantage to converting to 16 bit and dithering when converting back to 8 bit.
In general, starting with an 8 bit image – you’ve already lost most of your detail.
Dithering only happens when converting DOWN depths.   There is no point (or purpose) in dithering when converting from 8 to 16, or 16 to 32.
Chris

As far as automatic:
Camera Raw/LR has always added dither automatically when sending rendered images to Ps and saving them to disk  (JPEG, TIFF, PSD, etc.), for both 8-bit and 16-bit bit depths.

Also from Adobe:
The dither step is only added when quantizing from higher bit depths to lower bit depths.  For example, when we’re going to display an image inside of ACR/Lr, we need to send an output image at 8 bits.  But our internal processing is done at 16-bit or 32-bits, and the source data that we start from (say, a raw file) is also high bit depth.
When you save a JPEG file from ACR/Lr, the same thing happens.  JPEGs are 8 bits, so quantization from 16/32 bits still occurs, so there is still benefit from applying dither.
I usually output 16-bit tiffs from photoshop, but for those times when I need to produce a jpeg, how does one apply dither? I don’t remember any option for that in the jpeg dialog.
Logged
business website: www.airstream.pictures
blog: thirtynineframes.com/blog

digitaldog

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 20646
  • Andrew Rodney
    • http://www.digitaldog.net/
Re: Histogram "gaps"
« Reply #19 on: August 20, 2019, 05:59:35 pm »

I usually output 16-bit tiffs from photoshop, but for those times when I need to produce a jpeg, how does one apply dither? I don’t remember any option for that in the jpeg dialog.
JPEG is 8-bits per color. So dither will be applied from the 16-bit data UNLESS you have this option OFF in Color Settings.
Logged
http://www.digitaldog.net/
Author "Color Management for Photographers".
Pages: [1] 2   Go Up