I have 3 2D numpy float arrays (R, G, B) with the same dimensions. I want to merge it in one 2d array, causing every element in the new 2d array to be an array of 3 floating numbers. Below is my initial code:
image = cv2.imread('hurricane katrina 1.jpg', cv2.IMREAD_GRAYSCALE)
a = 255
b = 2 * (np.pi/255)
c = np.pi / 5
R = a * np.absolute(np.sin(b * image))
G = a * np.absolute(np.sin(b * image + c))
B = a * np.absolute(np.sin(b * image + 2 * c))
How will I do it in Python without iterating through the arrays? Thanks.
UPDATE:
I want to merge the 3 Arrays. Say for example
R[0][0] = 3
G[0][0] = 4
B[0][0] = 6
Then the merge array will be
RGB[0][0] = (3,4,6)
And this will be true for all elements in the arrays.
So the final output shape will be (1000,775,3)