Serveur d'exploration sur l'OCR

Attention, ce site est en cours de développement !
Attention, site généré par des moyens informatiques à partir de corpus bruts.
Les informations ne sont donc pas validées.

ASM Based Synthesis of Handwritten Arabic Text Pages

Identifieur interne : 000019 ( Pmc/Curation ); précédent : 000018; suivant : 000020

ASM Based Synthesis of Handwritten Arabic Text Pages

Auteurs : Laslo Dinges [Allemagne] ; Ayoub Al-Hamadi [Allemagne] ; Moftah Elzobi [Allemagne] ; Sherif El-Etriby [Arabie saoudite, Égypte] ; Ahmed Ghoneim [Arabie saoudite, Égypte]

Source :

RBID : PMC:4534626

Abstract

Document analysis tasks, as text recognition, word spotting, or segmentation, are highly dependent on comprehensive and suitable databases for training and validation. However their generation is expensive in sense of labor and time. As a matter of fact, there is a lack of such databases, which complicates research and development. This is especially true for the case of Arabic handwriting recognition, that involves different preprocessing, segmentation, and recognition methods, which have individual demands on samples and ground truth. To bypass this problem, we present an efficient system that automatically turns Arabic Unicode text into synthetic images of handwritten documents and detailed ground truth. Active Shape Models (ASMs) based on 28046 online samples were used for character synthesis and statistical properties were extracted from the IESK-arDB database to simulate baselines and word slant or skew. In the synthesis step ASM based representations are composed to words and text pages, smoothed by B-Spline interpolation and rendered considering writing speed and pen characteristics. Finally, we use the synthetic data to validate a segmentation method. An experimental comparison with the IESK-arDB database encourages to train and test document analysis related methods on synthetic samples, whenever no sufficient natural ground truthed data is available.


Url:
DOI: 10.1155/2015/323575
PubMed: 26295059
PubMed Central: 4534626

Links toward previous steps (curation, corpus...)


Links to Exploration step

PMC:4534626

Le document en format XML

