title: Image Processing on flood fill image
body: <p>I am working on an image processing project in which I have flood filled the original image.</p>
  
  <p>Now</p>
  
  <ol>
  <li><p>I  need to remove the noise in this picture which is the white lines around the image of the hand. I want to remove these white lines by merging them into the background color which is black.</p></li>
  <li><p>I need to to change the gray color (the value is <code>127</code>) of the flood filled area to white color. Note that the background colour should remain black.</p></li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/H65nf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H65nf.png" alt="enter image description here"></a></p>
  
  <hr>
  
  <p>This is a follow-up of <a href="https://stackoverflow.com/q/35460986/5008845">this question</a>. The image is obtained with the code in <a href="https://stackoverflow.com/a/35461437/5008845">this answer</a>.</p>