Create histogram image from multiple images
Posted: 2016-12-18T20:45:35-07:00
Help please,
I have a series of images, I want a combined histogram of all images.
Each column = seperate image and row = color (0-255) and Intensity = histogram percentage
i.e.
Get the histogram for each image as a 1xN(color) where the intensity = 255 x fraction of total counts
Append this into one large histogram, each column is from a new file.
This almost works
https://drive.google.com/file/d/0B13mzT ... sp=sharing
However, the colors move (vertically) and I don't have the counts.
I think a partial solution is viewtopic.php?f=1&t=19538&p=76915#p76915
I'm getting lost here but I think I need to change the second convert to
And I need to sort by color (1 to 256) not by counts
I have a series of images, I want a combined histogram of all images.
Each column = seperate image and row = color (0-255) and Intensity = histogram percentage
i.e.
Get the histogram for each image as a 1xN(color) where the intensity = 255 x fraction of total counts
Append this into one large histogram, each column is from a new file.
This almost works
Code: Select all
convert *.png -colors 255 -unique-colors -rotate 90 +append hist.png
However, the colors move (vertically) and I don't have the counts.
I think a partial solution is viewtopic.php?f=1&t=19538&p=76915#p76915
Code: Select all
convert rose: -colors 256 -format %c histogram:info:- | sed 's/:.*#/ #/' |
while read count color colorname; do
convert -size 1x$count xc:$color miff:-
done |
convert - -alpha set -gravity south -background none +append unique_color_histogram.png
Code: Select all
convert -size 1x1 xc: $color * $count / $TotalPixels miff:-