title: Combine 3 grayscale images to 1 natural color image in Python
body: <p>I am dealing with a dataset on Kaggle.com:
  <a href="https://www.kaggle.com/sorour/38cloud-cloud-segmentation-in-satellite-images" rel="nofollow noreferrer">https://www.kaggle.com/sorour/38cloud-cloud-segmentation-in-satellite-images</a>
  And what I'm trying to do is combine 3 grayscale image represent 3 channels (R, G, B) to one natural color image. So here is what I've tried:</p>
  <pre><code>r_np = np.array(cv2.imread(red, 0))
  g_np = np.array(cv2.imread(green, 0))
  b_np = np.array(cv2.imread(blue, 0))
  
  # Add the channels to the final image
  final_img = np.dstack([b_np, g_np, r_np]).astype(np.uint8)
  
  # Directory to save
  final_img_dir = store_directory + &quot;\\&quot; + &quot;img&quot; + image_id
  
  # Save the needed multi channel image
  cv2.imwrite(final_img_dir, final_img)
  </code></pre>
  <p>And its output is a still a grayscale image. My image format is .TIF.
  Thank you in advance!</p>