Crate paddleocr

A simple wrapper for hiroi-sora/PaddleOCR-json
.
Usage
let mut p = paddleocr::Ppocr::new(
PathBuf::from(".../PaddleOCR-json.exe"), Default::default(), )
.unwrap();
let now = std::time::Instant::now(); {
println!("{}", p.ocr(Path::new(".../test1.png").into()).unwrap());
println!("{}", p.ocr(Path::new(".../test2.png").into()).unwrap());
println!("{}", p.ocr(Path::new(".../test3.png").into()).unwrap());
println!("{}", p.ocr_clipboard().unwrap());
}
println!("Elapsed: {:.2?}", now.elapsed());
Use ocr_and_parse
to get structured results.
By enabling the bytes
feature, you can pass image data as a byte array (AsRef<[u8]>
).