title: python - opencv morphologyEx remove specific color
body: <p>After remove captcha's background.<br>
  The image remain digits and noise.<br>
  Noise line is all in one color :  RGB(127,127,127)<br>
  And then using morphology method.  </p>
  
  <pre><code>    kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (2, 2))
      self.im = cv2.morphologyEx(self.im, cv2.MORPH_CLOSE, kernel)
  </code></pre>
  
  <p>Some part of digit will be remove.<br>
  How to use   morphologyEx() remove only color in RGB(127,127,127) ?</p>
  
  <p><img src="https://i.stack.imgur.com/PZUdP.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/Dj56P.png" alt="enter image description here"></p>