OCR

Extract text from images

OCR (Optical Character Recognition) extracts text from images.

Diagram

OCR

🖼️ Image

👁️ OCR

📝 Text

🤖 Agent

Quick Start

  1. Process Image
    rust
    use praisonai::{Agent, tool};
    
    #[tool]
    async fn extract_text(image_path: String) -> String {
        // OCR processing
        ocr::extract(&image_path).await
    }
    
    let agent = Agent::new()
        .name("Reader")
        .tool(extract_text)
        .build()?;
    
    agent.chat("Read the text from screenshot.png").await?;

Supported Formats

FormatExtension
PNG.png
JPEG.jpg, .jpeg
PDF (scanned).pdf
TIFF.tiff

Related