婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁(yè) > 知識(shí)庫(kù) > python pytesseract庫(kù)的實(shí)例用法

python pytesseract庫(kù)的實(shí)例用法

熱門(mén)標(biāo)簽:宿州電話(huà)機(jī)器人哪家好 地圖標(biāo)注與注銷(xiāo) 百應(yīng)電話(huà)機(jī)器人總部 電梯新時(shí)達(dá)系統(tǒng)外呼顯示e 旅游廁所地圖標(biāo)注怎么弄 南昌地圖標(biāo)注 成都呼叫中心外呼系統(tǒng)哪家強(qiáng) 西青語(yǔ)音電銷(xiāo)機(jī)器人哪家好 無(wú)錫智能外呼系統(tǒng)好用嗎

說(shuō)明

1、pytesseract需要與安裝在本地的tesseract-ocr.exe文件一起使用。

2、需要注意的是,安裝時(shí)必須選擇中文包,默認(rèn)只支持英文識(shí)別。

安裝命令

pip install pytesseract

實(shí)例

import pytesseract
from PIL import Image
text = pytesseract.image_to_string(Image.open(r"d:\Desktop\39DEE621-40EA-4ad1-90CC-79EB51D39347.png"))
print(text)

識(shí)別結(jié)果輸出

Using Tesseract OCR with Python
# import the necessary packages
from PIL import Image
import pytesseract
import ergperse
import cv2
import os
 
# construct the argument parse and parse the arguments
ap = argparse.ArgunentParser()
ap.add_argument("-i", "--image", required-True,
help="path to input image to be OCR'd")
ap.add_argument("-p", "--preprocess", typesstr, default="thresh",
helpe"type of preprocessing to be done")
args = vars (ap.parse_args())

實(shí)例擴(kuò)展:

Python使用pytesseract庫(kù)識(shí)別圖片文字

準(zhǔn)備

首先需在本機(jī)安裝Tesseract客戶(hù)端,然后安裝pytesseract庫(kù):

pip install pytesseract

沒(méi)安裝過(guò)PIL的也要安裝一下,因?yàn)樗{(diào)用的第一個(gè)參數(shù)是由Image類(lèi)返回:

pip install PILLOW

實(shí)例

import pytesseract
from PIL import Image

img = Image.open("D://aa.jpg")
text = pytesseract.image_to_string(img, lang="chi_sim")
print(text)

到此這篇關(guān)于python pytesseract庫(kù)的實(shí)例用法的文章就介紹到這了,更多相關(guān)python pytesseract庫(kù)是什么內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

您可能感興趣的文章:
  • python利用pytesseract 實(shí)現(xiàn)本地識(shí)別圖片文字
  • python opencv pytesseract 驗(yàn)證碼識(shí)別的實(shí)現(xiàn)
  • Python pytesseract驗(yàn)證碼識(shí)別庫(kù)用法解析
  • python3使用Pillow、tesseract-ocr與pytesseract模塊的圖片識(shí)別的方法
  • python3光學(xué)字符識(shí)別模塊tesserocr與pytesseract的使用詳解
  • Python基于內(nèi)置庫(kù)pytesseract實(shí)現(xiàn)圖片驗(yàn)證碼識(shí)別功能
  • python下調(diào)用pytesseract識(shí)別某網(wǎng)站驗(yàn)證碼的實(shí)現(xiàn)方法

標(biāo)簽:渭南 西安 雅安 濰坊 贛州 許昌 辛集 七臺(tái)河

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《python pytesseract庫(kù)的實(shí)例用法》,本文關(guān)鍵詞  python,pytesseract,庫(kù),的,實(shí)例,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《python pytesseract庫(kù)的實(shí)例用法》相關(guān)的同類(lèi)信息!
  • 本頁(yè)收集關(guān)于python pytesseract庫(kù)的實(shí)例用法的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 甘泉县| 乌拉特前旗| 个旧市| 梁山县| 湖口县| 方正县| 莱芜市| 西峡县| 翼城县| 搜索| 衡东县| 长葛市| 吉安市| 察隅县| 甘谷县| 同仁县| 黑山县| 贺兰县| 伊吾县| 伊川县| 富阳市| 象州县| 栖霞市| 茌平县| 临猗县| 新泰市| 新疆| 青川县| 木兰县| 广东省| 柳江县| 社旗县| 连云港市| 丹巴县| 涞水县| 黄陵县| 沙雅县| 葫芦岛市| 张北县| 阿坝| 清远市|