Lets say I have histogram of a color image that is of size [16, 16, 16].
Now, I have a function that converts my rgb image into the format where each
rgb color (i.e. img[x, y, :] = (r, g, b)) is an integer in the range(0, 16)
I want create a new 2d array where new2darray[x, y] = hist[img[x,y, :]]
that is, for each 3 tuple in img, use that as an index into the 3d histogram
and store the value of the histogram into the (x,y) position of the 2d
array.
I've prototyped all the algorithms using for loops, now im just trying to
speed it up.
I can't quite wrap my head fully around this fancy indexing yet.
Chris