<record>
<TEI>
<teiHeader>
<fileDesc>
<titleStmt>
<title xml:lang="en">ASM Based Synthesis of Handwritten Arabic Text Pages</title>
<author>
<name sortKey="Dinges, Laslo" sort="Dinges, Laslo" uniqKey="Dinges L" first="Laslo" last="Dinges">Laslo Dinges</name>
<affiliation wicri:level="1">
<nlm:aff id="I1">Institute for Information Technology and Communications (IIKT), Otto-von-Guericke-University Magdeburg, 39016 Magdeburg, Germany</nlm:aff>
<country xml:lang="fr">Allemagne</country>
<wicri:regionArea>Institute for Information Technology and Communications (IIKT), Otto-von-Guericke-University Magdeburg, 39016 Magdeburg</wicri:regionArea>
</affiliation>
</author>
<author>
<name sortKey="Al Hamadi, Ayoub" sort="Al Hamadi, Ayoub" uniqKey="Al Hamadi A" first="Ayoub" last="Al-Hamadi">Ayoub Al-Hamadi</name>
<affiliation wicri:level="1">
<nlm:aff id="I1">Institute for Information Technology and Communications (IIKT), Otto-von-Guericke-University Magdeburg, 39016 Magdeburg, Germany</nlm:aff>
<country xml:lang="fr">Allemagne</country>
<wicri:regionArea>Institute for Information Technology and Communications (IIKT), Otto-von-Guericke-University Magdeburg, 39016 Magdeburg</wicri:regionArea>
</affiliation>
</author>
<author>
<name sortKey="Elzobi, Moftah" sort="Elzobi, Moftah" uniqKey="Elzobi M" first="Moftah" last="Elzobi">Moftah Elzobi</name>
<affiliation wicri:level="1">
<nlm:aff id="I1">Institute for Information Technology and Communications (IIKT), Otto-von-Guericke-University Magdeburg, 39016 Magdeburg, Germany</nlm:aff>
<country xml:lang="fr">Allemagne</country>
<wicri:regionArea>Institute for Information Technology and Communications (IIKT), Otto-von-Guericke-University Magdeburg, 39016 Magdeburg</wicri:regionArea>
</affiliation>
</author>
<author>
<name sortKey="El Etriby, Sherif" sort="El Etriby, Sherif" uniqKey="El Etriby S" first="Sherif" last="El-Etriby">Sherif El-Etriby</name>
<affiliation wicri:level="1">
<nlm:aff id="I2">Umm Al-Qura University, Makkah 21421, Saudi Arabia</nlm:aff>
<country xml:lang="fr">Arabie saoudite</country>
<wicri:regionArea>Umm Al-Qura University, Makkah 21421</wicri:regionArea>
</affiliation>
<affiliation wicri:level="1">
<nlm:aff id="I3">Faculty of Computers and Information, Menoufia University MUFIC, Menofia 32721, Egypt</nlm:aff>
<country xml:lang="fr">Égypte</country>
<wicri:regionArea>Faculty of Computers and Information, Menoufia University MUFIC, Menofia 32721</wicri:regionArea>
</affiliation>
</author>
<author>
<name sortKey="Ghoneim, Ahmed" sort="Ghoneim, Ahmed" uniqKey="Ghoneim A" first="Ahmed" last="Ghoneim">Ahmed Ghoneim</name>
<affiliation wicri:level="1">
<nlm:aff id="I4">Department of Software Engineering, College of Computer Science and Information Sciences, King Saud University, Riyadh 11451, Saudi Arabia</nlm:aff>
<country xml:lang="fr">Arabie saoudite</country>
<wicri:regionArea>Department of Software Engineering, College of Computer Science and Information Sciences, King Saud University, Riyadh 11451</wicri:regionArea>
</affiliation>
<affiliation wicri:level="1">
<nlm:aff id="I5">Department of Computer Science, College of Science, Menoufia University, Menofia 32721, Egypt</nlm:aff>
<country xml:lang="fr">Égypte</country>
<wicri:regionArea>Department of Computer Science, College of Science, Menoufia University, Menofia 32721</wicri:regionArea>
</affiliation>
</author>
</titleStmt>
<publicationStmt>
<idno type="wicri:source">PMC</idno>
<idno type="pmid">26295059</idno>
<idno type="pmc">4534626</idno>
<idno type="url">http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4534626</idno>
<idno type="RBID">PMC:4534626</idno>
<idno type="doi">10.1155/2015/323575</idno>
<date when="2015">2015</date>
<idno type="wicri:Area/Pmc/Corpus">000019</idno>
<idno type="wicri:Area/Pmc/Curation">000019</idno>
</publicationStmt>
<sourceDesc>
<biblStruct>
<analytic>
<title xml:lang="en" level="a" type="main">ASM Based Synthesis of Handwritten Arabic Text Pages</title>
<author>
<name sortKey="Dinges, Laslo" sort="Dinges, Laslo" uniqKey="Dinges L" first="Laslo" last="Dinges">Laslo Dinges</name>
<affiliation wicri:level="1">
<nlm:aff id="I1">Institute for Information Technology and Communications (IIKT), Otto-von-Guericke-University Magdeburg, 39016 Magdeburg, Germany</nlm:aff>
<country xml:lang="fr">Allemagne</country>
<wicri:regionArea>Institute for Information Technology and Communications (IIKT), Otto-von-Guericke-University Magdeburg, 39016 Magdeburg</wicri:regionArea>
</affiliation>
</author>
<author>
<name sortKey="Al Hamadi, Ayoub" sort="Al Hamadi, Ayoub" uniqKey="Al Hamadi A" first="Ayoub" last="Al-Hamadi">Ayoub Al-Hamadi</name>
<affiliation wicri:level="1">
<nlm:aff id="I1">Institute for Information Technology and Communications (IIKT), Otto-von-Guericke-University Magdeburg, 39016 Magdeburg, Germany</nlm:aff>
<country xml:lang="fr">Allemagne</country>
<wicri:regionArea>Institute for Information Technology and Communications (IIKT), Otto-von-Guericke-University Magdeburg, 39016 Magdeburg</wicri:regionArea>
</affiliation>
</author>
<author>
<name sortKey="Elzobi, Moftah" sort="Elzobi, Moftah" uniqKey="Elzobi M" first="Moftah" last="Elzobi">Moftah Elzobi</name>
<affiliation wicri:level="1">
<nlm:aff id="I1">Institute for Information Technology and Communications (IIKT), Otto-von-Guericke-University Magdeburg, 39016 Magdeburg, Germany</nlm:aff>
<country xml:lang="fr">Allemagne</country>
<wicri:regionArea>Institute for Information Technology and Communications (IIKT), Otto-von-Guericke-University Magdeburg, 39016 Magdeburg</wicri:regionArea>
</affiliation>
</author>
<author>
<name sortKey="El Etriby, Sherif" sort="El Etriby, Sherif" uniqKey="El Etriby S" first="Sherif" last="El-Etriby">Sherif El-Etriby</name>
<affiliation wicri:level="1">
<nlm:aff id="I2">Umm Al-Qura University, Makkah 21421, Saudi Arabia</nlm:aff>
<country xml:lang="fr">Arabie saoudite</country>
<wicri:regionArea>Umm Al-Qura University, Makkah 21421</wicri:regionArea>
</affiliation>
<affiliation wicri:level="1">
<nlm:aff id="I3">Faculty of Computers and Information, Menoufia University MUFIC, Menofia 32721, Egypt</nlm:aff>
<country xml:lang="fr">Égypte</country>
<wicri:regionArea>Faculty of Computers and Information, Menoufia University MUFIC, Menofia 32721</wicri:regionArea>
</affiliation>
</author>
<author>
<name sortKey="Ghoneim, Ahmed" sort="Ghoneim, Ahmed" uniqKey="Ghoneim A" first="Ahmed" last="Ghoneim">Ahmed Ghoneim</name>
<affiliation wicri:level="1">
<nlm:aff id="I4">Department of Software Engineering, College of Computer Science and Information Sciences, King Saud University, Riyadh 11451, Saudi Arabia</nlm:aff>
<country xml:lang="fr">Arabie saoudite</country>
<wicri:regionArea>Department of Software Engineering, College of Computer Science and Information Sciences, King Saud University, Riyadh 11451</wicri:regionArea>
</affiliation>
<affiliation wicri:level="1">
<nlm:aff id="I5">Department of Computer Science, College of Science, Menoufia University, Menofia 32721, Egypt</nlm:aff>
<country xml:lang="fr">Égypte</country>
<wicri:regionArea>Department of Computer Science, College of Science, Menoufia University, Menofia 32721</wicri:regionArea>
</affiliation>
</author>
</analytic>
<series>
<title level="j">The Scientific World Journal</title>
<idno type="ISSN">2356-6140</idno>
<idno type="eISSN">1537-744X</idno>
<imprint>
<date when="2015">2015</date>
</imprint>
</series>
</biblStruct>
</sourceDesc>
</fileDesc>
<profileDesc>
<textClass></textClass>
</profileDesc>
</teiHeader>
<front>
<div type="abstract" xml:lang="en">
<p>Document analysis tasks, as text recognition, word spotting, or segmentation, are highly dependent on comprehensive and suitable databases for training and validation. However their generation is expensive in sense of labor and time. As a matter of fact, there is a lack of such databases, which complicates research and development. This is especially true for the case of Arabic handwriting recognition, that involves different preprocessing, segmentation, and recognition methods, which have individual demands on samples and ground truth. To bypass this problem, we present an efficient system that automatically turns Arabic Unicode text into synthetic images of handwritten documents and detailed ground truth. Active Shape Models (ASMs) based on 28046 online samples were used for character synthesis and statistical properties were extracted from the IESK-arDB database to simulate baselines and word slant or skew. In the synthesis step ASM based representations are composed to words and text pages, smoothed by B-Spline interpolation and rendered considering writing speed and pen characteristics. Finally, we use the synthetic data to validate a segmentation method. An experimental comparison with the IESK-arDB database encourages to train and test document analysis related methods on synthetic samples, whenever no sufficient natural ground truthed data is available.</p>
</div>
</front>
<back>
<div1 type="bibliography">
<listBibl>
<biblStruct>
<analytic>
<author>
<name sortKey="M Rgner, V" uniqKey="M Rgner V">V. Märgner</name>
</author>
<author>
<name sortKey="El Abed, H" uniqKey="El Abed H">H. El Abed</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Elarian, Y" uniqKey="Elarian Y">Y. Elarian</name>
</author>
<author>
<name sortKey="Abdel Aal, R" uniqKey="Abdel Aal R">R. Abdel-Aal</name>
</author>
<author>
<name sortKey="Ahmad, I" uniqKey="Ahmad I">I. Ahmad</name>
</author>
<author>
<name sortKey="Parvez, M T" uniqKey="Parvez M">M. T. Parvez</name>
</author>
<author>
<name sortKey="Zidouri, A" uniqKey="Zidouri A">A. Zidouri</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Elarian, Y" uniqKey="Elarian Y">Y. Elarian</name>
</author>
<author>
<name sortKey="Al Muhsateb, H A" uniqKey="Al Muhsateb H">H. A. Al-Muhsateb</name>
</author>
<author>
<name sortKey="Ghouti, L M" uniqKey="Ghouti L">L. M. Ghouti</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Elzobi, M" uniqKey="Elzobi M">M. Elzobi</name>
</author>
<author>
<name sortKey="Al Hamadi, A" uniqKey="Al Hamadi A">A. Al-Hamadi</name>
</author>
<author>
<name sortKey="Al Aghbari, Z" uniqKey="Al Aghbari Z">Z. Al Aghbari</name>
</author>
<author>
<name sortKey="Dings, L" uniqKey="Dings L">L. Dings</name>
</author>
</analytic>
</biblStruct>
<biblStruct></biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Lorigo, L M" uniqKey="Lorigo L">L. M. Lorigo</name>
</author>
<author>
<name sortKey="Govindaraju, V" uniqKey="Govindaraju V">V. Govindaraju</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Hollerbach, J M" uniqKey="Hollerbach J">J. M. Hollerbach</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Gangadhar, G" uniqKey="Gangadhar G">G. Gangadhar</name>
</author>
<author>
<name sortKey="Joseph, D" uniqKey="Joseph D">D. Joseph</name>
</author>
<author>
<name sortKey="Chakravarthy, V S" uniqKey="Chakravarthy V">V. S. Chakravarthy</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Plamondon, R" uniqKey="Plamondon R">R. Plamondon</name>
</author>
<author>
<name sortKey="Guerfali, W" uniqKey="Guerfali W">W. Guerfali</name>
</author>
<author>
<name sortKey="Scribens Laboratory" uniqKey="Scribens Laboratory">Scribens (Laboratory)</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Guyon, I" uniqKey="Guyon I">I. Guyon</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Varga, T" uniqKey="Varga T">T. Varga</name>
</author>
<author>
<name sortKey="Bunke, H" uniqKey="Bunke H">H. Bunke</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Zheng, Y" uniqKey="Zheng Y">Y. Zheng</name>
</author>
<author>
<name sortKey="Doermann, D S" uniqKey="Doermann D">D. S. Doermann</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Viswanath, P" uniqKey="Viswanath P">P. Viswanath</name>
</author>
<author>
<name sortKey="Murty, N" uniqKey="Murty N">N. Murty</name>
</author>
<author>
<name sortKey="Bhatnagar, S" uniqKey="Bhatnagar S">S. Bhatnagar</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Choi, H I" uniqKey="Choi H">H. I. Choi</name>
</author>
<author>
<name sortKey="Cho, S J" uniqKey="Cho S">S.-J. Cho</name>
</author>
<author>
<name sortKey="Kim, J H" uniqKey="Kim J">J. H. Kim</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Dolinsky, J" uniqKey="Dolinsky J">J. Dolinsky</name>
</author>
<author>
<name sortKey="Takagi, H" uniqKey="Takagi H">H. Takagi</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Al Zubi, S" uniqKey="Al Zubi S">S. Al-Zubi</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Shi, D" uniqKey="Shi D">D. Shi</name>
</author>
<author>
<name sortKey="Gunn, S R" uniqKey="Gunn S">S. R. Gunn</name>
</author>
<author>
<name sortKey="Damper, R I" uniqKey="Damper R">R. I. Damper</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Helmers, M" uniqKey="Helmers M">M. Helmers</name>
</author>
<author>
<name sortKey="Bunke, H" uniqKey="Bunke H">H. Bunke</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Jawahar, C V" uniqKey="Jawahar C">C. V. Jawahar</name>
</author>
<author>
<name sortKey="Balasubramanian, A" uniqKey="Balasubramanian A">A. Balasubramanian</name>
</author>
<author>
<name sortKey="Meshesha, M" uniqKey="Meshesha M">M. Meshesha</name>
</author>
<author>
<name sortKey="Namboodiri, A M" uniqKey="Namboodiri A">A. M. Namboodiri</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Rao, P" uniqKey="Rao P">P. Rao</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Xu, Y" uniqKey="Xu Y">Y. Xu</name>
</author>
<author>
<name sortKey="Shum, H" uniqKey="Shum H">H. Shum</name>
</author>
<author>
<name sortKey="Wang, J" uniqKey="Wang J">J. Wang</name>
</author>
<author>
<name sortKey="Wu, C" uniqKey="Wu C">C. Wu</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Lin, Z" uniqKey="Lin Z">Z. Lin</name>
</author>
<author>
<name sortKey="Wan, L" uniqKey="Wan L">L. Wan</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Wang, J" uniqKey="Wang J">J. Wang</name>
</author>
<author>
<name sortKey="Wu, C" uniqKey="Wu C">C. Wu</name>
</author>
<author>
<name sortKey="Xu, Y Q" uniqKey="Xu Y">Y.-Q. Xu</name>
</author>
<author>
<name sortKey="Shum, H Y" uniqKey="Shum H">H.-Y. Shum</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Thomas, A O" uniqKey="Thomas A">A. O. Thomas</name>
</author>
<author>
<name sortKey="Rusu, A" uniqKey="Rusu A">A. Rusu</name>
</author>
<author>
<name sortKey="Govindaraju, V" uniqKey="Govindaraju V">V. Govindaraju</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Miyao, H" uniqKey="Miyao H">H. Miyao</name>
</author>
<author>
<name sortKey="Maruyama, M" uniqKey="Maruyama M">M. Maruyama</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Varga, T" uniqKey="Varga T">T. Varga</name>
</author>
<author>
<name sortKey="Bunke, H" uniqKey="Bunke H">H. Bunke</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Varga, T" uniqKey="Varga T">T. Varga</name>
</author>
<author>
<name sortKey="Kilchhofer, D" uniqKey="Kilchhofer D">D. Kilchhofer</name>
</author>
<author>
<name sortKey="Bunke, H" uniqKey="Bunke H">H. Bunke</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Chaudhuri, B B" uniqKey="Chaudhuri B">B. B. Chaudhuri</name>
</author>
<author>
<name sortKey="Kundu, A" uniqKey="Kundu A">A. Kundu</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Margner, V" uniqKey="Margner V">V. Margner</name>
</author>
<author>
<name sortKey="Pechwitz, M" uniqKey="Pechwitz M">M. Pechwitz</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Elarian, Y" uniqKey="Elarian Y">Y. Elarian</name>
</author>
<author>
<name sortKey="Ahmad, I" uniqKey="Ahmad I">I. Ahmad</name>
</author>
<author>
<name sortKey="Awaida, S" uniqKey="Awaida S">S. Awaida</name>
</author>
<author>
<name sortKey="Al Khatib, W G" uniqKey="Al Khatib W">W. G. Al-Khatib</name>
</author>
<author>
<name sortKey="Zidouri, A" uniqKey="Zidouri A">A. Zidouri</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Saabni, R M" uniqKey="Saabni R">R. M. Saabni</name>
</author>
<author>
<name sortKey="El Sana, J A" uniqKey="El Sana J">J. A. El-Sana</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Dinges, L" uniqKey="Dinges L">L. Dinges</name>
</author>
<author>
<name sortKey="Elzobi, M" uniqKey="Elzobi M">M. Elzobi</name>
</author>
<author>
<name sortKey="Al Hamadi, A" uniqKey="Al Hamadi A">A. Al-Hamadi</name>
</author>
<author>
<name sortKey="Al Aghbari, Z" uniqKey="Al Aghbari Z">Z. Al-Aghbari</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Dinges, L" uniqKey="Dinges L">L. Dinges</name>
</author>
<author>
<name sortKey="Al Hamadi, A" uniqKey="Al Hamadi A">A. Al-Hamadi</name>
</author>
<author>
<name sortKey="Elzobi, M" uniqKey="Elzobi M">M. Elzobi</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Almuallim, H" uniqKey="Almuallim H">H. Almuallim</name>
</author>
<author>
<name sortKey="Yamaguchi, S" uniqKey="Yamaguchi S">S. Yamaguchi</name>
</author>
</analytic>
</biblStruct>
<biblStruct>
<analytic>
<author>
<name sortKey="Xiu, P" uniqKey="Xiu P">P. Xiu</name>
</author>
<author>
<name sortKey="Peng, L" uniqKey="Peng L">L. Peng</name>
</author>
<author>
<name sortKey="Ding, X" uniqKey="Ding X">X. Ding</name>
</author>
<author>
<name sortKey="Wang, H" uniqKey="Wang H">H. Wang</name>
</author>
</analytic>
</biblStruct>
</listBibl>
</div1>
</back>
</TEI>
<pmc article-type="research-article">
<pmc-dir>properties open_access</pmc-dir>
<front>
<journal-meta>
<journal-id journal-id-type="nlm-ta">ScientificWorldJournal</journal-id>
<journal-id journal-id-type="iso-abbrev">ScientificWorldJournal</journal-id>
<journal-id journal-id-type="publisher-id">TSWJ</journal-id>
<journal-title-group>
<journal-title>The Scientific World Journal</journal-title>
</journal-title-group>
<issn pub-type="ppub">2356-6140</issn>
<issn pub-type="epub">1537-744X</issn>
<publisher>
<publisher-name>Hindawi Publishing Corporation</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="pmid">26295059</article-id>
<article-id pub-id-type="pmc">4534626</article-id>
<article-id pub-id-type="doi">10.1155/2015/323575</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Research Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>ASM Based Synthesis of Handwritten Arabic Text Pages</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<name>
<surname>Dinges</surname>
<given-names>Laslo</given-names>
</name>
<xref ref-type="aff" rid="I1">
<sup>1</sup>
</xref>
<xref ref-type="corresp" rid="cor1">
<sup>*</sup>
</xref>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Al-Hamadi</surname>
<given-names>Ayoub</given-names>
</name>
<xref ref-type="aff" rid="I1">
<sup>1</sup>
</xref>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Elzobi</surname>
<given-names>Moftah</given-names>
</name>
<xref ref-type="aff" rid="I1">
<sup>1</sup>
</xref>
</contrib>
<contrib contrib-type="author">
<name>
<surname>El-etriby</surname>
<given-names>Sherif</given-names>
</name>
<xref ref-type="aff" rid="I2">
<sup>2</sup>
</xref>
<xref ref-type="aff" rid="I3">
<sup>3</sup>
</xref>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Ghoneim</surname>
<given-names>Ahmed</given-names>
</name>
<xref ref-type="aff" rid="I4">
<sup>4</sup>
</xref>
<xref ref-type="aff" rid="I5">
<sup>5</sup>
</xref>
</contrib>
</contrib-group>
<aff id="I1">
<sup>1</sup>
Institute for Information Technology and Communications (IIKT), Otto-von-Guericke-University Magdeburg, 39016 Magdeburg, Germany</aff>
<aff id="I2">
<sup>2</sup>
Umm Al-Qura University, Makkah 21421, Saudi Arabia</aff>
<aff id="I3">
<sup>3</sup>
Faculty of Computers and Information, Menoufia University MUFIC, Menofia 32721, Egypt</aff>
<aff id="I4">
<sup>4</sup>
Department of Software Engineering, College of Computer Science and Information Sciences, King Saud University, Riyadh 11451, Saudi Arabia</aff>
<aff id="I5">
<sup>5</sup>
Department of Computer Science, College of Science, Menoufia University, Menofia 32721, Egypt</aff>
<author-notes>
<corresp id="cor1">*Laslo Dinges:
<email>laslo.dinges@ovgu.de</email>
</corresp>
<fn fn-type="other">
<p>Academic Editor: Tongxing Li</p>
</fn>
</author-notes>
<pub-date pub-type="ppub">
<year>2015</year>
</pub-date>
<pub-date pub-type="epub">
<day>30</day>
<month>7</month>
<year>2015</year>
</pub-date>
<volume>2015</volume>
<elocation-id>323575</elocation-id>
<history>
<date date-type="received">
<day>7</day>
<month>1</month>
<year>2015</year>
</date>
<date date-type="rev-recd">
<day>28</day>
<month>4</month>
<year>2015</year>
</date>
<date date-type="accepted">
<day>29</day>
<month>4</month>
<year>2015</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright © 2015 Laslo Dinges et al.</copyright-statement>
<copyright-year>2015</copyright-year>
<license license-type="open-access">
<license-p>This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<abstract>
<p>Document analysis tasks, as text recognition, word spotting, or segmentation, are highly dependent on comprehensive and suitable databases for training and validation. However their generation is expensive in sense of labor and time. As a matter of fact, there is a lack of such databases, which complicates research and development. This is especially true for the case of Arabic handwriting recognition, that involves different preprocessing, segmentation, and recognition methods, which have individual demands on samples and ground truth. To bypass this problem, we present an efficient system that automatically turns Arabic Unicode text into synthetic images of handwritten documents and detailed ground truth. Active Shape Models (ASMs) based on 28046 online samples were used for character synthesis and statistical properties were extracted from the IESK-arDB database to simulate baselines and word slant or skew. In the synthesis step ASM based representations are composed to words and text pages, smoothed by B-Spline interpolation and rendered considering writing speed and pen characteristics. Finally, we use the synthetic data to validate a segmentation method. An experimental comparison with the IESK-arDB database encourages to train and test document analysis related methods on synthetic samples, whenever no sufficient natural ground truthed data is available.</p>
</abstract>
</article-meta>
</front>
<body>
<sec id="sec1">
<title>1. Introduction</title>
<p>A crucial step for every pattern recognition system is to train the classifier against a database and validate the system using the corresponding ground truth (GT). However, collecting handwriting samples is known as error prone, labor-, and time-expensive process [
<xref rid="B20" ref-type="bibr">1</xref>
]. Particularly costly are databases, which are suitable for training and validation of methods, that segment words into letters or analyse text pages as historical documents, since corresponding GT needs to include additional information. For real handwriting databases this has to be done in a time consuming manual or semimanual way. This is one of the reasons, why data synthesis recently gained more and more interest [
<xref rid="B9" ref-type="bibr">2</xref>
].</p>
<p>The problem of the lack of satisfactory handwriting databases is very obvious in case of Arabic handwritings, where there mainly two well known, free available (offline) word databases (IFN/ENIT) [
<xref rid="B11" ref-type="bibr">3</xref>
], which exclusively contains Tunisian town names, and the IESK-arDB [
<xref rid="B12" ref-type="bibr">4</xref>
] that contains international town names and common terms as well, as 280 historical manuscript pages and 6000 segmented characters. We developed the IESK-arDB word database as a general database to train and validate segmentation based recognition of Arabic words. Therefore, the writers are from different Arabic countries; however, all of them writing in standard Nask. To match even the requirements of explicit segmentation, we add detailed, manual GT for all word samples, which includes bounding boxes of Pieces of Arabic Words (PAWs) and points where two letters are connected. Nevertheless the IESK-arDB word database contains only 300 different words (written by 20 writers), due to the time expensive GT. The manual, proper generation of such detailed GT for complete Arabic text pages is indeed more complicated and hard to realize even for few samples. To bypass this problem, it would be very helpful, if databases necessary for the research field could be produced automatically. One possible way to accomplish this task is to generate synthetic handwriting samples of single words and texts.</p>
<p>We developed a system for this purpose, which allows creating synthetic databases from text files or Unicode that is entered within the user interface (UI).
<xref ref-type="fig" rid="fig1"> Figure 1</xref>
gives an overview of the design of that system. Ground truth are automatically generated. They contain original Unicode, ArabTeX transliteration, and further data as the bounding box of every letter. Furthermore the trajectories are stored for online applications. The system is capable of generating realistic synthesis of words, text lines, and complete (single column) text pages.</p>
<p>The rest of the paper is organized as follows. In
<xref ref-type="sec" rid="sec3">Section 3</xref>
we give an overview of the related work. Thereafter we outline necessary data acquisition steps in
<xref ref-type="sec" rid="sec4">Section 4</xref>
. We also detail the mathematical background of Active Shape Models (ASMs) that we use to generate a large number of polygonal variations of Arabic letters. In
<xref ref-type="sec" rid="sec5">Section 5</xref>
we describe our proposed methods to synthesize words and text pages by composing and arranging ASM based glyphs. Experimental results are discussed in
<xref ref-type="sec" rid="sec6">Section 6</xref>
, where we use synthesized databases to validate a segmentation method. Conclusion and future work are presented in the last section.</p>
</sec>
<sec id="sec2">
<title>2. Arabic Script</title>
<p>The Arabic script has some special characteristics, so that synthesis or OCR approaches for Latin script will not succeed without major modifications [
<xref rid="B19" ref-type="bibr">6</xref>
]. Important aspects of Arabic script are as follows:
<list list-type="order">
<list-item>
<p>Arabic is written from right to left.</p>
</list-item>
<list-item>
<p>There are 28
<italic> letters</italic>
(Characters) in the Arabic alphabet, whose shapes are sensitive to their form (isolated, begin, middle, and end); see
<xref ref-type="table" rid="tab1">Table 1</xref>
.</p>
</list-item>
<list-item>
<p>Six characters can only assume the isolated or end form, which splits a word into two or more parts, called
<italic> Piece of Arabic word</italic>
(PAW). They consist of the main body (connected component) and related diacritics (dots), supplements like Hamza (أ). In case of handwriting, the ascenders of the letters Kaf (ك), Taa (ط), or Dha (ظ) can also be written as fragments.</p>
</list-item>
<list-item>
<p>Arabic is semicursive: within a PAW, letters are joined to each other, whether being handwritten or printed.</p>
</list-item>
<list-item>
<p>Very often PAWs overlap each other, especially in handwritings.</p>
</list-item>
<list-item>
<p>Sometimes one letter is written beneath its predecessor, like Lam-Ya (لي) or Lam-Mim (لم), or it almost vanishes away when it is in middle form, like Lam-Mim-Mim (لمّ) (unlike the middle letter of Kaf-Mim-Mim (كم)). Hence, in addition to the four basic forms, there are also special forms, which can be seen as exceptions. Additional, there are a few ligatures, which are two following letters that build a completely new character like LamAlif (لا).</p>
</list-item>
<list-item>
<p>Some letters like Tha (ث), Ya (ي), or Jim (ج) have one to three dots above, under or within their “body.”</p>
</list-item>
<list-item>
<p>Some letters like Ba (ب), Ta (ت), and Tha (ث) only differ because of these dots.</p>
</list-item>
</list>
</p>
</sec>
<sec id="sec3">
<title>3. Related Work</title>
<p>There are several applications of text synthesis, such as word spotting, CAPTCHAs, character recognition improvement, calligraphy, and others [
<xref rid="B9" ref-type="bibr">2</xref>
]. Accordingly there are different approaches of synthesis. In the literature, research addressing the issue of synthetic text generation can be classified into two main categories, top-down and bottom-up approaches. Both can be either based on offline or online techniques, according to the available samples and applications. Top-down approaches are typically based on neuromuscular models, that simulate the writing process itself [
<xref rid="B16" ref-type="bibr">7</xref>
,
<xref rid="B13" ref-type="bibr">8</xref>
]. Therefore, script trajectories are seen as a result of character key points (built by the human brain when learning how to write), the writing speed, character size, and inertia, which finally leads to the curvature of handwritings. These approaches are focused more on the physical aspects of writing than the actual handwriting sample outcome. One typical application is to investigate diseases as Parkinson or Alzheimer that influence handwriting abilities [
<xref rid="B23" ref-type="bibr">9</xref>
].</p>
<p>Bottom-up approaches on the contrary model the shape (and possibly texture) of handwritings itself. Hence, bottom-up approaches are preferred in context of text recognition task like segmentation or handwriting recognition. Bottom-up approaches can be further categorized into generation of new samples of the same level and concatenation to more complex outcomes, such as words, that are composed from characters or glyphs [
<xref rid="B14" ref-type="bibr">10</xref>
].</p>
<p>A common generation technique is data perturbation, which is performed by adding noise to online or offline samples. Samples might be complete units as text lines or words, but single characters or glyphs (as syllables, ligatures, or modified letters) are used mostly [
<xref rid="B29" ref-type="bibr">11</xref>
]. In case of letters or glyphs, noise is often achieved by degradation of offline or online samples or random displacement of trajectories; transformations as shearing, scaling, or rotation are favored for perturbing words or text lines. Another generation technique is sample fusion that blends two or a couple of samples to produce new hybrid ones [
<xref rid="B35" ref-type="bibr">12</xref>
,
<xref rid="B31" ref-type="bibr">13</xref>
]. A better statistical relevance can be achieved using model based generation [
<xref rid="B5" ref-type="bibr">14</xref>
,
<xref rid="B8" ref-type="bibr">15</xref>
]. This initially requires the creation of deformable models, which represent a class by a flexible shape. Deformable models are often based on statistical information that must be extracted from sufficient samples (usually on character level). Then unlimited new representations of the same model class can be generated. At the same time, deformable models are capable of generating more realistic variances than data perturbation, which closely depict the peculiarities of the letter class. Examples for deformable models are Active Shape Models (ASMs) and novel Active Shape Structural Models (ASSMs), which are used for generating variances of simple drawings and signatures [
<xref rid="B2" ref-type="bibr">16</xref>
]. ASMs are also applied for the classification of Chinese letters [
<xref rid="B26" ref-type="bibr">17</xref>
].</p>
<p>Since documents in Latin based script might be handprinted, concatenation of such handwriting samples to units of higher levels can be done without connecting the samples [
<xref rid="B14" ref-type="bibr">10</xref>
]. Proper simulation of cursive handwriting requires at least partially connection though. There are approaches that connect offline samples directly [
<xref rid="B15" ref-type="bibr">18</xref>
] and those who use polynomial [
<xref rid="B17" ref-type="bibr">19</xref>
], spline [
<xref rid="B24" ref-type="bibr">20</xref>
,
<xref rid="B34" ref-type="bibr">21</xref>
], or probabilistic models [
<xref rid="B18" ref-type="bibr">22</xref>
]. Due to the semi cursive style, connecting is mandatory in case of Arabic script.</p>
<p>Systems using the described techniques to synthesize handwritings have been built for different scripts and purposes. Wang et al. [
<xref rid="B32" ref-type="bibr">23</xref>
] proposed a learning based approach to synthesize cursive handwriting by combining shape and physical models. Thomas et al. [
<xref rid="B27" ref-type="bibr">24</xref>
] have proposed synthetic handwriting method, for generation of CAPTCHAs' (
<italic>completely automated public Turing test to tell computers and humans apart</italic>
) text lines. After segmentation, samples for each letter are generated using shape models. In the synthesis process, a delta log-normal function is used to compose smooth and natural cursive handwriting. Multiple approaches specific to Latin script that are based on polynomial merging functions and Bezier curves have been documented in [
<xref rid="B24" ref-type="bibr">20</xref>
]. Miyao and Maruyama [
<xref rid="B22" ref-type="bibr">25</xref>
] have proposed a method to improve offline Japanese Hiragana character classification using virtual examples synthesized from an online character database.</p>
<p>In contrast to word synthesizing, little research has been done concerning text line, paragraph, or document synthesis. If synthesis of multiple text lines is considered at all, it is typically modeled as horizontal baselines that may be influenced by noise [
<xref rid="B34" ref-type="bibr">21</xref>
], or each baseline line is defined by a rotation angle [
<xref rid="B14" ref-type="bibr">10</xref>
]. Varga et al. [
<xref rid="B28" ref-type="bibr">26</xref>
,
<xref rid="B30" ref-type="bibr">27</xref>
] presented a method for handwritten English text line synthesizing; their methodology starts by composing static image of the text line by perturbing and chaining of character templates. Then text line is drawn using overlapping strokes and delta-lognormal velocity profiles, as stated by delta-lognormal theory. Chaudhuri and Kundu proposed a system to synthesize handwritten Bangla script pages [
<xref rid="B4" ref-type="bibr">28</xref>
]. For page layout simulation they compute Gaussian distributions from natural text pages to model different features, namely, left margin angle, line orientation, interline gap, and line undulation.</p>
<p>Due to the characteristics if Arabic script, which were discussed in
<xref ref-type="sec" rid="sec2">Section 2</xref>
, existing systems and methods can not be directly used for Arabic. Margner and Pechwitz [
<xref rid="B21" ref-type="bibr">29</xref>
] suggest an image based perturbation approach for the generation of synthetic printed Arabic words. They add global noise of different degrees, simulating degradation, as artifact, which are caused by repeated copying. As for the problem of automatic synthesis of offline handwritten Arabic text, to the best of our knowledge, Elarian et al. [
<xref rid="B11" ref-type="bibr">3</xref>
,
<xref rid="B10" ref-type="bibr">30</xref>
] are the first who published research work addressing this problem so far. They propose a straightforward approach to compose arbitrary Arabic words. The approach starts by generating a finite set of letter images from two different writers, manually segmented from IFN/ENIT database, and then two kinds of simple features (width and direction feature) are extracted, so they can be used later as a metrics in the concatenation step. Saabni and El-Sana proposed a system to synthesize Pieces of Arabic Words (PAW) (without diacritics) [
<xref rid="B25" ref-type="bibr">31</xref>
]. They use digital tablets to acquire online samples, which are randomly composed to PAWs. Thereafter a subset of the produced synthetic data is selected by clustering techniques to get a compact database. In [
<xref rid="B7" ref-type="bibr">32</xref>
] we proposed a system to generate Arabic letter shapes by ASMs built from offline samples. Subsequently, we developed a system to render images of Arabic handwritten words, concatenating ASM based samples and using transformations on word level as optional, second generation step [
<xref rid="B6" ref-type="bibr">33</xref>
].</p>
<p>Segmentation of Arabic words is quite challenging. It depends on holistic word as well as the features of single characters, and detailed GT are required to perform a useful validation. Hence, it is reasonable to test this method on synthetic databases, which contain such GT. One of the earliest segmentation based approaches, suggested for the recognition of Arabic handwritten text, is the one proposed by [
<xref rid="B3" ref-type="bibr">34</xref>
], and no segmentation results are reported though. Xiu et al. proposed probabilistic segmentation model, for this segmentation approach a tentative, contour based over segmentation is first performed on the text image; as a result, a set of what they called graphemes is produced [
<xref rid="B33" ref-type="bibr">35</xref>
]. The approach differentiates among three types of graphemes. The confidence of each character is calculated according to the probabilistic model, respecting other factors, for example, recognition output, geometric confidence, and logical constraint. The authors experimented the proposed methodology on five different test sets, achieving 59.2% success rate.</p>
</sec>
<sec id="sec4">
<title>4. Data Acquisition and Generation</title>
<p>To synthesize Arabic handwritten words from glyphs, a sufficient amount of
<italic> glyph samples</italic>
has to be acquired first. In our case trajectories of single letters and their connections (Kashidas) are used as glyphs. The glyphs are acquired with online techniques since relevant information can be extracted more efficiently from trajectories than images. Nevertheless, we are mainly interested in synthesizing offline data. Hence, we decided to use online pens for data acquisition, for they can be applied as ordinary biros in contrast to digital tablets. Fifty or more samples per writer are taken from over hundred letter classes (28046 samples altogether) to built an online
<italic> character database</italic>
. To minimize manual effort and allow an easy extension, this database is completely automatically generated from raw data. Raw data are trajectories
<inline-formula>
<mml:math id="M1">
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">X</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
<mml:mo></mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck"></mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>m</mml:mi>
<mml:mo>×</mml:mo>
<mml:mn mathvariant="normal">2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula>
(see
<xref ref-type="table" rid="tab2">Table 2</xref>
) for each stroke within a virtual DIN A4 page. That page has a resolution of 1000 dpi and 58 rps (reports per second), so there are constant timestamps
<inline-formula>
<mml:math id="M2">
<mml:mover accent="true">
<mml:mrow>
<mml:mo></mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>-</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">0.0172</mml:mn>
<mml:mo></mml:mo>
<mml:mi mathvariant="normal">s</mml:mi>
</mml:math>
</inline-formula>
between neighbored
<inline-formula>
<mml:math id="M3">
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mn mathvariant="normal">2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo></mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">X</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
</mml:math>
</inline-formula>
. The generated database contains the trajectories and an image representation for each Arabic letter class (see
<xref ref-type="table" rid="tab1">Table 1</xref>
), as well as the resulting Active Shape Models (ASMs), which are described in the next section. Digits and special characters might be added in future work.</p>
<sec id="sec4.1">
<title>4.1. Computing Active Shape Models for Generation of Arabic Characters</title>
<p>Active Shape Models (ASMs) are statistical representations of the approximated shape of an object. An ASM uses the distribution of some significant points to store the most important information of many shapes of a class in one single model. Normally some well-defined landmarks have to be set manually for all samples and additional intermediate points between these landmarks are used if there are not enough landmarks to represent the shape. However, the definition of landmarks for over hundred classes for every writer is barely realizable and would prevent to add data from further writers efficiently. This is why we use two given landmarks, the
<italic> Start</italic>
and the
<italic> End</italic>
point of each polygon, and compute intermediate points by interpolating between the given
<inline-formula>
<mml:math id="M4">
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mn mathvariant="normal">2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">)</mml:mo>
</mml:math>
</inline-formula>
of
<inline-formula>
<mml:math id="M5">
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">X</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
<mml:mo></mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck"></mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>m</mml:mi>
<mml:mo>×</mml:mo>
<mml:mn mathvariant="normal">2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:math>
</inline-formula>
to get polygons
<bold>X</bold>
<italic></italic>
<sup>
<italic>n</italic>
×2</sup>
. By alternate storing of the
<italic>x</italic>
<sub>
<italic>i</italic>
,1</sub>
and
<italic>x</italic>
<sub>
<italic>i</italic>
,2</sub>
coordinates, each polygon is represented as a single vector of size 2
<italic>n</italic>
:
<bold>x</bold>
= (
<italic>x</italic>
<sub>1,1</sub>
,
<italic>x</italic>
<sub>1,2</sub>
,
<italic>x</italic>
<sub>2,1</sub>
,
<italic>x</italic>
<sub>2,2</sub>
…,
<italic>x</italic>
<sub>
<italic>n</italic>
,1</sub>
,
<italic>x</italic>
<sub>
<italic>n</italic>
,2</sub>
)
<sup>
<italic>T</italic>
</sup>
that is required to build ASMs. Given the point numbers
<italic>m</italic>
of the original and
<italic>n</italic>
of the desired approximated samples, we interpolate in such a way that the time steps
<inline-formula>
<mml:math id="M6">
<mml:msub>
<mml:mrow>
<mml:mo></mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mo></mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
<mml:mi>m</mml:mi>
<mml:mo>/</mml:mo>
<mml:mi>n</mml:mi>
</mml:math>
</inline-formula>
between neighbored interpolated points
<bold>p</bold>
<sub>
<italic>j</italic>
</sub>
,
<bold>p</bold>
<sub>
<italic>j</italic>
+1</sub>
<bold>p</bold>
<sub>
<italic>j</italic>
</sub>
= (
<italic>x</italic>
<sub>2
<italic>j</italic>
</sub>
,
<italic>x</italic>
<sub>2
<italic>j</italic>
+1</sub>
) are still constant, the Euclidean distance however may vary. Given the original points
<inline-formula>
<mml:math id="M7">
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">p</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
<mml:mo></mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">X</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
</mml:math>
</inline-formula>
we compute an interpolated point
<disp-formula id="EEq1">
<label>(1)</label>
<mml:math id="M8">
<mml:mtable style="T1">
<mml:mtr>
<mml:mtd>
<mml:malignmark></mml:malignmark>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">p</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="7.08pt" depth="2.484pt"></mml:mspace>
<mml:mn mathvariant="normal">1</mml:mn>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>λ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mspace height="7.08pt" depth="2.484pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">p</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:msub>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>λ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">p</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>+</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:malignmark></mml:malignmark>
<mml:mspace width="48.275634765625pt"></mml:mspace>
<mml:mtext>with  </mml:mtext>
<mml:msup>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>=</mml:mo>
<mml:mfenced open="⌊" close="⌋" separators="|">
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mover accent="true">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mo></mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>~</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mo></mml:mo>
<mml:mo></mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mo></mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>~</mml:mo>
</mml:mover>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mo></mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mo></mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mo></mml:mo>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>λ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mi>j</mml:mi>
<mml:mover accent="true">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mo></mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>~</mml:mo>
</mml:mover>
<mml:mo></mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
where
<italic>j</italic>
′ ∈ {1,
<italic>m</italic>
} and
<italic>j</italic>
∈ {1,
<italic>n</italic>
}. This enables a more detailed modeling of complex structures as the peaks of Sin (س) as one can see in Figures
<xref ref-type="fig" rid="fig2">2</xref>
and
<xref ref-type="fig" rid="fig3">3</xref>
. We set
<italic>n</italic>
= 25, which is sufficient to represent even complex Arabic characters like Sin (س), as shown in
<xref ref-type="fig" rid="fig2">Figure 2</xref>
(in order to speed up the synthesis process,
<italic>n</italic>
could be optimized for each individual class).</p>
<p>We then scale all samples
<bold>x</bold>
keeping their aspect ratio. Let
<italic>W</italic>
be the width and let
<italic>H</italic>
be the heights of an unscaled
<bold>x</bold>
, and then we scale
<bold>x</bold>
by 100
<italic>x</italic>
100/(
<italic>H∗W</italic>
) and translate
<bold>x</bold>
so that its center lies within the origin.</p>
<p>For each class there are
<italic>r</italic>
available vectors, from which the ASM of the corresponding class is calculated (we set
<italic>r</italic>
= 50 for our experiments).</p>
<p>To build ASMs, the expected value
<inline-formula>
<mml:math id="M9">
<mml:mrow>
<mml:mover accent="false">
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
and the covariance matrix
<bold>S</bold>
have to be calculated first:
<disp-formula id="EEq2">
<label>(2)</label>
<mml:math id="M10">
<mml:mtable style="T17">
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:mover accent="false">
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
<mml:malignmark></mml:malignmark>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mrow>
<mml:msubsup>
<mml:mo stretchy="false"></mml:mo>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:malignmark></mml:malignmark>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:mi mathvariant="bold">S</mml:mi>
<mml:malignmark></mml:malignmark>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:mi>r</mml:mi>
<mml:mo></mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:mfrac>
<mml:mrow>
<mml:munderover>
<mml:mstyle displaystyle="true">
<mml:mo stretchy="false"></mml:mo>
</mml:mstyle>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:munderover>
<mml:mrow>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="6.79pt" depth="2.484pt"></mml:mspace>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:mover accent="false">
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
<mml:mspace height="6.79pt" depth="2.484pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:msup>
<mml:mrow>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="6.79pt" depth="2.484pt"></mml:mspace>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:mover accent="false">
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
<mml:mspace height="6.79pt" depth="2.484pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mi>T</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mrow>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:malignmark></mml:malignmark>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
As a consequence of the covariance matrix calculation, the Eigenvalues
<italic>λ</italic>
<sub>
<italic>i</italic>
</sub>
and Eigenvectors
<bold>e</bold>
<sub>
<italic>i</italic>
</sub>
can be determined, and then the ASM corresponding to character classes is calculated. Now any arbitrary number of vectors that represent each class can be calculated by linear combination:
<disp-formula id="EEq3">
<label>(3)</label>
<mml:math id="M11">
<mml:mtable style="T1">
<mml:mtr>
<mml:mtd>
<mml:mi mathvariant="bold">u</mml:mi>
<mml:mo>=</mml:mo>
<mml:mover accent="false">
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
<mml:mo>+</mml:mo>
<mml:mrow>
<mml:munderover>
<mml:mstyle displaystyle="true">
<mml:mo stretchy="false"></mml:mo>
</mml:mstyle>
<mml:mrow>
<mml:mi>j</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:munderover>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">e</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mspace width="10pt"></mml:mspace>
<mml:msub>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:mfenced open="[" close="]" separators="|">
<mml:mrow>
<mml:mo></mml:mo>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:msub>
<mml:mrow>
<mml:msqrt>
<mml:mi>λ</mml:mi>
</mml:msqrt>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:msub>
<mml:mrow>
<mml:msqrt>
<mml:mi>λ</mml:mi>
</mml:msqrt>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
A limitation of
<italic>c</italic>
<sub>
<italic>j</italic>
</sub>
by
<inline-formula>
<mml:math id="M12">
<mml:mo>±</mml:mo>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:msub>
<mml:mrow>
<mml:msqrt>
<mml:mi>λ</mml:mi>
</mml:msqrt>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>
assures that all the deviations of
<bold>u</bold>
are within the doubled standard deviation
<italic>σ</italic>
. This is a common limit, since most training samples lie within this range. In few cases a limit of maximal
<inline-formula>
<mml:math id="M13">
<mml:mo>±</mml:mo>
<mml:mn mathvariant="normal">3</mml:mn>
<mml:msub>
<mml:mrow>
<mml:msqrt>
<mml:mi>λ</mml:mi>
</mml:msqrt>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>
is applied, which requires a clear increase of
<italic>r</italic>
in order to keep
<bold>u</bold>
statistically reliable.</p>
<p>Some examples of
<bold>x</bold>
and
<bold>u</bold>
are shown in
<xref ref-type="fig" rid="fig3">Figure 3</xref>
. The computation of ASMs is quite costly, especially if many samples and interpolation points are used. This is why we avoid recalculations of ASMs at runtime, since the synthesizing process requires a minimum of 100 ASMs. Hence, all ASMs (including their corresponding online samples) are saved in files, to separate ASM generation from the synthesis module.</p>
</sec>
<sec id="sec4.2">
<title>4.2. ASM Distance Measure</title>
<p>The distance
<italic>δ</italic>
of a sample
<bold>x</bold>
and a representation
<bold>u</bold>
of an ASM can be calculated as follows:
<disp-formula id="EEq4">
<label>(4)</label>
<mml:math id="M14">
<mml:mtable style="T1">
<mml:mtr>
<mml:mtd>
<mml:mi>δ</mml:mi>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="4.59pt" depth="1.16998pt"></mml:mspace>
<mml:mi mathvariant="bold">x</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="bold">u</mml:mi>
<mml:mspace height="4.59pt" depth="1.16998pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mrow>
<mml:munderover>
<mml:mstyle displaystyle="true">
<mml:mo stretchy="false"></mml:mo>
</mml:mstyle>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:munderover>
<mml:mrow>
<mml:msqrt>
<mml:msup>
<mml:mrow>
<mml:mfenced separators="|">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:mi>i</mml:mi>
<mml:mo></mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:mi>i</mml:mi>
<mml:mo></mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo>+</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mfenced separators="|">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:msqrt>
</mml:mrow>
</mml:mrow>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
Due to the performed scaling of
<bold>x</bold>
,
<italic>δ</italic>
(
<bold>x</bold>
,
<bold>u</bold>
) can be interpreted as the approximated deviation in percent. For all samples
<bold>x</bold>
we compute the most similar representation
<bold>u</bold>
<sup>
<italic></italic>
</sup>
by solving (
<xref ref-type="disp-formula" rid="EEq3">3</xref>
) numerically, using
<bold>c</bold>
as unknown (initially ∀
<italic>c</italic>
<sub>
<italic>i</italic>
</sub>
= 0). Some examples of
<bold>u</bold>
<sup>
<italic></italic>
</sup>
are visualized in
<xref ref-type="fig" rid="fig4">Figure 4</xref>
.</p>
<p>In contrast to ASMs from offline samples [
<xref rid="B7" ref-type="bibr">32</xref>
], most online based ASMs are capable of representing their input samples well, even without manually defined landmarks, since detailed, slowly written structures (where landmarks are suspected) are represented by more intermediate points. This effect allows an efficient extension and maintenance of the
<italic> character database</italic>
, since time consuming, manual landmarking can be avoided.</p>
<p>Nonetheless the average
<inline-formula>
<mml:math id="M15">
<mml:mrow>
<mml:mover accent="false">
<mml:mrow>
<mml:mi>δ</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
is writer dependent. We measured
<inline-formula>
<mml:math id="M16">
<mml:mover accent="false">
<mml:mrow>
<mml:mi>δ</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">0.8</mml:mn>
</mml:math>
</inline-formula>
for writer 1,
<inline-formula>
<mml:math id="M17">
<mml:mover accent="false">
<mml:mrow>
<mml:mi>δ</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">1.46</mml:mn>
</mml:math>
</inline-formula>
for writer 2 and even higher values for the other writers, whose handwriting style is less tidy. Furthermore
<inline-formula>
<mml:math id="M18">
<mml:mrow>
<mml:mover accent="false">
<mml:mrow>
<mml:mi>δ</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
depends on the letter class. A high
<inline-formula>
<mml:math id="M19">
<mml:mrow>
<mml:mover accent="false">
<mml:mrow>
<mml:mi>δ</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
is mainly caused by some classes with diacritics as Zai (ز) that need improvement (see
<xref ref-type="fig" rid="fig3">Figure 3(c)</xref>
). The distance between the letters main body and diacritics can vary clearly, which may lead to inappropriate
<bold>u</bold>
<sup>
<italic></italic>
</sup>
, in case that
<bold>x</bold>
is unlike
<inline-formula>
<mml:math id="M20">
<mml:mrow>
<mml:mover accent="false">
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
. To react against this effect, more training samples could be used or diacritics and main bodies could be separated using Active Shape Structural Models (ASSM) [
<xref rid="B2" ref-type="bibr">16</xref>
]. However, our ASMs are meant for synthesis approaches where the use of pure noise (perturbed data) is quite common, and hence moderate imprecision does not spoil the synthesis quality significantly.</p>
</sec>
</sec>
<sec id="sec5">
<title>5. Synthesizing Arabic Handwritings</title>
<p>In the following subsections we describe all methods that are applied to create synthetic Arabic handwritings from Unicode, using the
<italic> ASM data</italic>
from the last Section. Our system uses these either to show a few specific syntheses for preview purpose or to generate a complete database including ground truth.</p>
<p>The methods, which are used to synthesize and render Arabic handwritings, are described in the following Sections.</p>
<sec id="sec5.1">
<title>5.1. Composing Words</title>
<p>The basic idea of Arabic handwriting synthesis from Unicode is to select glyphs with proper shapes (isolated, initial, end, or middle form) and connect them subsequently to build PAWs, words, and texts, from which images or vector graphics are rendered.</p>
<sec id="sec5.1.1">
<title>5.1.1. Calculation of the Letter Form</title>
<p>Our system receives text as Unicode string that represents every letter as number. Since our samples are limited to the 28 regular letters and Tamarbuta (ة), we substitute special characters as Alif with Hamza above (أ) with their regular form Alif (ا) before starting the synthesis. Letter forms have a strong influence on the letter shape, but they are not given by regular Unicode; thus they have to be determined first.</p>
<p>Letters of the set Γ
<sup>2</sup>
= (ادرزذو) can only assume
<bold> i</bold>
solated or
<bold> e</bold>
nd form. All other letters, such as Ayn() can assume begin-, middle-, and- as well as isolated- form. Ayn (عـ ـعـ ـع ع). Therefore, the form
<bold>f</bold>
<sub>0</sub>
of the first letter
<italic>𝔩</italic>
<sub>0</sub>
of a word is
<disp-formula id="EEq5">
<label>(5)</label>
<mml:math id="M21">
<mml:mtable style="T1">
<mml:mtr>
<mml:mtd>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">f</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mfenced open="{" close="" separators="|">
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mi mathvariant="bold">i</mml:mi>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>if  </mml:mtext>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="fraktur">l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="normal">Γ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>else</mml:mtext>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
</p>
<p>Examples of the different letter forms within an Arabic word are shown in
<xref ref-type="fig" rid="fig5">Figure 5</xref>
. Let
<bold>f</bold>
<sub>−1</sub>
be the form of
<italic>𝔩</italic>
<sub>−1</sub>
, which is the predecessor of letter
<italic>𝔩</italic>
, and
<italic>𝔩</italic>
<sub>+1</sub>
=
<italic></italic>
define that the successor of
<italic>𝔩</italic>
is a space, tab, or return token
<italic></italic>
, and then the position
<bold>f</bold>
of a letter
<italic>𝔩</italic>
can be defined as follows:
<disp-formula id="EEq6">
<label>(6)</label>
<mml:math id="M22">
<mml:mtable style="T1">
<mml:mtr>
<mml:mtd>
<mml:mi mathvariant="bold">f</mml:mi>
<mml:mo>=</mml:mo>
<mml:mfenced open="{" close="" separators="|">
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mi mathvariant="bold">i</mml:mi>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>if</mml:mtext>
<mml:mo></mml:mo>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">f</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo></mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="bold">e</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo></mml:mo>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="fraktur">l</mml:mi>
<mml:mo></mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="normal">Γ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="fraktur">l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>+</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mi></mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>if</mml:mtext>
<mml:mo></mml:mo>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">f</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo></mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">i</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="bold">e</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo></mml:mo>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="fraktur">l</mml:mi>
<mml:mo></mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="normal">Γ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="fraktur">l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>+</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:mi></mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mi mathvariant="bold">m</mml:mi>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>if</mml:mtext>
<mml:mo></mml:mo>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">f</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo></mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="bold">m</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo></mml:mo>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="fraktur">l</mml:mi>
<mml:mo></mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="normal">Γ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="fraktur">l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>+</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:mi></mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mi mathvariant="bold">e</mml:mi>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>if</mml:mtext>
<mml:mo></mml:mo>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">f</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo></mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="bold">m</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo></mml:mo>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="fraktur">l</mml:mi>
<mml:mo></mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="normal">Γ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="fraktur">l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>+</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mi></mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
</p>
<p>Letters that have only two forms split an Arabic word into Pieces of Arabic Words (PAWs), which consist of one or more letters.</p>
</sec>
<sec id="sec5.1.2">
<title>5.1.2. Selection of Suitable Glyphs</title>
<p>To ensure that the styles of all neighbored glyphs are similar, glyphs of different writer are not mixed within a synthesis. We encouraged the writers to write letters only in this style that is dominant for their writings and avoid severe rotations. The size of the glyphs is normalized by the average character size we extracted from the IESK-arDB. However, we corrected the size manually in case of rare character classes. A suitability measure for the glyph joint points has not been considered, since steady joints are achieved by B-Spline interpolation and rendering at the end of the synthesis process.</p>
</sec>
<sec id="sec5.1.3">
<title>5.1.3. Connecting Glyphs</title>
<p>After all letter classes are defined by their names and forms, corresponding ASMs are loaded. The ASMs are used to generate an unique polygonal representation
<bold>u</bold>
for each occurrence of a letter class in order to avoid piecewise identical syntheses. In order to compose words from these polygons, each letter in end or middle form has to be connected with its predecessor: عـ ر→عر, نـ ـيـ ـو→نيو. Let
<bold>p</bold>
<sub>
<bold>f</bold>
</sub>
be the first point of ـيـ and
<bold>p</bold>
<sub>
<bold>l</bold>
</sub>
the last point of its predecessor نـ, and then we can connect them by translating ـيـ by
<bold>p</bold>
<sub>
<bold>l</bold>
</sub>
<bold>p</bold>
<sub>
<bold>f</bold>
</sub>
. An example is shown in
<xref ref-type="fig" rid="fig5">Figure 5</xref>
.</p>
<p>The relation of a PAW's
<italic>y</italic>
coordinate and the baseline depends on the letter classes the PAW is composed of. Thus we extracted the average
<italic>μ</italic>
<sub>
<italic>r</italic>
</sub>
and variance
<italic>σ</italic>
<sub>
<italic>r</italic>
</sub>
of the relative distance between the baseline and the center of a letter from manual created ground truth of our (real) word database IESK-arDB [
<xref rid="B12" ref-type="bibr">4</xref>
]. We set the baseline to 0 and shift all
<italic>y</italic>
coordinates of each PAW by
<italic>𝒩</italic>
(
<italic>μ</italic>
<sub>
<italic>r</italic>
</sub>
,
<italic>σ</italic>
<sub>
<italic>r</italic>
</sub>
). Finally, the space between the rightmost point of a PAW and the leftmost point of its predecessor has to be defined. Therefore, the user depending parameter
<italic>ς</italic>
is used that may be negative in order to simulate overlapping PAWs. Given
<bold>p</bold>
<sub>
<bold>l</bold>
</sub>
and
<bold>p</bold>
<sub>
<bold>f</bold>
</sub>
, the PAW can be translated by the vector
<disp-formula id="EEq7">
<label>(7)</label>
<mml:math id="M23">
<mml:mtable style="T1">
<mml:mtr>
<mml:mtd>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="bold">t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>paw</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:msub>
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>f</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:mi>ς</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:mi mathvariant="script">N</mml:mi>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>μ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>σ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
In case of intersections between the polygons of overlapping PAWs,
<italic>ς</italic>
is increased iteratively by 25% of the average letter width, as described in
<xref ref-type="fig" rid="alg1">Algorithm 1</xref>
.</p>
<p>Examples of words composed by the average letter shapes of different writers are shown in
<xref ref-type="fig" rid="fig6">Figure 6</xref>
. Examples from ASM based and original samples can be found in
<xref ref-type="table" rid="tab3">Table 3</xref>
. The maximal deviation
<italic>σ</italic>
<sub>
<italic>A</italic>
</sub>
means that the influence of an eigenvector
<bold>e</bold>
<sub>
<italic>i</italic>
</sub>
is limited by
<inline-formula>
<mml:math id="M24">
<mml:mo>±</mml:mo>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:msqrt>
<mml:msub>
<mml:mrow>
<mml:mi>λ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:msqrt>
</mml:math>
</inline-formula>
. While letters look similar using
<italic>σ</italic>
between 0 and 1, ASM representations
<bold>u</bold>
with
<italic>σ</italic>
<sub>
<italic>A</italic>
</sub>
of 2 already provoke increased letter variation. ASMs (trained with
<italic>r</italic>
= 50 samples) are barely capable of representing a deviation of
<italic>σ</italic>
<sub>
<italic>A</italic>
</sub>
= 3 though. As a matter of fact, there are noise based deformations as shown in
<xref ref-type="table" rid="tab3">Table 3</xref>
(second last row). This effect might be intended to create especially challenging syntheses.</p>
</sec>
</sec>
<sec id="sec5.2">
<title>5.2. Simulation of Global Variances</title>
<p>ASMs already contain variations in slant, width or connection size. Nevertheless, these variations are limited by the used samples. In order to increase and control these variations, affine transformations are used (scaling, translation, shearing, and rotation), which allow optional manipulations of letter and PAW shapes. The user interface (UI) of our synthesis system allows to set the average
<italic>μ</italic>
and variance
<italic>σ</italic>
of a Gaussian distribution for all affine transformations. Particularly global variations as the slant can be achieved this way. The influences of these affine transformations on the resulting word image is shown in
<xref ref-type="fig" rid="fig7">Figure 7</xref>
.</p>
<p>A stretching is performed by scale each
<italic>x</italic>
component of each letter point by the factor
<italic>c</italic>
∈ [0.5,2]. The word slant can be set by shearing the word with an angle of
<italic>α</italic>
<sub>
<italic>s</italic>
</sub>
as the skew of PAW can be manipulated by rotating to the angle
<italic>α</italic>
<sub>
<italic>r</italic>
</sub>
, where
<italic>α</italic>
<sub>
<italic>s</italic>
</sub>
,
<italic>α</italic>
<sub>
<italic>r</italic>
</sub>
∈ [−45°, +45°]. We analyzed the skew and slant of samples of the IESK-arDB database [
<xref rid="B12" ref-type="bibr">4</xref>
] with local minima regression and Hough transform. We found that the skew correlates with a Gaussian distribution of
<italic>𝒩</italic>
(−3.8°, 7.1°) (passed Chi square test with
<italic>α</italic>
= 0.05). The slant can be represented by
<italic>𝒩</italic>
(−4.6°, 14.4°). The size of the complete word or single letters can be adjusted by an equal scaling with
<italic>c</italic>
∈ [0.1,10], which can be used to control the resolution of the synthesized word images or to increase variation of letter size. As described in
<xref ref-type="sec" rid="sec5.1.3">Section 5.1.3</xref>
variations of PAW positions can be realized by translations. Even using the same glyphs, synthetic words can assume large variations in shape when using affine transformations or cutting connection size, as shown in
<xref ref-type="fig" rid="fig7">Figure 7</xref>
.</p>
<p>When examining the glyph samples and synthesis we found that compared to complete handwritings, letter connections of the acquired samples are extended and even excessively (approximately twice as) long in case of writer 1. Hence, we allow to delete up to 25% of the letter points to simulate stretched or missed connections, which often occur in natural Arabic handwritings. In Arabic handwritings some characters as Ya (ي) are sometimes written beneath their predecessors. As a result they resemble a single character, which impedes segmentation and recognition tasks. This effect can be simulated by a strong reduction of the Kashida, as shown in
<xref ref-type="fig" rid="fig8">Figure 8</xref>
. However, this feature has been not yet entirely implemented, since a list of all pairs of letters that typically show this behaviour needs to be created first.</p>
</sec>
<sec id="sec5.3">
<title>5.3. Interpolation</title>
<p>Since a polygonal letter representation does not look natural for vector graphics or images with a scaling factor >1, we use interpolation to improve the outcome. Let
<italic>n</italic>
(
<bold>u</bold>
) be the number of points of
<bold>u</bold>
, and then we use
<bold>u</bold>
as control points to interpolate a curve
<inline-formula>
<mml:math id="M25">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
. By increasing the interpolation steps,
<inline-formula>
<mml:math id="M26">
<mml:mi>n</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
<mml:mo stretchy="false">)</mml:mo>
</mml:math>
</inline-formula>
can be approximated to the original number of points of a sample
<inline-formula>
<mml:math id="M27">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">X</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
. The average length of
<inline-formula>
<mml:math id="M28">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">X</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
is
<inline-formula>
<mml:math id="M29">
<mml:mover accent="false">
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
<mml:mo stretchy="false">(</mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">X</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">266.8</mml:mn>
</mml:math>
</inline-formula>
, and hence a tenfold increase
<inline-formula>
<mml:math id="M30">
<mml:mi>n</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi mathvariant="bold">u</mml:mi>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">25</mml:mn>
<mml:mo></mml:mo>
<mml:mi>n</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">250</mml:mn>
</mml:math>
</inline-formula>
is generally sufficient to achieve smooth syntheses. To ensure that the above mentioned methods work efficiently on the compressed representation
<bold>u</bold>
, the interpolation step is applied just before rendering or skipped in case of low-resolution synthesis.</p>
<p>Our system supports two interpolation methods. Piecewise Cubic hermite-interpolation is
<italic>C</italic>
<sup>1</sup>
-steady, which means that only the first derivation of the used interpolation function is steady. Therefore, hermite-interpolation leads to less smooth and accurate results, a property, that can be used to create noisy handwritings [
<xref rid="B7" ref-type="bibr">32</xref>
] (perturbed data technique). State-of-the-art B-Spline interpolation is commonly used within CAD-applications, since it is
<italic>C</italic>
<sup>2</sup>
-steady and leads to smooth, natural curves, which can be defined properly by their control points, as shown in
<xref ref-type="fig" rid="fig9">Figure 9</xref>
. Although the B-Spline curve do not pass through all control points, it fits the original curve sufficiently when
<italic>n</italic>
= 25 control points are used. Given the measure
<italic>δ</italic>
of (
<xref ref-type="disp-formula" rid="EEq4">4</xref>
), the average distance between
<bold>u</bold>
and the
<italic>n</italic>
closest points of
<inline-formula>
<mml:math id="M31">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
can be computed. Using a cross-validation with
<italic>k</italic>
fold = 10, we get
<inline-formula>
<mml:math id="M32">
<mml:mover accent="false">
<mml:mrow>
<mml:mi>δ</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi mathvariant="bold">u</mml:mi>
<mml:mo>,</mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">0.45</mml:mn>
</mml:math>
</inline-formula>
with a variance of 0.058.</p>
</sec>
<sec id="sec5.4">
<title>5.4. Rendering Handwriting Images</title>
<p>The former sections discussed how to compose and interpolate polygonal representations of Arabic handwritings. Now those have to be transformed into images and saved in common files formats (.bmp,  .png, etc.), which can easily be loaded by most text recognitions or document analysis systems. Even preprocessing steps, as thinning, can influence the performance of the following tasks. Such preprocessing is sensitive to secondary features or flaws, which are a result of the used writing materials; hence the synthesized files should contain those features too. Therefore, we propose a rendering technique that reflects optical features caused by common pens as ball pens or pencils [
<xref rid="B6" ref-type="bibr">33</xref>
]. Subsequently, a modification of this technique is described that allows rendering features of historical handwritings.</p>
<p>First of all, pixels
<bold>o</bold>
have to be found that are close to polygons
<inline-formula>
<mml:math id="M33">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
and belong to the foreground. As shown in
<xref ref-type="fig" rid="fig10">Figure 10(a)</xref>
, we first interpolate between two neighbored points
<bold>p</bold>
,
<bold>q</bold>
of
<inline-formula>
<mml:math id="M34">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
(or
<bold>u</bold>
) and get
<italic>ρ∗</italic>
<bold>p</bold>
<bold>q</bold>
‖ new points
<disp-formula id="EEq8">
<label>(8)</label>
<mml:math id="M35">
<mml:mtable style="T1">
<mml:mtr>
<mml:mtd>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold">o</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>=</mml:mo>
<mml:mi>ν</mml:mi>
<mml:mi mathvariant="bold">p</mml:mi>
<mml:mo>+</mml:mo>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="6.39pt" depth="0.23pt"></mml:mspace>
<mml:mn mathvariant="normal">1</mml:mn>
<mml:mo></mml:mo>
<mml:mi>ν</mml:mi>
<mml:mspace height="6.39pt" depth="0.23pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:mi mathvariant="bold">q</mml:mi>
<mml:mo>,</mml:mo>
<mml:mspace width="10pt"></mml:mspace>
<mml:mi>ν</mml:mi>
<mml:mo></mml:mo>
<mml:mfenced open="[" close="]" separators="|">
<mml:mrow>
<mml:mn>0,1</mml:mn>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
where
<italic>ν</italic>
is uniform distributed and
<italic>ρ</italic>
is a user defined parameter.</p>
<p>Let
<inline-formula>
<mml:math id="M36">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">n</mml:mi>
</mml:mrow>
<mml:mo></mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
be the normal vector of line
<inline-formula>
<mml:math id="M37">
<mml:mrow>
<mml:mover accent="false">
<mml:mrow>
<mml:mi mathvariant="bold">p</mml:mi>
<mml:mi mathvariant="bold">q</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
and then we shift each
<bold>o</bold>
′ along
<inline-formula>
<mml:math id="M38">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">n</mml:mi>
</mml:mrow>
<mml:mo></mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
using a Gaussian distribution
<disp-formula id="EEq9">
<label>(9)</label>
<mml:math id="M39">
<mml:mtable style="T1">
<mml:mtr>
<mml:mtd>
<mml:mi mathvariant="bold">o</mml:mi>
<mml:mo>=</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold">o</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>+</mml:mo>
<mml:mi mathvariant="script">N</mml:mi>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mspace height="4.67pt" depth="2.59pt"></mml:mspace>
<mml:mi>μ</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi>σ</mml:mi>
<mml:mspace height="4.67pt" depth="2.59pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">n</mml:mi>
</mml:mrow>
<mml:mo></mml:mo>
</mml:mover>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
where
<italic>σ</italic>
and
<italic>μ</italic>
define the line width, which is decreased up to 20%, in case that
<bold>p</bold>
lies between the
<italic> Pen Up</italic>
or
<italic> Pen Down</italic>
point and the neighbored control point. As a result, the prototype of a word image has been prepared that defines all pixels, which are influenced by pigments at all (shown in
<xref ref-type="fig" rid="fig10">Figure 10(b)</xref>
). To allow sharp contours, a limitation of |
<italic>𝒩</italic>
(
<italic>μ</italic>
,
<italic>σ</italic>
)| <
<italic>ϖσ</italic>
is applied according to the simulated pen, where
<italic>ϖ</italic>
is user dependent.</p>
<sec id="sec5.4.1">
<title>5.4.1. Texture</title>
<p>Biros or pencils cause an irregular pigmentation intensity, which is reflected by pixel intensities
<italic>I</italic>
(
<italic>x</italic>
,
<italic>y</italic>
) of scanned images. A realistic physical model that simulates this behavior in a proper way is beyond the scope of this paper; a more simplified and generalized approach however is quite practical. Inspired by the ability of Fourier transform based image compression to represent the main nature of a texture by a small subset of the underlying frequencies, we define a texture by 10 points (
<italic>λ</italic>
,
<italic>θ</italic>
,
<italic>ϕ</italic>
) in frequency space in order to emulate irregularities caused by pen and paper. This way, simplified but unique textures can be created at runtime. However, in contrast to image compression, we are not interested in avoiding noise-prone high frequencies. Hence, different high and low frequencies are combined to simulate regional as well as locale effects (behavior of ink, paper texture). Each point represents a texture layer in image space with
<italic>I</italic>
<sub>1</sub>
(
<italic>x</italic>
,
<italic>y</italic>
)∈[−1,1]. We created several texture classes by defining different sets of Gaussian distributions for the angle
<italic>θ</italic>
, wave length
<italic>λ</italic>
, and phase shift
<italic>ϕ</italic>
of all layers manually. Afterwards, pixel intensities
<italic>I</italic>
<sub>2</sub>
(
<bold>o</bold>
)∈[0,256] are computed by accumulating most texture layers. The left layers are used to achieve variations in their intensities by multiplication. Finally, an image
<bold>I</bold>
with a small margin is created and all
<bold>o</bold>
are fitted to
<bold>I</bold>
subsequently.</p>
<p>By creating word syntheses using polygonal glyphs and rendering techniques, smooth letter connections can be achieved more efficiently compared to synthesis approaches that use image based glyphs. Furthermore, in contrast to the usage of natural textures, the described technique is able to generate unique, nontiled textures for every synthesized word, as shown in Figures
<xref ref-type="fig" rid="fig10">10(c)</xref>
<xref ref-type="fig" rid="fig10">10(e)</xref>
. Depending on the texture class, a median or Gaussian filter is used before saving the image.</p>
</sec>
<sec id="sec5.4.2">
<title>5.4.2. Simulation of Feather Like Writing Tools</title>
<p>The previous method allows a proper simulation of text that is written by ball pens, pencils, or coal on white paper. However, to allow a more accurate simulation of writing instruments as fountains pens or feathers, we extended our rendering technique. This includes mainly the implementation of two features: the writing speed and the shape of the top of the writing instrument, further called
<italic> Pen Shape</italic>
.</p>
<p>
<italic>Pen Shape.</italic>
If the
<italic> Pen Shape</italic>
is modeled as line or ellipsoid, the line width of the trajectory
<inline-formula>
<mml:math id="M40">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
depends not only on the width of the
<italic> Pen Shape w</italic>
<sub>
<italic>P</italic>
</sub>
, but also on its angle
<italic>γ</italic>
<sub>
<italic>P</italic>
</sub>
and the angle of the trajectory tangent
<inline-formula>
<mml:math id="M41">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>γ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
. We initialize
<italic>γ</italic>
<sub>
<italic>P</italic>
</sub>
= 45°, changing it continuously with a maximal deviation of ±15°. This locale deviation is computed by adding two cosine functions, where the wavelengths, phases, and amplitudes are redefined by Gaussian distributions for each synthesis.</p>
<p>According to the texture of a
<italic> Pen Shape</italic>
, the contact with the paper and consequently the caused pigmentation can vary. This is simulated by an one-dimensional function
<italic>f</italic>
(
<italic>x</italic>
<sub>
<italic>P</italic>
</sub>
)∣0 ≤
<italic>x</italic>
<sub>
<italic>P</italic>
</sub>
<italic>w</italic>
<sub>
<italic>P</italic>
</sub>
that defines the pigmentation potential for the long axis of the
<italic> Pen Shape</italic>
. An emphasized example, inspired by a fountain pen, is shown in
<xref ref-type="fig" rid="fig11">Figure 11(d)</xref>
.</p>
<p>Binary images can be rendered in a faster way by defining polygons (here a triangle mesh) that is a result of extruding an one-dimensional
<italic> Pen Shape</italic>
along
<bold>u</bold>
or
<inline-formula>
<mml:math id="M42">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
. A visualization of this can be found in
<xref ref-type="fig" rid="fig11">Figure 11(c)</xref>
, and a resulting synthesis is shown in
<xref ref-type="fig" rid="fig11">Figure 11(h)</xref>
. These polygons can then be drawn by standard routines. If the angle of the Pen Shape and the line is identical or so close, where the polygon width would be smaller than one pixel, a line have to be drawn instead to avoid letter fragmentation.</p>
<p>
<italic>Writing Speed.</italic>
Large lines or bows, as the left part of Sin (س), are usually written faster than more complex structures. A high writing speed often causes a lack of pigmentation that leads to brighter or dappled lines. However, there is no need to reconstruct writing speed, for the used online letter samples already that contain such information. From each representation
<inline-formula>
<mml:math id="M43">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
we can extract the relative, local writing speed for ASMs representations in points per second
<disp-formula id="EEq10">
<label>(10)</label>
<mml:math id="M44">
<mml:mtable style="T1">
<mml:mtr>
<mml:mtd>
<mml:malignmark></mml:malignmark>
<mml:mi>v</mml:mi>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="6.57999pt" depth="0.12pt"></mml:mspace>
<mml:mi>i</mml:mi>
<mml:mspace height="6.57999pt" depth="0.12pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:mi></mml:mi>
<mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">p</mml:mi>
<mml:mi mathvariant="normal">t</mml:mi>
</mml:mrow>
<mml:mo>/</mml:mo>
<mml:mrow>
<mml:mi mathvariant="normal">s</mml:mi>
</mml:mrow>
</mml:mrow>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mfenced open="‖" close="‖" separators="|">
<mml:mrow>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:mi>i</mml:mi>
<mml:mo></mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo></mml:mo>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:mi>i</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:mi>i</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn mathvariant="normal">2</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
<mml:mi></mml:mi>
<mml:mi mathvariant="normal">p</mml:mi>
<mml:mi mathvariant="normal">t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mo>/</mml:mo>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mrow>
</mml:mrow>
</mml:mfenced>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="normal">Δ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mi></mml:mi>
<mml:mi mathvariant="normal">s</mml:mi>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:malignmark></mml:malignmark>
<mml:mspace width="157.3070831298828125pt"></mml:mspace>
<mml:mn mathvariant="normal">1</mml:mn>
<mml:mo></mml:mo>
<mml:mi>i</mml:mi>
<mml:mo></mml:mo>
<mml:mi>n</mml:mi>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
</p>
<p>In order to estimate the expected pigmentation intensity, we use the normalized writing speed
<inline-formula>
<mml:math id="M45">
<mml:mover accent="true">
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mo>˙</mml:mo>
</mml:mover>
<mml:mo></mml:mo>
<mml:mo stretchy="false">[</mml:mo>
<mml:mn mathvariant="normal">0,1</mml:mn>
<mml:mo stretchy="false">]</mml:mo>
</mml:math>
</inline-formula>
, where
<inline-formula>
<mml:math id="M46">
<mml:mover accent="true">
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mo>˙</mml:mo>
</mml:mover>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">0</mml:mn>
</mml:math>
</inline-formula>
is the slowest and
<inline-formula>
<mml:math id="M47">
<mml:mover accent="true">
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mo>˙</mml:mo>
</mml:mover>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:math>
</inline-formula>
is the fastest part of the trajectory of a synthesis. If
<italic>𝔠</italic>
<sub>0</sub>
is the current color of a pixel in RGB color space and
<italic>𝔠</italic>
<sub>
<italic>p</italic>
</sub>
is the color of the pen pigment, then the new color is computed by
<disp-formula id="EEq11">
<label>(11)</label>
<mml:math id="M48">
<mml:mtable style="T1">
<mml:mtr>
<mml:mtd>
<mml:mi mathvariant="fraktur">c</mml:mi>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>p</mml:mi>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>α</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msub>
<mml:mrow>
<mml:mi>α</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="6.39pt" depth="2.484pt"></mml:mspace>
<mml:mn mathvariant="normal">1</mml:mn>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>α</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mspace height="6.39pt" depth="2.484pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
<mml:mspace width="10pt"></mml:mspace>
<mml:mi mathvariant="fraktur">c</mml:mi>
<mml:mo></mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="double-struck">R</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">3</mml:mn>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
where
<inline-formula>
<mml:math id="M49">
<mml:msub>
<mml:mrow>
<mml:mi>α</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">0.8</mml:mn>
<mml:mo stretchy="false">(</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
<mml:mo>-</mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mo>˙</mml:mo>
</mml:mover>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>+</mml:mo>
<mml:mn mathvariant="normal">0.2</mml:mn>
</mml:math>
</inline-formula>
defines opacity of
<italic>𝔠</italic>
<sub>
<italic>p</italic>
</sub>
and
<italic>α</italic>
<sub>
<italic>b</italic>
</sub>
= 1 defines the opacity of the background. Although pigments that are used for handwritings are typically full or semiopaque, reduction of pigmentation caused by increased writing speed can lead to transparency. This is simulated by reducing
<italic>α</italic>
<sub>
<italic>a</italic>
</sub>
, as shown in
<xref ref-type="fig" rid="fig11">Figure 11(e)</xref>
.</p>
<p>To ensure a steady behavior, we interpolate the speed of connected letters. For the first
<inline-formula>
<mml:math id="M50">
<mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
<mml:mo>/</mml:mo>
<mml:mrow>
<mml:mn>4</mml:mn>
</mml:mrow>
</mml:mrow>
</mml:math>
</inline-formula>
points
<inline-formula>
<mml:math id="M51">
<mml:mo stretchy="false">(</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:mi>i</mml:mi>
<mml:mo>-</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">)</mml:mo>
</mml:math>
</inline-formula>
we set the speed
<inline-formula>
<mml:math id="M52">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mo>˙</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
of a letter in middle or end form to
<disp-formula id="EEq12">
<label>(12)</label>
<mml:math id="M53">
<mml:mtable style="T1">
<mml:mtr>
<mml:mtd>
<mml:malignmark></mml:malignmark>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mo>˙</mml:mo>
</mml:mover>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="6.57999pt" depth="0.12pt"></mml:mspace>
<mml:mi>i</mml:mi>
<mml:mspace height="6.57999pt" depth="0.12pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:mo></mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mo>˙</mml:mo>
</mml:mover>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="6.57999pt" depth="0.12pt"></mml:mspace>
<mml:mi>i</mml:mi>
<mml:mspace height="6.57999pt" depth="0.12pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:mfenced open="[" close="]" separators="|">
<mml:mrow>
<mml:mspace height="7.08pt" depth="2.484pt"></mml:mspace>
<mml:mn mathvariant="normal">1</mml:mn>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>λ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mspace height="7.08pt" depth="2.484pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mo>˙</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="7.35pt" depth="1.84001pt"></mml:mspace>
<mml:mi>n</mml:mi>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="7.35pt" depth="0.14pt"></mml:mspace>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
<mml:mspace height="7.35pt" depth="0.14pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:mspace height="7.35pt" depth="1.84001pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:msub>
<mml:mrow>
<mml:mi>λ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:malignmark></mml:malignmark>
<mml:mspace width="113.027313232421875pt"></mml:mspace>
<mml:msub>
<mml:mrow>
<mml:mi>λ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">4</mml:mn>
<mml:mfrac>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfrac>
<mml:mo>,</mml:mo>
<mml:mo></mml:mo>
<mml:mo></mml:mo>
<mml:mi>i</mml:mi>
<mml:mo></mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">4</mml:mn>
</mml:mrow>
</mml:mfrac>
<mml:mi>n</mml:mi>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
where
<inline-formula>
<mml:math id="M54">
<mml:msub>
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>v</mml:mi>
</mml:mrow>
<mml:mo>˙</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">(</mml:mo>
<mml:mi>n</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo stretchy="false">)</mml:mo>
</mml:math>
</inline-formula>
is the speed at the end of the previous letter. The effect on the synthesis is shown in
<xref ref-type="fig" rid="fig11">Figure 11(d)</xref>
.</p>
<p>
<italic>Render on Degraded Background</italic>
. Finally, we create
<xref ref-type="fig" rid="fig11">Figure 11(f)</xref>
by combining our texture rendering technique of
<xref ref-type="sec" rid="sec5.4.1">Section 5.4.1</xref>
with the one based on
<italic> Pen Shape</italic>
and writing speed, using a nonuniform background. Therefore, we applied a transparent texture on all pixels that does not belong to the background texture. This way, small, random irregularity is simulated.</p>
<p>In the shown examples a black color is used, as most documents are written with dark ink (like iron oxide or soot). Pigmentation intensity is implemented as transparency, which allows simulating pigment accumulation at crossing lines or in case of a textured background. However, also colored opaque or semiopaque ink can be simulated. This might be interesting in the context of historical documents, since important passages are often highlighted by using red ink. Another important feature of historical documents is degradation of paper or parchment. Currently we simply use images of natural paper or parchment as background textures, which are scaled or tiled in case where they are smaller than the synthesized document.</p>
</sec>
</sec>
<sec id="sec5.5">
<title>5.5. Generation of Text Pages</title>
<p>Recently, not only character or word recognition but also more complex document analysis issues that address the interpretation or recognition of complete documents become a focus of Arabic handwriting research. Hence, we investigate the possibilities of text page synthesis. In this regard the accurate simulation of the lower baselines is crucial. Many problems that occur while detecting lines, words, or connected components depend on these baselines, as for instance assigning diacritics (that are very close to more than one text lines) to their corresponding PAW.</p>
<p>Our approach of simulating baselines has three steps. First of all we set the coordinates (
<italic>x</italic>
<sub>0</sub>
,
<italic>y</italic>
<sub>0</sub>
) of the first letter for each line. Secondly the curvatures of the baselines have to be computed. Thirdly potential intersection of words have to be solved.</p>
<p>
<italic>Start PAWs</italic>
. Due to the style of Arabic handwritings, all lines start at the rightmost
<italic>x</italic>
-coordinate
<italic>x</italic>
<sub>0</sub>
=
<italic>x</italic>
<sub>max⁡</sub>
. The vertical space between two neighbored lines can be defined as percentage of the average PAW heights to get
<italic>y</italic>
<sub>0</sub>
for each baseline.</p>
<p>
<italic>Baselines</italic>
. We implement the second step by declaring functions
<italic>f</italic>
(
<italic>x</italic>
,
<italic>y</italic>
<sub>0</sub>
) that define the curvatures of the simulated Baselines Ξ
<sub>
<italic>s</italic>
</sub>
(
<italic>y</italic>
<sub>0</sub>
defines the initial heights of a line). We normalize
<inline-formula>
<mml:math id="M55">
<mml:mover accent="true">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>0</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
<mml:mo>,</mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
<mml:mo></mml:mo>
<mml:mo stretchy="false">[</mml:mo>
<mml:mn mathvariant="normal">0,1</mml:mn>
<mml:mo stretchy="false">]</mml:mo>
</mml:math>
</inline-formula>
inside
<italic>f</italic>
(
<italic>x</italic>
,
<italic>y</italic>
<sub>0</sub>
), so it becomes independent of the page size. How to compute proper
<italic>f</italic>
<sub>
<italic>i</italic>
</sub>
is explained in
<xref ref-type="sec" rid="sec5.6">Section 5.6</xref>
.</p>
<p>Let
<bold>l</bold>
<sup>
<italic>r</italic>
</sup>
define the lower right of a letters bounding box, then we first translate the letter
<bold>l</bold>
towards the baseline, so that
<bold>l</bold>
<sup>
<italic>r</italic>
</sup>
touches it. Subsequently, the
<italic>y</italic>
-position of
<bold>l</bold>
must be corrected according to its class by translating it by
<bold>t</bold>
<sub>
<italic>b</italic>
</sub>
, so that
<bold>l</bold>
<sup>
<italic>r</italic>
</sup>
might be above or below
<italic>f</italic>
(
<italic>l</italic>
<sub>
<italic>x</italic>
</sub>
<sup>
<italic>r</italic>
</sup>
,
<italic>y</italic>
<sub>0</sub>
), as shown in
<xref ref-type="fig" rid="fig12">Figure 12</xref>
. Therefore, we extracted the normalized statistical relation
<italic>𝒩</italic>
<sub>
<italic>b</italic>
</sub>
between
<bold>l</bold>
<sup>
<italic>r</italic>
</sup>
and the baseline from the IESK-arDB for all letter classes. If
<italic>l</italic>
<sup>
<italic>h</italic>
</sup>
is the heights and
<bold>l</bold>
<sup>
<italic>i</italic>
</sup>
is the
<italic>i</italic>
th point of
<bold>l</bold>
, we can compute
<bold>t</bold>
<sub>
<italic>b</italic>
</sub>
= (0,
<italic>l</italic>
<sup>
<italic>h</italic>
</sup>
<italic>𝒩</italic>
<sub>
<italic>b</italic>
</sub>
)
<sup>
<italic>T</italic>
</sup>
and
<bold>l</bold>
<sup>
<italic>i</italic>
</sup>
=
<bold>l</bold>
<sup>
<italic>i</italic>
</sup>
+
<bold>t</bold>
<sub>
<italic>b</italic>
</sub>
as shown in
<xref ref-type="fig" rid="fig12">Figure 12</xref>
. We perform this for every first letter
<bold>l</bold>
<sub>
<italic>f</italic>
</sub>
of a PAW. Apart from the position, also the PAW skew depends on the baseline. We simulate this by rotating all points
<bold>l</bold>
<sup>
<italic>i</italic>
</sup>
of a letter around their
<italic> pen down</italic>
point
<bold>l</bold>
<sup>′1</sup>
. Let
<bold>l</bold>
<sup>
<italic>l</italic>
</sup>
be the lower left of the bounding box of the current letter
<bold>l</bold>
, and then the rotation angle is
<disp-formula id="EEq13">
<label>(13)</label>
<mml:math id="M56">
<mml:mtable style="T1">
<mml:mtr>
<mml:mtd>
<mml:mi>ϕ</mml:mi>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="normal">cos</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo></mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mo></mml:mo>
<mml:mrow>
<mml:mfrac>
<mml:mrow>
<mml:mfenced open="〈" close="〉" separators="|">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">a</mml:mi>
</mml:mrow>
<mml:mo></mml:mo>
</mml:mover>
<mml:mo>,</mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mo></mml:mo>
</mml:mover>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
<mml:mrow>
<mml:mfenced open="|" close="|" separators="|">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">a</mml:mi>
</mml:mrow>
<mml:mo></mml:mo>
</mml:mover>
</mml:mrow>
</mml:mfenced>
<mml:mfenced open="|" close="|" separators="|">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mo></mml:mo>
</mml:mover>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfrac>
</mml:mrow>
</mml:mrow>
<mml:mo>,</mml:mo>
<mml:mspace width="10pt"></mml:mspace>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">a</mml:mi>
</mml:mrow>
<mml:mo></mml:mo>
</mml:mover>
<mml:mo>=</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold">l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo></mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold">l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>,</mml:mo>
<mml:mo></mml:mo>
<mml:mo></mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">b</mml:mi>
</mml:mrow>
<mml:mo></mml:mo>
</mml:mover>
<mml:mo>=</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold">l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo></mml:mo>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mtable>
<mml:mtr>
<mml:mtd>
<mml:msubsup>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:msubsup>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
Before we rotate a letter
<bold>l</bold>
′ ≠
<bold>l</bold>
<sub>
<italic>f</italic>
</sub>
′ it has to be connected with its predecessor
<bold>l</bold>
<sub>
<italic>p</italic>
</sub>
′ translating it by
<bold>t</bold>
<sub>
<italic>j</italic>
</sub>
= (
<bold>l</bold>
<sub>
<italic>p</italic>
</sub>
<sup>
<italic>e</italic>
</sup>
<bold>l</bold>
<sup>′1</sup>
). This way, the handwriting synthesis fits to the baseline without causing aliasing effects.</p>
<p>
<italic>Solving Intersections.</italic>
In the last step, we detect and solve intersections between lines. Therefore, all PAW
<italic>𝔅</italic>
of the line above have to be detected, whose bounding boxes overlap with the current PAW
<italic>𝔄</italic>
or whose distances are less than
<italic>ϵ</italic>
. For all
<italic>𝔅</italic>
we then calculate weather there is any intersections between line segments
<inline-formula>
<mml:math id="M57">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="fraktur">𝔰</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="fraktur">𝔄</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mover accent="false">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="fraktur">𝔄</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="fraktur">𝔄</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
<mml:mi>i</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
<mml:mo></mml:mo>
<mml:mi mathvariant="fraktur">𝔄</mml:mi>
</mml:math>
</inline-formula>
and
<inline-formula>
<mml:math id="M58">
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="fraktur">𝔰</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="fraktur">𝔅</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="false">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="bold">l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="fraktur">𝔅</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="bold">l</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi></mml:mi>
<mml:mi>i</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msup>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="fraktur">𝔅</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:mi mathvariant="fraktur">𝔅</mml:mi>
</mml:math>
</inline-formula>
. If so,
<italic>𝔄</italic>
is translated by (0,
<italic>ψ</italic>
)
<sup>
<italic>T</italic>
</sup>
. This has to be done also for the predecessor of
<italic>𝔄</italic>
, by using the translation (
<italic>ψ</italic>
, 0)
<sup>
<italic>T</italic>
</sup>
. Similar to
<xref ref-type="fig" rid="alg1">Algorithm 1</xref>
(where intersections of two neighbored PAWs of the same line are handled) these steps have to be repeated, until no intersection is detected anymore.</p>
<p>Two lines, which are not parallel, have an intersection point
<bold>z</bold>
. To proof weather two line segments intersect,
<bold>z</bold>
of their corresponding lines must be calculated first. A pair of line segments
<italic>𝔰</italic>
<sub>
<italic>𝔄</italic>
</sub>
and
<italic>𝔰</italic>
<sub>
<italic>𝔅</italic>
</sub>
intersects, if and only if
<bold>z</bold>
lies on both line segments, as shown in
<xref ref-type="fig" rid="fig13">Figure 13(a)</xref>
. However, there might be an intersection of lines in the rendered image, even if
<italic>𝔰</italic>
<sub>
<italic>𝔄</italic>
</sub>
and
<italic>𝔰</italic>
<sub>
<italic>𝔅</italic>
</sub>
do not intersect. To avoid this, the distance
<italic>ɛ</italic>
of the two line segments has to be higher than
<italic>ε</italic>
<sub>min⁡</sub>
, where
<italic>ε</italic>
<sub>min⁡</sub>
has to be at least one pt larger than 2 times the
<italic> Pen Shape</italic>
widths
<italic>w</italic>
<sub>
<italic>P</italic>
</sub>
. Let
<bold>w</bold>
be the point of the opposite line segment of
<bold>l</bold>
<sub>
<italic>ɛ</italic>
</sub>
∈ {
<bold>l</bold>
<sub>
<italic>𝔄</italic>
</sub>
<sup>
<italic>i</italic>
</sup>
,
<bold>l</bold>
<sub>
<italic>𝔄</italic>
</sub>
<sup>
<italic>i</italic>
+1</sup>
,
<bold>l</bold>
<sub>
<italic>𝔅</italic>
</sub>
<sup>
<italic>i</italic>
</sup>
,
<bold>l</bold>
<sub>
<italic>𝔅</italic>
</sub>
<sup>
<italic>i</italic>
+1</sup>
} that is closest to
<bold>l</bold>
<sub>
<italic>ɛ</italic>
</sub>
, and then we get
<italic>ɛ</italic>
= ‖
<bold>l</bold>
<sub>
<italic>ɛ</italic>
</sub>
<bold>w</bold>
‖. In case that
<bold>z</bold>
lies only on one line segment
<italic>𝔰</italic>
<sub>
<italic>𝔅</italic>
/
<italic>𝔄</italic>
</sub>
, we know that
<bold>l</bold>
<sub>
<italic>ɛ</italic>
</sub>
∈ {
<bold>l</bold>
<sub>
<italic>𝔄</italic>
/
<italic>𝔅</italic>
</sub>
<sup>
<italic>i</italic>
</sup>
,
<bold>l</bold>
<sub>
<italic>𝔄</italic>
/
<italic>𝔅</italic>
</sub>
<sup>
<italic>i</italic>
+1</sup>
}, as shown in
<xref ref-type="fig" rid="fig13">Figure 13(b)</xref>
. Otherwise ‖
<bold>l</bold>
<sub>
<italic>ɛ</italic>
</sub>
<bold>w</bold>
‖ must be calculated for all four points.</p>
<p>Outcomes of the described techniques of text page generation are shown in
<xref ref-type="fig" rid="fig14">Figure 14</xref>
. How to determine a proper baseline function
<italic>f</italic>
(
<italic>x</italic>
,
<italic>y</italic>
<sub>0</sub>
) will be discussed in the next section.</p>
</sec>
<sec id="sec5.6">
<title>5.6. Optimization of Baseline Functions</title>
<p>A set of baselines Ξ are
<italic>n</italic>
sequences of bounding boxes of all PAW within a page, ordered from the first to the last PAW of a line. To validate and optimize synthetic baselines Ξ
<sub>
<italic>s</italic>
</sub>
, which are a result of
<italic>f</italic>
(
<italic>x</italic>
,
<italic>y</italic>
<sub>0</sub>
), we calculate the correlation
<italic>ρ</italic>
= corr(Ξ
<sub>
<italic>r</italic>
</sub>
, Ξ
<sub>
<italic>s</italic>
</sub>
), where Ξ
<sub>
<italic>r</italic>
</sub>
contains 11295 PAW extracted from natural handwritings.</p>
<p>To get the global correlation
<italic>ρ</italic>
<sub>
<italic>g</italic>
</sub>
, we train a Gaussian Mixture Model (GMM) on Ξ
<sub>
<italic>r</italic>
</sub>
. Therefore, features
<italic>x</italic>
as the average
<italic>μ</italic>
and sigma
<italic>σ</italic>
of the normalized space between text lines,
<italic>μ</italic>
<italic>σ</italic>
of the angle
<italic>ϕ</italic>
between a text line and the horizontal, or
<italic>μ</italic>
<italic>σ</italic>
of the change of
<italic>ϕ</italic>
depending on
<italic>y</italic>
<sub>0</sub>
are used. Subsequently, we use the GMM to calculate the log likelihood log⁡
<italic></italic>
(
<italic>θ</italic>
<bold>x</bold>
), where Ξ
<sub>
<italic>s</italic>
</sub>
with
<bold>x</bold>
belongs to the class of natural baselines
<italic>θ</italic>
. Now the global correlation can be computed by
<italic>ρ</italic>
<sub>
<italic>g</italic>
</sub>
=
<italic>n</italic>
<sup></sup>
1∑
<sup>
<italic>n</italic>
</sup>
log⁡
<italic></italic>
(
<italic>θ</italic>
<bold>x</bold>
).</p>
<p>To detect lines that have odd curvatures, we also compare each synthetic line with all natural ones. Therefore, we represent each line by
<italic>𝔏</italic>
, which is a series of the geometrical centers
<italic>𝔠</italic>
of the PAW-bounding boxes. To ease the comparison, all natural
<italic>𝔏</italic>
<sub>
<italic>r</italic>
</sub>
and synthetic
<italic>𝔏</italic>
<sub>
<italic>s</italic>
</sub>
lines are normalized and translated, so that their first (rightmost)
<italic>𝔠</italic>
lies within the origin. For all
<italic>m</italic>
<sub>Ξ</sub>
centers
<italic>𝔠</italic>
<italic>𝔏</italic>
<sub>
<italic>s</italic>
</sub>
we search neighbored
<italic>𝔠</italic>
<sup>
<italic>a</italic>
</sup>
,
<italic>𝔠</italic>
<sup>
<italic>b</italic>
</sup>
<italic>𝔏</italic>
<sub>
<italic>r</italic>
</sub>
that fulfill
<italic>𝔠</italic>
<sub>
<italic>x</italic>
</sub>
<sup>
<italic>a</italic>
</sup>
>
<italic>𝔠</italic>
<sub>
<italic>x</italic>
</sub>
>
<italic>𝔠</italic>
<sub>
<italic>x</italic>
</sub>
<sup>
<italic>b</italic>
</sup>
. Now
<italic>ρ</italic>
<sub>
<italic>l</italic>
</sub>
= corr(
<italic>𝔏</italic>
<sub>
<italic>s</italic>
</sub>
,
<italic>𝔏</italic>
<sub>
<italic>r</italic>
</sub>
) can be calculated:
<disp-formula id="EEq14">
<label>(14)</label>
<mml:math id="M59">
<mml:mtable style="T1">
<mml:mtr>
<mml:mtd>
<mml:malignmark></mml:malignmark>
<mml:msub>
<mml:mrow>
<mml:mi>ρ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">log</mml:mi>
</mml:mrow>
<mml:mo></mml:mo>
<mml:mrow>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="15.36195pt" depth="10.23001pt"></mml:mspace>
<mml:mn mathvariant="normal">1</mml:mn>
<mml:mo></mml:mo>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="15.36195pt" depth="9.46999pt"></mml:mspace>
<mml:mfrac>
<mml:mrow>
<mml:mrow>
<mml:msubsup>
<mml:mo stretchy="false"></mml:mo>
<mml:mrow></mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>m</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">Ξ</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:msubsup>
<mml:mrow>
<mml:mfenced open="‖" close="‖" separators="|">
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
<mml:mo></mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mrow>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>m</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">Ξ</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfrac>
<mml:mspace height="15.36195pt" depth="9.46999pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:mspace height="15.36195pt" depth="10.23001pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mrow>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:malignmark></mml:malignmark>
<mml:mspace width="109.8889617919921875pt"></mml:mspace>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>=</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo></mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo></mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfrac>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>+</mml:mo>
<mml:mfrac>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo></mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
</mml:msubsup>
<mml:mo></mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>a</mml:mi>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfrac>
<mml:msup>
<mml:mrow>
<mml:mi mathvariant="fraktur">c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>b</mml:mi>
</mml:mrow>
</mml:msup>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
Using the average
<inline-formula>
<mml:math id="M60">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mover accent="false">
<mml:mrow>
<mml:mi>ρ</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:math>
</inline-formula>
of the five best matches
<italic>ρ</italic>
<sub>
<italic>l</italic>
</sub>
we get
<inline-formula>
<mml:math id="M61">
<mml:mi>ρ</mml:mi>
<mml:mo>=</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mover accent="false">
<mml:mrow>
<mml:mi>ρ</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
</mml:mrow>
<mml:mrow>
<mml:mi>l</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>ρ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>g</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>
, where
<italic>ρ</italic>
indicated how proper
<italic>f</italic>
(
<italic>x</italic>
,
<italic>y</italic>
<sub>0</sub>
) simulates the shapes of natural baselines. The functions
<italic>f</italic>
<sub>
<italic>i</italic>
</sub>
have to be defined manually within the UI; however, an automatically optimization can be initialized subsequently. We defined multiple
<italic>f</italic>
<sub>
<italic>i</italic>
</sub>
, reflecting different peculiarities that could be observed studying historical and other Arabic handwritings. The function that defines a set of ground truth (nonhistorical) text pages of the IESK-arDB and that was used to generate the syntheses in
<xref ref-type="fig" rid="fig14">Figure 14</xref>
is
<italic>f</italic>
<sub>1</sub>
(
<italic>x</italic>
,
<italic>y</italic>
<sub>0</sub>
):
<disp-formula id="EEq15">
<label>(15)</label>
<mml:math id="M62">
<mml:mtable style="T∞5">
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:malignmark></mml:malignmark>
<mml:mo></mml:mo>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:msub>
<mml:mrow>
<mml:mi>q</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mi>x</mml:mi>
<mml:msub>
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>y</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">0</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mfenced open="[" close="]" separators="|">
<mml:mrow>
<mml:mspace height="6.93999pt" depth="2.59pt"></mml:mspace>
<mml:mn mathvariant="normal">0.7</mml:mn>
<mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">sin</mml:mi>
</mml:mrow>
<mml:mo></mml:mo>
<mml:mrow>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="6.39pt" depth="0.23pt"></mml:mspace>
<mml:mn mathvariant="normal">2.5</mml:mn>
<mml:mi>x</mml:mi>
<mml:mo></mml:mo>
<mml:mn mathvariant="normal">1.2</mml:mn>
<mml:mspace height="6.39pt" depth="0.23pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mrow>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>q</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>·</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">sin</mml:mi>
</mml:mrow>
<mml:mo></mml:mo>
<mml:mrow>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="6.39pt" depth="0.15pt"></mml:mspace>
<mml:mn mathvariant="normal">10</mml:mn>
<mml:mi>x</mml:mi>
<mml:mspace height="6.39pt" depth="0.15pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mrow>
<mml:mspace width="10pt"></mml:mspace>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>q</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">3</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>·</mml:mo>
<mml:mrow>
<mml:mrow>
<mml:mi mathvariant="normal">sin</mml:mi>
</mml:mrow>
<mml:mo></mml:mo>
<mml:mrow>
<mml:mfenced separators="|">
<mml:mrow>
<mml:mspace height="6.39pt" depth="0.23pt"></mml:mspace>
<mml:mn mathvariant="normal">8</mml:mn>
<mml:mi>x</mml:mi>
<mml:mo>+</mml:mo>
<mml:mn mathvariant="normal">2</mml:mn>
<mml:mspace height="6.39pt" depth="0.23pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mrow>
<mml:mspace height="6.93999pt" depth="2.59pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
</p>
<p>The parameters
<italic>q</italic>
<sub>
<italic>i</italic>
</sub>
are redefined by Gaussian distributions
<italic>𝒩</italic>
<sub>
<italic>i</italic>
</sub>
(
<italic>μ</italic>
<sub>
<italic>i</italic>
</sub>
,
<italic>σ</italic>
<sub>
<italic>i</italic>
</sub>
) for each page synthesis. To find the optimal
<italic>q</italic>
<sub>
<italic>i</italic>
</sub>
, we use genetic programming where
<italic>μ</italic>
<sub>
<italic>i</italic>
</sub>
,
<italic>σ</italic>
<sub>
<italic>i</italic>
</sub>
are the genetic representation and
<italic>ρ</italic>
is the fitness of an individual. For
<italic>f</italic>
<sub>1</sub>
we get the parameterization:
<disp-formula id="EEq16">
<label>(16)</label>
<mml:math id="M63">
<mml:mtable style="T17">
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:msub>
<mml:mrow>
<mml:mi>q</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:malignmark></mml:malignmark>
<mml:mo></mml:mo>
<mml:mi mathvariant="script">N</mml:mi>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mspace height="6.39pt" depth="1.16998pt"></mml:mspace>
<mml:mn mathvariant="normal">0.15,0.84</mml:mn>
<mml:mspace height="6.39pt" depth="1.16998pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:malignmark></mml:malignmark>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:msub>
<mml:mrow>
<mml:mi>q</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">2</mml:mn>
</mml:mrow>
</mml:msub>
<mml:malignmark></mml:malignmark>
<mml:mo></mml:mo>
<mml:mi mathvariant="script">N</mml:mi>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mspace height="6.39pt" depth="1.16998pt"></mml:mspace>
<mml:mn mathvariant="normal">0.67,0.51</mml:mn>
<mml:mspace height="6.39pt" depth="1.16998pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:mo>,</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:malignmark></mml:malignmark>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:msub>
<mml:mrow>
<mml:mi>q</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn mathvariant="normal">3</mml:mn>
</mml:mrow>
</mml:msub>
<mml:malignmark></mml:malignmark>
<mml:mo></mml:mo>
<mml:mi mathvariant="script">N</mml:mi>
<mml:mfenced separators="" open="(" close=")">
<mml:mrow>
<mml:mspace height="6.39pt" depth="1.16998pt"></mml:mspace>
<mml:mn mathvariant="normal">0.35,0.17</mml:mn>
<mml:mspace height="6.39pt" depth="1.16998pt"></mml:mspace>
</mml:mrow>
</mml:mfenced>
<mml:mo>.</mml:mo>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd>
<mml:maligngroup></mml:maligngroup>
<mml:malignmark></mml:malignmark>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
</disp-formula>
Depending on the defined formula and features of the used Ξ
<sub>
<italic>r</italic>
</sub>
, more or less challenging page syntheses can be achieved.</p>
</sec>
</sec>
<sec id="sec6">
<title>6. Results and Discussions</title>
<p>We found that our system is able to synthesize multiple realistic samples for all words that do not include special characters like Hamza over Nabira or ligatures like LamAlif or digits (which can be included when extending the letter database). In the following we propose a method to declare suitable functions for Baseline definitions and validate the applicability of our synthesis outcomes.</p>
<sec id="sec6.1">
<title>6.1. Synthesis Evaluation</title>
<p>Since the data synthesis module is built to ease the development and validation of methods that are related to document analysis, it is not only of interest whether syntheses look realistic or not. In fact it is crucial how image processing methods behave when being fed with synthetic instead of natural data. This is investigated in this section, where a method that segments handwritten Arabic words into letters is validated on such data. We chose word segmentation as example, due to its sensitivity to character shapes as well as global features like overlapping PAWs or varying Kashida length.</p>
<p>
<italic>Segmentation of Arabic Words.</italic>
The segmentation method, which is used for the following experiments, is described in [
<xref rid="B12" ref-type="bibr">4</xref>
]. It is based on topological features and a set of rules that reduces all candidates to a final set of points, which divide two neighbored letters. In contrast to other approaches, candidates are not minima that indicate the middle of a Kashida, but typically the following branch point. </p>
<p>
<italic>Comparison of Real and Synthetic Validation Databases</italic>
. The synthetic samples which are created by the proposed approach are meant as training or testing data for different document analysis methods. To investigate whether these syntheses can be used instead or additional to natural samples, we created synthetic samples (png files + ground truth) of all words of the IESK-arDB database [
<xref rid="B12" ref-type="bibr">4</xref>
] that we call IESK-arDB-Syn in the following. We validate the described segmentation method on both databases using cross validation. As shown in
<xref ref-type="table" rid="tab4">Table 4</xref>
the detected error rates are comparable. This proves at least that the proposed synthesis method is capable of reflecting those features of natural Arabic words, which are critical for segmentations.</p>
<p>Furthermore the proposed synthesis approach enables investigating the robustness of the segmentation method against the influence of particular features. Therefore, we built modifications of IESK-arDB-Syn for experiments A and B, using the UI to ensure that only the investigated feature differs for samples of the same writer. The results of these experiments are shown in
<xref ref-type="fig" rid="fig15">Figure 15</xref>
. </p>
<p>
<italic>Experiment A</italic>
:
<italic> ASM Eigenvector Intensity</italic>
. The intensities
<italic>c</italic>
<sub>
<italic>i</italic>
</sub>
of the used eigenvectors define the similarity of a computed letter shape
<bold>u</bold>
and
<inline-formula>
<mml:math id="M64">
<mml:mrow>
<mml:mover accent="false">
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
, where maximal intensities (
<italic>c</italic>
<sub>
<italic>i</italic>
</sub>
) often causes unexpected, deformed shapes which are hard to classify. The experiment confirms that eigenvector intensities are also proportional to segmentation error frequency. However, even strongly deformed letter shapes reduce the segmentation results only moderately, since their influence on Kashidas and key features, as branch points, is less than their influence on the signature of the letter curvature, which seems more vital regarding character recognition. </p>
<p>
<italic>Experiment B</italic>
:
<italic> Writer</italic>
. As one can see in
<xref ref-type="fig" rid="fig15">Figure 15(b)</xref>
, the segmentation method is quite sensitive to the writer dependent style. Best performance is achieved on writer 1, since letters are written in a proper style and have long Kashidas.</p>
<p>
<italic>Experiment C</italic>
:
<italic> Skew</italic>
. Although skew correction is a common preprocessing step, this experiments show that the used segmentation method is robust against a skew of ±20°.</p>
<p>
<italic>Experiment D</italic>
:
<italic> Kashida Length</italic>
. Kashidas are the connections of two letters, which have a high variation in case of Arabic handwritings. The experiment shows that a valid segmentation is especially difficult in case of very small Kashidas, since most structures that indicate a potential dividing point are hidden or vanished in such cases. In extreme cases neighbored letters can be written one above the other. This effect could be observed in both natural and synthetic handwritings and makes segmentation very challenging. In contrast to slant and skew variation, Kashida related problems cannot be solved by a simple preprocessing technique. </p>
<p>
<italic>Experiment E</italic>
:
<italic> Slant</italic>
. The used segmentation method does only segment at rows with exactly one foreground pixel. Hence, extreme slants can cause segmentation errors, if the slant causes strongly overlapping ascenders. The experiment shows that a slant of about 20° even slightly improves the segmentation results, which might be caused by the frequent appearance of Alif (ا) in end-form that can be detected more reliable, if it has a positive slant. This effect is weakened when reducing the Kashidas length, though. Finally, the experiment shows that slant correction is not a mandatory but nonetheless useful preprocessing step for the proposed segmentation method, especially for handwritings with strong negative slant.</p>
</sec>
</sec>
<sec id="sec7">
<title>7. Conclusion</title>
<p>We have presented an efficient approach to generate pseudo handwritten Arabic words and text pages, including diacritic marks (dots), from Unicode. Online sample and Active Shape Model based glyphs from multiple writers as well as affine transformations allow to generate various images for a given Unicode string to cover the variability of human handwritings. Data of new writers can be added easily and efficiently, since the definition of manual landmarks is not necessary. Features as the slant can be controlled manually if desired. Interpolation methods and a rendering technique are used to meet the properties of offline handwritings. We investigated the practical applicability of the synthesis by validating a segmentation algorithm on natural and synthetic data getting comparable results.</p>
<p>In our future work we are going to extend the used alphabet, acquire letter samples from more writers, and reduce the amount of synthesized words by clustering techniques as affinity propagation. This will help to synthesize compact but representative databases and use them to train and test methods for handwriting recognition and document analysis approaches.</p>
</sec>
</body>
<back>
<ack>
<title>Acknowledgment</title>
<p>The authors would like to extend their sincere appreciation to the Deanship of Scientific Research at King Saud University for its funding of this International Research Group (IRG14-28).</p>
</ack>
<sec sec-type="conflict">
<title>Conflict of Interests</title>
<p>The authors declare that they have no competing interests.</p>
</sec>
<ref-list>
<ref id="B20">
<label>1</label>
<element-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Märgner</surname>
<given-names>V.</given-names>
</name>
<name>
<surname>El Abed</surname>
<given-names>H.</given-names>
</name>
</person-group>
<article-title>Databases and competitions: strategies to improve Arabic recognition systems</article-title>
<source>
<italic>Arabic and Chinese Handwriting Recognition: SACH 2006 Summit College Park, MD, USA, September 27-28, 2006 Selected Papers</italic>
</source>
<year>2008</year>
<volume>4768</volume>
<publisher-loc>Berlin, Germany</publisher-loc>
<publisher-name>Springer</publisher-name>
<fpage>82</fpage>
<lpage>103</lpage>
<series>Lecture Notes in Computer Science</series>
<pub-id pub-id-type="doi">10.1007/978-3-540-78199-8_6</pub-id>
</element-citation>
</ref>
<ref id="B9">
<label>2</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Elarian</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Abdel-Aal</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Ahmad</surname>
<given-names>I.</given-names>
</name>
<name>
<surname>Parvez</surname>
<given-names>M. T.</given-names>
</name>
<name>
<surname>Zidouri</surname>
<given-names>A.</given-names>
</name>
</person-group>
<article-title>Handwriting synthesis: classifications and techniques</article-title>
<source>
<italic>International Journal on Document Analysis and Recognition</italic>
</source>
<year>2014</year>
<volume>17</volume>
<issue>4</issue>
<fpage>455</fpage>
<lpage>469</lpage>
<pub-id pub-id-type="doi">10.1007/s10032-014-0231-x</pub-id>
</element-citation>
</ref>
<ref id="B11">
<label>3</label>
<element-citation publication-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Elarian</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Al-Muhsateb</surname>
<given-names>H. A.</given-names>
</name>
<name>
<surname>Ghouti</surname>
<given-names>L. M.</given-names>
</name>
</person-group>
<article-title>Arabic handwriting synthesis</article-title>
<conf-name>Proceedings of the 1st International Workshop on Frontiers in Arabic Handwriting Recognition</conf-name>
<conf-date>2011</conf-date>
<comment>
<ext-link ext-link-type="uri" xlink:href="http://hdl.handle.net/2003/27562">http://hdl.handle.net/2003/27562</ext-link>
</comment>
</element-citation>
</ref>
<ref id="B12">
<label>4</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Elzobi</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Al-Hamadi</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Al Aghbari</surname>
<given-names>Z.</given-names>
</name>
<name>
<surname>Dings</surname>
<given-names>L.</given-names>
</name>
</person-group>
<article-title>IESK-ArDB: a database for handwritten Arabic and an optimized topological segmentation approach</article-title>
<source>
<italic>International Journal on Document Analysis and Recognition</italic>
</source>
<year>2013</year>
<volume>16</volume>
<issue>3</issue>
<fpage>295</fpage>
<lpage>308</lpage>
<pub-id pub-id-type="doi">10.1007/s10032-012-0190-z</pub-id>
<pub-id pub-id-type="other">2-s2.0-84881611592</pub-id>
</element-citation>
</ref>
<ref id="B1">
<label>5</label>
<element-citation publication-type="other">
<comment>
<ext-link ext-link-type="uri" xlink:href="http://www.bbc.co.uk/arabic/scienceandtech/">http://www.bbc.co.uk/arabic/scienceandtech/</ext-link>
</comment>
</element-citation>
</ref>
<ref id="B19">
<label>6</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Lorigo</surname>
<given-names>L. M.</given-names>
</name>
<name>
<surname>Govindaraju</surname>
<given-names>V.</given-names>
</name>
</person-group>
<article-title>Offline arabic handwriting recognition: a survey</article-title>
<source>
<italic>IEEE Transactions on Pattern Analysis and Machine Intelligence</italic>
</source>
<year>2006</year>
<volume>28</volume>
<issue>5</issue>
<fpage>712</fpage>
<lpage>724</lpage>
<pub-id pub-id-type="doi">10.1109/tpami.2006.102</pub-id>
<pub-id pub-id-type="other">2-s2.0-33645152193</pub-id>
<pub-id pub-id-type="pmid">16640258</pub-id>
</element-citation>
</ref>
<ref id="B16">
<label>7</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Hollerbach</surname>
<given-names>J. M.</given-names>
</name>
</person-group>
<article-title>An oscillation theory of handwriting</article-title>
<source>
<italic>Biological Cybernetics</italic>
</source>
<year>1981</year>
<volume>39</volume>
<issue>2</issue>
<fpage>139</fpage>
<lpage>156</lpage>
<pub-id pub-id-type="doi">10.1007/BF00336740</pub-id>
<pub-id pub-id-type="other">2-s2.0-0019367188</pub-id>
</element-citation>
</ref>
<ref id="B13">
<label>8</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Gangadhar</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Joseph</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Chakravarthy</surname>
<given-names>V. S.</given-names>
</name>
</person-group>
<article-title>An oscillatory neuromotor model of handwriting generation</article-title>
<source>
<italic>International Journal on Document Analysis and Recognition</italic>
</source>
<year>2007</year>
<volume>10</volume>
<issue>2</issue>
<fpage>69</fpage>
<lpage>84</lpage>
<pub-id pub-id-type="doi">10.1007/s10032-007-0046-0</pub-id>
<pub-id pub-id-type="other">2-s2.0-36349036453</pub-id>
</element-citation>
</ref>
<ref id="B23">
<label>9</label>
<element-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Plamondon</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Guerfali</surname>
<given-names>W.</given-names>
</name>
<name>
<surname>Scribens (Laboratory)</surname>
</name>
</person-group>
<source>
<italic>The Generation of Handwriting with Delta-Lognormal Synergies</italic>
</source>
<year>1996</year>
<publisher-name>Laboratoire Scribens, Département de Génie Électrique, École Polytechnique de Montréal</publisher-name>
<series>Rapport Technique</series>
<comment>
<ext-link ext-link-type="uri" xlink:href="http://books.google.de/books?id=6Vn9MwEACAAJ">http://books.google.de/books?id=6Vn9MwEACAAJ</ext-link>
</comment>
</element-citation>
</ref>
<ref id="B14">
<label>10</label>
<element-citation publication-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Guyon</surname>
<given-names>I.</given-names>
</name>
</person-group>
<article-title>Handwriting synthesis from handwritten glyphs</article-title>
<conf-name>Proceedings of the 5th International Workshop on Frontiers of Handwriting Recognition</conf-name>
<conf-date>1996</conf-date>
<fpage>309</fpage>
<lpage>312</lpage>
</element-citation>
</ref>
<ref id="B29">
<label>11</label>
<element-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Varga</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Bunke</surname>
<given-names>H.</given-names>
</name>
</person-group>
<person-group person-group-type="editor">
<name>
<surname>Marinai</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Fujisawa</surname>
<given-names>H.</given-names>
</name>
</person-group>
<article-title>Perturbation models for generating synthetic training data in handwriting recognition</article-title>
<source>
<italic>Machine Learning in Document Analysis and Recognition</italic>
</source>
<year>2008</year>
<volume>90</volume>
<publisher-loc>Berlin, Germany</publisher-loc>
<publisher-name>Springer</publisher-name>
<fpage>333</fpage>
<lpage>360</lpage>
</element-citation>
</ref>
<ref id="B35">
<label>12</label>
<element-citation publication-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Zheng</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Doermann</surname>
<given-names>D. S.</given-names>
</name>
</person-group>
<article-title>Handwriting matching and its application to handwriting synthesis</article-title>
<conf-name>Proceedings of the 8th International Conference on Document Analysis and Recognition (ICDAR '05)</conf-name>
<conf-date>September 2005</conf-date>
<conf-loc>Seoul, Republic of Korea</conf-loc>
<publisher-name>IEEE Computer Society</publisher-name>
<fpage>861</fpage>
<lpage>865</lpage>
<pub-id pub-id-type="doi">10.1109/icdar.2005.122</pub-id>
<pub-id pub-id-type="other">2-s2.0-33947425620</pub-id>
</element-citation>
</ref>
<ref id="B31">
<label>13</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Viswanath</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Murty</surname>
<given-names>N.</given-names>
</name>
<name>
<surname>Bhatnagar</surname>
<given-names>S.</given-names>
</name>
</person-group>
<article-title>Overlap pattern synthesis with an efficient nearest neighbor classifier</article-title>
<source>
<italic>Pattern Recognition</italic>
</source>
<year>2005</year>
<volume>38</volume>
<issue>8</issue>
<fpage>1187</fpage>
<lpage>1195</lpage>
<pub-id pub-id-type="doi">10.1016/j.patcog.2004.10.007</pub-id>
<pub-id pub-id-type="other">2-s2.0-18544379616</pub-id>
</element-citation>
</ref>
<ref id="B5">
<label>14</label>
<element-citation publication-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Choi</surname>
<given-names>H. I.</given-names>
</name>
<name>
<surname>Cho</surname>
<given-names>S.-J.</given-names>
</name>
<name>
<surname>Kim</surname>
<given-names>J. H.</given-names>
</name>
</person-group>
<article-title>Generation of handwritten characters with bayesian network based on-line handwriting recognizers</article-title>
<conf-name>Proceedings of the 7th International Conference on Document Analysis and Recognition</conf-name>
<conf-date>August 2003</conf-date>
<conf-loc>Edinburgh, UK</conf-loc>
<publisher-name>IEEE</publisher-name>
<fpage>995</fpage>
<lpage>999</lpage>
<pub-id pub-id-type="doi">10.1109/ICDAR.2003.1227809</pub-id>
</element-citation>
</ref>
<ref id="B8">
<label>15</label>
<element-citation publication-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Dolinsky</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Takagi</surname>
<given-names>H.</given-names>
</name>
</person-group>
<article-title>Synthesizing handwritten characters using naturalness learning</article-title>
<conf-name>Proceedings of the IEEE International Conference on Computational Cybernetics (ICCC '07)</conf-name>
<conf-date>October 2007</conf-date>
<conf-loc>Gammarth, Tunisia</conf-loc>
<fpage>101</fpage>
<lpage>106</lpage>
<pub-id pub-id-type="doi">10.1109/ICCCYB.2007.4402023</pub-id>
</element-citation>
</ref>
<ref id="B2">
<label>16</label>
<element-citation publication-type="gov">
<person-group person-group-type="author">
<name>
<surname>Al-Zubi</surname>
<given-names>S.</given-names>
</name>
</person-group>
<article-title>Active shape structural model</article-title>
<year>2004</year>
</element-citation>
</ref>
<ref id="B26">
<label>17</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Shi</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Gunn</surname>
<given-names>S. R.</given-names>
</name>
<name>
<surname>Damper</surname>
<given-names>R. I.</given-names>
</name>
</person-group>
<article-title>Handwritten Chinese radical recognition using nonlinear active shape models</article-title>
<source>
<italic>IEEE Transactions on Pattern Analysis and Machine Intelligence</italic>
</source>
<year>2003</year>
<volume>25</volume>
<issue>2</issue>
<fpage>277</fpage>
<lpage>280</lpage>
<pub-id pub-id-type="doi">10.1109/tpami.2003.1177158</pub-id>
<pub-id pub-id-type="other">2-s2.0-0037328219</pub-id>
</element-citation>
</ref>
<ref id="B15">
<label>18</label>
<element-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Helmers</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Bunke</surname>
<given-names>H.</given-names>
</name>
</person-group>
<person-group person-group-type="editor">
<name>
<surname>Perales</surname>
<given-names>F. J.</given-names>
</name>
<name>
<surname>Campilho</surname>
<given-names>A. J. C.</given-names>
</name>
<name>
<surname>de la Blanca</surname>
<given-names>N. P.</given-names>
</name>
<name>
<surname>Sanfeliu</surname>
<given-names>A.</given-names>
</name>
</person-group>
<article-title>Generation and use of synthetic training data in cursive handwriting recognition</article-title>
<source>
<italic>Pattern Recognition and Image Analysis: Proceedings of the 1st Iberian Conference, IbPRIA 2003, Puerto de Andratx, Mallorca, Spain, JUne 4–6, 2003</italic>
</source>
<year>2003</year>
<volume>2652</volume>
<publisher-loc>Berlin, Germany</publisher-loc>
<publisher-name>Springer</publisher-name>
<fpage>336</fpage>
<lpage>345</lpage>
<series>Lecture Notes in Computer Science</series>
<pub-id pub-id-type="doi">10.1007/978-3-540-44871-6_39</pub-id>
</element-citation>
</ref>
<ref id="B17">
<label>19</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Jawahar</surname>
<given-names>C. V.</given-names>
</name>
<name>
<surname>Balasubramanian</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Meshesha</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Namboodiri</surname>
<given-names>A. M.</given-names>
</name>
</person-group>
<article-title>Retrieval of online handwriting by synthesis and matching</article-title>
<source>
<italic>Pattern Recognition</italic>
</source>
<year>2009</year>
<volume>42</volume>
<issue>7</issue>
<fpage>1445</fpage>
<lpage>1457</lpage>
<pub-id pub-id-type="doi">10.1016/j.patcog.2008.08.017</pub-id>
<pub-id pub-id-type="other">ZBL1183.68536</pub-id>
<pub-id pub-id-type="other">2-s2.0-62349103376</pub-id>
</element-citation>
</ref>
<ref id="B24">
<label>20</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Rao</surname>
<given-names>P.</given-names>
</name>
</person-group>
<article-title>Shape vectors: an efficient parametric representation for the synthesis and recognition of hand script characters</article-title>
<source>
<italic>Sadhana</italic>
</source>
<year>1993</year>
<volume>18</volume>
<issue>1</issue>
<fpage>1</fpage>
<lpage>15</lpage>
<pub-id pub-id-type="doi">10.1007/bf02811383</pub-id>
<pub-id pub-id-type="other">2-s2.0-51649140617</pub-id>
</element-citation>
</ref>
<ref id="B34">
<label>21</label>
<element-citation publication-type="other">
<person-group person-group-type="author">
<name>
<surname>Xu</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Shum</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Wang</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Wu</surname>
<given-names>C.</given-names>
</name>
</person-group>
<article-title>Learning-based system and process for synthesizing cursive handwriting</article-title>
<comment>US Patent 7,227,993, 2007,
<ext-link ext-link-type="uri" xlink:href="http://www.google.co.in/patents/US7227993">http://www.google.co.in/patents/US7227993</ext-link>
</comment>
</element-citation>
</ref>
<ref id="B18">
<label>22</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Lin</surname>
<given-names>Z.</given-names>
</name>
<name>
<surname>Wan</surname>
<given-names>L.</given-names>
</name>
</person-group>
<article-title>Style-preserving English handwriting synthesis</article-title>
<source>
<italic>Pattern Recognition</italic>
</source>
<year>2007</year>
<volume>40</volume>
<issue>7</issue>
<fpage>2097</fpage>
<lpage>2109</lpage>
<pub-id pub-id-type="doi">10.1016/j.patcog.2006.11.024</pub-id>
<pub-id pub-id-type="other">ZBL1111.68642</pub-id>
<pub-id pub-id-type="other">2-s2.0-33947667516</pub-id>
</element-citation>
</ref>
<ref id="B32">
<label>23</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Wang</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Wu</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Xu</surname>
<given-names>Y.-Q.</given-names>
</name>
<name>
<surname>Shum</surname>
<given-names>H.-Y.</given-names>
</name>
</person-group>
<article-title>Combining shape and physical models for online cursive handwriting synthesis</article-title>
<source>
<italic>International Journal on Document Analysis and Recognition</italic>
</source>
<year>2005</year>
<volume>7</volume>
<issue>4</issue>
<fpage>219</fpage>
<lpage>227</lpage>
<pub-id pub-id-type="doi">10.1007/s10032-004-0131-6</pub-id>
<pub-id pub-id-type="other">2-s2.0-29444450230</pub-id>
</element-citation>
</ref>
<ref id="B27">
<label>24</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Thomas</surname>
<given-names>A. O.</given-names>
</name>
<name>
<surname>Rusu</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Govindaraju</surname>
<given-names>V.</given-names>
</name>
</person-group>
<article-title>Synthetic handwritten CAPTCHAs</article-title>
<source>
<italic>Pattern Recognition</italic>
</source>
<year>2009</year>
<volume>42</volume>
<issue>12</issue>
<fpage>3365</fpage>
<lpage>3373</lpage>
<pub-id pub-id-type="doi">10.1016/j.patcog.2008.12.018</pub-id>
<pub-id pub-id-type="other">2-s2.0-68349118954</pub-id>
</element-citation>
</ref>
<ref id="B22">
<label>25</label>
<element-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Miyao</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Maruyama</surname>
<given-names>M.</given-names>
</name>
</person-group>
<article-title>Virtual example synthesis based on PCA for off-line handwritten character recognition</article-title>
<source>
<italic>Document Analysis Systems VII</italic>
</source>
<year>2006</year>
<volume>3872</volume>
<publisher-loc>Berlin, Germany</publisher-loc>
<publisher-name>Springer</publisher-name>
<fpage>96</fpage>
<lpage>105</lpage>
<pub-id pub-id-type="doi">10.1007/11669487_9</pub-id>
</element-citation>
</ref>
<ref id="B28">
<label>26</label>
<element-citation publication-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Varga</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Bunke</surname>
<given-names>H.</given-names>
</name>
</person-group>
<article-title>Generation of synthetic training data for an HMM-based handwriting recognition system</article-title>
<volume>1</volume>
<conf-name>Proceedings of the 7th International Conference on Document Analysis and Recognition</conf-name>
<conf-date>August 2003</conf-date>
<conf-loc>Edinburgh, UK</conf-loc>
<fpage>618</fpage>
<lpage>622</lpage>
<pub-id pub-id-type="doi">10.1109/icdar.2003.1227736</pub-id>
</element-citation>
</ref>
<ref id="B30">
<label>27</label>
<element-citation publication-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Varga</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Kilchhofer</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Bunke</surname>
<given-names>H.</given-names>
</name>
</person-group>
<article-title>Template-based synthetic handwriting generation for the training of recognition systems</article-title>
<conf-name>Proceedings of the 12th Conference of the International Graphonomics Society</conf-name>
<conf-date>2005</conf-date>
<fpage>206</fpage>
<lpage>211</lpage>
</element-citation>
</ref>
<ref id="B4">
<label>28</label>
<element-citation publication-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Chaudhuri</surname>
<given-names>B. B.</given-names>
</name>
<name>
<surname>Kundu</surname>
<given-names>A.</given-names>
</name>
</person-group>
<article-title>Synthesis of individual handwriting in bangla script</article-title>
<conf-name>Proceedings of the ICFHR</conf-name>
<conf-date>2008</conf-date>
<comment>
<ext-link ext-link-type="uri" xlink:href="http://www.cenparmi.concordia.ca/ICFHR2008/Proceedings/papers/cr1079.pdf">http://www.cenparmi.concordia.ca/ICFHR2008/Proceedings/papers/cr1079.pdf</ext-link>
</comment>
</element-citation>
</ref>
<ref id="B21">
<label>29</label>
<element-citation publication-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Margner</surname>
<given-names>V.</given-names>
</name>
<name>
<surname>Pechwitz</surname>
<given-names>M.</given-names>
</name>
</person-group>
<article-title>Synthetic data for Arabic OCR system development</article-title>
<conf-name>Proceedings of the 6th International Conference on Document Analysis and Recognition</conf-name>
<conf-loc>Seattle, Wash, USA</conf-loc>
<fpage>1159</fpage>
<lpage>1163</lpage>
<pub-id pub-id-type="doi">10.1109/icdar.2001.953967</pub-id>
</element-citation>
</ref>
<ref id="B10">
<label>30</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Elarian</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Ahmad</surname>
<given-names>I.</given-names>
</name>
<name>
<surname>Awaida</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Al-Khatib</surname>
<given-names>W. G.</given-names>
</name>
<name>
<surname>Zidouri</surname>
<given-names>A.</given-names>
</name>
</person-group>
<article-title>An Arabic handwriting synthesis system</article-title>
<source>
<italic>Pattern Recognition</italic>
</source>
<year>2015</year>
<volume>48</volume>
<issue>3</issue>
<fpage>849</fpage>
<lpage>861</lpage>
<pub-id pub-id-type="doi">10.1016/j.patcog.2014.09.013</pub-id>
</element-citation>
</ref>
<ref id="B25">
<label>31</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Saabni</surname>
<given-names>R. M.</given-names>
</name>
<name>
<surname>El-Sana</surname>
<given-names>J. A.</given-names>
</name>
</person-group>
<article-title>Comprehensive synthetic Arabic database for on/off-line script recognition research</article-title>
<source>
<italic>International Journal on Document Analysis and Recognition</italic>
</source>
<year>2013</year>
<volume>16</volume>
<issue>3</issue>
<fpage>285</fpage>
<lpage>294</lpage>
<pub-id pub-id-type="doi">10.1007/s10032-012-0189-5</pub-id>
<pub-id pub-id-type="other">2-s2.0-84881614380</pub-id>
</element-citation>
</ref>
<ref id="B7">
<label>32</label>
<element-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Dinges</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Elzobi</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Al-Hamadi</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Al-Aghbari</surname>
<given-names>Z.</given-names>
</name>
</person-group>
<article-title>Synthizing handwritten arabic text using active shape models</article-title>
<source>
<italic>Image Processing and Communications Challenges 3</italic>
</source>
<year>2011</year>
<volume>102</volume>
<publisher-loc>Berlin, Germany</publisher-loc>
<publisher-name>Springer</publisher-name>
<fpage>401</fpage>
<lpage>408</lpage>
<series>Advances in Intelligent and Soft Computing</series>
<pub-id pub-id-type="doi">10.1007/978-3-642-23154-4_45</pub-id>
</element-citation>
</ref>
<ref id="B6">
<label>33</label>
<element-citation publication-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Dinges</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Al-Hamadi</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Elzobi</surname>
<given-names>M.</given-names>
</name>
</person-group>
<article-title>An approach for arabic handwriting synthesis based on active shape models</article-title>
<conf-name>Proceedings of the 12th International Conference on Document Analysis and Recognition (ICDAR '13)</conf-name>
<conf-date>August 2013</conf-date>
<fpage>1260</fpage>
<lpage>1264</lpage>
<pub-id pub-id-type="doi">10.1109/icdar.2013.255</pub-id>
<pub-id pub-id-type="other">2-s2.0-84889583724</pub-id>
</element-citation>
</ref>
<ref id="B3">
<label>34</label>
<element-citation publication-type="journal">
<person-group person-group-type="author">
<name>
<surname>Almuallim</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Yamaguchi</surname>
<given-names>S.</given-names>
</name>
</person-group>
<article-title>A method of recognition of arabic cursive handwriting</article-title>
<source>
<italic>IEEE Transactions on Pattern Analysis and Machine Intelligence</italic>
</source>
<year>1987</year>
<volume>9</volume>
<issue>5</issue>
<fpage>715</fpage>
<lpage>722</lpage>
<pub-id pub-id-type="doi">10.1109/tpami.1987.4767970</pub-id>
<pub-id pub-id-type="pmid">21869434</pub-id>
</element-citation>
</ref>
<ref id="B33">
<label>35</label>
<element-citation publication-type="book">
<person-group person-group-type="author">
<name>
<surname>Xiu</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Peng</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Ding</surname>
<given-names>X.</given-names>
</name>
<name>
<surname>Wang</surname>
<given-names>H.</given-names>
</name>
</person-group>
<article-title>Offline handwritten arabic character segmentation with probabilistic model</article-title>
<source>
<italic>Document Analysis Systems VII</italic>
</source>
<year>2006</year>
<volume>3872</volume>
<issue>No. project 60472002</issue>
<publisher-loc>Berlin, Germany</publisher-loc>
<publisher-name>Springer</publisher-name>
<fpage>402</fpage>
<lpage>412</lpage>
<series>Lecture Notes in Computer Science</series>
<pub-id pub-id-type="doi">10.1007/11669487_36</pub-id>
</element-citation>
</ref>
</ref-list>
</back>
<floats-group>
<fig id="fig1" orientation="portrait" position="float">
<label>Figure 1</label>
<caption>
<p>Simplified flowchart of the proposed synthesis system.</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.001"></graphic>
</fig>
<fig id="fig2" orientation="portrait" position="float">
<label>Figure 2</label>
<caption>
<p>The average
<inline-formula>
<mml:math id="M65">
<mml:mrow>
<mml:mover accent="false">
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
and
<italic>r</italic>
samples
<bold>x</bold>
for the letter Sin in isolated form of writer 1. (a) The number of interpolation steps
<italic>n</italic>
= 10 is not sufficient to represent complex characters as Sin (س), and details will be lost or distorted. (b) With
<italic>n</italic>
= 25, the approximated samples
<bold>x</bold>
are reliable enough to build proper ASMs for all character classes.</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.002"></graphic>
</fig>
<fig id="fig3" orientation="portrait" position="float">
<label>Figure 3</label>
<caption>
<p>Examples of glyphs: (a) examples for ASM-glyph representations
<bold>u</bold>
(where
<inline-formula>
<mml:math id="M66">
<mml:mrow>
<mml:mo stretchy="false"></mml:mo>
</mml:mrow>
<mml:mfenced open="|" close="|" separators="|">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo></mml:mo>
<mml:mrow>
<mml:mo stretchy="false"></mml:mo>
</mml:mrow>
<mml:mn mathvariant="normal">1.6</mml:mn>
<mml:msub>
<mml:mrow>
<mml:msqrt>
<mml:mi>λ</mml:mi>
</mml:msqrt>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>
; see (
<xref ref-type="disp-formula" rid="EEq3">3</xref>
)), (b) a B-Spline interpolation has been applied on the representations, (c), (d), original letter samples
<bold>x</bold>
. A B-Spline interpolation with 5 steps has been applied on (b) and (e). Examples of ASM-glyphs
<bold>u</bold>
that are composed to words are shown in (e) and (f), where the influence is minimal (e) and maximal (f), respectively, for all eigenvalues.</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.003"></graphic>
</fig>
<fig id="fig4" orientation="portrait" position="float">
<label>Figure 4</label>
<caption>
<p>Examples of ASM based glyph
<bold>u</bold>
<sup>
<italic></italic>
</sup>
that has the highest correlation (deviation
<italic>δ</italic>
) with a randomly chosen samples
<bold>x</bold>
. The average sample polygon
<inline-formula>
<mml:math id="M67">
<mml:mrow>
<mml:mover accent="false">
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
is displayed to show how strong
<bold>x</bold>
differs from the expected shape. Some of the ASM for characters with diacritics are problematic, as shown in (c).</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.004"></graphic>
</fig>
<fig id="fig5" orientation="portrait" position="float">
<label>Figure 5</label>
<caption>
<p>Outgoing from the Unicode sequence (ن ي و ي و ر ك) the forms (
<bold>i</bold>
solated,
<bold> e</bold>
nd,
<bold> m</bold>
iddle, and
<bold> b</bold>
egin) of all letters are determined (نـ ـيـ و يـ و ر ك) and composed to the word نيويورك (New York).</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.005"></graphic>
</fig>
<fig id="fig6" orientation="portrait" position="float">
<label>Figure 6</label>
<caption>
<p>The word نيويورك (New York), synthesized by the average letter shapes
<inline-formula>
<mml:math id="M68">
<mml:mrow>
<mml:mover accent="false">
<mml:mrow>
<mml:mi>x</mml:mi>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
of different writers.</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.006"></graphic>
</fig>
<fig id="fig7" orientation="portrait" position="float">
<label>Figure 7</label>
<caption>
<p>Affine transformations and connection shortening on synthetic words.</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.007"></graphic>
</fig>
<fig id="fig8" orientation="portrait" position="float">
<label>Figure 8</label>
<caption>
<p>Example for a synthesized letter pair using (a) full (b) half and (c) negative
<italic> Kashida</italic>
length.</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.008"></graphic>
</fig>
<fig id="fig9" orientation="portrait" position="float">
<label>Figure 9</label>
<caption>
<p>Comparison of B-Spline and Cubic interpolation where
<italic>n</italic>
(
<bold>u</bold>
) = 25 and
<inline-formula>
<mml:math id="M69">
<mml:mi>n</mml:mi>
<mml:mo stretchy="false">(</mml:mo>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">u</mml:mi>
</mml:mrow>
<mml:mo>˘</mml:mo>
</mml:mover>
<mml:mo stretchy="false">)</mml:mo>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">250</mml:mn>
</mml:math>
</inline-formula>
.</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.009"></graphic>
</fig>
<fig id="fig10" orientation="portrait" position="float">
<label>Figure 10</label>
<caption>
<p>Painting technique: (a) scheme, (b) word shape with
<italic>ρ</italic>
= 6,
<italic>σ</italic>
= 3.5 (Gaussian filter is disabled), (c-d) example results for painting technique: (c) test texture applied on (b), (d)
<italic>ρ</italic>
= 30,
<italic>σ</italic>
= 1.0 with ball pen texture, and (e-f) comparison of natural and synthetic ball pen textures.</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.010"></graphic>
</fig>
<fig id="fig11" orientation="portrait" position="float">
<label>Figure 11</label>
<caption>
<p>From the polygon
<bold>u</bold>
to a synthetic image that simulates a feather like writing instrument. (c) Polygon mesh created from
<bold>u</bold>
that is used for fast rendering of binary images.</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.011"></graphic>
</fig>
<fig id="fig12" orientation="portrait" position="float">
<label>Figure 12</label>
<caption>
<p>Arranging a letter along the baseline.</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.012"></graphic>
</fig>
<fig id="fig13" orientation="portrait" position="float">
<label>Figure 13</label>
<caption>
<p>Detecting intersections of two line segments, where the grid has the size 1 pt to suggest the synthesized image,
<italic>ɛ</italic>
is 2 pt. (a) The lines segments intersect. (b) The line segments are close and
<italic>𝔰</italic>
<sub>
<italic>𝔅</italic>
</sub>
points to
<italic>𝔰</italic>
<sub>
<italic>𝔅</italic>
</sub>
, but there is no need to move
<italic>𝔄</italic>
since their shortest distance
<italic>ɛ</italic>
is higher than
<italic>ε</italic>
<sub>min⁡</sub>
. (c) The intersection point
<bold>z</bold>
is outside both line segments, but
<italic>ɛ</italic>
is smaller than
<italic>ε</italic>
<sub>min⁡</sub>
, so an intersection of the corresponding lines of the synthesized image is expected.</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.013"></graphic>
</fig>
<fig id="fig14" orientation="portrait" position="float">
<label>Figure 14</label>
<caption>
<p>Examples for syntheses of complete text pages: (a) one of the natural handwritings that have been used to compute function
<italic>f</italic>
; (b) synthesis using optimized
<italic>f</italic>
<sub>1</sub>
(given by (
<xref ref-type="disp-formula" rid="EEq15">15</xref>
)), rendered as PDF; (c) another synthesis using
<italic>f</italic>
<sub>1</sub>
, rendered as png image. More examples inclusive ground truth will be added at
<ext-link ext-link-type="uri" xlink:href="http://www.iesk-ardb.ovgu.de/">http://www.iesk-ardb.ovgu.de/</ext-link>
soon. Text synthesis from a BBC newsletter (d); BBC article about a virus outbreak in Saudi Arabia [
<xref rid="B1" ref-type="bibr">5</xref>
] (e-f); two syntheses of the given paragraph of (d).</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.014"></graphic>
</fig>
<fig id="fig15" orientation="portrait" position="float">
<label>Figure 15</label>
<caption>
<p>Experiments show the influence of different features on the average error of the word segmentation method.</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.015"></graphic>
</fig>
<fig id="alg1" orientation="portrait" position="float">
<label>Algorithm 1</label>
<caption>
<p>Solving intersections of neighbored PAWs.</p>
</caption>
<graphic xlink:href="TSWJ2015-323575.alg.001"></graphic>
</fig>
<table-wrap id="tab1" orientation="portrait" position="float">
<label>Table 1</label>
<caption>
<p>Arabic alphabet, Naskh style. </p>
</caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th align="left" rowspan="1" colspan="1"></th>
<th align="center" rowspan="1" colspan="1"> i </th>
<th align="center" rowspan="1" colspan="1"> e </th>
<th align="center" rowspan="1" colspan="1"> m </th>
<th align="center" rowspan="1" colspan="1"> b </th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" rowspan="1" colspan="1"> Alif </td>
<td align="center" rowspan="1" colspan="1">ا</td>
<td align="center" rowspan="1" colspan="1">ـا</td>
<td align="center" rowspan="1" colspan="1"></td>
<td align="center" rowspan="1" colspan="1"></td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Ba </td>
<td align="center" rowspan="1" colspan="1">ب</td>
<td align="center" rowspan="1" colspan="1">ـب</td>
<td align="center" rowspan="1" colspan="1">ـبـ</td>
<td align="center" rowspan="1" colspan="1">بـ</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Ta </td>
<td align="center" rowspan="1" colspan="1">ت</td>
<td align="center" rowspan="1" colspan="1">ـت</td>
<td align="center" rowspan="1" colspan="1">ـتـ</td>
<td align="center" rowspan="1" colspan="1">تـ</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Tha </td>
<td align="center" rowspan="1" colspan="1">ث</td>
<td align="center" rowspan="1" colspan="1">ـث</td>
<td align="center" rowspan="1" colspan="1">ـثـ</td>
<td align="center" rowspan="1" colspan="1">ثـ</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Jim </td>
<td align="center" rowspan="1" colspan="1">ج</td>
<td align="center" rowspan="1" colspan="1">ـج</td>
<td align="center" rowspan="1" colspan="1">ـجـ</td>
<td align="center" rowspan="1" colspan="1">جـ</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Ha </td>
<td align="center" rowspan="1" colspan="1">ح</td>
<td align="center" rowspan="1" colspan="1">ـح</td>
<td align="center" rowspan="1" colspan="1">ـحـ</td>
<td align="center" rowspan="1" colspan="1">حـ</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Kha </td>
<td align="center" rowspan="1" colspan="1">خ</td>
<td align="center" rowspan="1" colspan="1">ـخ</td>
<td align="center" rowspan="1" colspan="1">ـخـ</td>
<td align="center" rowspan="1" colspan="1">خـ</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Dal </td>
<td align="center" rowspan="1" colspan="1">د </td>
<td align="center" rowspan="1" colspan="1">ـد </td>
<td align="center" rowspan="1" colspan="1"></td>
<td align="center" rowspan="1" colspan="1"></td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Thal </td>
<td align="center" rowspan="1" colspan="1">ذ </td>
<td align="center" rowspan="1" colspan="1">ـذ </td>
<td align="center" rowspan="1" colspan="1"></td>
<td align="center" rowspan="1" colspan="1"></td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Ra </td>
<td align="center" rowspan="1" colspan="1">ر </td>
<td align="center" rowspan="1" colspan="1">ـر </td>
<td align="center" rowspan="1" colspan="1"></td>
<td align="center" rowspan="1" colspan="1"></td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Zai </td>
<td align="center" rowspan="1" colspan="1">ز </td>
<td align="center" rowspan="1" colspan="1">ـز </td>
<td align="center" rowspan="1" colspan="1"></td>
<td align="center" rowspan="1" colspan="1"></td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Sin </td>
<td align="center" rowspan="1" colspan="1">س</td>
<td align="center" rowspan="1" colspan="1">ـس</td>
<td align="center" rowspan="1" colspan="1">ـسـ</td>
<td align="center" rowspan="1" colspan="1">سـ</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Shin </td>
<td align="center" rowspan="1" colspan="1">ش</td>
<td align="center" rowspan="1" colspan="1">ـش</td>
<td align="center" rowspan="1" colspan="1">ـشـ</td>
<td align="center" rowspan="1" colspan="1">شـ</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Sad </td>
<td align="center" rowspan="1" colspan="1">ص</td>
<td align="center" rowspan="1" colspan="1">ـص</td>
<td align="center" rowspan="1" colspan="1">ـصـ</td>
<td align="center" rowspan="1" colspan="1">صـ</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1"> Dhad </td>
<td align="center" rowspan="1" colspan="1">ض</td>
<td align="center" rowspan="1" colspan="1">ـض</td>
<td align="center" rowspan="1" colspan="1">ـضـ</td>
<td align="center" rowspan="1" colspan="1">ضـ</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1"> Taa </td>
<td align="center" rowspan="1" colspan="1">ط </td>
<td align="center" rowspan="1" colspan="1">ـط </td>
<td align="center" rowspan="1" colspan="1">ـطـ </td>
<td align="center" rowspan="1" colspan="1">طـ </td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1"> Dha </td>
<td align="center" rowspan="1" colspan="1">ظ </td>
<td align="center" rowspan="1" colspan="1">ـظ </td>
<td align="center" rowspan="1" colspan="1">ـظـ </td>
<td align="center" rowspan="1" colspan="1">ظـ </td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1"> Ayn </td>
<td align="center" rowspan="1" colspan="1">ع </td>
<td align="center" rowspan="1" colspan="1">ـع </td>
<td align="center" rowspan="1" colspan="1">ـعـ </td>
<td align="center" rowspan="1" colspan="1">عـ </td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1"> Ghayn </td>
<td align="center" rowspan="1" colspan="1">غ </td>
<td align="center" rowspan="1" colspan="1">ـغ </td>
<td align="center" rowspan="1" colspan="1">ـغـ </td>
<td align="center" rowspan="1" colspan="1">غـ </td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1"> Fa </td>
<td align="center" rowspan="1" colspan="1">ف </td>
<td align="center" rowspan="1" colspan="1">ـف </td>
<td align="center" rowspan="1" colspan="1">ـفـ </td>
<td align="center" rowspan="1" colspan="1">فـ </td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1"> Qaf </td>
<td align="center" rowspan="1" colspan="1">ق </td>
<td align="center" rowspan="1" colspan="1">ـق </td>
<td align="center" rowspan="1" colspan="1">ـقـ </td>
<td align="center" rowspan="1" colspan="1">قـ </td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1"> Kaf </td>
<td align="center" rowspan="1" colspan="1">ك </td>
<td align="center" rowspan="1" colspan="1">ـك </td>
<td align="center" rowspan="1" colspan="1">ـكـ </td>
<td align="center" rowspan="1" colspan="1">كـ </td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1"> Lam </td>
<td align="center" rowspan="1" colspan="1">ل </td>
<td align="center" rowspan="1" colspan="1">ـل </td>
<td align="center" rowspan="1" colspan="1">ـلـ </td>
<td align="center" rowspan="1" colspan="1">لـ </td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1"> Mim </td>
<td align="center" rowspan="1" colspan="1">م </td>
<td align="center" rowspan="1" colspan="1">ـم </td>
<td align="center" rowspan="1" colspan="1">ـمـ </td>
<td align="center" rowspan="1" colspan="1">مـ </td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1"> Nun </td>
<td align="center" rowspan="1" colspan="1">ن </td>
<td align="center" rowspan="1" colspan="1">ـن </td>
<td align="center" rowspan="1" colspan="1">ـنـ </td>
<td align="center" rowspan="1" colspan="1">نـ </td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1"> He </td>
<td align="center" rowspan="1" colspan="1">ه </td>
<td align="center" rowspan="1" colspan="1">ـه </td>
<td align="center" rowspan="1" colspan="1">ـهـ </td>
<td align="center" rowspan="1" colspan="1">هـ </td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1"> Waw </td>
<td align="center" rowspan="1" colspan="1">و </td>
<td align="center" rowspan="1" colspan="1">ـو </td>
<td align="center" rowspan="1" colspan="1"></td>
<td align="center" rowspan="1" colspan="1"></td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1"> Ya </td>
<td align="center" rowspan="1" colspan="1">ي </td>
<td align="center" rowspan="1" colspan="1">ـي </td>
<td align="center" rowspan="1" colspan="1">ـيـ </td>
<td align="center" rowspan="1" colspan="1">يـ </td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="tab2" orientation="portrait" position="float">
<label>Table 2</label>
<caption>
<p>Parameters and tresholds. </p>
</caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th align="left" rowspan="1" colspan="1">Parameter </th>
<th align="left" rowspan="1" colspan="1"> Explanation </th>
<th align="center" rowspan="1" colspan="1"> Value</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" rowspan="1" colspan="1">
<italic>r</italic>
</td>
<td align="left" rowspan="1" colspan="1">Number of samples used to compute an ASM </td>
<td align="center" rowspan="1" colspan="1">50</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">
<italic>m</italic>
</td>
<td align="left" rowspan="1" colspan="1">Number of points of letter sample trajectory
<inline-formula>
<mml:math id="M70">
<mml:mrow>
<mml:mover accent="true">
<mml:mrow>
<mml:mi mathvariant="bold">x</mml:mi>
</mml:mrow>
<mml:mo>´</mml:mo>
</mml:mover>
</mml:mrow>
</mml:math>
</inline-formula>
before approximation </td>
<td align="center" rowspan="1" colspan="1">
<inline-formula>
<mml:math id="M71">
<mml:mover accent="true">
<mml:mrow>
<mml:mi>m</mml:mi>
</mml:mrow>
<mml:mo>-</mml:mo>
</mml:mover>
<mml:mo>=</mml:mo>
<mml:mn mathvariant="normal">266.8</mml:mn>
</mml:math>
</inline-formula>
</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">
<italic>n</italic>
</td>
<td align="left" rowspan="1" colspan="1">Number of points of a approximated sample
<bold>x</bold>
</td>
<td align="center" rowspan="1" colspan="1">25</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">
<italic>ς</italic>
</td>
<td align="left" rowspan="1" colspan="1">Controlling the space between words </td>
<td align="center" rowspan="1" colspan="1">user defined</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">
<italic>α</italic>
<sub>
<italic>r</italic>
</sub>
</td>
<td align="left" rowspan="1" colspan="1">Word rotation </td>
<td align="center" rowspan="1" colspan="1">±45°</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">
<italic>α</italic>
<sub>
<italic>s</italic>
</sub>
</td>
<td align="left" rowspan="1" colspan="1">Word slant </td>
<td align="center" rowspan="1" colspan="1">±45°</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">
<italic>ϖ</italic>
</td>
<td align="left" rowspan="1" colspan="1">Controlling the sharpness of synthesis contours </td>
<td align="center" rowspan="1" colspan="1">0–10</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">
<italic>ω</italic>
<sub>
<italic>P</italic>
</sub>
</td>
<td align="left" rowspan="1" colspan="1">Width of synthesized lines in points </td>
<td align="center" rowspan="1" colspan="1">1–10</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="tab3" orientation="portrait" position="float">
<label>Table 3</label>
<caption>
<p>Syntheses using ASMs and sample based glyphs of writer 1. </p>
</caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th align="left" rowspan="1" colspan="1">
<inline-formula>
<mml:math id="M72">
<mml:msub>
<mml:mrow>
<mml:mi>σ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>A</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>~</mml:mo>
<mml:mover accent="false">
<mml:mrow>
<mml:mo stretchy="false">|</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>c</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>j</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo stretchy="false">|</mml:mo>
</mml:mrow>
<mml:mo>¯</mml:mo>
</mml:mover>
<mml:msqrt>
<mml:msub>
<mml:mrow>
<mml:mi>λ</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:msqrt>
</mml:math>
</inline-formula>
</th>
<th align="center" rowspan="1" colspan="1"> Result</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" rowspan="1" colspan="1">0</td>
<td align="center" rowspan="1" colspan="1">
<inline-graphic xlink:href="TSWJ2015-323575.tab3.i001.jpg"></inline-graphic>
</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">1</td>
<td align="center" rowspan="1" colspan="1">
<inline-graphic xlink:href="TSWJ2015-323575.tab3.i002.jpg"></inline-graphic>
</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">2</td>
<td align="center" rowspan="1" colspan="1">
<inline-graphic xlink:href="TSWJ2015-323575.tab3.i003.jpg"></inline-graphic>
</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">3</td>
<td align="center" rowspan="1" colspan="1">
<inline-graphic xlink:href="TSWJ2015-323575.tab3.i004.jpg"></inline-graphic>
</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Samples </td>
<td align="center" rowspan="1" colspan="1">
<inline-graphic xlink:href="TSWJ2015-323575.tab3.i005.jpg"></inline-graphic>
</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="tab4" orientation="portrait" position="float">
<label>Table 4</label>
<caption>
<p>Validation of the segmentation method. </p>
</caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th align="left" rowspan="1" colspan="1"> Database </th>
<th align="center" colspan="2" rowspan="1"> IESK-arDB </th>
<th align="center" colspan="2" rowspan="1"> IESK-arDB-Syn</th>
</tr>
<tr>
<th align="left" rowspan="1" colspan="1">Number of word samples </th>
<th align="center" colspan="2" rowspan="1"> 2540 </th>
<th align="center" colspan="2" rowspan="1"> 9000 </th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" rowspan="1" colspan="1">Measure </td>
<td align="center" rowspan="1" colspan="1">
<italic>μ</italic>
</td>
<td align="center" rowspan="1" colspan="1">
<italic>σ</italic>
</td>
<td align="center" rowspan="1" colspan="1">
<italic>μ</italic>
</td>
<td align="center" rowspan="1" colspan="1">
<italic>σ</italic>
</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Error per word </td>
<td align="center" rowspan="1" colspan="1"> 1.67 </td>
<td align="center" rowspan="1" colspan="1"> 0.13 </td>
<td align="center" rowspan="1" colspan="1"> 1.74 </td>
<td align="center" rowspan="1" colspan="1"> 0.024 </td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Error per letter </td>
<td align="center" rowspan="1" colspan="1"> 0.35 </td>
<td align="center" rowspan="1" colspan="1"> 0.026 </td>
<td align="center" rowspan="1" colspan="1"> 0.34 </td>
<td align="center" rowspan="1" colspan="1"> 0.0045 </td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Over segmentation (per word) </td>
<td align="center" rowspan="1" colspan="1"> 0.79 </td>
<td align="center" rowspan="1" colspan="1"> 0.097 </td>
<td align="center" rowspan="1" colspan="1"> 0.86 </td>
<td align="center" rowspan="1" colspan="1"> 0.0066</td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Under segmentation (per word) </td>
<td align="center" rowspan="1" colspan="1"> 0.87 </td>
<td align="center" rowspan="1" colspan="1"> 0.071 </td>
<td align="center" rowspan="1" colspan="1"> 0.88 </td>
<td align="center" rowspan="1" colspan="1"> 0.019 </td>
</tr>
<tr>
<td align="left" rowspan="1" colspan="1">Perfect segmentation (per word) </td>
<td align="center" rowspan="1" colspan="1"> 0.17 </td>
<td align="center" rowspan="1" colspan="1"> 0.0019 </td>
<td align="center" rowspan="1" colspan="1"> 0.13 </td>
<td align="center" rowspan="1" colspan="1"> 0.0067 </td>
</tr>
</tbody>
</table>
</table-wrap>
</floats-group>
</pmc>
</record>

Pour manipuler ce document sous Unix (Dilib)

EXPLOR_STEP=$WICRI_ROOT/Ticri/CIDE/explor/OcrV1/Data/Pmc/Curation
HfdSelect -h $EXPLOR_STEP/biblio.hfd -nk 000019 | SxmlIndent | more

Ou

HfdSelect -h $EXPLOR_AREA/Data/Pmc/Curation/biblio.hfd -nk 000019 | SxmlIndent | more

Pour mettre un lien sur cette page dans le réseau Wicri

{{Explor lien
   |wiki=    Ticri/CIDE
   |area=    OcrV1
   |flux=    Pmc
   |étape=   Curation
   |type=    RBID
   |clé=     PMC:4534626
   |texte=   ASM Based Synthesis of Handwritten Arabic Text Pages
}}

Pour générer des pages wiki

HfdIndexSelect -h $EXPLOR_AREA/Data/Pmc/Curation/RBID.i   -Sk "pubmed:26295059" \
       | HfdSelect -Kh $EXPLOR_AREA/Data/Pmc/Curation/biblio.hfd   \
       | NlmPubMed2Wicri -a OcrV1 

Wicri

This area was generated with Dilib version V0.6.32.
Data generation: Sat Nov 11 16:53:45 2017. Site generation: Mon Mar 11 23:15:16 2024