File tree Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
3
# Setup App
4
- wget https://github.com/mjhea0 /ocr_tutorial/archive/v0.tar.gz
4
+ wget https://github.com/rhgraysonii /ocr_tutorial/archive/v0.tar.gz
5
5
tar -xf v0.tar.gz
6
6
mv ocr_tutorial-0/* ../../home/
7
7
cd ../../home
Original file line number Diff line number Diff line change @@ -7,9 +7,15 @@ sudo apt-get install -y libpng12-dev
7
7
sudo apt-get install -y libjpeg62-dev
8
8
sudo apt-get install -y g++
9
9
sudo apt-get install -y libtiff4-dev
10
- sudo apt-get install -y libopencv-dev libtesseract-dev git cmake build-essential libleptonica-dev
11
- sudo apt-get install -y liblog4cplus-dev libcurl3-dev
12
- sudo apt-get install -y python2.7-dev tk8.5 tcl8.5 tk8.5-dev tcl8.5-dev
10
+ sudo apt-get install -y libopencv-dev libtesseract-dev
11
+ sudo apt-get install -y git
12
+ sudo apt-get install -y cmake
13
+ sudo apt-get install -y build-essential
14
+ sudo apt-get install -y libleptonica-dev
15
+ sudo apt-get install -y liblog4cplus-dev
16
+ sudo apt-get install -y libcurl3-dev
17
+ sudo apt-get install -y python2.7-dev
18
+ sudo apt-get install -y tk8.5 tcl8.5 tk8.5-dev tcl8.5-dev
13
19
sudo apt-get build-dep -y python-imaging --fix-missing
14
20
sudo apt-get install -y imagemagick
15
21
24
30
sudo make install
25
31
sudo ldconfig
26
32
33
+
27
34
# Building Tesseract
28
35
cd ..
29
36
wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz
35
42
sudo make install
36
43
sudo ldconfig
37
44
45
+
38
46
# Set Environment Variable
39
47
TESSDATA_PREFIX=/usr/local/share/
40
48
49
+
41
50
# Download the relevant Tesseract English Language Packages
42
51
cd ..
43
52
wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz
Original file line number Diff line number Diff line change 5
5
from StringIO import StringIO
6
6
7
7
8
- _ALL_WORDS = words .words () # we'll use this later
9
-
10
-
11
8
def get_image (url ):
12
9
return Image .open (StringIO (requests .get (url ).content ))
13
10
Original file line number Diff line number Diff line change 5
5
from StringIO import StringIO
6
6
7
7
8
- _ALL_WORDS = words .words () # we'll use this later
9
-
10
-
11
8
def process_image (url ):
12
9
image = _get_image (url )
13
10
image .filter (ImageFilter .SHARPEN )
You can’t perform that action at this time.
0 commit comments