Home Image-Pro General Discussions

Histogram stretched

Hello there,
does anyone have an idea what to do with stretched histograms?
I want to do Grey-scale analysis, but in every image the histograms are stretched, eg. every second bin=0.
That looks like this:
Grey value      Bin
72                   237
73                   0
74                   1147
75                   0
76                   356  .
77                   0
For my analysis I need to have an unstretched histogram. Is there a possibility to reverse the stretching without loosing pixeldata?
And do anyone have an idea, why it is stretched? Maybe because of digital gain of my ultrasound device?
Thanks again for your help!

Best Answer

  • Accepted Answer
    I didn't know that you used conversion, and yes, you shouldn't use "best-fit" option as it stretches image histogram to whole intensity range.



  • Hi Svenja,

    Yes, the histogram is stretched because of digital gain. It looks like the gain is 2 in your case, so every other histogram bin is empty.
    There are different ways to fix the histogram:

    1. Divide image intensities by 2 - it will revert affect of digital gain.
    2. Apply small low-pass filter (e.g. 3x3) - it will add odd intensity values and smooth the histogram.
    3. Set the number of histogram bins to 128 - so you will get 2 intensity values in one bin and histogram will be smooth.


  • Hi Yuri,
    thanks for your answer. I found out that if you choose for Image conversion:
    Adjust-->convert--> mono 8 bpp-->best fit pixel values--> Apply,
    the grey scale bins in the images histogram ( for example 70 bins) are stretched to 256.
    That is the reason for the empty bins. Choosing:
    mono 8bpp-->direct copy pixel values-->Apply
    solves the problem!
    Thanks again for your help!

Sign In or Register to comment.