DE19953610A1 - Font detection device for optical character recognition system selects system font from table whose width best corresponds to width of font in image - Google Patents

Font detection device for optical character recognition system selects system font from table whose width best corresponds to width of font in image

Info

Publication number
DE19953610A1
DE19953610A1 DE19953610A DE19953610A DE19953610A1 DE 19953610 A1 DE19953610 A1 DE 19953610A1 DE 19953610 A DE19953610 A DE 19953610A DE 19953610 A DE19953610 A DE 19953610A DE 19953610 A1 DE19953610 A1 DE 19953610A1
Authority
DE
Germany
Prior art keywords
font
image
metrics
text
width
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
DE19953610A
Other languages
German (de)
Inventor
Raymond W Smith
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
HP Inc
Original Assignee
Hewlett Packard Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hewlett Packard Co filed Critical Hewlett Packard Co
Publication of DE19953610A1 publication Critical patent/DE19953610A1/en
Withdrawn legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/24Character recognition characterised by the processing or recognition method
    • G06V30/242Division of the character sequences into groups prior to recognition; Selection of dictionaries
    • G06V30/244Division of the character sequences into groups prior to recognition; Selection of dictionaries using graphical properties, e.g. alphabet type or font
    • G06V30/245Font recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Character Discrimination (AREA)

Abstract

The device includes a logic circuit (100) which receives an image including text characters. A logic circuit estimates the point size of the font using a number of font metrics (110,120) corresponding to a system font contained in a table (110,120) including font metrics and inverse font metrics. The logic circuit calculates a scaling factor based on the estimated point size. A logic circuit compares a width of the font in the image with the widths of each system font in the table. The system font that corresponds best to the width of the font in the image is selected. Independent claims are included for a method of determining the font of some text in an image, and an apparatus for detecting the font in an OCR system.

Description

Die vorliegende Erfindung bezieht sich allgemein auf die optische Zeichenerkennung und insbesondere auf eine Vorrich­ tung und ein Verfahren zum schnellen und effizienten Bestim­ men eines Textfonts in einem optischen Zeichenerkennungs- (OCR-; OCR = Optical Character Recognition) System.The present invention relates generally to optical character recognition and especially on a Vorrich and a method for quick and efficient determination text font in an optical character recognition (OCR-; OCR = Optical Character Recognition) system.

Die optische Erkennungstechnologie wird in Abtastgeräten verwendet, um ein gedrucktes Dokument abzutasten und dassel­ be in ein elektronisch editierbares Format umzuwandeln. Ty­ pischerweise wird ein Benutzer ein Dokument mit einem Scan­ ner abtasten, der an einem Rechner angebracht ist. Der Rech­ ner umfaßt eine Software, die das abgetastete Bild interpre­ tiert, das Bild in eine Textdatei umwandelt und den Text dann dem Benutzer in einer editierbaren elektronischen Form präsentiert.Optical detection technology is used in scanning devices used to scan a printed document and the like be converted into an electronically editable format. Ty Typically, a user will scan a document feel that is attached to a computer. The rech ner includes software that interprets the scanned image animals, the image is converted into a text file and the text then to the user in an editable electronic form presents.

Bestimmte OCR-Einrichtung, die Teil bestimmter OCR-Systeme sind, umfassen einen begrenzten Grad an Fonterkennungsfähig­ keiten. Typischerweise wählen sie nur zwischen ein paar Fonts aus, und zwar basierend darauf, ob der Text einen fe­ sten Zeichenzwischenraum hat oder proportional ist, und ob der Text Serifen hat oder keine Serifen hat. Ein Nachteil eines solchen Systems besteht darin, daß die Reproduktion eines Ursprungsdokuments auf eine Art und Weise nicht möglich ist, die gleichmäßig und genau das ursprüngliche Layout des Dokuments bewahren kann. Dies ist der Fall, da unterschiedliche Fonts unterschiedliche Charakteristiken haben, die unterschiedliche Mengen an Raum auf einer Seite einnehmen, salbst wenn die gleiche Zeichengröße verwendet wird. Unterschiedliche Fonts verbrauchen variierende Mengen an horizontalem Raum, was dazu führt, daß die Textzeilen an unterschiedlichen Plätzen umbrechen. Folglicherweise werden Absätze eines abgetasteten Dokuments, die ohne Textfonter­ kennungsfähigkeiten verarbeitet werden, nicht dieselbe Anzahl von Zeilen wie im Ursprungsdokument haben. Diese Situation verhindert die genaue Reproduktion eines abge­ tasteten Dokuments durch bekannte optische Zeichenerken­ nungspakete.Specific OCR facility that is part of certain OCR systems include a limited degree of detection capability keiten. They typically only choose between a few Fonts based on whether the text has a fe most space between characters or is proportional, and whether the text has or has no serifs. A disadvantage of such a system is that reproduction of an original document in one way or another is possible that is evenly and exactly the original Can preserve the layout of the document. This is the case there different fonts different characteristics have different amounts of space on one side ingest even when using the same character size becomes. Different fonts consume varying amounts in horizontal space, which causes the lines of text to break different places. Consequently  Paragraphs of a scanned document without a text window skills are processed, not the same Number of lines as in the original document. This Situation prevents the exact reproduction of an abge scanned document by known optical character recognition packages.

In der Vergangenheit verwendeten bestimmte OCR-Einrichtungen die Zeichenerkennung, um Zeichen in einem Bild zu erkennen, sie hatten jedoch einen begrenzten Erfolg darin, einen spe­ ziellen Textfont zu erkennen und zu identifizieren. Ferner verhindert die Zuverlässigkeit eines Abtastsystems bei der OCR-Zeichenerkennungsfähigkeit ernsthaft den Betrieb des Sy­ stems als Ganzes.Certain OCR devices have been used in the past character recognition to recognize characters in an image, however, they had limited success in making one Recognize and identify the target text font. Further prevents the reliability of a scanning system in the OCR character recognition capability seriously affects the operation of the Sy stems as a whole.

Die Aufgabe der vorliegenden Erfindung besteht darin, ein Konzept zum schnellen und genauen Bestimmen des Fonts eines Texts in einem abgetasteten Dokument zu schaffen, so daß das Dokument genau reproduziert werden kann.The object of the present invention is a Concept for quickly and accurately determining the font of a To create text in a scanned document so that the Document can be reproduced accurately.

Diese Aufgabe wird durch eine Vorrichtung zum Erkennen des Fonts eines Texts nach Patentanspruch 1, ein Verfahren zum Bestimmen des Fonts eines Texts nach Patentanspruch 5, und eine Vorrichtung zum Erkennen des Fonts eines Texts nach Patentanspruch 9 gelöst.This task is accomplished by a device for recognizing the Fonts of a text according to claim 1, a method for Determining the font of a text according to claim 5, and a device for recognizing the font of a text Claim 9 solved.

Die vorliegende Erfindung liefert eine Vorrichtung und ein Verfahren zum schnellen Bestimmen des Textfonts in einem Textbild.The present invention provides an apparatus and an Method for quickly determining the text font in one Text image.

Architekturmäßig kann die vorliegende Erfindung als Vorrich­ tung zum Erkennen des Fonts eines Texts mit folgenden Merk­ malen dargestellt werden: einer Logik, die konfiguriert ist, um ein Bild in einem Fontbestimmungssystem zu empfangen, wo­ bei das Bild Textzeichen umfaßt, die einen Font in dem Bild darstellen, und einer Logik, die konfiguriert ist, um eine Punktgröße für den Font in dem Bild zu bestimmen, indem eine Mehrzahl von Fontmetriken verwendet wird, wobei die Font­ metriken ebenfalls zumindest einem Systemfont entsprechen, der in einer Tabelle enthalten ist, wobei die Tabelle die Fontmetriken und inverse Fontmetriken enthält, wobei die Fontmetriken eine Breite für jeden Systemfont in der Tabelle umfassen. Die Erfindung umfaßt ferner eine Logik, die konfi­ guriert ist, um einen Skalierungsfaktor unter Verwendung der geschätzten Punktgröße zu berechnen, wobei der Skalierungs­ faktor der Punktgröße entspricht, und wobei der Skalierungs­ faktor in einem Absatz des Bilds gemittelt ist, und wobei die Logik konfiguriert ist, um eine Breite des Fonts in dem Bild mit den Breiten von jedem Systemfont in der Tabelle zu vergleichen, wobei die Logik konfiguriert ist, um zumindest einen Systemfont aus der Tabelle auszuwählen, der mit der Breite des Fonts am ehesten übereinstimmt.Architecturally, the present invention can be used as a device to recognize the font of a text with the following note paint: a logic that is configured to receive an image in a font determination system where the image includes text characters that represent a font in the image represent, and logic configured to a Determine the point size for the font in the image by using a Majority of font metrics is used, the font  metrics also correspond to at least one system font, which is contained in a table, the table being the Contains font metrics and inverse font metrics, where the Font metrics a width for each system font in the table include. The invention also includes logic that is confi is gured to use a scaling factor to calculate estimated point size, taking the scaling factor corresponds to the point size, and being the scaling factor is averaged in a paragraph of the image, and wherein the logic is configured to match a width of the font in the Image with the widths of each system font in the table compare, with the logic configured to at least select a system font from the table that matches the Width of the font most closely matches.

