Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

35
LINES

< > BotCompany Repo | #1015266 // Recognize text on current screen - old

JavaX source code (desktop) [tags: archive use-pretranspiled] - run with: x30.jar

Download Jar. Uses 3874K of libraries. Click here for Pure Java version (12763L/94K).

!7

!include once #1015415 // GrabbedImage

static BufferedImage img;
static L<RecognizedText> texts;
static ImageSurface is;
static ReliableSingleThread rst;

p-subst-autorestart {
  doIt();
  showButton("Again", r-thread { doIt() });
}

svoid doIt {
  if (rst != null) rst.cancel();
  disposeWindow(is);
  is = null;
  print("Shooting");
  img = shootScreenHidingConsole();
  print("Recognizing");
  texts = ocr_recognizeMultiLine_scored(img);
  is = showImageWithRecognizedTexts(img, null, texts);
  rst = new ReliableSingleThread(f reRecognize);
  showImageWithRecognizedTexts_makeTeachable2(img, is, texts,
    filledSimpleRecognizer_cached(), r { rst.trigger() });
}

svoid reRecognize {
  print("Re-recognizing...");
  temp tempDisposeWindow(smallLoadingAnim());
  replaceCollection(texts, ocr_recognizeMultiLine_scored(img));
  is.repaint();
  print("Done");
}

Author comment

Began life as a copy of #1006334

download  show line numbers  debug dex  old transpilations   

Travelled to 5 computer(s): cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, onxytkatvevr, tvejysmllsmz

No comments. add comment

Snippet ID: #1015266
Snippet name: Recognize text on current screen - old
Eternal ID of this version: #1015266/20
Text MD5: dde2661afaa4c961a038bfe59e3feaf8
Transpilation MD5: 0d8ebd3bc5541df2b01cc1bf7b529928
Author: stefan
Category: javax / ocr
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): Yes
Created/modified: 2018-05-23 12:38:56
Source code size: 902 bytes / 35 lines
Pitched / IR pitched: No / No
Views / Downloads: 457 / 1336
Version history: 19 change(s)
Referenced in: [show references]