Coder Social home page Coder Social logo

Size limitation for text, and sometimes prior OCR conversion in clipboard is not replaced with new OCR conversion about textshot HOT 4 CLOSED

sjscotti avatar sjscotti commented on August 28, 2024
Size limitation for text, and sometimes prior OCR conversion in clipboard is not replaced with new OCR conversion

from textshot.

Comments (4)

sjscotti avatar sjscotti commented on August 28, 2024

I found at least one of my problems. I created an anaconda environment for textshot and did the pip install -r requirements.txt. But in searching on the internet, it seem for anaconda I needed to install the win32api used by win10toast with conda install pywin32 and not pip. Before win10toast wasn't finding win32api. I'm still exploring whether this addresses the other points I brought up, but for now I'll close this issue.

from textshot.

ianzhao05 avatar ianzhao05 commented on August 28, 2024

Hi, thanks for raising the issue. If you run it from the command line, it should print something that might be able to assist with troubleshooting. With large bodies of text, there is a 5 second timeout which should be enough for most use cases, but you can play with that value on line 92 of textshot.py to see if increasing it helps. Generally, a large text image should be fine.

That's interesting regarding conda + pip not installing win32api, thanks for testing that out!

from textshot.

sjscotti avatar sjscotti commented on August 28, 2024

Thanks for the speedy reply! Another thing that I have done which seems to improve my results is to set the --psm flag in the call on line 92 of textshot.py. So that line now reads...

            pil_img, timeout=5, lang=(sys.argv[1] if len(sys.argv) > 1 else None), config="--psm 6" 

At least that is what is working better for me..

from textshot.

ianzhao05 avatar ianzhao05 commented on August 28, 2024

That's a good idea to change the PSM. I might add a command line option to make the config easier to customize.

from textshot.

Related Issues (20)

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.