title: How to show image in color channel of a image not in grayscale?
body: <p>I was trying to obtain a image in colour channel but not in grayscale. Here is the code for it :- </p>
  
  <pre><code>img = cv2.imread("image.jpg")
  blue = img[:,:,0].copy() # Blue channel image
  blue[:,:,1] = 0  # Making green channel 0
  blue[:,:,2] = 0  # Making red channel 0
  </code></pre>
  
  <p>But, when I try to make green channel and red channel 0 of the blue channel of the "image.jpg", it gives an error pointing to line 3 and line 4.  </p>
  
  <p>Error: <code>IndexError: too many indices for array</code></p>
  
  <p>I am using OpenCV 3.3 and python 3.6 on mac.</p>