Die vorliegende Erfindung kann ebenfalls als Verfahren zum Bestimmen des Fonts eines Texts in einem Bild dargestellt werden, das folgende Schritte aufweist: Empfangen eines Bilds in einem Fontbestimmungssystem, wobei das Bild Text­ zeichen enthält, die einen Font in dem Bild darstellen; Schätzen einer Punktgröße für den Font in dem Bild unter Verwendung einer Mehrzahl von Fontmetriken, wobei die Font­ metriken ebenfalls zumindest einem Systemfont entsprechen, der in einer Tabelle enthalten ist, wobei die Tabelle die Fontmetriken und inversen Fontmetriken enthält, und wobei die Fontmetriken eine Breite für jeden Systemfont in der Tabelle enthalten; Berechnen eines Skalierungsfaktors unter Verwendung der geschätzten Punktgröße, wobei der Skalie­ rungsfaktor der Punktgröße entspricht und in einem Absatz des Bildes gemittelt ist; Vergleichen einer Breite des Fonts in dem Bild mit den Breiten von jedem Systemfont in der Tabelle; und Auswählen zumindest eines Systemfonts aus der Tabelle, der mit der Breite des Fonts in dem Bild am ehesten übereinstimmt.The present invention can also be used as a method for Determine the font of a text displayed in an image that includes the steps of: Receiving a Image in a font determination system, the image being text contains characters representing a font in the image; Estimate a point size for the font in the image below Using a plurality of font metrics, the Font metrics also correspond to at least one system font, which is contained in a table, the table being the Contains font metrics and inverse font metrics, and where the font metrics a width for each system font in the Table included; Calculate a scaling factor under Use the estimated point size, being the scale factor corresponds to the point size and in one paragraph of the picture is averaged; Compare a width of the font in the image with the widths of each system font in the Table; and selecting at least one system font from the Table that most closely matches the width of the font in the image matches.

Die vorliegende Erfindung hat viele Vorteile, von denen ei­ nige beispielhaft dargelegt werden. The present invention has many advantages, ei Nige are exemplified.  

Ein Vorteil der vorliegenden Erfindung besteht darin, daß sie die schnelle Bestimmung eines Textfonts in einem Text­ bild ermöglicht.An advantage of the present invention is that the quick determination of a text font in a text picture allows.

Ein weiterer Vorteil der Erfindung besteht darin, daß sie die Bestimmung eines Textfonts unter Verwendung von Minimal­ informationen aus einer optischen Zeichenerkennungseinrich­ tung erlaubt.Another advantage of the invention is that it the determination of a text font using minimal information from an optical character recognition device tion allowed.

Ein weiterer Vorteil der vorliegenden Erfindung besteht dar­ in, daß sie unabhängig von einer Einrichtung zur optischen Zeichenerkennung implementiert werden kann.Another advantage of the present invention is in that they are independent of any optical device Character recognition can be implemented.

Ein weiterer Vorteil der Erfindung besteht darin, daß sie im Entwurf einfach ist und in großen Stückzahlen für eine kom­ merzielle Produktion ohne weiteres implementiert werden kann.Another advantage of the invention is that it Design is simple and in large quantities for a com commercial production can be easily implemented can.

Bevorzugte Ausführungsbeispiele der vorliegenden Erfindung werden nachfolgend bezugnehmend auf die beiliegenden Zeich­ nungen detailliert erläutert. Es zeigen:Preferred embodiments of the present invention are referred to below with reference to the attached drawing explained in detail. Show it:

Fig. 1 ein Blockdiagramm, das ein Computersystem dar­ stellt, das die Fontbestimmungslogik der vorliegen­ den Erfindung umfaßt;Comprising 1 is a block diagram that illustrates a computer system is the Font determination logic of the present the invention.

Fig. 2 ein Blockdiagramm, das die Fontbestimmungslogik von Fig. 1 näher darstellt; FIG. 2 is a block diagram that further illustrates the font determination logic of FIG. 1;

Fig. 3 eine schematische Ansicht, die Fontmetriken von zwei unterschiedlichen Fonts darstellt; Fig. 3 represents a schematic view, the metrics of two different fonts;

Fig. 4 ein Flußdiagramm, das den Betrieb der vorliegenden Erfindung darstellt; und Figure 4 is a flow chart illustrating the operation of the present invention; and

Fig. 5A und 5B schematische Ansichten, die gemeinsam die Auswirkung der Zeichenbegrenzungskästen und Wortbe­ grenzungskästen auf die Fontbestimmungslogik von Fig. 2 darstellen. Fig. 5A and 5B are schematic views that together represent the effect of the character bounding boxes and Wortbe grenzungskästen to the font determination logic of FIG. 2.

Es sei darauf hingewiesen, daß die Komponenten in den Zeich­ nungen nicht notwendigerweise maßstabsgerecht sind, sondern daß darauf Wert gelegt wurde, die Prinzipien der vorliegen­ den Erfindung herauszustellen.It should be noted that the components in the drawing are not necessarily to scale, but that emphasis was placed on the principles of the present to highlight the invention.

Das Fontbestimmungsprogramm der vorliegenden Erfindung kann in Hardware, Software, Firmware oder einer Kombination der­ selben implementiert sein. Bei dem bevorzugten Ausführungs­ beispiel bzw. den bevorzugten Ausführungsbeispielen ist das Fontbestimmungsprogramm in Software oder Firmware implemen­ tiert, die in einem Speicher gespeichert ist, und die durch ein geeignetes Befehlsausführungssystem ausgeführt wird.The font designation program of the present invention can in hardware, software, firmware or a combination of the same implemented. In the preferred embodiment example or the preferred embodiments is Implement the font determination program in software or firmware tiert, which is stored in a memory, and by an appropriate command execution system is executed.

Bezugnehmend auf die Zeichnungen stellt Fig. 1 ein Blockdia­ gramm dar, das ein Computersystem zeigt, das die Fontbestim­ mungslogik 100 der vorliegenden Erfindung aufweist. Ein Com­ puter 15 kann irgendein Rechner sein, der in der Lage ist, die Logik der vorliegenden Erfindung auszuführen. Beispiels­ weise kann der Computer 15 ein Personalcomputersystem sein. Ein Scanner 14 ist mit dem Computersystem 15 verbunden. Der Scanner 14 kann, wie es bekannt ist, verwendet werden, um ein Bild auf einer gedruckten Seite in ein elektronisch les­ bares Format umzuwandeln. Beispielsweise kann der Scanner 14 eine Textseite abtasten, wodurch ein gescanntes Bild erzeugt wird, und dann nach einiger Weiterverarbeitung das Textbild erkennen und in Textzeichen in einem elektronisch lesbaren Format umwandeln. Der Computer 15 umfaßt ferner eine Benut­ zerschnittstelle 16, die dem Dokumentenerfassungssystem 36 zugeordnet ist, wobei die Fontbestimmungslogik 100 der vor­ liegenden Erfindung einen Teil desselben bildet. Ferner ist die Fontbestimmungslogik 100 aus Klarheitsgründen als dis­ kretes Element gezeigt. Dieselbe kann auch innerhalb des Do­ kumentenerkennungssystems integral enthalten sein.Referring to the drawings, FIG. 1 is a block diagram showing a computer system that includes the font determination logic 100 of the present invention. A computer 15 may be any computer capable of executing the logic of the present invention. For example, computer 15 may be a personal computer system. A scanner 14 is connected to the computer system 15 . The scanner 14 , as is known, can be used to convert an image on a printed page to an electronically readable format. For example, the scanner 14 can scan a page of text, creating a scanned image, and then, after some further processing, recognize the text image and convert it to text characters in an electronically readable format. The computer 15 further includes a user interface 16 associated with the document capture system 36 , the font determination logic 100 of the present invention forming part of the same. Furthermore, the font determination logic 100 is shown as a discrete element for reasons of clarity. The same can also be integrated within the document recognition system.

