Note: If you are on a 64-bit linux machine, you could just try running this file, that has been pre-built for you (based on the instructions below).
-
Install
git,g++,png,jpeg,tiff,zlibetc.sudo apt-get install git g++ libpng-dev libjpeg-dev libtiff-dev libz-dev
-
(Optional) Add SSH keys if you want to develop and contribute.
-
Clone this project
git clone git@github.com:TeluguOCR/banti_segmenter.git
-
Get latest version of Eclipse C++. Specific instructions for Ubuntu:
- Copy extracted directory to
/opt - Creat shortcut:
sudo ln -s -T /opt/eclipse/eclipse /usr/bin/eclipse - Add application by creating
/usr/share/applications/eclipse.desktop - If titles are not showing specify in the above file:
Exec=env UBUNTU_MENUPROXY= eclipse
- Copy extracted directory to
-
Run eclipse
-
Set workspace to the directory you cloned to.
-
File -> Import -> General -> Existing Projects into WorkspaceSpecify the directory you cloned to
Check the option
Search for Nested Projects -
Install Freetype
- Download latest source
- Unzip
- Run the usual
./configure make -j4 sudo make install
-
Build all the three
leptonica,gfft,segmenter. Go to theProjectmenu and clickBuild All(Ctrl B).(ONLY) If you are getting Freetype errors, go to the properties of leptonica project.
- Right click on the
leptonicaproject and select properties (Alt Enter) - Go to
C/C++ Build -> Settings -> Tool Settings -> GCC Compiler -> Includesand add/usr/local/includeand/usr/local/include/freetype2
- Right click on the
-
Run segmenter!
<path_to_cloned_directory>/segmenter/Debug/segmenter images/praasa.tif 6 1 # Run with no arguments to see all the options. # Increase stack size if you are getting a Seg Fault. ulimit -s 1000000
-
If you want to run classifier you will need to have the data (
charcodes.txt,cp.bin,sm.bin,wr.bin) in the data directory (symbolically) located in the same folder as the executable.<path_to_git_directory>/segmenter/Debug$ ln -s -T ../../dct_lda/output