title: Convert White Pixels to Black in OpenCV python
body: <p>I am trying to convert the white background of the input image into black using python OpenCV.But all the white pixels are not completely getting converted to black. I have attached the input and output images.</p>
  
  <p>Input Image :</p>
  
  <p><img src="https://i.stack.imgur.com/MgiNL.png" alt="Input Image in the window"></p>
  
  <p>Output Image: </p>
  
  <p><img src="https://i.stack.imgur.com/aJOat.png" alt="Output Image in the Window"></p>
  
  <p>I have used the following code for conversion:</p>
  
  <pre><code>img[np.where((img==[255,255,255]).all(axis=2))] = [0,0,0];
  </code></pre>
  
  <p>What should I do?</p>