Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

pytesseract

pip install pytesseract
Comment

pytesseract.image_to

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import pytesseract
import cv2
img = cv2.imread('test.jpg')
img = cv2.resize(img, (600, 360))
hImg, wImg, _ = img.shape

boxes = pytesseract.image_to_boxes(img)
for b in boxes.splitlines():
  b = b.split(' ')
print(b)
x, y, w, h = int(b[1]), int(b[2]), int(b[3]), int(b[4])
cv2.rectangle(img, (x, hImg - y), (w, hImg - h), (50, 50, 255), 1)
cv2.putText(img, b[0], (x, hImg - y + 13), cv2.FONT_HERSHEY_SIMPLEX, 0.4, (50, 205, 50), 1)

cv2.imshow('Detected text', img)
cv2.waitKey(0)
Comment

PREVIOUS NEXT
Code Example
Shell :: yandex browser not playing videos 
Shell :: sync show progress 
Shell :: How to create a new repository on the command line. 
Shell :: electron build windows exe 
Shell :: mac install pytorch 
Shell :: valet: command not found 
Shell :: change permissions pem 
Shell :: chkconfig httpd on Amazon Linux 2 AMI 
Shell :: linux rename command incremental 
Shell :: screen recorder ubuntu 
Shell :: making file executable linux 
Shell :: streamlink save to file 
Shell :: decompress file gz in linux 
Shell :: git grep across all branches 
Shell :: install chrome beta on linux mint 
Shell :: java check java version 
Shell :: ubuntu install ngrok 
Shell :: Error: ENOSPC: System limit for number of file watchers reached, 
Shell :: Bitwarden docker-compose 
Shell :: open android studio project from terminal 
Shell :: Consider using absolute ordering 
Shell :: ngx translate install 
Shell :: command check macos version 
Shell :: batch file cool ending 
Shell :: uninstall service cmd 
Shell :: how to search forward in emacs 
Shell :: list recently updated packages arch 
Shell :: copy ssh key to remote server 
Shell :: install nodejs ubuntu 
Shell :: how to steal stolen deleted code... from github... 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =