# gosseract OCR
[](https://github.com/otiai10/gosseract/actions?query=workflow%3A%22Runtime+Test%22)
[](https://codecov.io/gh/otiai10/gosseract)
[](https://goreportcard.com/report/github.com/otiai10/gosseract)
[](https://github.com/otiai10/gosseract/blob/main/LICENSE)
[](https://pkg.go.dev/github.com/otiai10/gosseract/v2)
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
```go
package main
import (
"fmt"
"github.com/otiai10/gosseract/v2"
)
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](https://github.com/tesseract-ocr/tesseract/wiki), including library and headers
2. `go get -t github.com/otiai10/gosseract`
Check [Dockerfile](https://github.com/otiai10/gosseract/blob/main/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](https://github.com/tesseract-ocr/tesseract/wiki) 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](https://github.com/otiai10/gosseract/tree/main/test/runtimes) for more information about runtime tests.
# Issues
- [https://github.com/otiai10/gosseract/issues](https://github.com/otiai10/gosseract/issues?utf8=%E2%9C%93&q=is%3Aissue)

一个傻子程序媛
- 粉丝: 78
最新资源
- VB语言数组专题讲解PPT学习课件.ppt
- 基于PLC的音乐喷泉控制基础系统综合设计.docx
- 《青少年网络安全与新媒介素养》调查报告.doc
- 高速公路建设档案信息化管理的基本方法模式与加强对策(1).docx
- 浅谈信息技术在电子商务教学中的运用(1).docx
- java程设计.docx
- 计算机安全技术205页完整版教学课件汇总全书电子讲义(1).pptx
- 工程网络计划(网络图).ppt
- jsp专业课程设计方案报告.doc
- 大数据技术在电力行业的研究与应用(1).docx
- 基于PLC的自动售货机系统设计毕业论文(1)(1).doc
- 政府审计信息化浅议(1).docx
- 恒智天成建筑资料软件钢筋混凝土地下构筑物施工(1).doc
- 我们的互联网时代-.ppt
- MATLABSWPU数学运算省公共课一等奖全国赛课获奖课件.pptx
- 公安信息化行业发展趋势PPT.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


