Ocrs

interface Ocrs : ScriptCloseable, Variable

OCR 工厂接口,用于通过配置方式创建不同类型的 OCR 实例。

实现该接口的类可作为脚本变量使用,并支持资源自动释放。 此接口提供了一系列方法,用于创建不同类型的 OCR 实例,包括 Tesseract、百度、Paddle 和 ML Kit 等。 用户可以根据具体需求,在配置块中设置相应的参数,以定制 OCR 实例的行为。

See also

ScriptCloseable

提供资源释放能力的接口,实现该接口的类可以确保在不再使用时正确释放资源。

Variable

支持在脚本中作为变量使用的接口,使得实现该接口的类可以方便地在脚本环境中使用。

Functions

Link copied to clipboard
abstract fun baidu(baiduOcrConfig: BaiduOcrConfig.() -> Unit): BaiduOcr

创建百度 OCR 实例。

Link copied to clipboard
abstract override fun close()
Link copied to clipboard
abstract fun getContext(): ScriptContext
Link copied to clipboard
abstract fun getGlobalName(): String
Link copied to clipboard
abstract fun getPublicType(): Type
Link copied to clipboard
abstract fun isClosed(): Boolean
Link copied to clipboard
abstract fun isPrefixRequired(): Boolean
Link copied to clipboard
abstract fun isSuffixRequired(): Boolean
Link copied to clipboard
abstract fun paddle(paddleOcrConfig: PaddleOcrConfig.() -> Unit): PaddleOcr

创建 Paddle OCR 实例。

Link copied to clipboard
abstract fun tesseract(tesseractOcrConfig: TesseractOcrConfig.() -> Unit): TesseractOcr

创建 Tesseract OCR 实例。