OCR
Extract text from images
OCR (Optical Character Recognition) extracts text from images.
graph LR
subgraph "OCR"
I[🖼️ Image] --> O[👁️ OCR]
O --> T[📝 Text]
T --> A[🤖 Agent]
end
classDef image fill:#6366F1,stroke:#7C90A0,color:#fff
classDef text fill:#10B981,stroke:#7C90A0,color:#fff
class I image
class O,T,A textQuick Start
- 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
| Format | Extension |
|---|---|
| PNG | .png |
| JPEG | .jpg, .jpeg |
| PDF (scanned) | .pdf |
| TIFF | .tiff |