df-ocr-switcher 0.1.0

Document OCR pipeline in pure Rust: scanned PDF / multi-page TIFF / image → Markdown. PaddleOCR PP-OCRv6 and Tesseract 5.5 as interchangeable engines, PP-DocLayoutV3 layout for both.
Documentation
1
2
3
4
5
6
7
8
9
use std::path::Path;
use image::RgbImage;
use crate::error::Result;

/// Carica una singola immagine (PNG, JPEG, BMP, TIFF pagina singola, …)
/// e la converte in RGB8.
pub fn load_image(path: impl AsRef<Path>) -> Result<RgbImage> {
    Ok(image::open(path)?.to_rgb8())
}