## 1 Introduction  
Optical Character Recognition (OCR) is the process of extracting words and characters from an image and converting them to their corresponding editable text. The input images include PDF files, images captured by cell phone or camera, and scanned documents [1]. OCR's applications can be found in many areas, such as reading forms and cheques; converting hard copies of archived documents to digital files, separating written parts of the documents such as written addresses on letter envelopes; reading books and papers for blind or illiterate people, and so on. An accurate OCR system speeds up the processes mentioned above by removing the time-consuming user tasks [2]. Each OCR system contains several modules illustrated in Figure 1.  
First, an analysis is done on the document image, which is fed into the system to be divided into several segments [3]. In the next step, a pre-processing module removes noises and deviations and converts the input image into a binary one. Then, inner segmentation decomposes text lines into characters. In the feature extraction step, beneficial features are generated and given into the recognition module to recognize the corresponding character to the passed features. In the optional post-processing step, the accuracy is improved by using the dictionary to correct the recognized words. In the end, the final output is shown to the user. The quality of an OCR system can be improved by various factors, including understanding the existing challenges of the target language, choosing an appropriate training algorithm for an OCR system, and finally covering, different styles of the characters in the target language by utilizing a thorough and diverse dataset. Persian is one of the most challenging languages in terms of developing an accurate OCR system due to its characteristics. It is a right-to-left language that has 32 characters and ten numbers. Some of the most important challenges are as follows [4]:  
1. In Persian, a word is made by the connection of continuous characters that overlap each other. So, it makes it difficult to divide them into different characters. For example, in the word \"\(\_\)\(\_\)\(\_\)\(\_\)\", separation of /Sh/ \"\(\_\)\(\_\)\" and \"\(\_\)\(\_\)\" or /L/ \"\(\_\)\(\_\)\" and \"\(\_\)\" in \"\(\_\)\" is a difficult challenge since they cannot be separated by a simple vertical line [5]. The mentioned issue is illustrated in Figure 2.
2. Some characters are formed by two elements like /U/ \"\(\_\)\(\_\)\" or /G/ \"\(\_\)\(\_\)\", existence of space between these two elements makes segmentation to be difficult. The reason is their body shape is similar to some other characters but different in their oblique. Since their oblique is too smaller than their body, the error rate increases. For instance, \"\(\_\)\" is similar to /A/ \"\(\_\)\", which does not have the oblique. 3. The difference between some of the Persian characters, such as /P/ \"\(\_\)\", /B/ \"\(\_\)\", /Gh/ \"\(\_\)\(\_\)\" and /Z/ \"\(\_\)\" is that they are only limited to their dot(s). So, OCR might find it difficult to recognize these characters [5]. In Persian language, there are 18 characters with dot(s). 4. A character is allowed to have different shapes based on the place it appears in a word [6]. For example, shapes of /H/ \"\(\_\)\" are /Guidance/ \"\(\_\)\(\_\)\(\_\)\" at the beginning of the word, /Moonlight/ \"\(\_\)\(\_\)\(\_\)\" in the middle of the word, /Blossom/ \"\(\_\)\(\_\)\(\_\)\" at the end of the word, which is connected to another character, and /Simple/ \"\(\_\)\(\_\)\" at the end of the word which is not connected to another character [7]. 5. Using English characters, words, and numbers is a common phenomenon in the Persian text. This feature brings complexity to the segmentation process in a text containing both. Figure 1: Different modules of an OCR system. Figure 2: Segmentation of a word in the Persian context. Researchers have tested various algorithms to improve the performance of the segmentation and recognition sections of the OCR system [8; 9; 10].