text-segmentation
text-segmentation copied to clipboard
Document scanner until word segmentation
Text Segmentation
A simple pre-project in python with the handwritten text segmentation module in c++.
Requirements
- GCC/G++ 8+
- Python 3.7
- openCV 3+
Run
python main.py -c -p
or
python3 main.py -c -p
Specify an image
python main.py -c -p --image xxx.png
or
python3 main.py -c -p --image xxx.png
Techniques
- Document Scanner
- Binarization with illumination compensation
- Line Segmentation with deslanting
- Word Segmentation
Document Scanner
Process of detecting the predominant contour in the image and segment using a four-point transformation. [ref]
Binarization
A technique for light compensation and sauvola binarization was applied, but others techniques was studied also.
- Implementation of the paper "Efficient Illumination Compensation Techniques for text images", Guillaume Lazzara and Thierry Géraud, 2014. [ref]
- Niblack, Sauvola and Wolf binarizations. [ref]
Line Segmentation
-
Implementation of the paper "A Statistical approach to line segmentation in handwritten documents", Manivannan Arivazhagan, Harish Srinivasan and Sargur Srihari, 2007. [ref]
-
Deslanting image. [ref]
Word Segmentation
- Implementation of the paper "Scale Space Technique for Word Segmentation in Handwritten Documents", R. Manmatha and N. Srimal, 1999. [ref]
Binary image
![](https://github.com/arthurflor/handwritten-text-segmentation/blob/master/doc/results/003.png/003_2_binary.png)
Image lines
![](https://github.com/arthurflor/handwritten-text-segmentation/blob/master/doc/results/003.png/003_3_lines.png)
First line/words segment
![](https://github.com/arthurflor/handwritten-text-segmentation/blob/master/doc/results/003.png/003_4_summary_001.png)