getting histo to work with a matrix

Nov 30, 2010 at 12:12am

getting histo to work with a matrix

im trying to get histo to count how many instances of any given color are in a matrix.
I managed to reduce the number of colors in the matrix so histo could handle it, but i need a way to convert aRGB values into int’s so histo understands the data and can then make a histogram out of the data, and have been unsuccessful in doing so.
How would I manage to turn each matrix value into its own unique int for histo to understand.
Any hints or anything to help me along my way would be greatly appreciated.
thanks!

#53629
Nov 30, 2010 at 1:04am

You might want to check out jit.unpack, jit.spill, jit.histogram.

If you still end up using it, histo has an optional argument that can set the size, [histo 2048] or whatever.

That’ll give you some starting points.

-Ben

#192812

You must be logged in to reply to this topic.