Der Computer 15 umfaßt ferner einen Wortprozessor 38 und ei­ ne Wortprozessorbenutzerschnittstelle 33, die mit dem Mikro­ prozessor 18 über eine logische Schnittstelle 21 kommuni­ ziert. Die Logikschnittstelle 21 soll den Kommunikationsbus darstellen, der Komponenten innerhalb des Computers 15 ver­ bindet. Dieselbe ist aus Einfachheitsgründen lediglich frag­ mentarisch dargestellt. Ein optisches Zeichenerkennungssy­ stem 19 ist ferner enthalten und in Kommunikation mit der logischen Schnittstellen 21. Das System 19 zur optischen Zeichenerkennung kann, obwohl es als unabhängiges Element dargestellt ist, als Teil des Dokumentenerkennungssystems 36 modular implementiert sein. Ein Dokumentenspeichergerät 39 ist zwischen dem Dokumentenerkennungssystem 36 und dem Wort­ prozessor 38 positioniert. Der Wortprozessor 38 stellt ein typisches Anwendungsprogramm dar, das die Ausgabe des Doku­ mentenerkennungssystems 36 verwenden kann.The computer 15 further includes a word processor 38 and egg ne word processor user interface 33 which communicates with the microprocessor 18 via a logic interface 21 . The logic interface 21 is intended to represent the communication bus that binds components within the computer 15 . For the sake of simplicity, it is only shown in fragments. An optical character recognition system 19 is also included and in communication with the logic interfaces 21 . The system 19 for optical character recognition, although shown as an independent element, can be implemented modularly as part of the document recognition system 36 . A document storage device 39 is positioned between the document recognition system 36 and the word processor 38 . Word processor 38 is a typical application program that can use the output of document recognition system 36 .

Ein Speichergerät 22 und die Fontbestimmungslogik 100 gemäß der vorliegenden Erfindung sind ebenfalls über die logische Schnittstelle 21 in Verbindung. Gemäß einem Aspekt der vor­ liegenden Erfindung umfaßt das Speichergerät 22 ferner eine Umwandlungsfaktortabelle 110, die eine Tabelle aus Fontme­ triken enthält, und eine Umwandlungsfaktortabelle 120, die eine Tabelle für inverse Fontmetriken enthält. Der Inhalt der Umwandlungsfaktortabelle 110 und der Umwandlungsfaktor­ tabelle 120 enthält Textbreiten- und Basisinformationen be­ züglich einer Mehrzahl von Fonts, was nachfolgend detail­ lierter beschrieben wird.A storage device 22 and the font determination logic 100 according to the present invention are also connected via the logic interface 21 . In one aspect of the present invention, storage device 22 further includes a conversion factor table 110 that contains a table of font metrics and a conversion factor table 120 that includes a table for inverse font metrics. The content of the conversion factor table 110 and the conversion factor table 120 contains text width and basic information relating to a plurality of fonts, which will be described in more detail below.

Der Scanner 14 kommuniziert mit dem Computer 15 über eine Verbindung 28, über die ein abgetastetes Bild 17 in den Com­ puter 15 übertragen wird. Das abgetastete Bild 17 wird dann über eine Verbindung 27 dem Dokumentenerkennungssystem 36 zugeführt. Das Dokumentenerkennungssystem 36 liefert die Da­ ten 17 des abgetasteten Bildes zu der OCR-Einrichtung 19 über eine Verbindung 41. Die OCR-Einrichtung 19 liefert die Eingabe für die Fontbestimmungslogik 100 gemäß der vorlie­ genden Erfindung in der Form von Begrenzungskästen über eine Verbindung 24 und Textzeichen über eine Verbindung 26. Die Textzeichen, die von der OCR-Einrichtung 19 zugeführt wer­ den, werden aus dem abgetasteten Bild erzeugt. Die Fontbe­ stimmungslogik 100 kommuniziert mit dem Speicher 22 und ins­ besondere mit der Umwandlungsfaktortabelle (Fontmetriken) 110 und der Umwandlungsfaktortabelle (inverse Fontmetriken) 120 über die Verbindung 13. Die Fontbestimmungslogik 100 liefert ihre Ausgabe zu dem Dokumentenerkennungssystem 36 über eine Verbindung 34 in der Form eines bestimmten Fonts, von Begrenzungskästen und Textzeichen. Wie es in der Technik bekannt ist, ist ein Begrenzungskasten das kleinste Recht­ eck, das ein spezielles Graphikelement vollständig umgeben kann.The scanner 14 communicates with the computer 15 via a connection 28, via which a scanned image is transmitted to the computer 17 Com 15 °. The scanned image 17 is then fed to the document recognition system 36 via a connection 27 . The document recognition system 36 supplies the data 17 of the scanned image to the OCR device 19 via a connection 41 . The OCR device 19 provides the input for the font determination logic 100 according to the present invention in the form of bounding boxes over a connection 24 and text characters over a connection 26 . The text characters that are supplied by the OCR device 19 are generated from the scanned image. The font determination logic 100 communicates with the memory 22 and in particular with the conversion factor table (font metrics) 110 and the conversion factor table (inverse font metrics) 120 via the connection 13 . The font determination logic 100 provides its output to the document recognition system 36 via a connection 34 in the form of a specific font, bounding boxes and text characters. As is known in the art, a bounding box is the smallest rectangle that can completely surround a particular graphic element.

Das Dokumentenerkennungssystem 36 nimmt die Ausgabe der Fontbestimmungslogik 100 und integriert diese Informationen mit einem zu präsentierenden Dokument (d. h. dem anzuzei­ genden abgetasteten Dokument), das über eine Verbindung 47 zu dem Dokumentenspeicher 39 kommuniziert werden kann, wo es über eine Verbindung 48 einem Wortprozessor 38 zur Anzeige über die Wortprozessorschnittstelle 33 verfügbar gemacht wird. Die Wortprozessorschnittstelle 33 sendet anzuzeigende Informationen über eine Verbindung 44 zur Anzeige 12. Alter­ nativ kann ein Dokument, das das abgetastete Bild enthält, und das die Ausgabe der Fontbestimmungslogik 100 enthält, von der Dokumenterkennungssystembenutzerschnittstelle 16 über eine Verbindung 46 zu der Anzeige 12 angezeigt werden. Alternativ können andere Textverarbeitungsanwendungen ver­ wendet werden, um die Informationen einem Endbenutzer anzu­ zeigen.The document recognition system 36 takes the output of the font determination logic 100 and integrates this information with a document to be presented (ie the scanned document to be displayed), which can be communicated via a connection 47 to the document memory 39 , where it is connected via a connection 48 to a word processor 38 Display via the word processor interface 33 is made available. The word processor interface 33 sends information to be displayed over a connection 44 to the display 12 . Alternatively, a document containing the scanned image and containing the output of the font determination logic 100 can be displayed by the document recognition system user interface 16 via a connection 46 to the display 12 . Alternatively, other word processing applications can be used to display the information to an end user.

Fig. 2 ist ein Blockdiagramm, das die Fontbestimmungslogik 100 von Fig. 1 detaillierter darstellt. Die Fontbestimmungs­ logik 100 umfaßt eine Fontgrößenberechnungslogik 130, eine Textgrößenberechnungslogik 140 und eine Abstandsberech­ nungslogik 150. Die Fontgrößenberechnungslogik 130 kommuni­ ziert mit der Umwandlungsfaktortabelle (inverse Fontmetri­ ken) 120 über die Verbindung 31 und die Textgrößenberech­ nungslogik 140 kommuniziert mit der Umwandlungsfaktortabelle (Fontmetriken) 110. Die Fontbestimmungslogik 100 empfängt eine Eingabe von der OCR-Einrichtung 19 in der Form von Be­ grenzungskästen über die Verbindung 24 und von Textzeichen über die Verbindung 26. Die Begrenzungskästen auf der Ver­ bindung 24 können die Form von Zeichenbegrenzungskästen oder Wortbegrenzungskästen annehmen und werden nachfolgend de­ tailliert beschrieben. Die Fontbestimmungslogik 100 liefert auf der Verbindung 34 den bestimmten Font plus der Begren­ zungskästen und der Textzeichen zu dem Dokumentenerkennungs­ system 36, wie es oben beschrieben wurde. FIG. 2 is a block diagram illustrating the font determination logic 100 of FIG. 1 in more detail. The font determination logic 100 includes a font size calculation logic 130 , a text size calculation logic 140 and a distance calculation logic 150 . Font size calculation logic 130 communicates with conversion factor table (inverse font metrics) 120 via connection 31 and text size calculation logic 140 communicates with conversion factor table (font metrics) 110 . Font determination logic 100 receives input from OCR device 19 in the form of bounding boxes over connection 24 and text characters over connection 26 . The bounding boxes on the connection 24 can take the form of character bounding boxes or word bounding boxes and are described in more detail below. The font determination logic 100 provides on the link 34 the determined font plus the bounding boxes and the text characters to the document recognition system 36 as described above.

