Hi,
I'm facing an issue since long time. Every time I run the script to get text from image, I usually get wrong text out of OCRArea function. I have checked the dimensions of the rectangle many times but it returns wrong text every time.
Any idea why this is happening?
Is this a bug of MS 15 which I'm unaware of?
Regards,
Ushahra
OCRArea captures wrong text most of the time
Moderators: Dorian (MJT support), JRL
- Dorian (MJT support)
- Automation Wizard
- Posts: 1389
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: OCRArea captures wrong text most of the time
It's certainly not a bug we've had reported. I'm sure we'd have had a lot of reports if it was a bug.
Something somewhere must be changing. Does your monitor setup change at all?
Adding or removing a monitor will change screen coordinates.
For example if you add a 2nd screen as an extension above, it'll shift the coordinates of your original screen down - in my case, by 2160. Could this be it?
When you get the incorrect results, are the screen coordinates still matching the script coordinates? Are you hard coding the coordinates you use in OCRArea or are you getting them programatically somehow? If the latter, have you looked in the watch list to ensure they are as expected?
Something somewhere must be changing. Does your monitor setup change at all?
Adding or removing a monitor will change screen coordinates.
For example if you add a 2nd screen as an extension above, it'll shift the coordinates of your original screen down - in my case, by 2160. Could this be it?
When you get the incorrect results, are the screen coordinates still matching the script coordinates? Are you hard coding the coordinates you use in OCRArea or are you getting them programatically somehow? If the latter, have you looked in the watch list to ensure they are as expected?
Yes, we have a Custom Scripting Service. Message me or go here