robotgo/vendor/github.com/otiai10/gosseract
2019-03-01 07:46:30 -04:00
..
.gitignore update dep pkg 2018-08-30 14:25:58 -04:00
.travis.yml update dep pkg 2018-08-30 14:25:58 -04:00
client.go update go mod vendor 2019-03-01 07:46:30 -04:00
CODE_OF_CONDUCT.md update dep pkg 2018-08-30 14:25:58 -04:00
constant.go update go mod vendor 2019-03-01 07:46:30 -04:00
Dockerfile update dep pkg 2018-08-30 14:25:58 -04:00
ISSUE_TEMPLATE.md update dep pkg 2018-08-30 14:25:58 -04:00
LICENSE update dep pkg 2018-08-30 14:25:58 -04:00
README.md update dep pkg 2018-08-30 14:25:58 -04:00
tessbridge.cpp update go mod vendor 2019-03-01 07:46:30 -04:00
tessbridge.h update go mod vendor 2019-03-01 07:46:30 -04:00

gosseract OCR

Build Status codecov Go Report Card GoDoc

Golang OCR package, by using Tesseract C++ library.

OCR Server

Do you just want OCR server, or see the working example of this package? Yes, there is already-made server application, which is seriously easy to deploy!

👉 https://github.com/otiai10/ocrserver

Example

package main

import (
	"fmt"
	"github.com/otiai10/gosseract"
)

func main() {
	client := gosseract.NewClient()
	defer client.Close()
	client.SetImage("path/to/image.png")
	text, _ := client.Text()
	fmt.Println(text)
	// Hello, World!
}

Install

  1. tesseract-ocr, including library and headers
  2. go get -t github.com/otiai10/gosseract

Check Dockerfile for more detail of installation, or you can just try by docker run -it --rm otiai10/gosseract.

Test

In case you have tesseract-ocr on your local, you can just hit

% go test .

Otherwise, if you DON'T want to install tesseract-ocr on your local, kick ./test/runtime which is using Docker and Vagrant to test the source code on some runtimes.

% ./test/runtime --driver docker
% ./test/runtime --driver vagrant

Check ./test/runtimes for more information about runtime tests.

Issues