Die vorliegende Erfindung nutzt die Tatsache aus, daß unter­ schiedliche Fonts unterschiedliche Fontmetriken haben. Ein Beispiel für unterschiedliche Fontmetriken kann bezugnehmend auf Fig. 3 dargestellt werden.The present invention takes advantage of the fact that different font metrics have different fonts. An example of different font metrics can be shown with reference to FIG. 3.

Fig. 3 ist eine schematische Ansicht, die einen Abschnitt der Fontmetriken von zwei unterschiedlichen Fonts zeigt. Fontmetriken können zusätzlich zu den nachfolgend erörterten Metriken die Fonthöhe und die Fontbreite umfassen. Um die Punktgröße eines speziellen Texts zu bestimmen, teilt die Fontbestimmungslogik 100 der vorliegenden Erfindung einen Fontzeichensatz gemäß der Höhe eines Zeichens folgender­ maßen:
Oben: Unter x, x-Höhe, kleiner Oberstrich, Großbuchstabe und voller Oberstrich;
Unten: Über der Basis, Basis, kleiner Unterstrich und Un­ terstrich.
Figure 3 is a schematic view showing a portion of the font metrics of two different fonts. Font metrics can include font height and font width in addition to the metrics discussed below. To determine the point size of a particular text, the font determination logic 100 of the present invention divides a font character set according to the height of a character as follows:
Above: Under x, x-height, small top line, capital letter and full top line;
Below: Above the base, base, small underline and underline.

Unter Verwendung dieser Klassifikationen und vorbestimmten Messungen von Zeichen von den zu erkennenden Fonts ist es möglich, für jeden Font die Punktgröße eines Zeichens zu bestimmen, um die gemessene Größe zu sein. Aus Fig. 3 ist zu sehen, daß unter Verwendung des Beispielworts 40 und des Beispielworts 50 die Höhe und Breite der gleichen Buchstaben von Font zu Font variiert. Wie es aus dem Wort 40 zu sehen ist, reicht der Großbuchstabe "A", der in dem Font "Arial" gedruckt ist, vollständig bis zur oberen Linie 41, während der Großbuchstabe "A", der in dem Font "Times New Roman" (Wort 50) gedruckt ist, nicht vollständig zur Linie 41 reicht. Auf ähnliche Art und Weise sind die x-Höhen (die Höhe eines Kleinbuchstabens, der keine Unterlänge und keine Oberlänge hat) des Worts 40 und des Worts 50 unterschied­ lich. Insbesondere hat der Buchstabe "x" im Wort eine größere x-Höhe als der Buchstabe "x" im Wort 50. Auf ähnliche Art und Weise können Unterlängen oder Teile von Buchstaben, die sich unter die x-Höhe oder unter die Basislinie 42 erstrecken, d. h. die sich zur unteren Linie 44 erstrecken, von einem Fonttyp zum anderen unterschiedlich sein.Using these classifications and predetermined measurements of characters from the fonts to be recognized, it is possible to determine the point size of a character for each font to be the measured size. From Fig. 3 it can be seen that using example word 40 and example word 50 the height and width of the same letters vary from font to font. As can be seen from word 40 , the capital letter "A", which is printed in the font "Arial", extends completely to the top line 41 , while the capital letter "A", which is printed in the font "Times New Roman" (Word 50 ) is printed, does not fully extend to line 41 . Similarly, the x-heights (the height of a lower case letter that has no descenders and no ascenders) of word 40 and word 50 are different. In particular, the letter "x" in the word has a greater x height than the letter "x" in word 50 . Similarly, descenders or portions of letters that extend below the x-height or below the baseline 42 , that is, that extend to the bottom line 44 , may vary from one font type to another.

Im wesentlichen bestimmt die vorliegende Erfindung den Font eines Texts in einem Bild durch Analysieren der Größe des Fonts, um die Menge an Raum auf einer Seite zu bestimmen, die der Text in dem einen oder anderen Font brauchen würde. Die Erfindung analysiert einen speziellen Font (den vorlie­ genden Font von Interesse in einem abgetasteten Bild), mißt die Größe des speziellen Fonts und vergleicht dann diese Messungen mit den Messungen (Metriken) von bekannten Fonts in einer Tabelle (wie z. B. der Umwandlungsfaktortabelle (Fontmetriken) 110 und der Umwandlungsfaktortabelle (inverse Fontmetriken) 120) und nimmt den geeignetsten Font aus der Tabelle heraus, um ihn dem speziellen Font zuzuordnen.In essence, the present invention determines the font of text in an image by analyzing the size of the font to determine the amount of space on a page that the text in one font or another would require. The invention analyzes a particular font (the font of interest in a scanned image), measures the size of the particular font, and then compares these measurements to the measurements (metrics) of known fonts in a table (such as the conversion factor table) (Font metrics) 110 and the conversion factor table (inverse font metrics) 120 ) and takes the most suitable font from the table to assign it to the particular font.

Fig. 4 ist ein Flußdiagramm, das den Betrieb der vorliegen­ den Erfindung darstellt. Das Flußdiagramm von Fig. 4 zeigt die Architektur, Funktionalität und den Betrieb einer mög­ lichen Implementation der Fontbestimmungssoftware von Fig. 2. In dieser Hinsicht stellt jeder Block ein Modul, Segment oder einen Abschnitt eines Codes dar, der einen oder mehrere ausführbare Befehle umfaßt, um die spezifizierte logische Funktion bzw. die spezifizierten logischen Funktionen zu im­ plementieren. Es sollte ebenfalls angemerkt werden, daß bei bestimmten alternativen Implementationen die in den Blöcken bezeichneten Funktionen in einer anderen Reihenfolge als in Fig. 4 auftreten können. Beispielsweise können zwei in Fig. 4 aufeinanderfolgend gezeigte Blöcke in der Tat im wesent­ lichen gleichzeitig ausgeführt werden, oder die Blöcke kön­ nen manchmal in der umgekehrten Reihenfolge ausgeführt wer­ den, und zwar abhängig von der betroffenen Funktionalität, wie es nachfolgend detaillierter ausgeführt wird. Fig. 4 is a flow chart illustrating the operation of the present invention. The flowchart of FIG. 4 shows the architecture, functionality and operation of a possible implementation of the font determination software of FIG. 2. In this regard, each block represents a module, segment or section of code that includes one or more executable instructions. to implement the specified logic function or functions. It should also be noted that in certain alternative implementations, the functions identified in the blocks may occur in a different order than in FIG. 4. For example, two blocks shown in succession in Fig. 4 may in fact be executed substantially simultaneously, or the blocks may sometimes be executed in the reverse order, depending on the functionality involved, as detailed below.

