Advertisement
MizunoBrasil

Converter imagem em texto usando python em poucas linhas de código

Jun 23rd, 2023 (edited)
869
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. #Maiores detalhes como instalação em https://www.youtube.com/watch?v=HHHkh9IOqhI
  2.  
  3. import pytesseract as pyt
  4. import cv2
  5.  
  6. img = cv2.imread("text_img.png")
  7.  
  8. pyt.pytesseract.tesseract_cmd = "C:\\Program Files\\Tesseract-OCR\\tesseract.exe"
  9.  
  10. text = pyt.image_to_string(img)
  11.  
  12. print(text)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement