Skip to main content

sceptre-integrating-rust

Embed Sceptre OCR in Rust with Reader, decoded images, model providers and structured error handling.

Datos de origen

Repositorio
xberg-io/sceptre
Última actividad en el origen
14 de octubre de 2026 a las 17:09
Idioma detectado de SKILL.md
inglés
Estrellas
18
Forks
1

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Explorador de archivos
2 archivos

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
description
Embed Sceptre OCR in Rust with Reader, decoded images, model providers and structured error handling.
name
sceptre-integrating-rust
<!-- AI-RULEZ :: GENERATED FILE — DO NOT EDIT Content-Hash: blake3:8a2764e592fca4078d462d08b57a3bed76460dc415af41bc7ff745857663b731 Source-Hash: blake3:5c8442fa8b2f9f7d5d68801c4562f6bf03cc6e52237900bbcf720e4b5bedfa5e Schema-Version: v1 --> # Integrating Rust Add `sceptre = { version = "0.8", features = ["ort-bundled", "download"] }` to Cargo dependencies. The library default features are empty; select a backend explicitly. ```rust use sceptre::{ReadOptions, Reader}; use std::path::Path; let reader = Reader::builder().build()?; let result = reader.readtext(Path::new("receipt.png"), &ReadOptions::default())?; ``` Reuse the reader across images. Call `warm_up()` or build with `build_warmed()` to move model initialization out of the first request. Structured lines expose text, confidence and quadrilateral. For encoded bytes, decode with `Image::from_bytes`, then call `Reader::recognize(&image, &options)`. `Reader::detect` and `Reader::recognize_line` also accept decoded `Image` values. Configure the reader through `Reader::builder().config(OcrConfig::default())`; provide a `ModelProvider` through `.model_provider(...)` for managed or offline assets. Propagate `OcrError` with the failed operation's context; do not convert errors into empty text.
Ver en GitHub