gosseract

Go package for OCR (Optical Character Recognition), by using Tesseract C++ library

Github星跟踪图

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

主要指标

概览
名称与所有者otiai10/gosseract
主编程语言Go
编程语言Go (语言数: 5)
平台
许可证MIT License
所有者活动
创建于2013-10-11 07:27:53
推送于2025-03-24 23:56:26
最后一次提交
发布数11
最新版本名称v2.4.1 (发布于 )
第一版名称v2.0 (发布于 )
用户参与
星数3k
关注者数50
派生数300
提交数524
已启用问题?
问题数189
打开的问题数30
拉请求数108
打开的拉请求数3
关闭的拉请求数26
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?