This is a tiny OCR project and just provide a caller method to interact with Tesseract (Which is a known open source OCR library project written in C++).
- OCR on static image (result in text or the value of probability)
- OCR on screen with specified region (result in text or the value of probability)
Download and Install the Tesseract OCR Engine:
For more details, please refer to Github: https://github.com/tesseract-ocr/tesseract
Windows binary(3-parties) and Trained data: https://sourceforge.net/projects/tesseract-ocr-alt/files/
For Windows user, you can install Tesseract OCR engine from this projecct directory(test/tesseract-3.02.02-chi_traineddata.7z) I have packed with the Traditional Chinese trained data.
command line test
Please make sure the Tesseract OCR engine can be called from command/unix cli.
(*the version number will be printed if Tesseract is set up correctly. If none of this, please make sure you have added the installation path to the PATH environment variable. Almost the default path should be C:\Program Files (x86)\Tesseract-OCR)
usage on Node (please refer to the /test/test[1-5].js for detailed usage)
npm install easy-tesseract-ocr --save
const eto = ;console;eto;