is this histogram output correct?
Posted: 2017-02-12T23:43:43-07:00
The magick code in batch file:
Reading from a grayscale image, part of this histogram output is:
I am using the histogram output to find the peak and other spike values, so i need to know the relevant histogram bin value where the spike is. with grayscale, i was thinking its gray(x) value would be the same as its bin location.
but since the gray values repeat, maybe i am not thinking of this correctly?
Thank You..
--------------------------------------------------------------------------------------------------------
Version: ImageMagick 7.0.3-5 Q16 x64 2016-11-08
Visual C++: 180040629
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib
windows 10 pro 64bit
Code: Select all
magick convert -quiet input.tif -colorspace gray -gravity center -crop 60%% -format %%c histogram:info:- >> %~dp0hist.txt
I am wondering why (7, 7, 7) is listed three times with a pixel count of 1 for each. is this being miscounted or are there three separate pixels with gray(7) as their value? Same question for the other values that are repeated, such as 5, 10, 14, ...etc.1: ( 2, 2, 2) #020202 gray(2)
1: ( 5, 5, 5) #050505 gray(5)
2: ( 5, 5, 5) #050505 gray(5)
1: ( 7, 7, 7) #070707 gray(7)
1: ( 7, 7, 7) #070707 gray(7)
1: ( 7, 7, 7) #070707 gray(7)
3: ( 8, 8, 8 ) #080808 gray(8)
1: ( 9, 9, 9) #090909 gray(9)
1: ( 10, 10, 10) #0A0A0A gray(10)
3: ( 10, 10, 10) #0A0A0A gray(10)
4: ( 11, 11, 11) #0B0B0B gray(11)
1: ( 13, 13, 13) #0D0D0D gray(13)
1: ( 14, 14, 14) #0E0E0E gray(14)
1: ( 14, 14, 14) #0E0E0E gray(14)
1: ( 17, 17, 17) #111111 gray(17)
1: ( 20, 20, 20) #141414 gray(20)
1: ( 21, 21, 21) #151515 gray(21)
1: ( 22, 22, 22) #161616 gray(22)
2: ( 24, 24, 24) #181818 gray(24)
4: ( 25, 25, 25) #191919 gray(25)
I am using the histogram output to find the peak and other spike values, so i need to know the relevant histogram bin value where the spike is. with grayscale, i was thinking its gray(x) value would be the same as its bin location.
but since the gray values repeat, maybe i am not thinking of this correctly?
Thank You..
--------------------------------------------------------------------------------------------------------
Version: ImageMagick 7.0.3-5 Q16 x64 2016-11-08
Visual C++: 180040629
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo flif freetype jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib
windows 10 pro 64bit