Documentation
¶
Overview ¶
Package ocr 提供 OCR 引擎的统一接口与结果标准化。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPClient ¶
type HTTPClient struct {
Endpoint string
APIKey string
Language string
Client *http.Client
MaxResponseBytes int64
}
HTTPClient 把图片发送到实现 OFD 通用 OCR HTTP 协议的服务。 请求体是 PNG,X-OCR-Language 指定语言;响应 JSON 的 blocks 使用左上角原点像素坐标。
func NewHTTPClient ¶
func NewHTTPClient(endpoint, apiKey, language string) *HTTPClient
NewHTTPClient 创建远程 OCR 引擎。
type Tesseract ¶
Tesseract 调用系统中的 tesseract 命令行程序。
func NewTesseract ¶
NewTesseract 创建 Tesseract OCR 引擎。
Click to show internal directories.
Click to hide internal directories.