desmondmorris / node-tesseract

A simple wrapper for the Tesseract OCR package
Other
675 stars 118 forks source link

How to pass "digits" option? #36

Closed ir-fuel closed 8 years ago

ir-fuel commented 8 years ago

If I only want to recognise digits I need to run tesseract with the digits parameter. I see no way of passing it. Running the code with digits:true in the options structure doesn't work.

ir-fuel commented 8 years ago

Ok, found it (after looking in the sources)

I had to do:

var options = {
  l: 'eng',
  psm: 6,
  binary: '/usr/local/bin/tesseract',
  config:["digits"]
};