/gosseract

Golang OCR library, wrapping Tesseract-ocr

Primary LanguageGoMIT LicenseMIT

Gosseract-OCR Build Status GoDoc

Tesseract-OCR command wrapper for Golang

code example

package main

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

func main() {
    // This is the simlest way :)
    out := gosseract.Must(gosseract.Params{
			Src:       "your/img/file.png",
			Languages: "eng+heb",
    })
    fmt.Println(out)

    // Using client
    client, _ := gosseract.NewClient()
    out, _ = client.Src("your/img/file.png").Out()
    fmt.Println(out)
}

sample application

ocrserver ocrserver: the minimum OCR server with using gosseract.

installation

  1. install tesseract-ocr
  2. install go
  3. install gosseract
    • go get github.com/otiai10/gosseract
  4. install mint for testing
    • go get github.com/otiai10/mint
  5. run the tests at first↓

test

go test ./...

dependencies

issues