title: Opencv-python: Type of input image should be CV_8UC3 or CV_8UC4! in function fastNlMeansDenoisingColored
body: <p>I wrote a simple opencv program, which reduce the noise of images.</p>
  
  <pre><code>import cv2
  import numpy as np
  from matplotlib import pyplot as plt
  
  img = cv2.imread('stream/horse.png')
  
  dst = cv2.fastNlMeansDenoisingColored(img, None, 10, 10, 7, 21)
  
  cv2.imshow(dst)
  plt.subplot(121), plt.imshow(img)
  plt.subplot(122), plt.imshow(dst)
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/A89mW.jpg" rel="noreferrer">horse.png</a></p>
  
  <p>When I ran the program it gave an error. Which is...</p>
  
  <pre><code>OpenCV Error: Bad argument (Type of input image should be CV_8UC3 or CV_8UC4!) in fastNlMeansDenoisingColored, file /home/govinda/github_repos/opencv/modules/photo/src/denoising.cpp, line 176
  Traceback (most recent call last):
    File "/home/govinda/workspace-python/opencv/src/Smle.py", line 7, in &lt;module&gt;
      dst = cv2.fastNlMeansDenoisingColored(img, None, 10, 10, 7, 21)
  cv2.error: /home/govinda/github_repos/opencv/modules/photo/src/denoising.cpp:176: error: (-5) Type of input image should be CV_8UC3 or CV_8UC4! in function fastNlMeansDenoisingColored
  </code></pre>
  
  <p>How should I over come this?</p>