python---pytessercat图片验证码,kali linux,Pillow,pytessercat,tesserocr的安装

python—pytessercat图片验证码,kali linux,Pillow,pytessercat,tesserocr的安装

在kali linux 上安装Pillow,pytessercat,tesserocr
参考:http://www.oschina.net/question/54100_59400

源码文件:
https://github.com/python-pillow/Pillow
https://github.com/madmaze/pytesseract
https://github.com/sirfz/tesserocr

前期准备工作

root@kali:~/python/laowangpy/function# sudo apt-get install tesseract*

root@kali:~/python/laowangpy/function# sudo apt-get install pytess*

root@kali:~/python/laowangpy/function# cd /usr/share/

https://pypi.python.org/pypi?%3Aaction=search&term=setuptools_scm&submit=search
root@kali:/usr/share# cd setuptools_scm-1.15.6/
root@kali:/usr/share/setuptools_scm-1.15.6# ls
appveyor.yml  CHANGELOG.rst  dist     PKG-INFO    setup.cfg  setuptools_scm           testing
build         default.nix    LICENSE  README.rst  setup.py   setuptools_scm.egg-info  tox.ini
root@kali:/usr/share/setuptools_scm-1.15.6# python setup.py install

root@kali:/usr/share# sudo apt-get install libpng*

root@kali:/usr/share# sudo apt-get install libjpeg*

root@kali:/usr/share# sudo apt-get install libtiff*

root@kali:/usr/share# sudo apt-get install zlibg*


第一步:先安装Pillow的PIL
root@kali:/usr/share# git clone https://github.com/python-pillow/Pillow.git

root@kali:/usr/share# cd Pillow/
root@kali:/usr/share/Pillow# ls
appveyor.yml       docs             LICENSE         Pillow.egg-info       setup.py
build              encode.c         Makefile        profile-installed.py  test-installed.py
build_children.sh  _imaging.c       MANIFEST.in     py3.h                 Tests
CHANGES.rst        _imagingcms.c    map.c           README.rst            Tk
codecov.yml        _imagingft.c     mp_compile.py   RELEASING.md          tox.ini
decode.c           _imagingmath.c   mp_compile.pyc  requirements.txt      _webp.c
depends            _imagingmorph.c  outline.c       Scripts               winbuild
display.c          _imagingtk.c     path.c          selftest.py
dist               libImaging       PIL             setup.cfg
root@kali:/usr/share/Pillow#python setup.py install

第二步:安装pytesseract
root@kali:/usr/share# git clone https://github.com/madmaze/pytesseract.git
正克隆到 'pytesseract'...

root@kali:/usr/share# cd pytesseract/
root@kali:/usr/share/pytesseract# ls
build  dist  LICENSE  MANIFEST.in  pytesseract.egg-info  README.rst  setup.cfg  setup.py  src
root@kali:/usr/share/pytesseract# python setup.py install
running install
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
writing requirements to pytesseract.egg-info/requires.txt
writing pytesseract.egg-info/PKG-INFO
writing top-level names to pytesseract.egg-info/top_level.txt
writing dependency_links to pytesseract.egg-info/dependency_links.txt
writing entry points to pytesseract.egg-info/entry_points.txt
reading manifest file 'pytesseract.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pytesseract.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
creating build/bdist.linux-i686/egg
creating build/bdist.linux-i686/egg/pytesseract
copying build/lib.linux-i686-2.7/pytesseract/pytesseract.py -> build/bdist.linux-i686/egg/pytesseract
copying build/lib.linux-i686-2.7/pytesseract/test-european.jpg -> build/bdist.linux-i686/egg/pytesseract
copying build/lib.linux-i686-2.7/pytesseract/__init__.py -> build/bdist.linux-i686/egg/pytesseract
copying build/lib.linux-i686-2.7/pytesseract/test.png -> build/bdist.linux-i686/egg/pytesseract
byte-compiling build/bdist.linux-i686/egg/pytesseract/pytesseract.py to pytesseract.pyc
byte-compiling build/bdist.linux-i686/egg/pytesseract/__init__.py to __init__.pyc
creating build/bdist.linux-i686/egg/EGG-INFO
copying pytesseract.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying pytesseract.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying pytesseract.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying pytesseract.egg-info/entry_points.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying pytesseract.egg-info/requires.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying pytesseract.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/pytesseract-0.1.7-py2.7.egg' and adding 'build/bdist.linux-i686/egg' to it
removing 'build/bdist.linux-i686/egg' (and everything under it)
Processing pytesseract-0.1.7-py2.7.egg
removing '/usr/local/lib/python2.7/dist-packages/pytesseract-0.1.7-py2.7.egg' (and everything under it)
creating /usr/local/lib/python2.7/dist-packages/pytesseract-0.1.7-py2.7.egg
Extracting pytesseract-0.1.7-py2.7.egg to /usr/local/lib/python2.7/dist-packages
pytesseract 0.1.7 is already the active version in easy-install.pth
Installing pytesseract script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/pytesseract-0.1.7-py2.7.egg
Processing dependencies for pytesseract==0.1.7
Searching for Pillow==4.4.0.dev0
Best match: Pillow 4.4.0.dev0
Processing Pillow-4.4.0.dev0-py2.7-linux-i686.egg
Pillow 4.4.0.dev0 is already the active version in easy-install.pth
Installing viewer.py script to /usr/local/bin
Installing player.py script to /usr/local/bin
Installing explode.py script to /usr/local/bin
Installing painter.py script to /usr/local/bin
Installing pildriver.py script to /usr/local/bin
Installing pilfont.py script to /usr/local/bin
Installing pilprint.py script to /usr/local/bin
Installing gifmaker.py script to /usr/local/bin
Installing pilfile.py script to /usr/local/bin
Installing pilconvert.py script to /usr/local/bin
Installing enhancer.py script to /usr/local/bin
Installing thresholder.py script to /usr/local/bin

Using /usr/local/lib/python2.7/dist-packages/Pillow-4.4.0.dev0-py2.7-linux-i686.egg
Finished processing dependencies for pytesseract==0.1.7
root@kali:/usr/share/pytesseract# cd ..

第三步:安装tesserocr
root@kali:/usr/share# export GIT_SSL_NO_VERIFY=1
root@kali:/usr/share# git clone https://github.com/sirfz/tesserocr.git
正克隆到 'tesserocr'...
remote: Counting objects: 332, done.
remote: Total 332 (delta 0), reused 0 (delta 0), pack-reused 332
Receiving objects: 100% (332/332), 381.39 KiB | 34 KiB/s, done.
Resolving deltas: 100% (201/201), done.
root@kali:/usr/share# cd tesser
-bash: cd: tesser: No such file or directory
root@kali:/usr/share# cd tesser
tesseract-ocr/ tesserocr/     
root@kali:/usr/share# cd tesserocr/
root@kali:/usr/share/tesserocr# ls
LICENSE      README.rst  tesseract.pxd             tesserocr.pyx  tox.ini
MANIFEST.in  setup.py    tesserocr_experiment.pyx  tests
root@kali:/usr/share/tesserocr# python setup.py install
pkg-config failed to find tesseract/lept libraries: Package tesseract was not found in the pkg-config search path.
Perhaps you should add the directory containing `tesseract.pc'
to the PKG_CONFIG_PATH environment variable
No package 'tesseract' found

Supporting tesseract v3.02
Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 770}}
Couldn't find index page for 'Cython' (maybe misspelled?)
No local packages or download links found for Cython>=0.23
Traceback (most recent call last):
  File "setup.py", line 184, in <module>
    setup_requires=['Cython>=0.23'],
  File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 221, in __init__
    self.fetch_build_eggs(attrs.pop('setup_requires'))
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 245, in fetch_build_eggs
    parse_requirements(requires), installer=self.fetch_build_egg
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 576, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 821, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 833, in obtain
    return installer(requirement)
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 294, in fetch_build_egg
    return cmd.easy_install(req)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 602, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('Cython>=0.23')
root@kali:/usr/share/tesserocr# 

第一个错误:tesseract_ocr.cpp:507:34: fatal error: leptonica/allheaders.h: No such file or directory
    compilation terminated.
解决办法:sudo apt install libleptonica-dev

第二个错误:tesseract_ocr.cpp:508:31: fatal error: tesseract/baseapi.h: No such file or directory
    compilation terminated.
解决办法:sudo apt install libtesseract-dev


第四步:安装TesseractTrainer(可选用于机器学习图片生产规则)
root@kali:/usr/share# git clone https://github.com/HarshUpadhyay/TesseractTrainer.git
正克隆到 'TesseractTrainer'...
remote: Counting objects: 421, done.
Receiving objects: 100% (421/421), 98.46 KiB | 38 KiB/s, done.
remote: Total 421 (delta 0), reused 0 (delta 0), pack-reused 421
Resolving deltas: 100% (225/225), done.
root@kali:/usr/share# cd TesseractTrainer/
root@kali:/usr/share/TesseractTrainer# ls
LICENSE.txt  MANIFEST.in  README.md  README.txt  setup.py  tesseract_trainer  WHATCHANGED.md
root@kali:/usr/share/TesseractTrainer# python setup.py install
running install
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
creating TesseractTrainer.egg-info
writing requirements to TesseractTrainer.egg-info/requires.txt
writing TesseractTrainer.egg-info/PKG-INFO
writing top-level names to TesseractTrainer.egg-info/top_level.txt
writing dependency_links to TesseractTrainer.egg-info/dependency_links.txt
writing manifest file 'TesseractTrainer.egg-info/SOURCES.txt'
reading manifest file 'TesseractTrainer.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'TesseractTrainer.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
creating build
creating build/lib.linux-i686-2.7
creating build/lib.linux-i686-2.7/tesseract_trainer
copying tesseract_trainer/multipage_tif.py -> build/lib.linux-i686-2.7/tesseract_trainer
copying tesseract_trainer/__init__.py -> build/lib.linux-i686-2.7/tesseract_trainer
creating build/bdist.linux-i686
creating build/bdist.linux-i686/egg
creating build/bdist.linux-i686/egg/tesseract_trainer
copying build/lib.linux-i686-2.7/tesseract_trainer/multipage_tif.py -> build/bdist.linux-i686/egg/tesseract_trainer
copying build/lib.linux-i686-2.7/tesseract_trainer/__init__.py -> build/bdist.linux-i686/egg/tesseract_trainer
byte-compiling build/bdist.linux-i686/egg/tesseract_trainer/multipage_tif.py to multipage_tif.pyc
byte-compiling build/bdist.linux-i686/egg/tesseract_trainer/__init__.py to __init__.pyc
creating build/bdist.linux-i686/egg/EGG-INFO
installing scripts to build/bdist.linux-i686/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/scripts-2.7
copying and adjusting tesseract_trainer/tesstrain -> build/scripts-2.7
changing mode of build/scripts-2.7/tesstrain from 644 to 755
creating build/bdist.linux-i686/egg/EGG-INFO/scripts
copying build/scripts-2.7/tesstrain -> build/bdist.linux-i686/egg/EGG-INFO/scripts
changing mode of build/bdist.linux-i686/egg/EGG-INFO/scripts/tesstrain to 755
copying TesseractTrainer.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying TesseractTrainer.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying TesseractTrainer.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying TesseractTrainer.egg-info/requires.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying TesseractTrainer.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/TesseractTrainer-0.1-py2.7.egg' and adding 'build/bdist.linux-i686/egg' to it
removing 'build/bdist.linux-i686/egg' (and everything under it)
Processing TesseractTrainer-0.1-py2.7.egg
creating /usr/local/lib/python2.7/dist-packages/TesseractTrainer-0.1-py2.7.egg
Extracting TesseractTrainer-0.1-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding TesseractTrainer 0.1 to easy-install.pth file
Installing tesstrain script to /usr/local/bin

Installed /usr/local/lib/python2.7/dist-packages/TesseractTrainer-0.1-py2.7.egg
Processing dependencies for TesseractTrainer==0.1
Searching for Pillow==4.4.0.dev0
Best match: Pillow 4.4.0.dev0
Processing Pillow-4.4.0.dev0-py2.7-linux-i686.egg
Pillow 4.4.0.dev0 is already the active version in easy-install.pth
Installing viewer.py script to /usr/local/bin
Installing player.py script to /usr/local/bin
Installing explode.py script to /usr/local/bin
Installing painter.py script to /usr/local/bin
Installing pildriver.py script to /usr/local/bin
Installing pilfont.py script to /usr/local/bin
Installing pilprint.py script to /usr/local/bin
Installing gifmaker.py script to /usr/local/bin
Installing pilfile.py script to /usr/local/bin
Installing pilconvert.py script to /usr/local/bin
Installing enhancer.py script to /usr/local/bin
Installing thresholder.py script to /usr/local/bin

Using /usr/local/lib/python2.7/dist-packages/Pillow-4.4.0.dev0-py2.7-linux-i686.egg
Finished processing dependencies for TesseractTrainer==0.1
root@kali:/usr/share/TesseractTrainer# cd .
root@kali:/usr/share/TesseractTrainer#

在测试目录下放置一个图片验证码的图片文件
这里写图片描述

测试用例使用:
在测试目录下放置一个图片验证码的图片文件
root@kali:~/python/laowangpy/function# ls
xx.png


root@kali:~/python/laowangpy/function# python
Python 2.7.3 (default, Mar 14 2014, 11:57:14) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Image
>>> import pytesseract
>>> from pytesseract import *
>>> import os
>>> os.system("pwd")
/root/python/laowangpy/function
0
>>> im = Image.open("xx.png")
>>> text = image_to_string(im)
Tesseract Open Source OCR Engine v3.02 with Leptonica
>>> print text
LP6U
>>> 

这里写图片描述

root@kali:~/python/laowangpy/function# python
Python 2.7.3 (default, Mar 14 2014, 11:57:14) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Image
>>> from pytesseract import *
>>> im = Image.open("11.jpg")
>>> text = image_to_string(im)
Tesseract Open Source OCR Engine v3.02 with Leptonica
>>> print text
o4cKa
>>> 

安装特定版本的tesseract 3.04版,有依赖包安装
https://packages.ubuntu.com/artful/i386/tesseract-ocr/download

root@kali:/usr/share/tesserocr# dpkg -i tesseract-ocr_3.04.01-6_i386.deb 
Selecting previously unselected package tesseract-ocr.
(Reading database ... 334403 files and directories currently installed.)
Preparing to unpack tesseract-ocr_3.04.01-6_i386.deb ...
Unpacking tesseract-ocr (3.04.01-6) ...
dpkg: dependency problems prevent configuration of tesseract-ocr:
 tesseract-ocr depends on tesseract-ocr-eng (>= 3.01~); however:
  Package tesseract-ocr-eng is not installed.
 tesseract-ocr depends on tesseract-ocr-osd; however:
  Package tesseract-ocr-osd is not installed.
 tesseract-ocr depends on tesseract-ocr-equ; however:
  Package tesseract-ocr-equ is not installed.

dpkg: error processing package tesseract-ocr (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.6.1-4) ...
Errors were encountered while processing:
 tesseract-ocr
root@kali:/usr/share/tesserocr# wget http://kr.archive.ubuntu.com/ubuntu/pool/universe/t/tesseract-eng/tesseract-ocr-eng_3.04.00-1_all.deb
--2018-01-06 15:46:28--  http://kr.archive.ubuntu.com/ubuntu/pool/universe/t/tesseract-eng/tesseract-ocr-eng_3.04.00-1_all.deb
Resolving kr.archive.ubuntu.com (kr.archive.ubuntu.com)... 103.22.220.133
Connecting to kr.archive.ubuntu.com (kr.archive.ubuntu.com)|103.22.220.133|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8824184 (8.4M) [application/x-debian-package]
Saving to: ‘tesseract-ocr-eng_3.04.00-1_all.deb’

tesseract-ocr-eng_3.04.00-1_all.d 100%[=============================================================>]   8.42M  14.3KB/s    in 7m 23s  

2018-01-06 15:54:41 (19.5 KB/s) - ‘tesseract-ocr-eng_3.04.00-1_all.deb’ saved [8824184/8824184]

root@kali:/usr/share/tesserocr# dpkg -i tesseract-ocr-eng_3.04.00-1_all.deb 
Selecting previously unselected package tesseract-ocr-eng.
(Reading database ... 334427 files and directories currently installed.)
Preparing to unpack tesseract-ocr-eng_3.04.00-1_all.deb ...
Unpacking tesseract-ocr-eng (3.04.00-1) ...
Setting up tesseract-ocr-eng (3.04.00-1) ...
root@kali:/usr/share/tesserocr# wget http://kr.archive.ubuntu.com/ubuntu/pool/universe/t/tesseract-osd/tesseract-ocr-osd_3.04.00-1_all.deb
--2018-01-06 15:55:26--  http://kr.archive.ubuntu.com/ubuntu/pool/universe/t/tesseract-osd/tesseract-ocr-osd_3.04.00-1_all.deb
Resolving kr.archive.ubuntu.com (kr.archive.ubuntu.com)... 103.22.220.133
Connecting to kr.archive.ubuntu.com (kr.archive.ubuntu.com)|103.22.220.133|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2988308 (2.8M) [application/x-debian-package]
Saving to: ‘tesseract-ocr-osd_3.04.00-1_all.deb’

tesseract-ocr-osd_3.04.00-1_all.d 100%[=============================================================>]   2.85M  17.7KB/s    in 2m 17s  

2018-01-06 15:58:01 (21.4 KB/s) - ‘tesseract-ocr-osd_3.04.00-1_all.deb’ saved [2988308/2988308]

root@kali:/usr/share/tesserocr# dpkg -i tesseract-ocr-osd_3.04.00-1_all.deb 
Selecting previously unselected package tesseract-ocr-osd.
(Reading database ... 334439 files and directories currently installed.)
Preparing to unpack tesseract-ocr-osd_3.04.00-1_all.deb ...
Unpacking tesseract-ocr-osd (3.04.00-1) ...
Setting up tesseract-ocr-osd (3.04.00-1) ...
root@kali:/usr/share/tesserocr# wget http://kr.archive.ubuntu.com/ubuntu/pool/universe/t/tesseract-equ/tesseract-ocr-equ_3.04.00-1_all.deb
--2018-01-06 15:58:50--  http://kr.archive.ubuntu.com/ubuntu/pool/universe/t/tesseract-equ/tesseract-ocr-equ_3.04.00-1_all.deb
Resolving kr.archive.ubuntu.com (kr.archive.ubuntu.com)... 103.22.220.133
Connecting to kr.archive.ubuntu.com (kr.archive.ubuntu.com)|103.22.220.133|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 567740 (554K) [application/x-debian-package]
Saving to: ‘tesseract-ocr-equ_3.04.00-1_all.deb’

tesseract-ocr-equ_3.04.00-1_all.d 100%[=============================================================>] 554.43K  19.5KB/s    in 22s     

2018-01-06 15:59:17 (24.9 KB/s) - ‘tesseract-ocr-equ_3.04.00-1_all.deb’ saved [567740/567740]

root@kali:/usr/share/tesserocr# dpkg -i tesseract-ocr-equ_3.04.00-1_all.deb 
Selecting previously unselected package tesseract-ocr-equ.
(Reading database ... 334443 files and directories currently installed.)
Preparing to unpack tesseract-ocr-equ_3.04.00-1_all.deb ...
Unpacking tesseract-ocr-equ (3.04.00-1) ...
Setting up tesseract-ocr-equ (3.04.00-1) ...
root@kali:/usr/share/tesserocr# dpkg -i tesseract-ocr_3.04.01-6_i386.deb 
(Reading database ... 334447 files and directories currently installed.)
Preparing to unpack tesseract-ocr_3.04.01-6_i386.deb ...
Unpacking tesseract-ocr (3.04.01-6) over (3.04.01-6) ...
Setting up tesseract-ocr (3.04.01-6) ...
Processing triggers for man-db (2.7.6.1-4) ...
root@kali:/usr/share/tesserocr# tesseract -v
tesseract 3.04.01
 leptonica-1.74.4
  libgif 5.1.4 : libjpeg 6b (libjpeg-turbo 1.5.1) : libpng 1.6.34 : libtiff 4.0.9 : zlib 1.2.8 : libwebp 0.6.0 : libopenjp2 2.3.0

root@kali:/usr/share/tesserocr#

如何使用pytesseract模块弹不出“Tesseract Open Source OCR Engine v3.02 with Leptonica”说明图片验证码识别不出来,必须安装libleptonica-dev

root@kali:~/python/laowangpy/function# python
Python 2.7.3 (default, Nov 24 2017, 16:26:37) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Image
>>> from pytesseract import *
>>> im = Image.open("22.png")
>>> text = image_to_string(im)
Tesseract Open Source OCR Engine v3.02 with Leptonica
>>> print text
oooc
>>> exit()

可以弹出“Tesseract Open Source OCR Engine v3.02 with Leptonica”信息,并成功识别图片验证码

root@kali:~/python/laowangpy/function# apt-cache show Lepton*
Package: leptonica-progs
Source: leptonlib
Version: 1.74.4-1
Installed-Size: 128
Maintainer: Jeff Breidenbach <jab@debian.org>
Architecture: i386
Depends: libc6 (>= 2.7), liblept5
Size: 20976
SHA256: bf679aa008142c00aff44ed465fb083d304f3d2461f5091c3d0acffc425e8bc7
SHA1: 3fcef9d468bb8dba2d73078b41376a419f721afc
MD5sum: 7b9f21ba9ae33d17611299d181e68152
Description: sample programs for Leptonica image processing library
 Well-tested C library for some basic image processing operations,
 along with a description of the functions and some design methods. A
 full set of affine transformations (translation, shear, rotation,
 scaling) on images of all depths is included, with the exception that
 some of the scaling methods do not work at all depths. There are also
 implementations of binary morphology, grayscale morphology,
 convolution and rank order filters, and applications such as jbig2
 image processing and color quantization. You will also find basic
 utilities for the safe and efficient handling of arrays (of strings,
 numbers, number pairs and image-related geometrical objects), byte
 queues, generic stacks, generic lists, and endian-independent
 indexing into 32-bit arrays.
Section: graphics
Priority: optional
Filename: pool/main/l/leptonlib/leptonica-progs_1.74.4-1_i386.deb

Package: libleptonica-dev
Source: leptonlib
Version: 1.74.4-1
Installed-Size: 5047
Maintainer: Jeff Breidenbach <jab@debian.org>
Architecture: i386
Depends: liblept5 (= 1.74.4-1)
Size: 1399684
SHA256: a333b706bcd1b4ba6e7da1e528e1c432da960a33dd2db7c8ca1d6adcc3abe146
SHA1: e0ec23b3f7bd85c96a81d59e2aeefdb55237cc1f
MD5sum: 713847c8a0d455ba055e7fce580bc716
Description: image processing library
 Well-tested C library for some basic image processing operations,
 along with a description of the functions and some design methods. A
 full set of affine transformations (translation, shear, rotation,
 scaling) on images of all depths is included, with the exception that
 some of the scaling methods do not work at all depths. There are also
 implementations of binary morphology, grayscale morphology,
 convolution and rank order filters, and applications such as jbig2
 image processing and color quantization. You will also find basic
 utilities for the safe and efficient handling of arrays (of strings,
 numbers, number pairs and image-related geometrical objects), byte
 queues, generic stacks, generic lists, and endian-independent
 indexing into 32-bit arrays.
Section: libdevel
Priority: optional
Filename: pool/main/l/leptonlib/libleptonica-dev_1.74.4-1_i386.deb

root@kali:~/python/laowangpy/function# 
root@kali:/usr/share/tesserocr# wget http://ftp.iinet.net.au/pub/ubuntu/pool/universe/l/leptonlib/libleptonica-dev_1.74.4-1_i386.deb
--2018-01-06 20:35:27--  http://ftp.iinet.net.au/pub/ubuntu/pool/universe/l/leptonlib/libleptonica-dev_1.74.4-1_i386.deb
Resolving ftp.iinet.net.au (ftp.iinet.net.au)... 203.0.178.32
Connecting to ftp.iinet.net.au (ftp.iinet.net.au)|203.0.178.32|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1392370 (1.3M) [application/x-debian-package]
Saving to: ‘libleptonica-dev_1.74.4-1_i386.deb’

libleptonica-dev_1.74.4-1_i386.de 100%[=============================================================>]   1.33M  21.3KB/s    in 52s     

2018-01-06 20:36:28 (26.0 KB/s) - ‘libleptonica-dev_1.74.4-1_i386.deb’ saved [1392370/1392370]

root@kali:/usr/share/tesserocr# dpkg -i libleptonica-dev_1.74.4-1_i386.deb
(Reading database ... 340154 files and directories currently installed.)
Preparing to unpack libleptonica-dev_1.74.4-1_i386.deb ...
Unpacking libleptonica-dev (1.74.4-1) over (1.74.4-1) ...
Setting up libleptonica-dev (1.74.4-1) ...
root@kali:/usr/share/tesserocr# 
root@kali:/usr/share/tesserocr# ls
build                               README.rst                           tesseract-ocr-osd_3.04.00-1_all.deb  tesserocr.pyx
dist                                setup.py                             tesseract.pxd                        tests
libleptonica-dev_1.74.4-1_i386.deb  tesseract-ocr_3.04.01-6_i386.deb     tesserocr.cpp                        tox.ini
LICENSE                             tesseract-ocr-eng_3.04.00-1_all.deb  tesserocr.egg-info
MANIFEST.in                         tesseract-ocr-equ_3.04.00-1_all.deb  tesserocr_experiment.pyx
root@kali:/usr/share/tesserocr# 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

徐为波

看着给就好了,学习写作有点累!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值