Skip to main content

VisionBackend

Trait VisionBackend 

Source
pub trait VisionBackend: Send + Sync {
    // Required methods
    fn ocr_page(
        &self,
        page_png: &[u8],
        dpi: u32,
    ) -> Result<Vec<Char>, BackendError>;
    fn detect_table(
        &self,
        region_png: &[u8],
    ) -> Result<Vec<Vec<Cell>>, BackendError>;
}
Expand description

A backend that can recover content the deterministic core cannot.

Required Methods§

Source

fn ocr_page(&self, page_png: &[u8], dpi: u32) -> Result<Vec<Char>, BackendError>

OCR a rasterized page (PNG at dpi) into positioned characters.

Source

fn detect_table( &self, region_png: &[u8], ) -> Result<Vec<Vec<Cell>>, BackendError>

Recognize the cell structure of a borderless-table region (PNG).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§