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§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".