What it is Here is prototype tool for extraction arabic text line from image and segmentation it into subwords. What I used Python 2.7 OpenCV 3.1.0 How to use python word2subwords.py impath Look into run function for algorithm details. Data and results Here are some images for experiments and results for them.