getting histo to work with a matrix


    Nov 30 2010 | 12:12 am
    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!

    • Nov 30 2010 | 1:04 am
      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