Forum Discussion
syedsafvan
16 years agoContributor
Hello TCUser,
All you would need to do is clearly define the small portion of the image you need. That you can do by defining the coordinates of the rectangle of that small portion.
If you can get that from the properties of other child objects that'll be great, else you could just hard code the coordinates by analyzing your picture a bit.
XL = QObj.Left
YT = QObj.Top
XR = QObj.Width
YB = QObj.Height
Set Rect = Aliases.My_Process.My_Form.My_Frame.Picture(XL, YT, XR, YB, False)
Set OCRObj = OCR.CreateObject(Rect)
Set OCROptions = OCRObj.CreateOptions
TextToBeRecognised = OCRObj.GetText(OCROptions)
If you are not able to get the coordinates as XL = QObj.Left, you could hard code it as XL = 202 if that is always the rectangle you want to perform your OCR on;
Hope that makes sense
Thankyou
Syed
Related Content
- 2 years ago
- 2 years ago
Recent Discussions
- 30 minutes ago
- 24 hours ago
- 7 days ago
- 11 days ago