ubuntu中pytesseract 安装与使用示例
1. 安装 tesseract-ocr 包
安装方法: sudo apt-get install tesseract-ocr
2. 安装 PIL
PIL(python imaging library)是python中的图像处理库
安装方法: sudo apt-get install python-imaging
3. 安装 pytesseract
安装方法: pip install pytesseract
4. pytesseract使用示例
新建py文件或者直接在终端中输入以下程序:
import pytesseract
from PIL import Image
img = Image.open("./01.jpg")
code = pytesseract.image_to_string(img)
print code
01.jpg:
验证:
ubuntu中pytesseract 安装与使用示例的更多相关文章
- ubuntu中mysql安装失败
在ubuntu中mysql安装失败后,卸载重新安装还是安装失败,之后找了资料说是卸载的不干净,然后进行下面操作,重新安装成功. 解决办法如下: sudo rm /var/lib/mysql/ -Rsu ...
- Ubuntu中wine安装的程序如何卸载
很多朋友尝试在Ubuntu中用wine安装exe格式的应用程序,但经常遇到装完之后启动程序就崩溃.或者根本无法启动.无法使用的情况,于是想立即把安装的程序卸载,可是在wine中却找不到卸载exe软件的 ...
- Ubuntu中MongoDB安装
在Ubuntu中MongoDB有时候启动不起来,可以参考以下方法从新安装: 1.导入包管理系统使用的公钥 Ubuntu 的软件包管理工具(即dpkg和APT)要求软件包的发布者通过GPG密钥签名来确保 ...
- ubuntu中python3安装package
1.实验环境 Ubuntu16.04x86 + python3.5 ubuntu中同时存在python2.7 和 python3.5 2.pip使用说明 sudo pip install packag ...
- Linux之Ubuntu中的安装应用
在Ubuntu中我们经常会使用apt install “APP name” 来安装需要的应用. 从图中我们可以看到,我们使用apt install map命令安装一个map小游戏,这个小游戏是一个用四 ...
- 1.在ubuntu中软件安装在哪里?
ubuntu下安装软件有四种方式: 1.通过deb格式的离线软件包安装 sudo dpkg -i xxx.deb # 安装包,安装程序 -i: install sudo dpkg -r packa ...
- ubuntu中编译安装gcc 9.2.0
一切都和其他源码安装软件是一样的: 一.下载源代码: http://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.xz 二.解压文件 tar xvf gcc- ...
- ubuntu中apt-get安装与默认路径
一.apt-get 安装 deb是debian linus的安装格式,跟red hat的rpm非常相似,最基本的安装命令是:dpkg -i file.deb或者直接双击此文件 dpkg 是Debian ...
- Ubuntu中Eclipse安装与配置
安装Eclipse: 第一种是通过Ubuntu自带的程序安装功能安装Eclipse,应用程序 ->Ubtuntu软件中心,搜Eclipse安装即可.第二种方法是用命令:应用程序->附件-& ...
随机推荐
- HDU 5421 Victor and String
Victor and String Time Limit: 1000ms Memory Limit: 262144KB This problem will be judged on HDU. Orig ...
- JS 回车跳转
window.onload = function () { SeteasyuiTheme(); jQuery(':input:enabled').addClass('enterIndex'); var ...
- hihoCoder#1141 二分·归并排序之逆序对
原题地址 又是一道WA成狗的题,最后发现原来是结果溢出了.. 代码: #include <iostream> #include <cstring> using namespac ...
- Match the string--hdu1797(模拟)
http://acm.hdu.edu.cn/showproblem.php?pid=1797 就是模拟 我的思路是标记aba 和h的位置 然后就判断是否正确 就行了 还有就是 最后 fkfkfkf ...
- linux命名详解及其软件安装实例
始于cd,ls命令 好啦,步入正题,我使用的linux连接工具为xshell,mRemoteNG,对两款工具不做介绍啦,你可以百度一下,实在不会入左上方群. 进入之后,便是上面的界面黑乎乎一片,对于初 ...
- SpringMVC Ueditor1.4.3 未找到上传数据
ueditor自事的fileupload组件与spring的有冲突.将那个类BinaryUploader 重写就可以了 return storageState; ...
- SpringBoot初始教程之项目结构(一)
SpringBoot初始教程之项目结构 1 简介 spring Boot makes it easy to create stand-alone, production-grade Spring ba ...
- DataGridView依据下拉列表显示数据
我们都知道,DataGridView能够直接绑定数据源.显示数据库中的数据.可是我想做的是能够对他进行条件查询,依据用户级别选择不同级别的记录. 以上这个控件就是DataGridView控件,能够用它 ...
- ansible学习之--简单学习笔记1
1.利用dm-crypt来创建加密文件系统.编写shell脚本(安装和卸载两个shell脚本) 2.编写ansible,playbook文件 3.编写python脚本 首先编写shell脚本 inst ...
- Jenkins系列之-—02 email-ext 邮件模板
邮件通知配置 系统管理 → 系统设置 → 邮件通知 SMTP 服务器:配置 SMTP 服务器.(不填默认本地运行服务器) 用户默认邮件后缀:注册用户邮件只需填写用户名即可,后缀会加该后缀,如果填写,则 ...