I am a beginner in image processing i am learning it using OpenCV library. While working with it i came across the following code snippet
import numpy as np
img = np.zeros((300, 512, 3), np.uint8)
img[:] = [b, g, r]
When i do img=[b,g,r]
It does not work as expected. I understand that this is may be because of the dimension of the array as initialized with numpy but i am not able to visualize it. Can anyone explain how this syntax work ?