Interactive PowerBasic Forum

IT-Berater: Theo Gottwald (IT-Consultant) => AI / ChatGPT / Claude AI / LM Studio / AGI => Topic started by: Pierre Bellisle on March 29, 2023, 07:36:05 AM

Title: OCR
Post by: Pierre Bellisle on March 29, 2023, 07:36:05 AM
I was working lately with Tesseract OCR for one of my app.
(It's a process that extract text from image)
It gave me the idea to make a utility to read any part of the screen.
Then I found a nice little one.

Capture2Text (https://capture2text.sourceforge.net/#download)

No install, no auto start, no add, no junk, just a zip you put where you like,
then you run Capture2Text.exe.
You will have a tray icon.
Put your mouse on top-left corner where you want to grab text,
Type Window+Q
Click and drag a rectangle and you will get a popup with the text extracted from the image you selected.
Not perfect but more than fair, really good to have.
You may add some language from the site.
English, French, German, Japanese, Korean, Russian, and Spanish come packed in the main download,
I was tired to retype valuable text from image on the net or from some images I got...

Have fun
Title: Re: OCR
Post by: Theo Gottwald on March 29, 2023, 01:01:45 PM
Thats a good Tipp, Pierre.
Even the Sourcecode (https://sourceforge.net/projects/capture2text/files/SourceCode/) is available!
The OCREngine.cpp has just 12 kb.
I wonder where the OCR is really done. Did you ever take a look on the Sourcecode?
Title: Re: OCR
Post by: Pierre Bellisle on March 29, 2023, 10:15:48 PM
Not yet,
When I was working with Tesseract (https://github.com/tesseract-ocr/tesseract), I was hoping to find a single dll that do easy OCR.
Not to resolve thing like captcha, but simple horizontal text like we have on our screen most of the time.
With Tesseract (https://github.com/tesseract-ocr/tesseract) I end up with 25 needed dll for my little program. It's too much.

Yes, It could be a good thing to look at the Sourcecode (https://sourceforge.net/projects/capture2text/files/SourceCode/) .
One more project on the plate. :-)
Title: Re: OCR
Post by: Theo Gottwald on March 30, 2023, 12:04:10 PM
Such a DLL is also what i would need, Pierre, so keep me updated.
Possibly there are even Windows (Office-) API's that can just be called that will do the Job.

On the other side i have such a project (unready) Neural Network Project that will recognize Letters on Screen in multiple Fonts, colors and sizes (in Cleartype) with >95% accuracy of all sorts and is much smaller then Teseract and in Pure PB.
If you want to work on it i can share the code with you. I just never got the time to finish and optimize it.
I would wonder if you can understand my code better then i can understand your code.