title: How to set background color on image to white with OpenCV in Python
body: <p>I have one picture read with OpenCV lib in Python.
  Im wondering, how can I change background color to white. I just want to have persons from the image and white background.</p>
  
  <p>For example:</p>
  
  <p><a href="https://i.stack.imgur.com/UtvFp.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/UtvFp.jpg" alt="enter image description here"></a></p>
  
  <p>I want to change to this:</p>
  
  <p><a href="https://i.stack.imgur.com/tWPcC.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/tWPcC.jpg" alt="enter image description here"></a></p>
  
  <p>How can I do such thing:</p>
  
  <pre><code>import numpy as np
  import cv2
  
  my_image = r'C:\Users\Pc\Desktop\preklapanje4.jpg'
  my_image = cv2.imread(my_image, 1)
  
  cv2.imshow('img',my_image)
  cv2.waitKey(0)
  </code></pre>