ocr_server

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2020 License: MIT Imports: 9 Imported by: 0

README

OCR server

Used for reading simple CAPTCHA. Powered by Tesseract 4.1.1

API

/base64 POST

Example body:

{
    "base64": "iVBORw0KGgoAAAANSUhEUgAAABYAAAAkCAMAAAC62DqvAAAAP1BMVEUAAAAkJSgjKCgoKCglJSgjJSckJSgjJSkkJCYnJycnJycqKiokJSgjJSckJSgkJCclJSglJSklJSwaGhokJSjbbGjNAAAAFHRSTlMA8joT0HDMil0hGgbVtaWVUkQpCmqOj4cAAABQSURBVCjP5cg3DoAwEATAdcSBjP//VtCVvkWixlMOPqopFL0utmayWt8ek15puibTtT/cGtki0UWQnl3Xxcj7/u2gf/EPoL+B/gHlXJcdb24oNg3pSN9UAQAAAABJRU5ErkJggg==",
    "whitelist": "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
}

base64 field can have prefix data:image/png;base64,

Install

This project Dockerfile build Tesseract from source so you can choose suitable version.

Convenient commands for dev:

docker build --tag=daominah/ocr_server .

docker rm -f ocr_server

docker run -dit --restart always --name=ocr_server -p=35735:35735 daominah/ocr_server

Config

Tesseract parameters can be changed to modify its behaviour in tesseract.cfg

Doc: Tesseract ControlParams

Source

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL