LogIn E-mail
설계이야기
ocr cv2 py
# 29 jinsung    70.1.1 09:00

import os
import cv2
from matplotlib import pyplot as plt
import numpy as np
import imutils
import easyocr

img =cv2.imread("p1038_02.png")
gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
#plt.imshow(cv2.cvtColor(gray,cv2.COLOR_BGR2RGB))
cropped_image=gray[0:30,0:20]
print(gray[0:3,0:2])
print(cropped_image.shape)
print(cropped_image)
print(type(cropped_image))
aaa=gray[0:3,0:2]
print(aaa)
print(aaa.shape)
plt.imshow(cv2.cvtColor(cropped_image,cv2.COLOR_BGR2RGB))
plt.show()
#plt.imshow(cv2.cvtColor(gray,cv2.COLOR_BGR2RGB))
reader = easyocr.Reader(['ko','en'])
result = reader.readtext(cropped_image)
print(result)

첨부파일: pix2.py
게시물: 28 건, 현재: 1 / 1 쪽
[1]
번호 제       목 작성자 등록일 방문
29  ocr cv2 py jinsung 21.9.17 25
28  PIL to numpy jinsung 21.9.15 27
27  pygame.display.flip vs pygame.display.update jinsung 21.9.6 31
26  house.py jinsung 21.3.18 148
25  move_circle_j1.py jinsung 21.3.18 122
24  bounce_j1.py jinsung 21.3.18 110
23  모두의 파이썬 - 20일만에배우는 프로그래밍 기초 JMJS 20.1.8 286
22  python -m pip install -U pip JMJS 19.11.25 246
21  get =lambda i,m ... JMJS 19.11.13 256
20  2차원 리스트, 튜플 JMJS 19.11.13 267
19  [turtle]def polygon3(n,c,d) JMJS 19.11.11 245
18  [turtle]def polygon2(n,a) JMJS 19.11.11 249
17  def factorial(n) JMJS 19.11.11 233
16  def sum_func(n) JMJS 19.11.11 276
15  def hello() fun1(a) fun2(a,b) JMJS 19.11.11 258
14  while sum JMJS 19.11.11 222
13  random calculation JMJS 19.11.11 233
12  turtle random JMJS 19.11.11 236
11  import time time.time JMJS 19.11.11 247
10  turtle begin_fill end_fill JMJS 19.11.11 225
9  if else JMJS 19.11.11 228
8  input JMJS 19.11.11 236
7  list JMJS 19.11.11 251
6  turtle triangle JMJS 19.11.11 238
5  for range JMJS 19.11.11 225
4  모듈 사용하기 JMJS 19.11.11 239
3  import 파이썬 모듈 가져다 쓰기 JMJS 19.11.11 255
1  print 줄바꿈 JMJS 19.11.11 285
[1]