Logarithmic Histogram?

DrJimSok

Well-known member
Hey Folks,

Is there a way to get a logarithmic histogram of pixel values, like in Histogram / Curves Transform? This woud be very useful for visualizing the status of the high end / low number of the distribution. When stretching an image, then one could see the impact on this high end to see how saturated items have beocme.

Jim
 
The easiest way is to use PixelMath to generate a temporary logarithmic stretch (roughly log($T)), and look at the histogram of that. You are probably really interested in the luminance, so (log(CIEL($T))). The image will typically be normalised, so the log values will be negative (and so clipped to zero), hence you need to subtract log(min(CIEL($T))) (but this won't quite work as it stands since you want the min over the whole CIEL($T) image). You will also need to avoid zero values (log(0)=-infinity).
So something like: given image Im, extract ImL = CIEL(Im); on ImL execute (iif($T,log($T)-log(min($T),0))) giving ImlogL; look at histogram of ImlogL.
 
The OP wants a logarithmic scale of the y axis of the histogram which is the frequency (or abundance?) of values. This goal is not at all achieved by your formula.

Bernd
 
Last edited:
@Juan Conejero:
I had wished to set the scale of the y axis of a histogram to logarithmic as well. Indeed this thread would be well suited in the category "Wish List".

Bernd
 
I had wished to set the scale of the y axis of a histogram to logarithmic as well
Me too - in fact I have sometimes exported an image into MatLab for just this reason (so I really should have understood the original question!:sleep:)
 
Oh sorry if my original 'ask' wasn't clear... oops !! Seems like an easy fix too... just add a button to the GUI (like w/ HistTransform), quickly compute (or have stored already in cache) the logs, and switch the display... of course, the GUIs are pretty feature righ already, so "just add a button" is more complex to do than to say !! Yucks...
 
Back
Top