<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Morten Jønsson</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hans Heinrich Bothe</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Centre for Applied Hearing Research (CAHR), Oersted DTU, Technical University of Denmark</institution>
          ,
          <addr-line>DTU</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Informatics and Mathematical Modelling, Technical University of Denmark</institution>
          ,
          <addr-line>DTU</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2007</year>
      </pub-date>
      <abstract>
        <p>The OCR-algorithm (optical character recognition) described in this paper is a module in the assistive device SubPal, which should be able to read subtitles from television and camera aloud. The SubPal system is described in detail in (Nielsen &amp; Bothe, 2007). By sampling the television signal (PAL) a binary image is created. This binary image is analysed using the OCR-algorithm for generating text-strings that can be passed on to a speech synthesis box. The requirements and the implementation of the OCR are discussed and some initial results are presented. The algorithm is developed with the purpose of later being implemented in hardware (FPGA).</p>
      </abstract>
      <kwd-group>
        <kwd>optical character recognition</kwd>
        <kwd>subtitles</kwd>
        <kwd>visually impaired people</kwd>
        <kwd>dyslexic</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Interviews with both visually impaired people and dyslexic have revealed, that a large group is cut off
from full understanding of the visual media (television, DVD, VHS, cinemas), when this is given in a
language that they are not comfortable with. Even if a visual impaired person is able to grasp the
overall content of the screen they are unable to read the subtitles. A solution to this is presented in the
paper
        <xref ref-type="bibr" rid="ref6">(Nielsen &amp; Bothe, 2007)</xref>
        , from this it is clear that a versatile, fast and robust OCR (optical
character recognition) is necessary. For a sufficient detection speed this OCR should be implemented
in hardware (FPGA). Since a commercial hardware OCR is not on the market, we will in this paper
show the initial steps towards such an OCR algorithm.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. OCR Requirements</title>
      <p>
        Before going into detail with the modules of the OCR, we asses the overall requirements that should
be considered with respect to the application (described in
        <xref ref-type="bibr" rid="ref6">(Nielsen &amp; Bothe, 2007)</xref>
        ).
1 Implying that the speech synthesizer meets the time requirements imposed on the system.
•
•
      </p>
      <p>Adaptive – the font differ from channel to channel depending on the subtitling company. The
algorithm should be versatile enough to encounter for this. Noisy backgrounds (e.g. white
Tshirt behind subtitles), should not reduce the detection rate significantly.</p>
      <p>
        Orientation – the spatial orientation of the image should be transparent to the algorithm.
Commercial OCR-solution have been surveyed, but the majority of the available OCR-solutions
targets the software market and depends on a specific operating system and hardware-architecture,
which imposes additional overhead with respect to performance. The OCR discussed in this paper is
intentioned for the portable device described in
        <xref ref-type="bibr" rid="ref6">(Nielsen &amp; Bothe, 2007)</xref>
        , and must comply with the
necessary speed of response implying that a special purpose hardware is feasible e.g. a FPGA2.
Since we have not found such on chip OCR-solution, we will instead develop this from scratch by first
looking into optimal character recognition algorithms which is the objective of this paper. Further
studies are left for implementing the algorithm on an FPGA. Although the existing commercial
OCRsolutions are not relevant for this device, we can use them as a benchmark to compare how effective
the developed algorithm is.
      </p>
      <p>In the following sections we will look into the design of such an OCR.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Overview of OCR Modules</title>
      <p>
        The task of recognising characters in television as well as
cinema can be divided into the modules illustrated in figure
1. This division is consistent with the standard approach
used in OCR-systems
        <xref ref-type="bibr" rid="ref8">(Trier &amp; Torfinn, 1996)</xref>
        .
      </p>
      <p>First of all the raw signal from the composite video signal
is sampled to create a binary image, from which the
subtitles can be extracted. When using the signal from the
camera it is also necessary with some spatial adjustment
to ensure that the lines of text are horizontal in the image,
which is a precondition for our OCR-algorithm. Next the
binary image is prefiltered to remove noise and enhance
characteristic features. After the optimal filtering the image
can be divided into separate lines, words and letters.
Each of these characteristic features, statistical or
semantic, are detected and compared with an already
existing database (based upon training set). After
choosing the most likely letters in a given word, the word
can be compared with a dictionary lookup, to verify if the
letter combination is likely.</p>
      <p>Each processing step will be explained in more detail in
