title: Why cv2.write saves black images?
body: <p><em><strong>hi folks, greetings</strong></em></p>
  <p>am using this code that I found on the web, to apply a wiener filter on an image, the code :</p>
  <pre><code>from scipy.signal.signaltools import deconvolve
  from skimage import color, data, restoration
  img = color.rgb2gray(img)
  from scipy.signal import convolve2d
  psf = np.ones((5, 5)) / 25
  img = convolve2d(img, psf, 'same')
  img += 0.1 * img.std() * np.random.standard_normal(img.shape)
  deconvolved_img = restoration.wiener(img, psf, 1100)
  
  f, (plot1, plot2) = plt.subplots(1, 2)
  plot1.imshow(img)
  plot2.imshow(deconvolved_img)
  plt.show()
  cv2.imwrite(&quot;wiener result 2.jpeg&quot;,deconvolved_img)
  </code></pre>
  <p>the issue is when I plot the result using Matplotlib I get this :</p>
  <p><a href="https://i.stack.imgur.com/eEzOl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eEzOl.png" alt="enter image description here" /></a></p>
  <p><em><strong>but</strong></em> when I type <code>cv2.imwrite(&quot;wiener result 2.jpeg&quot;,deconvolved_img)</code> to save the image, I get this :</p>
  <p><a href="https://i.stack.imgur.com/9rXAz.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9rXAz.jpg" alt="enter image description here" /></a></p>
  <p>why do I get a black image when I save it ??</p>