I have used identify verbose in order to get standard deviation of a grayscale channel and it has worked great (values between 0 and 1).
Right now I have tried doing the following:
Code: Select all
def standard_deviation
# Image is a RMagick object
grayscale = @image.quantize(number_colors=256, colorspace=Magick::GRAYColorspace)
p grayscale.channel_mean
grayscale.write('grayscaled.png')
end
[16068.833636363637, 2110.3275912339077]
How is it possible that the standard deviation is above 1? Here is the documentation for #channel_mean: http://rubydoc.info/github/rmagick/rmag ... annel_mean
I am not sure what am I missing here.