I want to get the word under mouse cursor using OCR, mainly form web pages and ebooks, my procedures are:
Get the location of the rectangle containing the word under mouse cursor. For example , if my mouse cursor is on
century
, then I need to get the rectangle containingcentury
Take screen shot of the rectangle
- Using OCR engines like Tesseract to convert the rectangular image to text, then I get the word under mouse cursor this way:)
The difficulty resides in the first step , I know nearly nothing about image processing , so cannot figure out a way to locate the rectangle . Speed matters in my scenario , so please guide me a fast and efficient solution on this ? Thanks so much!