Re: Logarithmic histogram

```
On Monday, 5 Feb 2001, Jay Cox wrote:

Linear, Log, and sqrt are all common ways to scale histograms for display.
Perhaps we should make it an option in preferences (or in the histogram
display itself).

sqrt() - I haddn't thought of that.  That sounds plausibly like what
Photoshop is using.   I might have a play with that.

Austin

```

Re: Logarithmic histogram

```
Linear, Log, and sqrt are all common ways to scale histograms for
display.
Perhaps we should make it an option in preferences (or in the histogram
display itself).

sqrt() - I haddn't thought of that.  That sounds plausibly like what
Photoshop is using.   I might have a play with that.

To me, it looks like Photoshop uses linear, but if there are some peaks that
are very high relative to the rest of the histogram, they don't show these
peaks completely (they are clipped off) in order to be able to show some
detail in the lower parts. I tried something similar in Gimp, and for a
number of images I tried, the histograms of Photoshop and the Gimp were very
similar.
If you want, I can post the code I used for it.
I'm not sure about how to determine the clipping, though; now I have done
something like (I don't have my code here with me) after the calculation of
max in the function that calculates the heights of all peaks (I forgot the
name)

avg = ...
if (max  avg * 4)
max = avg * 4;

Note: the average is not the average as shown in the histogram widgt; it is
the average height of all peaks in the histogram which is something
completely different.

But perhaps it is better to use the median instead of the average, or maybe
the 90% percentile or something.

Roel Schroeven

```

Re: Logarithmic histogram

```
Austin Donnelly wrote:

On Sunday, 4 Feb 2001, Roel Schroeven wrote:

I noticed in the source code that the histogram widget uses a logarithmic
scaling. Is there a reason to do it that way, as Photoshop et al. seem to
use a linear scaling.

I just checked the CVS history; we've been using a log y axis (ie
pixel count) ever since the histogram widget was writen.  Jay Cox
checked in the initial rev (including log scale) in March 1999.

I've played around a bit with gimp looked at some web-based tutorials
for histogram use in photoshop, and while I agree that gimp's log axis
graphs don't look very similar to photoshop's, I don't think photoshop
just uses raw counts.  They also scale their data, but a little less
aggressively than by a log scale.

Austin

Actually the log histogram was around before I ever heard of gimp.  I merely
converted the existing histogram display into a real widget.  I expect that
the log scale on histograms dates from the days of Spencer and Peter.

Linear, Log, and sqrt are all common ways to scale histograms for display.
Perhaps we should make it an option in preferences (or in the histogram
display itself).

Jay Cox
[EMAIL PROTECTED]

```

Re: Logarithmic histogram

```
On Sunday, 4 Feb 2001, Roel Schroeven wrote:

I noticed in the source code that the histogram widget uses a logarithmic
scaling. Is there a reason to do it that way, as Photoshop et al. seem to
use a linear scaling.

I just checked the CVS history; we've been using a log y axis (ie
pixel count) ever since the histogram widget was writen.  Jay Cox
checked in the initial rev (including log scale) in March 1999.

I've played around a bit with gimp looked at some web-based tutorials
for histogram use in photoshop, and while I agree that gimp's log axis
graphs don't look very similar to photoshop's, I don't think photoshop
just uses raw counts.  They also scale their data, but a little less
aggressively than by a log scale.

Austin

```