Hello,

I'm new to Julia and have been reading all the documentation I can.  Using 
Images.jl and PyPlot, I'm trying to take a image, convert and reinterpret 
it before plotting the count of the various pixel colors in a histogram.

using Images
img_gld = imread("plane.jpg")
img_gld_gs = convert(Image,img_gld)
img_gld_gs = reinterpret(Uint8,data(img_gld_gs))

hist(vec(img_gld_gs), -1:255)
 
Returns:

*(-1:255,[1675,1122,1674,14998,23244,14503,14014,14959,14428,12569  … 
 215,183,137,86,96,242,499,3116,8958,597726])*
 

The issue I am having is how to manipulate this array element with a 
sequence into being the the x and y axis in a PyPlot Histogram.  I think 
once I get a better grasp of how to manipulate this sort of vector Julia 
will open up to me.  I've tried a number of approaches that generally 
results in "*ValueError: setting an array element with a sequence." or 
similar.*


import PyPlot
PyPlot.plt.hist(????)
PyPlot.plt.plot(????)

Thanks,

Paul

Reply via email to