Ferner kann das Fontbestimmungsprogramm, das eine geordnete Liste von ausführbaren Befehlen zum Implementieren von lo­ gischen Funktionen enthält, in einem beliebigen Computer­ lesbaren Medium zur Verwendung durch oder in Verbindung mit einem Befehlsausführungssystem, einer Befehlsausführungsvor­ richtung oder einem Befehlsausführungsgerät ausgeführt wer­ den, wie z. B. einem Computer-basierten System, einem Sy­ stem, das einen Prozessor enthält, oder einem anderen Sy­ stem, das die Befehle von dem Befehlsausführungssystem, von der Befehlsausführungsvorrichtung oder von dem Befehlsaus­ führungsgerät abrufen und ausführen kann. Im Kontext dieses Dokuments kann ein "Computer-lesbares Medium" irgendeine Einrichtung sein, die das Programm enthält, speichert, kommuniziert, weiterführt oder transportiert, damit es durch oder in Verbindung mit dem Befehlsausführungssystem, der Be­ fehlsausführungsvorrichtung oder dem Befehlsausführungsgerät verwendet wird. Das Computer-lesbare Medium kann beispiels­ weise ein elektronisches, ein magnetisches, ein optisches, ein elektromagnetisches oder ein Infrarot-Medium sein, oder aber auch ein Halbleitersystem, eine Vorrichtung, ein Gerät oder ein Ausbreitungsmedium. Spezifische Beispiele (eine nicht-erschöpfende Liste) für mögliche Computer-lesbare Me­ dien können Folgende umfassen: eine elektrische Verbindung (elektronisch) mit einem oder mehreren Drähten, eine trag­ bare Computerdiskette (magnetisch), einen Direktzugriffs­ speicher (RAM) (magnetisch), einen Nur-Lese-Speicher (ROM) (magnetisch), einen löschbaren, programmierbaren Nur-Lese- Speicher (EPROM oder Flash-Speicher) (magnetisch), eine op­ tische Faser (optisch) und einen tragbaren Kompakt-Disk- Nur-Lese-Speicher (CDROM) (optisch). Es sei angemerkt, daß das Computer-lesbare Medium sogar Papier oder ein anderes geeignetes Medium sein könnte, auf dem das Programm gedruckt ist, da das Programm beispielsweise mittels einer optischen Abtastung des Papiers oder eines anderen Mediums elektro­ nisch erfaßt werden kann, dann compiliert werden kann, dann interpretiert werden kann oder auf andere Art und Weise ge­ eignet verarbeitet werden kann, falls es erforderlich ist, und dann in einem Computerspeicher gespeichert werden kann.Furthermore, the font determination program, which is an ordered one List of executable commands to implement lo contains functions in any computer readable medium for use by or in connection with an instruction execution system direction or a command execution device the, such as B. a computer-based system, a Sy stem, which contains a processor, or another Sy stem that the commands from the command execution system, from the command execution device or from the command can call and execute the guidance device. In the context of this Document can be any "computer readable medium" Be a facility that contains the program, stores, communicates, carries on or transports so that it can pass through or in connection with the command execution system, the Be mis-execution device or the instruction execution device is used. The computer-readable medium can, for example wise an electronic, a magnetic, an optical, be an electromagnetic or an infrared medium, or but also a semiconductor system, a device, a device or a propagation medium. Specific examples (a non-exhaustive list) for possible computer-readable me these can include: an electrical connection (electronic) with one or more wires, a trag bare computer diskette (magnetic), a direct access memory (RAM) (magnetic), a read-only memory (ROM) (magnetic), an erasable, programmable read-only Memory (EPROM or flash memory) (magnetic), an op table fiber (optical) and a portable compact disc Read-only memory (CDROM) (optical). It should be noted that the computer-readable medium even paper or another  suitable medium on which the program is printed is because the program, for example, by means of an optical Scanning the paper or another medium electro niche can be captured, then compiled, then can be interpreted or otherwise can be suitably processed if necessary and then can be stored in computer memory.

Wieder bezugnehmend auf Fig. 4 bestimmt die Fontgrößenbe­ rechnungslogik 130 (Fig. 2) in einem Kasten 101 die Größe und die Höhenkategorie des spezifizierten Zeichens oder Worts. Für jeden Font wird die Punktgröße, für die die Zeichenhöhe am nächsten an dem Zeichen in dem Absatz liegt, bestimmt. Die Punktgrößen werden dann verwendet, um einen Skalierungsfaktor relativ zu der Punktgröße des vorliegenden Texts zu berechnen, der durch die OCR-Einrichtung (Fig. 2) bestimmt wird, die die Textzeichen auf der Leitung 26 lie­ fert. Der Skalierungsfaktor wird dann in dem Absatz gemit­ telt. Dies ermöglicht es, daß die Punktgröße in dem Absatz konstant ist, daß sie jedoch variieren kann, wenn sich die Höhe im Text wesentlich ändert.Referring again to FIG. 4, the font size calculation logic 130 ( FIG. 2) in a box 101 determines the size and height category of the specified character or word. For each font, the point size for which the character height is closest to the character in the paragraph is determined. The dot sizes are then used to calculate a scaling factor relative to the dot size of the present text, which is determined by the OCR device ( FIG. 2) that provides the text characters on line 26 . The scaling factor is then averaged in the paragraph. This allows the point size in the paragraph to be constant, but it can vary as the height in the text changes significantly.

Entweder Zeichenbegrenzungskästen oder Wortbegrenzungskästen können von der OCR-Einrichtung 19 von Fig. 2 über die Ver­ bindung 24 zugeführt werden, während Textzeichen von der OCR-Einrichtung 19 über die Verbindung 26 zugeführt werden können. Textzeichen werden von der OCR-Einrichtung 19 aus dem abgetasteten Bild zugeführt, wie es in der Technik be­ kannt ist.Either character limit boxes or word limit boxes can be supplied by the OCR device 19 of FIG. 2 via the connection 24 , while text characters can be supplied by the OCR device 19 via the connection 26 . Text characters are supplied by the OCR device 19 from the scanned image, as is known in the art.

Fig. 5A und 5B sind schematische Ansichten, die gemeinsam die Auswirkung der Zeichenbegrenzungskästen und Wortbegren­ zungskästen auf die Fontbestimmungslogik 100 von Fig. 2 zei­ gen. Ob Wortbegrenzungskästen oder Zeichenbegrenzungskästen von der OCR-Einrichtung 19 zu der Fontbestimmungslogik 100 zugeführt werden, bestimmt die Genauigkeit, die von der Fontbestimmungslogik 100 geschaffen wird. Fig. 5A and 5B are schematic views that are in common the effect of the character bounding boxes and Wortbegren wetting boxes to the font determination logic 100 of FIG. 2 zei gene. Whether word bounding boxes or character bounding boxes from the OCR device 19 is supplied to the Font determination logic 100 determines the accuracy, created by the font determination logic 100 .

Fig. 5A zeigt das Wort 60 und das Wort 70, welche durch Wortbegrenzungskästen 61 bzw. 71 umgeben sind, während Fig. 5B das Wort 60 und das Wort 70 zeigt, wobei jeder Buchstabe jedes Worts mit einem Zeichenbegrenzungskasten 62 bzw. 72 umgeben ist. Obwohl nur ein Zeichenbegrenzungskasten 62 für das Wort 60 bezeichnet ist, und nur ein Zeichenbegrenzungs­ kasten 72 für das Wort 70 bezeichnet ist, sollte klar sein, daß jeder Buchstabe in jedem Wort durch einen Zeichenbegren­ zungskasten umgeben ist. FIG. 5A shows word 60 and word 70 surrounded by word limit boxes 61 and 71 , respectively, while FIG. 5B shows word 60 and word 70 , each letter of each word being surrounded by character limit boxes 62 and 72 , respectively. Although only one character bounding box 62 is designated for word 60 and only one character bounding box 72 is designated for word 70 , it should be understood that each letter in each word is surrounded by a character bounding box.

Wenn nur die Wortbegrenzungskästen der Fontbestimmungslogik 100 zugeführt werden, ist die Schwierigkeit beim Erhalten eines genauen Schätzwerts für den Font höher, als wenn Zei­ chenbegrenzungskästen verfügbar sind. Wenn die Wortbegren­ zungskästen 61 und 71 von der OCR-Einrichtung 19 zugeführt werden existiert eine kleinere Wahrscheinlichkeit, daß Wor­ te, die nur x-Höhen-Zeichen enthalten, wie z. B. das Wort 60, zugeführt werden. Sehr wahrscheinlicher werden viel mehr Worte, wie z. B. das Wort 70, zugeführt werden, die zumin­ dest ein paar Oberlängen, wie z. B. den Buchstaben "t" in dem Wort 70, und ein paar Unterlängen, wie z. B. der Buch­ stabe "y", enthalten, der bezugnehmend auf Fig. 3 beschrie­ ben wurde. Aus diesem Grund ist es schwieriger, die Größe der Worte zu schätzen, wenn Wortbegrenzungskästen zugeführt werden, da die Wahrscheinlichkeit für Worte, die nur x-Hö­ hen-Zeichen enthalten, reduziert ist. Es ist jedoch möglich, die x-Höhe zu erzeugen, wenn eine ausreichend große Probe des Texts vorhanden ist, so daß ein paar Worte mit keinen Unterlängen und Oberlängen, wie z. B. das Wort 60, gefunden werden.If only the word bounding boxes are supplied to the font determination logic 100 , the difficulty in obtaining an accurate estimate of the font is greater than when character bounding boxes are available. If the word limit boxes 61 and 71 are supplied from the OCR device 19 , there is a smaller probability that words containing only x-height characters, such as e.g. B. the word 60 , are supplied. It is more likely that many more words, such as B. the word 70 , the at least a few ascenders, such as. B. the letter "t" in the word 70 , and a few descenders, such as. B. the book letter "y" included, which has been described with reference to FIG. 3 ben. For this reason, it is more difficult to estimate the size of the words when supplying word limit boxes because the probability of words containing only x-height characters is reduced. However, it is possible to generate the x-height if there is a sufficiently large sample of the text so that a few words with no descenders and ascenders, such as B. the word 60 can be found.

Wieder bezugnehmend auf Fig. 4 bestimmt im Block 101 die Fontbestimmungslogik 100 die größten und kleinsten Buch­ staben in einem Wort unter Verwendung der Textzeichen, die von der OCR-Einrichtung 19 für jedes Wort zugeführt werden, und unter Verwendung der Zeichengrößenmetriken, wie es oben beschrieben wurde. Referring again to FIG. 4 determined in block 101, the font determination logic 100, the largest and smallest book case letters in a word using the text characters from the OCR device is supplied 19 for each word, and using the character size metrics, as described above has been.

In einem Block 102 wird die Höhe des Worts von dem Begren­ zungskasten 61 oder 71 oder die Höhe des Zeichens von dem Begrenzungskasten 62 oder 72 in einen Punktgrößenschätzwert durch die Fontgrößenberechnungslogik 130 unter Verwendung der Umwandlungsfaktortabelle (inverse Fontmetriken) 120 von Fig. 2 umgewandelt. Unterschiedliche Punktgrößen werden für jeden der Fonts erhalten.In block 102 , the height of the word from the bounding box 61 or 71 or the height of the character from the bounding box 62 or 72 is converted to a point size estimate by the font size calculation logic 130 using the conversion factor table (inverse font metrics) 120 of FIG. 2. Different point sizes are obtained for each of the fonts.

Wie es oben beschrieben wurde, wird der Punktgrößenschätz­ wert in einen Skalierungsfaktor bezüglich der Punktgröße umgewandelt, die von der OCR-Einrichtung 19 zurückgegeben wird. Die Skalierungsfaktoren werden in einem Absatz gemit­ telt, der den speziellen Text enthält, der analysiert wird, um es sicherzustellen, daß eine gleichmäßige Punktgröße auf alle Worte in einem Absatz angewendet wird.As described above, the point size estimate is converted into a scale factor with respect to the point size that is returned from the OCR device 19 . The scaling factors are averaged in a paragraph that contains the particular text that is being analyzed to ensure that a uniform dot size is applied to all words in a paragraph.

Für jeden Font in der Tabelle wird die Fontgröße basierend auf der Kategoriengröße des Bilds (Font auf der Seite), das analysiert wird, unter Verwendung der Fontgrößenberechnungs­ logik 130 in Kooperation mit der Umwandlungsfaktortabelle (inverse Fontmetriken) 120 vorhergesagt.For each font in the table, the font size is predicted based on the category size of the image (font on the page) that is being analyzed using the font size calculation logic 130 in cooperation with the conversion factor table (inverse font metrics) 120 .

In einem Block 104 trägt die Fontbestimmungslogik 100 und insbesondere die Textgrößenberechnungslogik 140 die Umwand­ lungsfaktortabelle (Fontmetriken) 110 ab, um die Breite der Worte für jeden Font in der entsprechenden Größe zu bestim­ men. Bezüglich seiner Verwendung in dieser Beschreibung be­ zieht sich der Ausdruck "geeignet" auf den Punktgrößen­ schätzwert, der in dem Block 102 für jeden Font vorhergesagt wird, und zwar in der Tabelle 110 bzw. 120.In a block 104 , the font determination logic 100, and in particular the text size calculation logic 140, removes the conversion factor table (font metrics) 110 in order to determine the width of the words for each font in the corresponding size. As used in this specification, the term "suitable" refers to the estimated point sizes predicted in block 102 for each font, in tables 110 and 120, respectively.

In einem Block 105 wird eine Abstandsmetrik zwischen der Sy­ stemtextgröße und der Bildtextgröße auf Wortebene oder auf Zeilenebene abhängig von dem speziellen Ausführungsbeispiel und dem erwünschten Effekt durch die Abstandsmeßlogik 150 berechnet. Insbesondere werden die quadrierten Fehler (zwi­ schen der tatsächlichen Größe und der Größe, die von der Textgrößenberechnungslogik 140 zurückgegeben wird) in Wort­ breiten in einem Absatz aufaddiert, um einen Gesamtfehlerab­ stand für jeden Font zu erhalten.In block 105 , a distance metric between the system text size and the image text size at word level or at line level is calculated depending on the specific embodiment and the desired effect by the distance measuring logic 150 . In particular, the squared errors (between the actual size and the size returned by the text size calculation logic 140 ) are added up in word widths in a paragraph to obtain a total error margin for each font.

In einem Block 106 wird der Font mit der kleinsten Abstands­ metrik ausgewählt und ausgegeben, wobei dieser Font verwen­ det wird, um den Absatz darzustellen.In block 106 , the font with the smallest distance metric is selected and output, this font being used to represent the paragraph.

Bei einem Ausführungsbeispiel der vorliegenden Erfindung halten die Umwandlungsfaktortabelle (inverse Fontmetriken) 120 und die Umwandlungsfaktortabelle (Fontmetriken) 110 fünf Fonts. Weniger oder zusätzliche Fonts können jedoch in den Tabellen 110 und 120 gehalten werden.In one embodiment of the present invention, the conversion factor table (inverse font metrics) 120 and the conversion factor table (font metrics) 110 hold five fonts. However, fewer or additional fonts can be kept in Tables 110 and 120 .

Es folgt ein Beispiel zum Berechnen der Fontgröße unter Ver­ wendung von Höhen und Kategorien. Die Umwandlungsfaktorta­ belle (inverse Fontmetriken) 120 enthält die Pixelgrößen s eines 10-Punkt-Textes in jedem Font mit jeder möglichen Kom­ bination von Größenkategorien. Die Punktgröße p wird für ein Zeichen (oder ein Wort) der Höhe h durch p = 10 . h/s vor­ hergesagt, wobei s die Größe von der Tabelle für die Höhen­ kategorie des Zeichens (Worts) ist. Um eine Ausnahme für ei­ nen Font mit festem Zeichenzwischenraum darzustellen, wenn der Punktgrößenschätzwert für den Font "Courier" erzeugt wird, wird die Größe aus (Breite + 6) . 120/(Länge . 300) berechnet, wobei Breite die Breite des Worts in 300-Punkt­ pro-Zoll- (DPI-) Pixeln ist, und wobei Länge die Anzahl von Zeichen in dem Wort ist. Dies ermöglicht es, daß der Font "Courier" mit irgendeinem Font mit festem Zeichenzwischen­ raum übereinstimmt, selbst wenn er eine unterschiedliche vertikale Größe hat. Der gesamte quadrierte Fehler der Breite wird für jeglichen proportionalen Font groß sein, jedoch für einen Font mit festem Zwischenraum klein sein.The following is an example of how to calculate the font size using heights and categories. The conversion factor table (inverse font metrics) 120 contains the pixel sizes s of a 10-point text in each font with every possible combination of size categories. The point size p becomes for a character (or a word) of height h by p = 10. h / s predicted before, where s is the size of the table for the height category of the sign (word). To represent an exception for a font with a fixed space between characters when the point size estimate is generated for the "Courier" font, the size is made (width + 6). 120 / (length. 300), where width is the width of the word in 300 dots per inch (DPI) pixels, and length is the number of characters in the word. This allows the "Courier" font to match any font with a fixed space between characters, even if it has a different vertical size. The total squared error of width will be large for any proportional font, but small for a fixed space font.

