I am trying to code a multispectral image.
Every pixel's value is coded in 33 channels.
I have two numpy arrays image and spectral_range
For example one image has 4 x 4 pixels:
image = np.array([[[1,2,4,3],[2,2,2,1],[1,2,3,2],[5,4,3,2]])
And for each pixel should be associated the 33 values of the spectral range covered by the image:
spectral_range = np.array([0,0,0,0,0,0,0,1,23,99,166,86,54,12,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])
How can I simply create a np.array of shape (width, height, 33), where each pixel's 33 values are the 33 values of the array spectrum multiplied by the individual values of the array image?
The expected result looks like:
result = np.array([[[0,0,0,0,0,0,0,1,23,99,166,86,54,12,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,2,46,198,...etc.]]])
Thanks for helping