GithubHelp home page GithubHelp logo

rusty-tesseract's People

Contributors

foxzool avatar gakgu avatar icekey avatar serial-ata avatar thomasgruebl avatar vininew921 avatar vladmovchan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rusty-tesseract's Issues

Not getting text from image

This is my code

let img = Image::from_path("C:/Users/{my user}/Downloads/asd.png").unwrap();
let mut my_args = Args::default();
let output = rusty_tesseract::image_to_string(&img, &my_args).unwrap();
println!("The String output is: {:?}", output);

and this is the output

Tesseract Command: tesseract.exe C:/Users/{my user}/Downloads/asd.png stdout -l eng --dpi 150 --psm 3 --oem 3
The String output is: ""

This is the image im using it with
asd

Is it something to do with my image/tesseract args or is it with the crate?

AWS Lambda Function Errors

I'm using rusty-tesseract with a rust lambda function and I'm getting some strange results.

When I run everything locally it works great, super easy to use!

But as soon as I deploy to an AWS Lambda, it breaks with this error:

thread 'main' panicked at 'called Result::unwrap()on anErr value: CommandExitStatusError("exit status: 1", "Error in pixCreateNoInit: pixdata_malloc fail for data\nError in pixCreateTemplateNoInit: pixd not made\nError in pixCreateTemplate: pixd not made\nError in pixCopy: pixd not made\nError in pixGetDepth: pix not defined\nError in pixGetWpl: pix not defined\nError in pixGetYRes: pix not defined\nError in pixClone: pixs not defined\nPlease call SetImage before attempting recognition.\nError during processing.\n")', src/main.rs:158:74

I am deploying using Lambda Layers with pre-built Tesseract binaries. I have tried this with Tesseract v4 and v5 but get the same error each time. Here are the versions I've tried with:

The tesseract version is: "tesseract 4.1.3\n leptonica-1.82.0\n libjpeg 6b (libjpeg-turbo 2.0.90) : libpng 1.5.13 : libtiff 4.0.3 : zlib 1.2.7 : libwebp 0.3.0\n Found AVX2\n Found AVX\n Found FMA\n Found SSE\n"

And also v5:

The tesseract version is: "tesseract 5.3.2\n leptonica-1.83.1\n libjpeg 6b (libjpeg-turbo 2.0.90) : libpng 1.5.13 : libtiff 4.0.3 : zlib 1.2.7 : libwebp 0.3.0\n Found AVX2\n Found AVX\n Found FMA\n Found SSE4.1\n Found OpenMP 201511\n"

It is definitely a possible Lambda environment issue I haven't figured out yet, but I wanted to put this out there in case there is something else going on that you may want to know about.

Feature Request: add hOCR output support

Hi! rusty-tesseract is amzaing work! It works pretty well on my both Linux and MacOS machine!

I have used it on my personal project https://github.com/strrl/dejavu, and I found that I require more detailed information like
page, paragraph, line, not only the "word". ref: STRRL/dejavu#7

I found that both alto and hOCR output could make it possible, and both of them are XML-based output. And I prefer to hOCR because it seems it still keeps updating, https://github.com/kba/hocr-spec/

So here is my proposal:

  • append new function called image_to_hocr, and output is the string which the content is the xml-based hOCR

How do you think about it? ❤️

I could draft a PR for that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.