filmov
tv
How to convert image to text using python

Показать описание
In this tutorial you will learn how to convert / turn images into text by using python and the pytesseract ocr module. You will also learn how to automate keyboard functions and drag the mouse so that you can “do something” based on the text you detect.
Pytesseract ocr is a python library that helps with optical character recognition, or “ ocr “ in short. If you are having issues with the ocr library, please try to use python 3.7 64 bit. If you are getting inaccurate results, try to make the image size larger as ocr gets better the larger the image is (don’t overdo it of course)
As usual, the full finished code can be found on the project’s github page:
Convert image to text: 0:25
Keyboard automation: 4:14
Mouse drag: 6:15
Code and links used in video (in order):
Image to text:
pip install pytesseract
pip install pillow
import pyautogui
from PIL import Image
from pytesseract import *
Keyboard automation:
pip install pywin32
pip install pyautogui
pip install keyboard
import time
import pyautogui
import keyboard
import win32api, win32con
Mouse drag:
import time
import win32api, win32con
win32api.SetCursorPos((500,500))
win32api.SetCursorPos((500,300))
Hope you enjoyed the video, if it helped please consider subscribing :)
I will also run polls on the server for future videos, so check it out if you’re interested in staying.
Thanks for watching!
#botting #python #automation
Pytesseract ocr is a python library that helps with optical character recognition, or “ ocr “ in short. If you are having issues with the ocr library, please try to use python 3.7 64 bit. If you are getting inaccurate results, try to make the image size larger as ocr gets better the larger the image is (don’t overdo it of course)
As usual, the full finished code can be found on the project’s github page:
Convert image to text: 0:25
Keyboard automation: 4:14
Mouse drag: 6:15
Code and links used in video (in order):
Image to text:
pip install pytesseract
pip install pillow
import pyautogui
from PIL import Image
from pytesseract import *
Keyboard automation:
pip install pywin32
pip install pyautogui
pip install keyboard
import time
import pyautogui
import keyboard
import win32api, win32con
Mouse drag:
import time
import win32api, win32con
win32api.SetCursorPos((500,500))
win32api.SetCursorPos((500,300))
Hope you enjoyed the video, if it helped please consider subscribing :)
I will also run polls on the server for future videos, so check it out if you’re interested in staying.
Thanks for watching!
#botting #python #automation
Комментарии