title: remove noise from image text nodejs
body: <p>how can i remove background noise and leave only the text?
  Example image:</p>
  
  <p><a href="https://i.stack.imgur.com/3SS2c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3SS2c.png" alt="enter image description here"></a> </p>
  
  <p>My code:</p>
  
  <pre><code>var Tesseract = require('tesseract.js');
  var Jimp = require("jimp");
  
  
  Jimp.read("12.png").then(function (image) {
      image
          .color([
            { apply: 'brighten', params: [20] }
          ])
          .contrast(1)
          .greyscale()
          .write("img-opt.jpg");
  })
  .then(function() {
    Tesseract.recognize('img-opt.jpg', {
        tessedit_char_whitelist: 'AN%D%P'
    })
      .progress(function(message){console.log(message)})
      .catch(function(err){console.error(err)})
      .then(function(result){console.log(result.text)})
  })
  .catch(function (err) {
      console.error(err);
  });
  </code></pre>
  
  <p>And i got this result:</p>
  
  <p><a href="https://i.stack.imgur.com/ouLRn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ouLRn.jpg" alt="enter image description here"></a></p>
  
  <p>So, how can i can remove background noise?
  Thanks!</p>