Capture2Text icon indicating copy to clipboard operation
Capture2Text copied to clipboard

Failed to OCR a screen rect: read_params_file: parameter not found: enable_new_segsearch

Open brunoais opened this issue 7 years ago • 9 comments

I compiled the program as explained in the README. Because of the error mentioned in #2, I moved all that was in tessdata into where Capture2Text_CLI is. Then I did what I mention below

In ubuntu 18 LTS with Xorg windows server, when I run the command: ./Capture2Text_CLI --screen-rect "400 200 600 300" The program outputs: read_params_file: parameter not found: enable_new_segsearch

Any idea what is wrong?

See also #2 for another issue I encountered

brunoais avatar Aug 15 '18 18:08 brunoais

Does supplying -platform offscreen as arguments to the tool help at all when running it?

GSam avatar Aug 20 '18 04:08 GSam

Will check when able...

brunoais avatar Aug 20 '18 06:08 brunoais

I believe that I built this originally on 16.04, so possibly try that if you can. I may take a look at 18.04, but don't expect anything.

GSam avatar Aug 20 '18 07:08 GSam

Thank you... I just wish they'd do official linux versions...

On Mon, Aug 20, 2018 at 8:41 AM GSam [email protected] wrote:

I believe that I built this originally on 16.04, so possibly try that if you can. I may take a look at 18.04, but don't expect anything.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GSam/Capture2Text/issues/3#issuecomment-414225771, or mute the thread https://github.com/notifications/unsubscribe-auth/AAnB6zKhH5_L7-okuW8ebfx92Vs9uxLHks5uSmgwgaJpZM4V-n61 .

brunoais avatar Aug 20 '18 07:08 brunoais

One other thing, if you can take a screenshot (to the right dimensions and crop), you can do -i <filename>. That way you can chain the command and have the same functionality probably? (Imagemagick or some other tool might be helpful in this manner).

GSam avatar Aug 20 '18 07:08 GSam

good idea. Will try that next weekend or so.... Very busy...

brunoais avatar Aug 20 '18 17:08 brunoais

@GSam I tried with an input file and I got the full screenshot output.... So.... it works as expected when I give an image but it is unable to get an image by itself.... That's an unfortunate bother.... More than half of the work from Capture2Text is the capture itself......

brunoais avatar Sep 02 '18 11:09 brunoais

It is unfortunate. From what I can tell, some of the GUI components work, but not nearly enough of them to build it all in. The only alternative seems to be rewriting the screenshot code to be more Linux specific, but there doesn't seem to be a useful API, plus it has to be reconverted into QT-based images.

GSam avatar Sep 02 '18 23:09 GSam

For now, I did: a shortcut to a personalized script which:

  1. Activates the screenshot program already into "area" mode and saving into a tempfs.
  2. Then order capture2Text to capture the text within.
  3. Store the results in another file in the tempfs.
  4. Copy results to clipboard.
  5. Delete the temporary files.

brunoais avatar Sep 03 '18 06:09 brunoais