the following sections.
2 Field Programmable Gate Array</p>
    </sec>
    <sec id="sec-4">
      <title>4. Sampling Module</title>
      <p>
        The images used for the character recognition are created by sampling the composite signal from the
television/video camera using a Tektronix TDS1002 oscilloscope and applying a threshold. This is
described in more detail in
        <xref ref-type="bibr" rid="ref6">(Nielsen &amp; Bothe, 2007)</xref>
        . An example of the resulting binary image is
shown figure 2.
      </p>
    </sec>
    <sec id="sec-5">
      <title>5. Spatial Adjustments</title>
      <p>
        In the case where the images come from the CCD video camera, it will often be necessary to carry out
some minor spatial adjustments, since our later described feature extraction is not rotational invariant.
The subtitles consist of one or two lines of densely packed letters with the same orientation. This
a’priori knowledge can be used for finding the rotation of the image, which maximizes the horizontal
sum in the frame (corresponding to a horizontal orientation of the subtitles). Another approach would
be to use a rotation invariant feature extraction, such as Transformation Ring Projection
        <xref ref-type="bibr" rid="ref7">(Tang, 1991)</xref>
        .
      </p>
    </sec>
    <sec id="sec-6">
      <title>6. Preprocessing</title>
      <p>
        The success of the OCR-algorithm depends on the initial filtering. The aim of this filtering and
segmentation is to separate the text into separate letters and at the same time make sure that each
letter is as characteristic as possible. To begin with we lowpass-filter the image to remove high
frequency noise which was not removed in the sampleprocess, further more we use dilation3 to avoid
that letters are being divided into several regions (see
        <xref ref-type="bibr" rid="ref4">(Carstensen, 2002)</xref>
        ,
        <xref ref-type="bibr" rid="ref5">(Horn, 1986)</xref>
        for further
details and figure 4 and 5 for illustration). The dilation is done with a structuring element consisting of
two horizontal pixels. This ensures that errors that would separate letters into several regions are
corrected, without influencing the characteristic appearance of the letter considerably (illustrated in
figure 3).
      </p>
      <p>With the optimal preconditions given the lines can then be separated by simply detecting minimas in
the horizontal projections. By looking at the vertical projections instead each line can be separated into
words and letters (see figure 6). After the segmentation each letter is mapped into fixed height and
width, thereby making it comparable with the letters in the database, when extracting the features.</p>
    </sec>
    <sec id="sec-7">
      <title>7. Feature Extraction</title>
      <p>
        To compare each region with our database we need to extract relevant features. We use a
combination of simple statistical and semantic features, which minimize the amount of calculations.
The statistical features are relations between area, width/height, background/foreground and the 1st
order moment. Furthermore the horizontal and vertical projections (see figure 9) are used. A way to
reduce the data from the horizontal and vertical projection is to do a Fourier transform of the rowsums
as described in
        <xref ref-type="bibr" rid="ref3">(Bourbakis, 1991)</xref>
        , but with our low resolution it is sufficient to use the sums directly.
Before calculating the projections (row- and column-sums ) the letter is mapped into a fixed size using
bicubic interpolation
        <xref ref-type="bibr" rid="ref4">(Carstensen, 2002)</xref>
        .
      </p>
      <p>
        Our semantic method detects holes, feet, heads and arms in the letters as illustrated in figure 8. An
improvement could be to further more use feature point extraction for detection of intersections and
corners (see
        <xref ref-type="bibr" rid="ref2">(Brown, 1992)</xref>
        for details).
      </p>
    </sec>
    <sec id="sec-8">
      <title>8. Classification</title>
      <p>The horizontal and vertical projections are compared with the database using crosscorrelation.
When comparing the statistical features such as height/width-ratio, foreground/background, area and
first order moment, a normal distribution is assumed. For each letter the mean of this distribution is
given in the database, while the variance is chosen for optimal detection. An extracted feature such as
the pixelarea can now be checked towards the distribution of each letter and a probability can be
calculated (see figure 7). The results from the projections and the other statistics is finally combined
and the most likely letter is chosen. Afterwards the semantical features are used for correction of the
most likely misclassifications.</p>
    </sec>
    <sec id="sec-9">
      <title>9. Verification</title>
      <p>
        Even with a good detection rate of each letter, errors will occur from time to time. To cater for these,