Wenn die Zeichenbegrenzungskästen von der OCR-Einrichtung 19 über die Verbindung 24 der Fontbestimmungslogik 100 von Fig. 2 zugeführt werden, ist es möglich, die Punktgröße von fast jedem erkannten Zeichen zu schätzen und dieselbe bei der Be­ rechnung des gemittelten Skalierungsfaktors, wie es oben be­ schrieben wurde, zu verwenden. Zeichen, für die der oberste Punkt oder der unterste Punkt nicht mit den "bestätigten" Meßpunkten übereinstimmen, werden aus dem Punktgrößenschätz­ verfahren herausgehalten. Bestätigte Meßpunkte umfassen oben: x-Höhe, Großbuchstabe, volle Oberlänge, und unten: Basis und Unterlänge. Dies sind die Positionen, die von Zei­ chen eingenommen werden, deren Größe zuverlässig verwendet werden kann, um die Punktgröße vorherzusagen. Die nicht-be­ stätigten Meßpunkte sind oben: unter x und kleine Oberlänge, und unten: über der Basis und kleine Unterlänge. Zeichen, wie z. B. " ", "t", etc. werden herausgelassen, da sie in die Meßkategorie "nicht-bestätigt" fallen. Zusätzlich zu der Tatsache, daß mehr Zeichen vorhanden sind, um die Punktgröße zu schätzen, existiert ein weiterer Unterschied, der bei Zeichenbegrenzungskästen auftritt. Das Verhältnis der x-Höhe zur Großbuchstabenhöhe und das Verhältnis der x-Höhe zur Un­ terlänge können ebenfalls beim Fontauswahlverfahren einge­ setzt werden. Durch Gewichten der Differenzen dieser Ver­ hältnisse gegenüber den Breitenfehlern ist es möglich, die Fontauswahl zu beeinflussen, um entweder vorzugsweise die Breiten richtig zu machen oder vorzugsweise die Höhen rich­ tig zu machen.When the character bounding boxes are supplied from the OCR device 19 via the link 24 to the font determination logic 100 of FIG. 2, it is possible to estimate the dot size of almost any recognized character and the same when calculating the averaged scaling factor as described above was written to use. Characters for which the uppermost point or the lowest point do not match the "confirmed" measuring points are kept out of the point size estimation procedure. Confirmed measurement points include: x-height, capital letter, full ascender, and below: base and descender. These are the positions taken by characters, the size of which can be used reliably to predict the point size. The non-confirmed measuring points are at the top: below x and small ascender, and below: above the base and small descender. Characters such as B. "", "t", etc. are omitted because they fall into the measurement category "not confirmed". In addition to the fact that there are more characters to estimate the point size, there is another difference that occurs with character bounding boxes. The ratio of the x-height to the capital letter height and the ratio of the x-height to the lower length can also be used in the font selection process. By weighting the differences of these ratios against the width errors, it is possible to influence the font selection, either to get the widths correct or preferably to make the heights correct.

Das Verhältnis der x-Höhe zur Großbuchstabenhöhe und das Verhältnis der x-Höhe zur Unterlänge kann ebenfalls verwen­ det werden, nachdem ein vorgegebener Font für den Absatz ausgewählt wird, um einzelne Worte zu erfassen, in denen sich der Font deutlich von dem vorgegebenen Font unterschei­ det. Diese Worte können dann durch einen anderen Font dar­ gestellt werden.The ratio of the x-height to the capital letter height and that Ratio of the x-height to the descender can also be used after a given font for the paragraph is selected to capture individual words in which the font clearly differs from the given font det. These words can then be represented by another font be put.

Es sollte darauf hingewiesen werden, daß die oben beschrie­ benen Ausführungsbeispiele der vorliegenden Erfindung und insbesondere jegliche "bevorzugten" Ausführungsbeispiele lediglich mögliche Beispiele für Implementationen sind, die ausgeführt worden sind, um die Prinzipien der Erfindung dar­ zulegen.It should be noted that the above described benen embodiments of the present invention and especially any "preferred" embodiments are only possible examples of implementations that have been carried out to illustrate the principles of the invention increase.

Claims (12)

1. Vorrichtung (100) zum Erkennen des Fonts eines Texts, mit folgenden Merkmalen:
einer Logik (100), die konfiguriert ist, um ein Bild (17) in einem Fontbestimmungssystem (100) zu empfangen, wobei das Bild (17) Textzeichen (26) umfaßt, die einen Font in dem Bild (17) darstellen;
einer Logik (130), die konfiguriert ist, um eine Punkt­ größe für den Font in dem Bild (17) zu schätzen, indem eine Mehrzahl von Fontmetriken (110, 120) verwendet wird, wobei die Fontmetriken (110, 120) ebenfalls zu­ mindest einem Systemfont entsprechen, der in einer Ta­ belle (110, 120) enthalten ist, wobei die Tabelle die Fontmetriken (110) und inverse Fontmetriken (120) um­ faßt, wobei die Fontmetriken (110, 120) eine Breite für jeden Systemfont in der Tabelle (110, 120) umfassen;
einer Logik (130), die konfiguriert ist, um einen Ska­ lierungsfaktor unter Verwendung der geschätzten Punkt­ größe zu berechnen, wobei der Skalierungsfaktor der Punktgröße entspricht und über einen Absatz des Bildes (17) gemittelt ist;
einer Logik (150), die konfiguriert ist, um eine Breite des Fonts in dem Bild mit den Breiten von jedem System­ font in der Tabelle (110, 120) zu vergleichen; und
einer Logik (150), die konfiguriert ist, um zumindest einen Systemfont, der am besten mit der Breite des Fonts in dem Bild (17) übereinstimmt, aus der Tabelle (110, 120) auszuwählen.
1. Device ( 100 ) for recognizing the font of a text, having the following features:
logic ( 100 ) configured to receive an image ( 17 ) in a font determination system ( 100 ), the image ( 17 ) including text characters ( 26 ) representing a font in the image ( 17 );
logic ( 130 ) configured to estimate a point size for the font in the image ( 17 ) using a plurality of font metrics ( 110 , 120 ), the font metrics ( 110 , 120 ) also at least correspond to a system font contained in a table ( 110 , 120 ), the table comprising the font metrics ( 110 ) and inverse font metrics ( 120 ), the font metrics ( 110 , 120 ) being a width for each system font in the table ( 110 , 120 ) include;
logic ( 130 ) configured to calculate a scaling factor using the estimated point size, the scaling factor corresponding to the point size and averaged over a paragraph of the image ( 17 );
logic ( 150 ) configured to compare a width of the font in the image with the widths of each system font in the table ( 110 , 120 ); and
logic ( 150 ) configured to select at least one system font from the table ( 110 , 120 ) that best matches the width of the font in the image ( 17 ).
2. Vorrichtung (100) nach Anspruch 1, bei dem die Fontme­ triken (110, 120) Metriken umfassen, die aus folgender Gruppe ausgewählt sind: unter x, x-Höhe, kleine Ober­ länge, Großbuchstabe, volle Oberlänge, über der Basis, Basis, kleine Unterlänge, Unterlänge.2. The device ( 100 ) according to claim 1, wherein the font metrics ( 110 , 120 ) comprise metrics selected from the following group: below x, x height, small upper length, capital letter, full upper length, above the base, Base, small descender, descender. 3. Vorrichtung nach Anspruch 1 oder 2, das ferner eine Lo­ gik (19) aufweist, die konfiguriert ist, um die Text­ zeichen in Wortbegrenzungskästen (61, 71) einzufassen.3. The apparatus of claim 1 or 2, further comprising a logic ( 19 ) configured to encode the text characters in word limit boxes ( 61 , 71 ). 4. Vorrichtung nach Anspruch 1 oder 2, das ferner eine Lo­ gik (19) aufweist, die konfiguriert ist, um die Text­ zeichen in Zeichenbegrenzungskästen (62, 72) einzufas­ sen.4. The apparatus of claim 1 or 2, further comprising logic ( 19 ) configured to characterize the text characters in character delimitation boxes ( 62 , 72 ). 5. Verfahren (100) zum Bestimmen des Fonts eines Texts in einem Bild (17), mit folgenden Schritten:
Empfangen eines Bilds (17) in einem Fontbestimmungssy­ stem (100), wobei das Bild (17) Textzeichen (26) um­ faßt, die einen Font in dem Bild (17) darstellen;
Schätzen (102) einer Punktgröße für den Font in dem Bild (17) unter Verwendung einer Mehrzahl von Fontme­ triken (110, 120), wobei die Fontmetriken (110, 120) ferner zumindest einem Systemfont entsprechen, der in einer Tabelle (110, 120) enthalten ist, wobei die Ta­ belle (110, 120) die Fontmetriken (110) und inverse Fontmetriken (120) enthält, wobei die Fontmetriken eine Breite für jeden Systemfont in der Tabelle (110, 120) umfassen;
Berechnen (102) eines Skalierungsfaktors unter Verwen­ dung der geschätzten Punktgröße, wobei der Skalierungs­ faktor der Punktgröße entspricht und über einem Absatz des Bildes (17) gemittelt ist;
Vergleichen (105) einer Breite des Fonts in dem Bild (17) mit den Breiten von jedem Systemfont in der Tabel­ le (110, 120); und
Auswählen (106) zumindest eines Systemfonts, der am be­ sten mit der Breite des Fonts in dem Bild (17) überein­ stimmt, aus der Tabelle (110, 120).
5. A method ( 100 ) for determining the font of a text in an image ( 17 ), comprising the following steps:
Receiving an image ( 17 ) in a font determination system ( 100 ), the image ( 17 ) including text characters ( 26 ) representing a font in the image ( 17 );
Estimating ( 102 ) a point size for the font in the image ( 17 ) using a plurality of font metrics ( 110 , 120 ), the font metrics ( 110 , 120 ) also corresponding to at least one system font that is in a table ( 110 , 120 ) is contained, wherein the Ta ble (120) contains the font metrics (110) and inverse font metrics (120) 110, wherein the font metrics for each system a width font in the table (110, 120) comprise;
Computing ( 102 ) a scaling factor using the estimated point size, the scaling factor corresponding to the point size and averaged over a paragraph of the image ( 17 );
Comparing ( 105 ) a width of the font in the image ( 17 ) with the widths of each system font in the table ( 110 , 120 ); and
Select ( 106 ) at least one system font that most closely matches the width of the font in the image ( 17 ) from the table ( 110 , 120 ).
6. Verfahren (100) nach Anspruch 5, bei dem die Fontmetri­ ken (110, 120) Metriken umfassen, die aus folgender Gruppe ausgewählt sind: unter x, x-Höhe, kleine Ober­ länge, Großbuchstabe, volle Oberlänge, über der Basis, Basis, kleine Unterlänge, Unterlänge.6. The method ( 100 ) according to claim 5, wherein the font metrics ( 110 , 120 ) comprise metrics selected from the following group: under x, x-height, small upper length, capital letter, full upper length, above the base, Base, small descender, descender. 7. Verfahren (100) nach Anspruch 5 oder 6, bei dem die Textzeichen (26) in Wortbegrenzungskästen (61, 71) ein­ gefaßt sind.7. The method ( 100 ) according to claim 5 or 6, wherein the text characters ( 26 ) in word limit boxes ( 61 , 71 ) are summarized. 8. Verfahren (100) nach einem der Ansprüche 5 oder 6, bei dem die Textzeichen (26) in Zeichenbegrenzungskästen (62, 72) eingefaßt sind.8. The method ( 100 ) according to any one of claims 5 or 6, wherein the text characters ( 26 ) are enclosed in character delimitation boxes ( 62 , 72 ). 9. Vorrichtung (100) zum Erkennen des Fonts eines Texts in einem System zur optischen Zeichenerkennung (OCR), mit folgenden Merkmalen:
einer Einrichtung zum Empfangen eines Bilds (17) in ei­ nem Fontbestimmungssystem (100);
einer Einrichtung zum Identifizieren einer Textregion innerhalb des Bilds, wobei die Textregion zumindest ein Textzeichen umfaßt, das einen Font in dem Bild (17) darstellt;
einer Einrichtung zum Schätzen (102) einer Punktgröße für den Font in dem Bild (17) unter Verwendung einer Mehrzahl von Fontmetriken (110, 120), wobei die Font­ metriken (110, 120) ferner zumindest einem Systemfont entsprechen, der in einer Tabelle (110, 120) enthalten ist, wobei die Tabelle (110, 120) die Fontmetriken (110) und inverse Fontmetriken (120) enthält, wobei die Fontmetriken eine Breite für jeden Systemfont in der Tabelle (110, 120) umfassen;
einer Einrichtung zum Berechnen (102) eines Skalie­ rungsfaktors unter Verwendung der geschätzten Punkt­ größe, wobei der Skalierungsfaktor der Punktgröße ent­ spricht und über einen Absatz des Bildes (17) gemittelt ist;
einer Einrichtung zum Vergleichen (105) einer Breite des Fonts in dem Bild (17) mit den Breiten von jedem Systemfont in der Tabelle (110, 120); und
einer Einrichtung zum Auswählen (106) zumindest eines Systemfonts, der am besten mit der Breite des Fonts in dem Bild (17) übereinstimmt, aus der Tabelle (110, 120).
9. Device ( 100 ) for recognizing the font of a text in a system for optical character recognition (OCR), having the following features:
means for receiving an image ( 17 ) in a font determination system ( 100 );
means for identifying a text region within the image, the text region comprising at least one text character representing a font in the image ( 17 );
means for estimating (102) (110, 120) further comprises at least correspond to a point size for the font in the image (17) using a plurality of font metrics (110, 120), the font metrics a system font, which in a table ( 110 , 120 ), the table ( 110 , 120 ) containing the font metrics ( 110 ) and inverse font metrics ( 120 ), the font metrics comprising a width for each system font in the table ( 110 , 120 );
means for calculating ( 102 ) a scaling factor using the estimated point size, the scaling factor corresponding to the point size and averaged over a paragraph of the image ( 17 );
means for comparing ( 105 ) a width of the font in the image ( 17 ) with the widths of each system font in the table ( 110 , 120 ); and
means for selecting ( 106 ) at least one system font that best matches the width of the font in the image ( 17 ) from the table ( 110 , 120 ).
10. Vorrichtung (100) nach Anspruch 9, bei dem die Fontme­ triken (110, 120) Metriken umfassen, die aus folgender Gruppe ausgewählt sind: unter x, x-Höhe, kleine Ober­ länge, Großbuchstabe, volle Oberlänge, über der Basis, Basis, kleine Unterlänge, Unterlänge.10. The device ( 100 ) according to claim 9, wherein the font metrics ( 110 , 120 ) comprise metrics selected from the following group: under x, x height, small upper length, capital letter, full upper length, above the base, Base, small descender, descender. 11. Vorrichtung nach Anspruch 9 oder 10, bei dem die Text­ zeichen in Wortbegrenzungskästen (61, 71) eingefaßt sind.11. The apparatus of claim 9 or 10, wherein the text characters in word limit boxes ( 61 , 71 ) are bordered. 12. Vorrichtung nach Anspruch 9 oder 10, bei dem die Text­ zeichen in Zeichenbegrenzungskästen (62, 72) eingefaßt sind.12. The apparatus of claim 9 or 10, wherein the text characters are enclosed in character delimitation boxes ( 62 , 72 ).
DE19953610A 1999-02-26 1999-11-08 Font detection device for optical character recognition system selects system font from table whose width best corresponds to width of font in image Withdrawn DE19953610A1 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US25841699A 1999-02-26 1999-02-26

