Lurker News

Comments (97) 35 threads

Earlier comments
AgentME1 reply#
Why the promise-like interface? If it returned a promise with a this-returning progress method monkey-patched onto it, then you could use it otherwise like a regular promise:

    Tesseract.recognize(myImage)
      .progress(function(message){console.log(message)})
      .then(function(result){console.log(result)})
      .catch(function(err){console.error(err)});
or

    Tesseract.recognize(myImage)
      .progress(function(message){console.log(message)})
      .then(
        function(result){console.log(result)},
        function(err){console.error(err)}
      );
I guess I just still have bad memories of jQuery's old almost-like-real promises. I'd rather never have to think ever again about whether I'm dealing with a real promise or one that's going to surprise me and break at run-time because I tried to use it like a real one.
bijection#
If you want to use a real Promise, you can wrap the call to recognize in Promise.resolve:

  Promise.resolve(Tesseract.recognize(myImage)).then(result => console.log(result))
greenpizza131 reply#
Excited about this... but the OCR quality seems to be very bad. Maybe it's not optimized for recognizing black text on a white background.

For example, I took a screenshot of this comment and ran it through the demo and got this:
Excited ehent this... but the OCR enenty Seems te be very bad. Maybe it's het Dptimized far recngnizing black text an e white heckgmnhe. EDI example, 1 tank e Screenshnt at this cement ehe teh it. thmneh the den» ehd get this:
It seems to recognize the bounding boxes just fine but mangles the words.

bijection#
Did you try increasing the font size a bit? On a retina macbook (so effectively ~2x bigger font) I get:

Excited about this... but the OCR quality seems to be very bad. Maybe it's not optimized for recognizing black text on a white background. For example, I took a screenshot of this comment and ran it through the demo and got this:

goatslacker1 reply#
I've been using this library to read screenshots of Pokemon Go to automatically calculate Individual Values for each Pokemon[1] It's worked great on desktop, but on mobile safari where it matters most the library causes the browser to crash :(

1: https://github.com/goatslacker/pokemon-go-iv-calculator/blob...

methyl#
Consider doing it server-side
userbinator#
Tesseract was one of the best publicly-available CAPTCHA solvers when I was playing around with that stuff a few years ago; I remember somewhere in the neighbourhood of 90%+ accuracy on ReCAPTCHA, no wonder they've changed those considerably since then to make it difficult even for humans.

Load more comments