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 (發布於 )
用户参与
星數2.9k
關注者數51
派生數295
提交數524
已啟用問題?
問題數189
打開的問題數30
拉請求數108
打開的拉請求數3
關閉的拉請求數26
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?