pub trait OcrEngine: Send + 'static {
// Required method
fn recognize(
&mut self,
view: &FrameView<'_>,
) -> Result<Vec<TextSpan>, DetectorError>;
}Expand description
Pluggable OCR backend. The default ONNX/PaddleOCR implementation lives in
the visual-cortex-ocr-onnx crate; any engine can slot in here. Returning an empty
vec means “no text present” and is not an error.
Required Methods§
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl OcrEngine for Box<dyn OcrEngine>
Boxed engines are engines, so builder plumbing can defer construction.
impl OcrEngine for Box<dyn OcrEngine>
Boxed engines are engines, so builder plumbing can defer construction.