New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding getUpText() and isUpText() #237
Conversation
filter: TCompareRules := [-1, 85, true, 55]; | ||
begin | ||
ocr.clientID := exportImageTarget(); | ||
exit(replaceRegExpr('[^a-zA-Z\d\s]', ocr.recognize(box, filter), '', true)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you choose to remove everything that's not a character or a decimal from the result of GetUpText
. Would not the raw output be better?
Looks good, would be nice if you could answer my one question tho. Update: I also noted that the space width is ~5pixels, rather than 4 which is default. begin
ocr.Init(FontPath + 'UpCharsEx');
ocr.FontData.SpaceWidth := 5;
end; |
Agree, isn't a '-' etc also quite useful? |
@warpie I decided it would be a good idea to sanitize the output if OCR ever bugged out and gave crazy output. I was experimenting with You're right though, there's no real reason to do it. I'll also update the shadow tolerance and add the space width. @MerlijnWajer Yeah, it is. Along with '/' as well. I see now that stripping the output was probably a bad idea. I'll change it. Edit: Pushed. Thanks for the feedback :) |
Adding getUpText() and isUpText()
Merged :) |
Nice work! Good to keep this ticking over. Sent from phone. Excuse brevity. -------- Original Message -------- Merged :) — |
Adds some OCR functions to SRL-6 using SimpleOCR. These functions will read UpText, similar to the existing functions that read mouse-over text.
Discussion thread on Villavu: https://villavu.com/forum/showthread.php?t=115737
Video: https://www.youtube.com/watch?v=VB-3e8vBRhU