Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OCR
#2
Macro Macro2761
Code:
Copy      Help
str s1
str fBmp="$temp$\qm_modi.bmp"

RECT r
if(scan("resource:<Image>image:h1B7A5E0B" w r 16|128))
,fBmp.expandpath
,OffsetRect &r 0 50
,CaptureImageOnScreen(r.left r.top r.right-r.left r.bottom-r.top fBmp)
,typelib MODI {A5EDEDF4-2BBC-45F3-822B-E60C278A1A79} 13.0
,MODI.Document doc._create
,doc.Create(fBmp)
,doc.OCR(MODI.miLANG_ENGLISH -1 0)
,MODI.Image im=doc.Images.Item(0)
,s1=im.Layout.Text

2. Tesseract does not OCR screen text well. At least when I tested it last time, 1 year ago. It works well only with bigger font text. We can resize captured screen text, but OCR results are still poor. MODI is much better. I have the test macro, can post if you need.

For example, I tried to OCR your post with tesseract.
Results without resizing, time 7.5 s:
Code:
Copy      Help
miswasutyarigitaiocncode.ttmever,tttaveazmiturissrresvdnrnriscode.

I I want [a capture a iuage based on were me previms iuage is located. Lg. iuage:trttt7A5(ott is located at x: 510, y: 310 I want. [a capture the hcatiuu x:610,y:310-ó50.wltaldnldtange
[a do IItis?

1. We issues wilIt wont ever sitce I upgraded my npemt'llg system In witdrms I0. sttarepairt 1007 carmtbe itslaled anymore. I '01-GÇ£ a open Sources ocn Films:llgimubmnmliesseracr
acr/tesseractbut I need some guide on him In 'lirooopemle it itln the code.
Results when resized 3 times, time 0.9 s:
Code:
Copy      Help
This was my original OCR code. However, I have a 2 minor issues with this code.

1 . I want to capture a image based on where the previous image is located. E.g. image:h1B7A5EOB is located at x: 620, y: 320 I want it to capture the location x:620, y: 320460. What do I diange
to do this?

2. I've issues with MODI ever since I upgraded my operating system to windows 10. Sharepoint 2007 cannot be installed anymore. I found a open sources OCR https:llgithub.comltesseract-
ocrltesseract but I need some guide on how to in-cooperate it into the code.


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)