Skip to content

Commit bc9a023

Browse files
committed
updated code
1 parent dd2d30d commit bc9a023

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

_app.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
# 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
55
tar -xf v0.tar.gz
66
mv ocr_tutorial-0/* ../../home/
77
cd ../../home

_run.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@ sudo apt-get install -y libpng12-dev
77
sudo apt-get install -y libjpeg62-dev
88
sudo apt-get install -y g++
99
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
1319
sudo apt-get build-dep -y python-imaging --fix-missing
1420
sudo apt-get install -y imagemagick
1521

@@ -24,6 +30,7 @@ make
2430
sudo make install
2531
sudo ldconfig
2632

33+
2734
# Building Tesseract
2835
cd ..
2936
wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz
@@ -35,9 +42,11 @@ make
3542
sudo make install
3643
sudo ldconfig
3744

45+
3846
# Set Environment Variable
3947
TESSDATA_PREFIX=/usr/local/share/
4048

49+
4150
# Download the relevant Tesseract English Language Packages
4251
cd ..
4352
wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz

flask_server/cli.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
from StringIO import StringIO
66

77

8-
_ALL_WORDS = words.words() # we'll use this later
9-
10-
118
def get_image(url):
129
return Image.open(StringIO(requests.get(url).content))
1310

flask_server/ocr.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
from StringIO import StringIO
66

77

8-
_ALL_WORDS = words.words() # we'll use this later
9-
10-
118
def process_image(url):
129
image = _get_image(url)
1310
image.filter(ImageFilter.SHARPEN)

0 commit comments

Comments
 (0)