each word is checked with a dictionary, containing the most common words. If the word is not present,
the most likely match is chosen, e.g. by finding the word with most letters in the correct position. It is
then evaluated which of the 2 words is the most likely, based on the probabilities from the
classification. The dictionary lookup is done using the large English database WordNet® (see
reference
        <xref ref-type="bibr" rid="ref1">(Anon, 2006)</xref>
        for information on license). It contain more than 200.000 nouns, verbs,
adjectives and adverbs in all conjugations. e.g. Run, ran, running, runs, house, houses, housing ...
We combine this with a database containing words not included in WordNet®, such as pronouns,
prepositions etc.
With the binary images created by sampling of the television signal using oscilloscope, we get a letter
detection rate of 95%, when using the same type of font in the trainingset and the testset. By using a
commercial OCR4 on a resized version of the subtitles we obtain a detectionrate of 96%. With the
present solution the database is created using only one type of subtitle font and is therefore only
optimal when the same type of font is presented, while the commercial approach produces similar
results independent on the font.
      </p>
      <p>The aim of these considerations is to obtain an implementation in hardware for optimal response times
and optimal power consumption. Further work is necessary to make the OCR more versatile, fulfilling
the requirements laid out in section 2. A possibility for doing this could be to implement the
classification by using an associative neural network.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Anon</surname>
          </string-name>
          (
          <year>2006</year>
          ).
          <source>WordNet 3</source>
          .0, Princeton University, http://wordnet.princeton.edu/
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <string-name>
            <surname>Brown</surname>
            ,
            <given-names>E.W.</given-names>
          </string-name>
          (
          <year>1992</year>
          ).
          <article-title>Character recognition by feature point extraction</article-title>
          , Northeastern University internal paper
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <string-name>
            <surname>Bourbakis</surname>
            ,
            <given-names>N.G</given-names>
          </string-name>
          and
          <string-name>
            <surname>A. T. Gumahad</surname>
            ,
            <given-names>II</given-names>
          </string-name>
          (
          <year>1991</year>
          ).
          <article-title>Knowledge-based recognition of typed text characters</article-title>
          ,
          <source>International Journal of pattern Recognition</source>
          , vol.
          <volume>5</volume>
          (
          <issue>1-2</issue>
          ), pp.
          <fpage>293</fpage>
          -
          <lpage>310</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <string-name>
            <surname>Carstensen</surname>
            ,
            <given-names>J.M</given-names>
          </string-name>
          (
          <year>2002</year>
          ).
          <article-title>Image analysis, vision</article-title>
          and computer graphics, Technical University of Denmark
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <string-name>
            <surname>Horn</surname>
            ,
            <given-names>B.K.P</given-names>
          </string-name>
          (
          <year>1986</year>
          )
          <article-title>Robot Vision</article-title>
          , The MIT Press
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <string-name>
            <surname>Nielsen</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          and
          <string-name>
            <given-names>H.H.</given-names>
            <surname>Bothe</surname>
          </string-name>
          (
          <year>2007</year>
          )
          <article-title>SubPal: A device for reading aloud subtitles from television and cinema</article-title>
          , CVHI conference.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <string-name>
            <surname>Tang</surname>
            ,
            <given-names>Y.Y</given-names>
          </string-name>
          (
          <year>1991</year>
          )
          <article-title>Transformation-ring-projection (TRP) algorithm</article-title>
          and VLSI implementation,
          <source>International Journal of Pattern Recognition</source>
          , vol.
          <volume>5</volume>
          (
          <issue>1-2</issue>
          ), PP.
          <fpage>25</fpage>
          -
          <lpage>56</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <string-name>
            <surname>Trier</surname>
          </string-name>
          , Ø.D,
          <string-name>
            <surname>A.K. Jain</surname>
            and
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Torfinn</surname>
          </string-name>
          (
          <year>1996</year>
          ).
          <article-title>Feature extraction methods for character recognition - a survey, Pattern Recognition</article-title>
          , vol.
          <volume>29</volume>
          (
          <issue>4</issue>
          ), pp.
          <fpage>641</fpage>
          -
          <lpage>662</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <article-title>4 Abbyy FineReader 8.0 Professional edition</article-title>
          . http://buy.abbyy.com/content/frpro/default.aspx 6
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>