Package: easyocr-window-scanner
Don't install this module without reading the instructions!!The best OCR engineIn my opinion, EasyOCR is the best OCR engine out there.The results are much better than Tesseract's OCR, but it is much slower.And, unfortunately, it is a bit tricky to install.Example -Bluestacks[adb/hwnd]<a href="https://www.youtube.com/watch?v=hDRwmzbrvaY">

     <img src="https://img.youtube.com/vi/hDRwmzbrvaY/0.jpg" style="width:100%;">

  </a>Step 1If you have a GPU and Windows (by the way, this module is only for Windows), you should install torch and torchvision first to get a good speed up*Fromhttps://github.com/JaidedAI/EasyOCRNote 1: For Windows, please install torch and torchvision first by following the official instructions herehttps://pytorch.org. On the pytorch website, be sure to select the right CUDA version you have. If you intend to run on CPU mode only, select CUDA = None.*Step 2pipinstalleasyocr_window_scannerStep 3EasyOCR installs the headless (light) version of opencv that doesn't even have cv2.imshow, soEasyOCR2Df.scan_window_with_adb / EasyOCR2Df.scan_window_with_hwnd don't work!Tofixthisproblem,dothis:pipuninstallopencv-pythonpipuninstallopencv-python-headlesspipinstall--upgrade--force-reinstallopencv-python==4.5.5.62Step 4You might get the following error when you import the module:cv2.error: Unknown C++ exception from OpenCV code.It seems to be a very common issue with EasyOCRhttps://github.com/opencv/opencv-python/issues/602#issuecomment-1070290110To fix this problem, you have to open:"C:\Users\YOURUSERNAME\anaconda3\envs\YOURENV\Lib\site-packages\easyocr\craft_utils.py"and change:nLabels, labels, stats, centroids = cv2.connectedComponentsWithStats(text_score_comb.astype(np.uint8), connectivity=4)to:nLabels, labels, stats, centroids = cv2.connectedComponentsWithStats(text_score_comb.astype(np.uint8))Step 5#We are finally ready to gofromeasyocr_window_scannerimportEasyOCR2Df#create an instance, you can pass any argument you would pass to the EasyOCR moduleeasyo=EasyOCR2Df(["en"])#Taking screenshots using adb, and do OCR on the flyeasyo.scan_window_with_adb(adb_path=r"C:\ProgramData\adb\adb.exe",adb_serial='localhost:5555',quit_key='q')#Taking screenshots using the windows handle, and do OCR on the flyeasyo.scan_window_with_hwnd(hwnd=None,regular_expression='[bB]lue[sS]tacks.*',quit_key="q")#If you just want to have the OCR results as a DataFrame, use:easyo.start_ocr_to_df(r'https://i.ytimg.com/vi/fa82Qpw6lyE/hqdefault.jpg').get_results_df()Out[5]:textconf...middle_xmiddle_y0Nostopsigns,speedin' limit  0.842704  ...       148        901Nobody's gonna slow me down  0.744984  ...       159       1122Likeawheel,gonnaspinit0.966272...1411363Nobody's gonna mess me 'round0.994361...1651574Satan!Paidmydues0.708869...1531805Playin' in a rockin'band0.979712...1332026Mama' Look at me  0.559171  ...       147       2247Tmonmywayt0thepromiseland0.703882...1742478Hey0.999969...531799Hey0.999027...52224[10rowsx14columns]#If you want to have the image of the OCR results without showing it, use:easyo.start_ocr_to_df(r'https://i.ytimg.com/vi/fa82Qpw6lyE/hqdefault.jpg').draw_easyocr_results().get_results_picture()Out[7]:array([[[0,0,0],[0,0,0],[0,0,0],...,[0,0,0],[0,0,0],[0,0,0]],...