title: Change all white pixels of image to transparent in OpenCV C++
body: <p>I have this image in OpenCV <code>imgColorPanel = imread("newGUI.png", CV_LOAD_IMAGE_COLOR);</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/NKEQM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NKEQM.png" alt="enter image description here"></a></p>
  
  <p>When I load it in with grey scale <code>imgColorPanel = imread("newGUI.png", CV_LOAD_IMAGE_GRAYSCALE);</code> it looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/6zeDr.png" rel="noreferrer"><img src="https://i.stack.imgur.com/6zeDr.png" alt="enter image description here"></a></p>
  
  <p>However I want to remove the white background or make it transparent (only it's white pixels), to be looking like this:</p>
  
  <p><strong>How to do it in C++ OpenCV ?</strong></p>
  
  <p><a href="https://i.stack.imgur.com/L6chG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/L6chG.png" alt="enter image description here"></a></p>