Page 1 of 1

Histogram detail

Posted: 2014-03-09T13:31:45-07:00
by Elapido
For the same image (a photo of a person on white background) I get this histogram in Photoshop (left) and this one with ImageMagick (right). Why so few detail with ImageMagick? I barely get any info from that with many images. Is there a way to have a more sensitive histogram? Maybe generating a larger image? Or maybe it is that I'm creating the histogram in a wrong way: convert.exe f:\1.jpg -colorspace Gray -define histogram:unique-colors=false histogram:f:\histo.png

Image

Re: Histogram detail

Posted: 2014-03-09T13:39:11-07:00
by snibgo
I haven't noticed any problems with histograms.

What version of ImageMagick?

Re: Histogram detail

Posted: 2014-03-09T13:52:56-07:00
by fmw42
Imagemagick, I believes scales the histogram so that the max bin count is at the top of the image. If there are very few counts in all the other bins, then you will not see much of them. Post a link to the exact image that you used.

Also if on Unix, you might try my script, plot, to get histogram plots as well as image row/column profiles. It allows scaling of the histogram counts. See the link below.

Re: Histogram detail

Posted: 2014-03-10T14:37:10-07:00
by Elapido
Look, this is a test image with the two histograms (left: Photoshop, right: ImageMagick). None of both provides lots of detail but with the one created by Photoshop you can at least see something. The histogram generated by Imagemagick is completelly useless since the only thing you can figure out from it is that the image has a lot of white. Any way to fix this or any alternative program to create histograms from the command line?

Image

Image

Re: Histogram detail

Posted: 2014-03-10T15:08:54-07:00
by snibgo
IM can't directly make log histograms, which would be useful here.

Nor can it put histogram data into an image format, which would allow an IM command to do the log calculation.

It can produce text output, which can then be manipulated, as in fmw's script.