Publications (1)

Publication Number Publication Date
DE19953610A1 true DE19953610A1 (en) 2000-09-07

Family

ID=22980457

Family Applications (1)

Application Number Title Priority Date Filing Date
DE19953610A Withdrawn DE19953610A1 (en) 1999-02-26 1999-11-08 Font detection device for optical character recognition system selects system font from table whose width best corresponds to width of font in image

Country Status (2)

Country Link
DE (1) DE19953610A1 (en)
TW (1) TW480457B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100550040C (en) * 2005-12-09 2009-10-14 佳能株式会社 Optical character recognition method and equipment and character recognition method and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100550040C (en) * 2005-12-09 2009-10-14 佳能株式会社 Optical character recognition method and equipment and character recognition method and equipment

Also Published As

Publication number Publication date
TW480457B (en) 2002-03-21

Similar Documents

Publication Publication Date Title
DE19953608B4 (en) Apparatus and method for recognizing a font of a text in a document processing system
DE3806223C2 (en) Process for creating character patterns
DE69129520T2 (en) Improved segmentation method for machine reading handwritten information
DE69715076T2 (en) Device for generating a binary image
DE69425084T2 (en) Method and device for recognizing text lines, words and spatial features of character cells
DE3436033C2 (en) Output device and method for outputting character patterns
DE69230632T2 (en) Optical word recognition through word shape analysis
DE69230631T2 (en) Method of comparing word shapes
DE69434405T2 (en) Method of creating a visual design
DE69027134T2 (en) Character processing device
DE69428475T2 (en) Method and device for automatic speech recognition
DE4091841C2 (en) Method for generating a form display and screen form generation system
DE69133362T2 (en) Document processing method and device, corresponding program and storage unit
DE60219048T2 (en) SECTION EXTRACTION TOOL FOR PDF DOCUMENTS
DE69629173T2 (en) Automatic placement of a graphic pattern
EP1921422B1 (en) Method and device for generating a text object
DE69616246T2 (en) Automatic procedure for identifying omission words in the image of a document without using the OCR
DE69618913T2 (en) Verification of an interactive office system
DE10105941A1 (en) System and method for automatically assigning a file name to a scanned document
DE69717730T2 (en) Image processing method and apparatus
DE69330900T2 (en) Process for filling the pixels within a polygon
EP0402868B1 (en) Method for recognizing previously located character represented as digital grey-value images, in particular of character stamped into metal surfaces
EP0654778A1 (en) Method of displaying text on a screen
DE69624663T2 (en) Process and device for image processing and storage medium
EP2289022B1 (en) Method and apparatus for automatically determining control elements in computer applications

Legal Events

Date Code Title Description
OP8 Request for examination as to paragraph 44 patent law
8127 New person/name/address of the applicant

Owner name: HEWLETT-PACKARD CO. (N.D.GES.D.STAATES DELAWARE),

8130 Withdrawal