JP4710672B2 - Character color discrimination device, character color discrimination method, and computer program - Google Patents

Character color discrimination device, character color discrimination method, and computer program Download PDF

Info

Publication number
JP4710672B2
JP4710672B2 JP2006074507A JP2006074507A JP4710672B2 JP 4710672 B2 JP4710672 B2 JP 4710672B2 JP 2006074507 A JP2006074507 A JP 2006074507A JP 2006074507 A JP2006074507 A JP 2006074507A JP 4710672 B2 JP4710672 B2 JP 4710672B2
Authority
JP
Japan
Prior art keywords
character
image
color
pixel
area
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.)
Expired - Fee Related
Application number
JP2006074507A
Other languages
Japanese (ja)
Other versions
JP2007249774A (en
Inventor
義昭 廣岡
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.)
Konica Minolta Business Technologies Inc
Original Assignee
Konica Minolta Business Technologies Inc
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 Konica Minolta Business Technologies Inc filed Critical Konica Minolta Business Technologies Inc
Priority to JP2006074507A priority Critical patent/JP4710672B2/en
Publication of JP2007249774A publication Critical patent/JP2007249774A/en
Application granted granted Critical
Publication of JP4710672B2 publication Critical patent/JP4710672B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、スキャナなどの画像入力装置で入力した画像に含まれる文字の色を判別する装置および方法などに関する。   The present invention relates to an apparatus and a method for determining the color of a character included in an image input by an image input apparatus such as a scanner.

用紙に描かれている画像をスキャナでスキャンし電子データとして保存する技術が普及している。通常、高品質な画像の電子データを得るために、スキャンした画像に対してその特性に応じた画像処理を施すことが多い。例えば、文字を表わす文字画像が含まれる領域に対しては、文字の識別性を高くするための画像処理を施す。つまり、その文字画像が何の文字を表わしているのかが明確に分かるようにするための画像処理を施す。   A technique in which an image drawn on paper is scanned with a scanner and stored as electronic data has become widespread. Usually, in order to obtain electronic data of a high-quality image, image processing corresponding to the characteristics is often performed on the scanned image. For example, image processing for increasing the character identification is performed on a region including a character image representing a character. That is, image processing is performed so that the user can clearly understand what character the character image represents.

スキャンした文字領域に対する画像処理の方法として、特許文献1に記載されるような方法が提案されている。この方法によると、カラー画像より文字領域の二値画像を生成し、前記文字領域の二値画像に対し文字矩形を作成し、前記文字矩形の単色判定を行い、非単色の文字矩形が複数種の単色文字集合であることを判定し、上記判定矩形内を文字切りする。これにより、文字色および文字領域の情報を抽出することができる。   As an image processing method for a scanned character area, a method as described in Patent Document 1 has been proposed. According to this method, a binary image of a character region is generated from a color image, a character rectangle is created for the binary image of the character region, single color determination of the character rectangle is performed, and a plurality of non-monochromatic character rectangles It is determined that the set is a single-color character set, and the character inside the determination rectangle is cut. As a result, information on the character color and the character region can be extracted.

また、特許文献2に記載される方法によると、文書画像をカラーデジタル画像として入力し、該文書画像の背景色を特定し、該背景色を用いて該文書画像から背景領域以外の画素を抽出し、該画素を統合して連結成分を生成し、該連結成分を形状特徴と色特徴から文字/罫線/図/写真などの領域に分類し、識別する。識別された領域である文字領域として文字矩形データを取得し、該文字矩形内の背景色に相当する画素を除去して残った画素の画素値に基づいて代表色を算出し、該代表色をその文字矩形の文字色とする。   According to the method described in Patent Document 2, a document image is input as a color digital image, the background color of the document image is specified, and pixels other than the background region are extracted from the document image using the background color Then, the connected components are generated by integrating the pixels, and the connected components are classified and identified into areas such as characters / ruled lines / drawings / photographs from the shape features and the color features. Character rectangle data is acquired as a character area that is an identified area, a pixel corresponding to the background color in the character rectangle is removed, a representative color is calculated based on the pixel values of the remaining pixels, and the representative color is calculated. The character color of the character rectangle.

そのほか、特許文献3には、入力した画像の中から写真の領域、色文字の領域、および黒文字の領域を判定する方法が開示されている。入力された画像の色信号から、色判定部で各画素が色画素か否かを判定する。色判定補正部で、色判定部で色画素と判定された領域に対し、第1の膨張処理部での膨張処理で色文字の切れをつなぎ、収縮処理部での収縮処理で黒文字部の色画素を除去し、第2の膨張処理部で色文字の部分を包含するように色画素の領域を膨張処理する。これにより、黒文字部の色画素判定が除去され、色文字部の色画素でないと判定された部分も色画素となる。一方、構造抽出部で写真構造、文字構造が抽出され、写真・文字判定部で、色判定補正部で補正された色判定結果とともに論理演算により写真、色文字、黒文字の各領域を判定する。
特開2004−242075号公報 特開2002−236921号公報 特開平11−4344号公報
In addition, Patent Document 3 discloses a method of determining a photo area, a color character area, and a black character area from an input image. From the color signal of the input image, the color determination unit determines whether each pixel is a color pixel. In the color determination correction unit, the color character cut is connected by the expansion processing by the first expansion processing unit to the area determined as the color pixel by the color determination unit, and the color of the black character part by the contraction processing by the contraction processing unit The pixel is removed, and the color pixel region is expanded by the second expansion processing unit so as to include the color character portion. Thereby, the color pixel determination of the black character portion is removed, and a portion determined not to be a color pixel of the color character portion is also a color pixel. On the other hand, a photographic structure and a character structure are extracted by the structure extraction unit, and a photo / character character determination unit determines each region of the photograph, color character, and black character by logical operation together with the color determination result corrected by the color determination correction unit.
JP 2004-242075 A JP 2002-236922 A Japanese Patent Laid-Open No. 11-4344

ところで、通常、スキャンした文字画像のエッジの部分つまり文字の背景の画像(背景画像)との境界付近の画素は、背景画像の色と混じり合い、文字画像の色が滲んでしまうことがよくある。背景画像から離れている画素は、滲みが少なく、文字の本来の色が明確に表れている。   By the way, usually, the edge part of the scanned character image, that is, the pixel near the boundary with the background image (background image) of the character is mixed with the color of the background image, and the color of the character image is often blurred. . Pixels far from the background image are less blurred and the original color of the character appears clearly.

文字画像の表わす文字の線が太い場合は、背景画像から離れている画素を多く選出することができるので、上に述べたような従来の方法を用いても文字の色をある程度正確に判別することができる。   When the character line represented by the character image is thick, it is possible to select many pixels that are distant from the background image, so that the character color can be accurately determined to some extent even using the conventional method as described above. be able to.

しかし、文字画像の表わす文字の線が細い場合は、文字画像の多くの画素は、背景画像との境界付近に位置するので、その色が滲んでしまっている。つまり、文字の線が太い文字画像と比較して、本来の色が明確に表れている画素が少ない。したがって、従来の方法では、判別した色の正確性が乏しい。   However, when the character line represented by the character image is thin, many pixels of the character image are located near the boundary with the background image, so that the color is blurred. That is, there are fewer pixels in which the original color clearly appears compared to a character image with thick character lines. Therefore, the accuracy of the determined color is poor in the conventional method.

本発明は、このような問題点に鑑み、スキャナなどで入力した文字画像の表わす文字の色を従来よりも正確に判別することを目的とする。   In view of such problems, it is an object of the present invention to determine the color of a character represented by a character image input by a scanner or the like more accurately than in the past.

本発明に係る文字色判別装置は、画像入力装置によって入力された入力画像に表れる文字の線図形の中央線およびその付近の領域からなる中央領域を検出する中央領域検出手段と、複数の画素からなりかつ前記中央線の一部分が中央に位置する小領域を複数、前記中央領域から抽出する小領域抽出手段と、前記小領域ごとに、当該小領域に属する画素の中から所定の条件に合う画素を条件合致画素として検出する条件合致画素検出手段と、前記入力画像に表れる文字の色を前記各小領域の前記条件合致画素の色情報に基づいて判別する色判別手段と、を有することを特徴とする。 A character color discriminating device according to the present invention comprises a central region detecting means for detecting a central region consisting of a central line of a line figure of a character appearing in an input image input by an image input device and a region in the vicinity thereof, and a plurality of pixels. a Li Kui plurality of small areas a portion of the center line is located at the center, and the small area extracting means for extracting from said central region, for each of the small areas, meet a given condition from among the pixels belonging to the small region Condition matching pixel detection means for detecting a pixel as a condition matching pixel, and color determination means for determining a color of a character appearing in the input image based on color information of the condition matching pixel in each of the small regions. Features.

好ましくは、前記中央領域検出手段は、前記入力画像に対して細線化処理を施すことによって検出した細線またはその付近の領域を、前記中央領域として検出し、前記所定の条件とは、明度が最も低いことであり、前記色判別手段は、原色ごとに、前記条件合致画素の当該原色の階調のピークを算出し、当該各原色の当該ピークによって表わされる色を、前記入力画像に表れる文字の色であると判別する。   Preferably, the central area detecting means detects a thin line detected by performing thinning processing on the input image or an area in the vicinity thereof as the central area, and the predetermined condition is that the brightness is the highest. The color discrimination means calculates a peak of the gradation of the primary color of the condition-matching pixel for each primary color, and calculates the color represented by the peak of each primary color of the character appearing in the input image. It is determined that the color.

なお、本発明では、「文字」には、漢字、平仮名、片仮名、およびアルファベットなどのほか、「0」〜「9」の数字および演算子などの符号も含まれるものとする。   In the present invention, “character” includes not only kanji, hiragana, katakana, and alphabet, but also numerals such as numbers “0” to “9” and operators.

本発明によると、スキャナなどで入力した文字画像の表わす文字の色を従来よりも正確に判別することができる。   According to the present invention, the color of a character represented by a character image input by a scanner or the like can be determined more accurately than before.

図1は本発明に係る画像形成装置1を有するシステム構成の例を示す図、図2は画像形成装置1のハードウェア構成の例を示す図、図3は画像形成装置1の機能的構成の例を示す図である。   1 is a diagram showing an example of a system configuration having an image forming apparatus 1 according to the present invention, FIG. 2 is a diagram showing an example of a hardware configuration of the image forming apparatus 1, and FIG. 3 is a functional configuration of the image forming apparatus 1. It is a figure which shows an example.

図1に示す画像形成装置1は、コピー、スキャナ、ファックス、ネットワークプリンティング、ドキュメントサーバ、およびファイル転送などの様々な機能を集約した画像処理装置である。複合機またはMFP(Multi Function Peripherals)などと呼ばれることもある。   An image forming apparatus 1 shown in FIG. 1 is an image processing apparatus that integrates various functions such as copying, scanning, faxing, network printing, document server, and file transfer. Sometimes called a multi-function peripheral or MFP (Multi Function Peripherals).

この画像形成装置1は、役所または企業などのオフィス、学校または図書館などの公共施設、コンビニエンスストアなどの店舗、その他種々の場所に設置され、複数のユーザによって共用することができる。また、パーソナルコンピュータまたはワークステーションなどの端末装置2と通信回線3を介して接続可能である。通信回線3として、インターネット、LAN、公衆回線、または専用線などが用いられる。   The image forming apparatus 1 is installed in offices or offices such as businesses, public facilities such as schools or libraries, stores such as convenience stores, and other various places and can be shared by a plurality of users. Further, it can be connected to a terminal device 2 such as a personal computer or a workstation via a communication line 3. As the communication line 3, the Internet, a LAN, a public line, a dedicated line, or the like is used.

画像形成装置1は、図2に示すように、CPU10a、RAM10b、ROM10c、ハードディスク10d、制御用回路10e、操作パネル10f、スキャナユニット10g、印刷ユニット10h、モデム10j、およびネットワークインタフェース10kなどによって構成される。   As shown in FIG. 2, the image forming apparatus 1 includes a CPU 10a, a RAM 10b, a ROM 10c, a hard disk 10d, a control circuit 10e, an operation panel 10f, a scanner unit 10g, a printing unit 10h, a modem 10j, and a network interface 10k. The

スキャナユニット10gは、原稿の用紙(以下、単に「原稿」と記載する。)に描かれている写真、文字、絵、図表などの画像を光学的に読み取って電子データ化する装置である。読み取られた画像のデータはRAM10bに記憶され、後に説明するように、様々な処理が施されてファイル化される。本実施形態では、カラースキャナが用いられる。   The scanner unit 10g is an apparatus that optically reads an image such as a photograph, a character, a picture, or a chart drawn on a document sheet (hereinafter simply referred to as “document”) and converts it into electronic data. The read image data is stored in the RAM 10b, and is subjected to various processes and filed as described later. In this embodiment, a color scanner is used.

印刷ユニット10hは、スキャナユニット10gで読み取られた画像または端末装置2などから送信されてきた画像を、イエロー、マゼンタ、シアン、およびブラックの4色のトナーを使用して用紙に印刷する装置である。   The printing unit 10h is an apparatus that prints an image read by the scanner unit 10g or an image transmitted from the terminal device 2 or the like on a sheet using toners of four colors of yellow, magenta, cyan, and black. .

操作パネル10fは、操作部および表示部によって構成される。操作部としてテンキーなどが用いられ、表示部として液晶ディスプレイなどが用いられる。ユーザは、操作部を操作することによって、画像形成装置1に対して、処理の実行開始または中断などの指令を与え、データの宛先、スキャン条件、または画像ファイルフォーマットなどの処理条件を指定し、その他種々の事項を指定することができる。表示部には、ユーザに対してメッセージまたは指示を与えるための画面、ユーザが所望する処理の種類および処理条件を入力するための画面、および画像形成装置1で実行された処理の結果を示す画面などが表示される。操作パネル10fとしてタッチパネルを用いた場合は、タッチパネルが操作部および表示部の両方を兼ねる。このように、操作パネル10fは、画像形成装置1を操作するユーザのためのユーザインタフェースの役割を果たしている。なお、端末装置2には、画像形成装置1に対して指令を与えるためのアプリケーションプログラムおよびドライバがインストールされている。したがって、ユーザは、端末装置2によって画像形成装置1を遠隔的に操作することができる。   The operation panel 10f includes an operation unit and a display unit. A numeric keypad or the like is used as the operation unit, and a liquid crystal display or the like is used as the display unit. By operating the operation unit, the user gives an instruction to start or stop the processing to the image forming apparatus 1 and designates processing conditions such as a data destination, a scanning condition, or an image file format, Various other items can be specified. The display unit includes a screen for giving a message or an instruction to the user, a screen for inputting the type of processing and processing conditions desired by the user, and a screen showing the result of the processing executed by the image forming apparatus 1 Etc. are displayed. When a touch panel is used as the operation panel 10f, the touch panel serves as both an operation unit and a display unit. As described above, the operation panel 10 f serves as a user interface for a user who operates the image forming apparatus 1. Note that an application program and a driver for giving a command to the image forming apparatus 1 are installed in the terminal device 2. Therefore, the user can remotely operate the image forming apparatus 1 with the terminal device 2.

モデム10jは、NCU(Network Control Unit)が内蔵されており、アナログの公衆回線を介して他のファックス端末と接続し、ファクシミリプロトコルに基づくデータ制御およびファックスデータの変復調などを行う。ネットワークインタフェース10kは、NIC(Network Interface Card)であって、LANまたはインターネットなどを介して端末装置2などへの接続を行い、ファイルの送受信などを行う。   The modem 10j has a built-in NCU (Network Control Unit), and is connected to another fax terminal via an analog public line to perform data control based on a facsimile protocol, fax data modulation / demodulation, and the like. The network interface 10k is a NIC (Network Interface Card), and connects to the terminal device 2 and the like via a LAN or the Internet, and transmits and receives files.

制御用回路10eは、ハードディスク10d、操作パネル10f、スキャナユニット10g、印刷ユニット10h、モデム10j、およびネットワークインタフェース10kなどの装置を制御するための回路である。   The control circuit 10e is a circuit for controlling devices such as the hard disk 10d, the operation panel 10f, the scanner unit 10g, the printing unit 10h, the modem 10j, and the network interface 10k.

ハードディスク10dには、図3に示すような前処理部101、非文字領域処理部102、文字領域処理部103、およびPDFファイル生成部104などの機能を実現するためのプログラムおよびデータなどが格納されている。これらのプログラムは必要に応じてRAM10bに読み出され、CPU10aによってプログラムが実行される。これらのプログラムまたはデータの一部または全部を、ROM10cに記憶させておいてもよい。または、図3の機能の一部または全部を、制御用回路10eによって実現するようにしてもよい。   The hard disk 10d stores programs and data for realizing functions such as the preprocessing unit 101, the non-character region processing unit 102, the character region processing unit 103, and the PDF file generation unit 104 as shown in FIG. ing. These programs are read into the RAM 10b as necessary, and the programs are executed by the CPU 10a. Some or all of these programs or data may be stored in the ROM 10c. Alternatively, part or all of the functions of FIG. 3 may be realized by the control circuit 10e.

図4は原稿画像GA0、GA0’の例を示す図、図5は非文字領域処理部102の構成の例を示す図である。   FIG. 4 is a diagram illustrating an example of document images GA0 and GA0 ′, and FIG. 5 is a diagram illustrating a configuration example of the non-character area processing unit 102.

次に、図3に示す画像形成装置1の各部の機能および処理内容などについて説明する。   Next, functions and processing contents of each unit of the image forming apparatus 1 shown in FIG. 3 will be described.

前処理部101は、スキャナユニット10gによって入力された原稿の画像(以下、「原稿画像GA0」と記載する。)に対して、非文字領域処理部102以降の処理に対応した解像度に変換する処理(解像度変換処理)を施し、さらに、原稿画像GA0の下地部分の色などを除去する処理(下地除去処理)を施す。「原稿画像GA0の下地部分」とは、コンテンツ(オブジェクト)が何もない領域のことを意味する。例えば、図4に示すような原稿画像GA0である場合は、「新・デジタルMFP 255255」という文字列の画像のある矩形領域、「デジタル機の価格差は…期待できます。」という文字列の画像のある矩形領域、およびMFPの写真が中央に配置された矩形領域の合計3つの矩形領域以外の部分が、原稿画像GA0の下地部分である。   The preprocessing unit 101 converts a document image input by the scanner unit 10g (hereinafter referred to as “document image GA0”) to a resolution corresponding to the processing after the non-character area processing unit 102. (Resolution conversion processing) is performed, and further, processing (background removal processing) for removing the color of the background portion of the document image GA0 is performed. The “background portion of the document image GA0” means an area where there is no content (object). For example, in the case of a manuscript image GA0 as shown in FIG. 4, a rectangular area with an image of a character string “new digital MFP 255255”, a character string “The price difference of a digital machine can be expected ...”. A portion other than a total of three rectangular regions including a rectangular region with an image and a rectangular region in which a photograph of the MFP is arranged at the center is a background portion of the document image GA0.

原稿画像GA0には、文字の画像、写真の画像、または背景の画像など、様々な種類のオブジェクトの画像が含まれている。以下、文字画像が含まれる領域を「文字領域RM」と記載し、文字画像以外のオブジェクトの画像しか含まれない領域を「非文字領域RH」と記載する。例えば、図4の原稿画像GA0は、2つの文字領域RMおよび1つの非文字領域RHを有している。また、解像度変換処理および下地除去処理が施された原稿画像GA0を「原稿画像GA0’」と記載する。   The document image GA0 includes images of various types of objects such as character images, photographic images, and background images. Hereinafter, a region including a character image is referred to as a “character region RM”, and a region including only an image of an object other than a character image is referred to as a “non-character region RH”. For example, the document image GA0 of FIG. 4 has two character areas RM and one non-character area RH. The document image GA0 that has been subjected to the resolution conversion process and the background removal process is referred to as “document image GA0 ′”.

文字領域RMには、文字を表わす線の画像およびその線の背景の画像が含まれている。以下、前者を「文字画像」と記載し、後者を「文字背景画像」と記載する。例えば、白色の用紙に赤色の文字が書かれている原稿をスキャンした場合は、文字領域RMのうち、赤色の画素群が文字画像となり、白色の画素群が文字背景画像となる。ただし、文字の線と背景との境界付近は、色滲みのために色の区別が付かないことがある。この問題については、後に順次説明する処理によって対処する。   The character region RM includes a line image representing a character and a background image of the line. Hereinafter, the former is referred to as “character image”, and the latter is referred to as “character background image”. For example, when a document having red characters written on white paper is scanned, a red pixel group in the character region RM becomes a character image, and a white pixel group becomes a character background image. However, near the boundary between the character line and the background, the color may not be distinguished due to color blur. This problem will be dealt with by processing that will be described later.

非文字領域処理部102は、図5に示すように、明度算出部121、写真背景等抽出部122、階調等補正部123、および非文字再現用データ生成部124などによって構成され、原稿画像GA0’のうちの非文字領域RHつまり写真および背景などの領域に対する画像処理などを行う。   As shown in FIG. 5, the non-character area processing unit 102 includes a lightness calculation unit 121, a photographic background extraction unit 122, a gradation correction unit 123, a non-character reproduction data generation unit 124, and the like. Image processing or the like is performed on the non-character area RH in GA0 ′, that is, an area such as a photograph and a background.

明度算出部121は、前処理された原稿画像GA0つまり原稿画像GA0’の各画素の明度を算出することによって、明度画像GA1を生成する。例えば、フルカラー(つまり、24ビット)の原稿画像GA0が入力された場合は、次のような方法で明度を算出する。   The brightness calculation unit 121 generates the brightness image GA1 by calculating the brightness of each pixel of the preprocessed document image GA0, that is, the document image GA0 '. For example, when a full-color (that is, 24-bit) document image GA0 is input, the brightness is calculated by the following method.

前処理によって得られた原稿画像GA0’のR(赤)、G(緑)、およびB(青)の各原色の階調の値を8ビットの階調に落とす。そして、これらの値を次の(1)式のような公知の計算式に代入する。
Y=0.3×R+0.6×G+0.1×B …… (1)
ただし、Yは明度、RはR成分の階調の値、GはG成分の階調の値、BはB成分の階調の値である。
The gradation value of each primary color of R (red), G (green), and B (blue) of the document image GA0 ′ obtained by the preprocessing is reduced to an 8-bit gradation. These values are substituted into a known calculation formula such as the following formula (1).
Y = 0.3 × R + 0.6 × G + 0.1 × B (1)
However, Y is the brightness, R is the gradation value of the R component, G is the gradation value of the G component, and B is the gradation value of the B component.

なお、必要に応じて、スムージング処理を施し、明度画像GA1のノイズの除去および輪郭の補正などを行ってもよい。   If necessary, smoothing processing may be performed to remove noise from the brightness image GA1 and correct the contour.

写真背景等抽出部122は、明度画像GA1に対してラベリング処理を施すことによって、原稿画像GA0’に含まれる写真または背景などの画像つまり文字以外の画像の領域(非文字領域RH)の位置を判別し、非文字領域RHを抽出する。一般に、写真などの画像に対してラベリング処理を施すと白または黒の大きな塊が出現し、文字画像に対してラベリング処理を施すと不規則な細い線が多く出現しする。このような特徴に基づいて、非文字領域RHの位置を判別する。そして、その判別結果を示す非文字領域位置データ81を生成する。図4の場合は、非文字領域RHaの位置を示す非文字領域位置データ81を生成する。   The photographic background extraction unit 122 performs labeling processing on the brightness image GA1, thereby determining the position of an image area other than characters (non-character area RH) such as a photograph or background included in the document image GA0 ′. It discriminate | determines and extracts non-character area | region RH. In general, when a labeling process is performed on an image such as a photograph, a large white or black lump appears, and when a labeling process is performed on a character image, many irregular thin lines appear. Based on such characteristics, the position of the non-character region RH is determined. Then, non-character area position data 81 indicating the determination result is generated. In the case of FIG. 4, non-character area position data 81 indicating the position of the non-character area RHa is generated.

階調等補正部123は、必要に応じて、写真背景等抽出部122によって抽出された非文字領域RHの中の画像の階調などの補正を、公知の方法を用いて行う。   The tone correction unit 123 corrects the tone of the image in the non-character region RH extracted by the photo background extraction unit 122 as necessary using a known method.

非文字再現用データ生成部124は、各非文字領域RHの、階調等補正部123によって補正された画像(以下、「非文字画像GC」と記載する。)の画像データおよび非文字領域位置データ81を統合することによって非文字領域画像再現用データ71を生成する。   The non-character reproduction data generation unit 124 includes image data and non-character region position of each non-character region RH corrected by the gradation etc. correction unit 123 (hereinafter referred to as “non-character image GC”). By integrating the data 81, non-character area image reproduction data 71 is generated.

以上のような非文字領域処理部102を構成する各部の処理によって、原稿画像GA0’に含まれる各非文字領域RHの位置に関する情報および好適な画像データ(イメージデータ)が得られる。以下、非文字領域処理部102による画像処理の結果得られた、非文字領域RHの画像データを、「非文字領域画像再現用データ71」と記載する。   Information regarding the position of each non-character region RH and suitable image data (image data) included in the document image GA0 'can be obtained by the processing of each unit constituting the non-character region processing unit 102 as described above. Hereinafter, the image data of the non-character area RH obtained as a result of the image processing by the non-character area processing unit 102 will be referred to as “non-character area image reproduction data 71”.

図6は文字領域処理部103の構成の例を示す図、図7は複数のブロックBRに分割した文字領域RMの例を示す図、図8は原稿文字色判別部135の構成の例を示す図、図9は細線化画像GSの生成方法の例を説明するための図、図10は文字の線図形の中央線の位置の例を示す図、図11は文字の線図形の中央線およびその付近の領域を複数の文字色候補領域RCに分割する方法の例を説明するための図、図12は近似色画素選出処理の流れの例を説明するためのフローチャート、図13は各原色の階調の分布の例を示す図である。   6 is a diagram illustrating an example of the configuration of the character region processing unit 103, FIG. 7 is a diagram illustrating an example of the character region RM divided into a plurality of blocks BR, and FIG. 8 illustrates an example of the configuration of the document character color determination unit 135. FIG. 9 is a diagram for explaining an example of a method for generating a thinned image GS, FIG. 10 is a diagram showing an example of the position of the center line of a character line graphic, and FIG. FIG. 12 is a diagram for explaining an example of a method of dividing a nearby region into a plurality of character color candidate regions RC, FIG. 12 is a flowchart for explaining an example of the flow of approximate color pixel selection processing, and FIG. It is a figure which shows the example of distribution of a gradation.

図3に戻って、文字領域処理部103は、図6に示すように、明度算出部131、文字領域抽出部132、文字領域分割部133、二値化処理部134、原稿文字色判別部135、文字背景処理部136、および文字再現用データ生成部137などによって構成され、文字画像を含む領域つまり文字領域RMに対する画像処理などを行う。   Returning to FIG. 3, the character area processing unit 103, as shown in FIG. 6, includes a lightness calculation unit 131, a character area extraction unit 132, a character region division unit 133, a binarization processing unit 134, and a document character color determination unit 135. The character background processing unit 136, the character reproduction data generation unit 137, and the like, and performs image processing on an area including the character image, that is, the character area RM.

明度算出部131は、図5の明度算出部121と同様に、原稿画像GA0’の各画素の明度を算出することによって、明度画像GA1を生成する。   The lightness calculation unit 131 generates the lightness image GA1 by calculating the lightness of each pixel of the document image GA0 ', similarly to the lightness calculation unit 121 of FIG.

文字領域抽出部132は、明度画像GA1に対してラベリング処理を施し、その処理結果の特徴に基づいて原稿画像GA0’に含まれる文字領域RMの位置を判別し、文字領域RMを抽出する。そして、その判別結果を示す文字領域位置データ80を生成する。図4の場合は、2つの文字領域RMa、RMbそれぞれについて、各位置を示す文字領域位置データ80が生成される。   The character region extraction unit 132 performs a labeling process on the lightness image GA1, determines the position of the character region RM included in the document image GA0 'based on the characteristics of the processing result, and extracts the character region RM. Then, character area position data 80 indicating the determination result is generated. In the case of FIG. 4, character area position data 80 indicating each position is generated for each of the two character areas RMa and RMb.

なお、明度算出部131と明度算出部121とを共通化し、文字領域抽出部132と写真背景等抽出部122とを共通化してもよい。つまり、1つの明度算出部によって得られた明度画像を、以降の処理において各部が共通に使用するようにしてもよい。また、文字領域抽出部132および写真背景等抽出部122を1つの領域抽出部として共通化し、1回のラベリング処理の結果に基づいて原稿画像GA0’の中から文字領域RMおよび非文字領域RHの両方を抽出し、それぞれの位置を示す文字領域位置データ80および非文字領域位置データ81を生成するようにしてもよい。   The brightness calculation unit 131 and the brightness calculation unit 121 may be shared, and the character area extraction unit 132 and the photographic background extraction unit 122 may be shared. That is, the brightness image obtained by one brightness calculation unit may be used in common by each unit in the subsequent processing. Further, the character area extraction unit 132 and the photographic background extraction unit 122 are shared as one area extraction unit, and the character area RM and the non-character area RH are selected from the document image GA0 ′ based on the result of one labeling process. Both may be extracted, and character area position data 80 and non-character area position data 81 indicating the respective positions may be generated.

文字領域分割部133は、文字領域画像GMに多数の文字が表れている場合に、左右方向または上下方向に並ぶ複数個の文字をグループ化する。例えば、1〜10個程度の文字をグループ化する。英文などの場合は、単語ごと(つまり、スペースとスペースとの間にある文字群ごと)にグループ化してもよい。横書きの場合は左右方向に並ぶ文字をグループ化し、縦書きの場合は上下方向に並ぶ文字をグループ化する。横書きであるか縦書きであるかは、文字画像の並び方の特徴に基づいて判別することができる。そして、グループ化した各文字の文字画像を含む部分を、文字領域RMからブロックBRとして抽出する。これにより、文字領域RMは複数のブロックBRに分割される。例えば、文字領域RMb(図4参照)を、図7に示すように複数のブロックBR(BR1、BR2、…)に分割する。また、各ブロックBRについて、文字領域RMにおけるその位置を示すブロック位置データ82を生成しておく。   The character area dividing unit 133 groups a plurality of characters arranged in the horizontal direction or the vertical direction when a large number of characters appear in the character area image GM. For example, about 1 to 10 characters are grouped. In the case of English sentences, etc., they may be grouped for each word (that is, for each character group between the spaces). In horizontal writing, characters arranged in the left-right direction are grouped, and in vertical writing, characters arranged in the vertical direction are grouped. Whether it is horizontal writing or vertical writing can be determined based on the characteristics of the arrangement of the character images. Then, a portion including the character image of each grouped character is extracted as a block BR from the character region RM. Thereby, the character area RM is divided into a plurality of blocks BR. For example, the character area RMb (see FIG. 4) is divided into a plurality of blocks BR (BR1, BR2,...) As shown in FIG. For each block BR, block position data 82 indicating the position in the character area RM is generated.

二値化処理部134は、文字領域分割部133によって得られた文字領域RMの各ブロックBRの二値画像GNを生成する。本実施形態では、ブロックBRの二値画像GNを次のように生成する。ブロックBRの画像の各画素の濃度を算出する。本実施形態では、濃度は8ビットで表されるものとする。算出した濃度が、濃度閾値β以上であればその画素の値を「1」とし、濃度閾値β未満であればその画素の値を「0」とする。このように各画素の値を「0」または「1」のいずれかに変換することによって、二値画像GNが生成される。   The binarization processing unit 134 generates a binary image GN of each block BR of the character area RM obtained by the character area dividing unit 133. In the present embodiment, the binary image GN of the block BR is generated as follows. The density of each pixel of the image of the block BR is calculated. In the present embodiment, the density is represented by 8 bits. If the calculated density is equal to or higher than the density threshold β, the value of the pixel is “1”, and if the calculated density is less than the density threshold β, the value of the pixel is “0”. Thus, by converting the value of each pixel into either “0” or “1”, a binary image GN is generated.

生成した二値画像によると、原稿画像GA0’および明度画像GA1などにそれぞれ含まれる文字領域RMの文字画像の部分と文字背景画像の部分とを区別することができる。つまり、「1」である画素が文字画像の部分を示し、「0」である画素が文字背景画像の部分を示しているものとする。   According to the generated binary image, the character image portion and the character background image portion of the character region RM respectively included in the document image GA0 ', the brightness image GA1, and the like can be distinguished. That is, it is assumed that a pixel “1” indicates a character image portion and a pixel “0” indicates a character background image portion.

原稿文字色判別部135は、図8に示すように、低解像度画像生成部301、細線化画像生成部302、文字画像分割部303、近似色画素選出部304、文字色成分取得部305、および文字色決定部306などによって構成され、原稿に描かれていた文字の色(以下、「原稿文字色」と記載する。)を判別する。本実施形態では、ブロックBRごとに、原稿文字色を判別する。ここで、原稿文字色を判別する処理の内容について、図9に示すような「255255」という文字群を表す文字画像を含むブロックBRxが処理対象である場合を例に説明する。   As shown in FIG. 8, the document character color determination unit 135 includes a low resolution image generation unit 301, a thin line image generation unit 302, a character image division unit 303, an approximate color pixel selection unit 304, a character color component acquisition unit 305, and A character color determining unit 306 and the like are used to determine the color of characters drawn on the original (hereinafter referred to as “original character color”). In the present embodiment, the document character color is determined for each block BR. Here, the content of the process of determining the document character color will be described by taking as an example the case where a block BRx including a character image representing the character group “255255” as shown in FIG.

図9(a)は、元の原稿画像GA0’のうちのブロックBRxに対応する部分(以下、「ブロック原稿画像GA0x」と記載する。)を示している。図9(b)は、原稿画像GA0’の明度画像GA1のうちのブロックBRxに対応する部分(以下、「ブロック明度画像GA1x」と記載する。)を示している。図9(c)は、ブロックBRxの二値画像GNである。   FIG. 9A shows a portion (hereinafter referred to as “block document image GA0x”) corresponding to the block BRx in the original document image GA0 ′. FIG. 9B shows a portion corresponding to the block BRx in the lightness image GA1 of the original image GA0 ′ (hereinafter referred to as “block lightness image GA1x”). FIG. 9C is a binary image GN of the block BRx.

図8の低解像度画像生成部301は、ブロックBRxの二値画像GNの解像度を落とすことによって図9(d)に示すような低解像度画像GTを生成する。本実施形態では、原稿画像GA0、GA0’、ブロック原稿画像GA0x、および二値画像GNの解像度が300dpiであるものとし、低解像度画像生成部301は75dpiの低解像度画像GTを生成するものとする。   The low resolution image generation unit 301 in FIG. 8 generates a low resolution image GT as shown in FIG. 9D by reducing the resolution of the binary image GN of the block BRx. In the present embodiment, it is assumed that the document images GA0 and GA0 ′, the block document image GA0x, and the binary image GN have a resolution of 300 dpi, and the low resolution image generation unit 301 generates a 75 dpi low resolution image GT. .

細線化画像生成部302は、低解像度画像GTに対して公知の細線化処理を施すことによって、図9(e)のような細線化画像GSを生成する。すなわち、低解像度画像GTに表れている太さ1ピクセル(画素)以上の線図形から中心線を検出することによって低解像度画像GTを生成する。例えば「2」という文字の線図形からは、図10に示すような中央線が検出される。本実施形態では、太さ1ピクセル(画素)の細線を表わす細線化画像GSを生成する。なお、細線化画像GSの解像度は、低解像度画像GTの解像度と同じであり、75dpiである。細線化画像生成部302の処理によって、文字の線図形の中央線およびその付近に位置する画素群(領域)を見つけることができる。   The thinned image generation unit 302 generates a thinned image GS as shown in FIG. 9E by performing a known thinning process on the low resolution image GT. That is, the low resolution image GT is generated by detecting the center line from a line figure having a thickness of 1 pixel (pixel) or more appearing in the low resolution image GT. For example, a center line as shown in FIG. 10 is detected from the line figure of the character “2”. In the present embodiment, a thinned image GS representing a thin line having a thickness of 1 pixel (pixel) is generated. Note that the resolution of the thinned image GS is the same as the resolution of the low-resolution image GT and is 75 dpi. By the processing of the thinned image generating unit 302, it is possible to find a pixel group (region) located at the center line of the character line figure and its vicinity.

文字画像分割部303は、細線化画像GSに基づいて、ブロック原稿画像GA0xに含まれる文字画像が表わす文字の線図形の中央線およびその付近を複数の文字色候補領域RCに分割する。文字色候補領域RCに分割する処理は、例えば次のような方法で行う。   Based on the thinned image GS, the character image dividing unit 303 divides the center line of the character line figure represented by the character image included in the block document image GA0x and the vicinity thereof into a plurality of character color candidate regions RC. The process of dividing the character color candidate area RC is performed by the following method, for example.

細線化画像GSの細線上の1つの画素は、ブロック原稿画像GA0xの中の文字画像のうちの複数個の画素に相当する。つまり、例えば図11(a)において円形の点線枠で示す細線化画像GSの中の細線上の1つの画素PXは、図11(b)において矩形の点線枠で示す元のブロック原稿画像GA0xの文字の線上の複数個の画素に相当する。文字画像分割部303は、これらの画素の塊を文字色候補領域RCとして抽出する。本実施形態では、細線化画像GSおよびブロック原稿画像GA0xのそれぞれの解像度の関係から、図11(c)に示すように、4×4画素の文字色候補領域RCが抽出される。同様に、細線上の他の画素に対応する画素の塊を抽出することによって、ブロック原稿画像GA0xの文字画像が表わす文字の線図形の中央線およびその付近を複数の文字色候補領域RCに分割することができる。文字画像分割部303の処理によって複数の文字色候補領域RCが抽出される。   One pixel on the thin line of the thinned image GS corresponds to a plurality of pixels in the character image in the block document image GA0x. That is, for example, one pixel PX on the thin line in the thinned image GS indicated by the circular dotted line frame in FIG. 11A corresponds to the original block original image GA0x indicated by the rectangular dotted line frame in FIG. It corresponds to a plurality of pixels on a character line. The character image dividing unit 303 extracts these pixel clusters as the character color candidate region RC. In the present embodiment, a character color candidate region RC of 4 × 4 pixels is extracted from the relationship between the resolutions of the thinned image GS and the block document image GA0x, as shown in FIG. Similarly, by extracting a block of pixels corresponding to other pixels on the thin line, the center line of the character line figure represented by the character image of the block original image GA0x and its vicinity are divided into a plurality of character color candidate regions RC. can do. A plurality of character color candidate regions RC are extracted by the processing of the character image dividing unit 303.

近似色画素選出部304は、文字画像分割部303によって得られた各文字色候補領域RCの中から、原稿文字色に最も近い色を表わしていると考えられる画素(以下、「近似色画素PK」と記載する。)を、図12に示すような手順で選出する。   The approximate color pixel selection unit 304 selects a pixel (hereinafter referred to as an “approximate color pixel PK”) that is considered to represent a color closest to the original character color from each character color candidate region RC obtained by the character image division unit 303. Is selected in accordance with the procedure shown in FIG.

1つの文字色候補領域RCに注目し、その文字色候補領域RCを構成する4×4個の画素のうち上下左右の端に位置する画素(例えば、図11(c)において太線枠の外側に位置する12個の画素)を候補から除外する(図12の#402)。これらの画素は、太線枠の内側に位置する画素よりも文字背景画像に近いので、色滲みが発生している可能性が高く信頼性が低いからである。   Paying attention to one character color candidate region RC, out of the 4 × 4 pixels constituting the character color candidate region RC, pixels located at the top, bottom, left and right edges (for example, outside the thick line frame in FIG. 11C) 12 pixels located) are excluded from the candidates (# 402 in FIG. 12). This is because these pixels are closer to the character background image than the pixels located inside the thick line frame, and therefore there is a high possibility that color blur has occurred and the reliability is low.

除外されずに残った画素つまり図11(c)において太線枠の内側に位置する2×2個の画素のそれぞれの明度を算出する。そして、明度が最も低い画素(つまり、濃度が最も高い画素)を、原稿文字色に最も近い色を表わしている画素つまり近似色画素PKとして選出する(#403)。明度は、図6の明度算出部131によって生成した明度画像GA1を参照しても構わない。   The brightness of each pixel that remains without being excluded, that is, 2 × 2 pixels located inside the thick line frame in FIG. 11C is calculated. Then, the pixel having the lowest brightness (that is, the pixel having the highest density) is selected as the pixel representing the color closest to the original character color, that is, the approximate color pixel PK (# 403). For the lightness, the lightness image GA1 generated by the lightness calculation unit 131 in FIG. 6 may be referred to.

他の文字色候補領域RCについても同様にステップ#402、#403の処理を実行し、近似色画素PKを選出する。   Similarly, the processing of steps # 402 and # 403 is executed for other character color candidate regions RC, and an approximate color pixel PK is selected.

以上の処理によって、1つのブロックBRについて多数の近似色画素PKが選出される。具体的には、そのブロックBRの細線化画像GS(図9(e)参照)の細線を構成する画素の個数分の近似色画素PKが選出される。   Through the above processing, a large number of approximate color pixels PK are selected for one block BR. Specifically, the approximate color pixels PK corresponding to the number of pixels constituting the thin line of the thin line image GS (see FIG. 9E) of the block BR are selected.

図8の文字色成分取得部305は、近似色画素選出部304によって選出された各近似色画素PKについて、ブロックBRの文字画像の中のその近似色画素PKの、RGBの各原色の階調の値を取得する。係る画素値は、元の原稿画像GA0’のうちのブロックBRに対応する部分を検索し、そのブロックBRの中のその近似色画素PKの位置の画素値を参照することによって取得することができる。取得した各原色の階調の値は、例えば、図13に示すヒストグラムのような分布になる。   For each approximate color pixel PK selected by the approximate color pixel selection unit 304, the character color component acquisition unit 305 in FIG. 8 performs gradations of RGB primary colors of the approximate color pixel PK in the character image of the block BR. Get the value of. The pixel value can be obtained by searching a portion corresponding to the block BR in the original document image GA0 ′ and referring to the pixel value at the position of the approximate color pixel PK in the block BR. . The acquired gradation value of each primary color has a distribution like a histogram shown in FIG. 13, for example.

文字色決定部306は、文字色成分取得部305によって取得された各原色の階調の値の分布に基づいて、ブロックBRの文字画像が表わす文字の色を、例えば次のような方法で決定する。   The character color determination unit 306 determines the color of the character represented by the character image of the block BR based on, for example, the following method based on the distribution of gradation values of the primary colors acquired by the character color component acquisition unit 305. To do.

文字色成分取得部305によって取得された各原色の階調の値の分布のそれぞれについて、ピークの値を求める。これは、公知の方法によって求められる。例えば、最も個数の多い画素値をピークの値として選出してもよいし、公知の演算方法によって求めてもよい。このようにして求められたR、G、Bそれぞれのピークの値によって再現される色を、ブロックBRの文字画像が表わす文字の色に決定する。そして、これを、ブロックBRの文字画像が表わす文字の色であると判別する。   A peak value is obtained for each distribution of gradation values of each primary color acquired by the character color component acquisition unit 305. This is determined by a known method. For example, the pixel value having the largest number may be selected as the peak value, or may be obtained by a known calculation method. The color reproduced by the respective peak values of R, G, and B thus determined is determined as the character color represented by the character image of the block BR. Then, it is determined that this is the color of the character represented by the character image of the block BR.

以上のような原稿文字色判別部135を構成する各部の処理によって、ブロックBRそれぞれの文字画像が表わす文字の色が決定する。そして、決定した色を、ブロックBRにおける原稿文字色であると判別する。また、原稿文字色判別部135は、ブロックBRごとに、判別した原稿文字色を示す文字色データ83を生成する。   The color of the character represented by the character image of each block BR is determined by the processing of each part constituting the document character color discriminating unit 135 as described above. Then, the determined color is determined as the original character color in the block BR. In addition, the document character color determination unit 135 generates character color data 83 indicating the determined document character color for each block BR.

図6に戻って、文字背景処理部136は、原稿画像GA0’の中の各文字領域RMの各ブロックBRの画像から文字画像を削除することによって、文字の背景部分だけの画像つまり文字背景画像の画像データを生成する。以下、文字背景処理部136によって得られた文字背景画像を「文字背景画像GH」と記載する。文字背景画像GHの削除された画素の部分は、白抜けの状態になる。なお、文字画像の位置は、二値画像GNを参照すればよい。つまり、二値画像GNの中の画素値が「1」である画素の位置に対応する部分をブロックBRの画像から削除することによって、文字背景画像GHを生成することができる。   Returning to FIG. 6, the character background processing unit 136 deletes the character image from the image of each block BR of each character region RM in the document image GA0 ′, so that an image of only the character background portion, that is, the character background image. Image data is generated. Hereinafter, the character background image obtained by the character background processing unit 136 is referred to as “character background image GH”. The deleted pixel portion of the character background image GH is blank. In addition, what is necessary is just to refer the binary image GN for the position of a character image. That is, the character background image GH can be generated by deleting from the image of the block BR the part corresponding to the position of the pixel whose pixel value is “1” in the binary image GN.

文字再現用データ生成部137は、各文字領域RMの画像を再現するための文字領域再現用データ70を生成する。この文字領域再現用データ70は、各文字領域RMの各ブロックBRのブロック位置データ82、二値画像GNすなわち文字画像の線図形の画像データ(イメージデータ)、文字色データ83、および文字背景画像GHの画像データ(イメージデータ)と、各文字領域RMの文字領域位置データ80とを統合することによって生成される。   The character reproduction data generation unit 137 generates character area reproduction data 70 for reproducing an image of each character area RM. The character area reproduction data 70 includes block position data 82 of each block BR of each character area RM, binary image GN, that is, image data (image data) of a line figure of the character image, character color data 83, and character background image. It is generated by integrating GH image data (image data) and character region position data 80 of each character region RM.

以上のような文字領域処理部103を構成する各部の処理によって、文字領域RMに対する画像処理がなされ、文字領域再現用データ70が生成される。   The image processing is performed on the character region RM by the processing of each part constituting the character region processing unit 103 as described above, and the character region reproduction data 70 is generated.

図14は原稿再現用ファイルFLの構造の例を示す図である。図3に戻って、PDFファイル生成部104は、非文字領域処理部102によって生成された非文字領域位置データ81および文字領域処理部103によって生成された文字領域位置データ80などを用いて、スキャナユニット10gによって入力された原稿の画像を再現するための原稿再現用ファイルFLを、例えば次のような手順で生成する。   FIG. 14 is a diagram showing an example of the structure of the document reproduction file FL. Returning to FIG. 3, the PDF file generation unit 104 uses the non-character region position data 81 generated by the non-character region processing unit 102, the character region position data 80 generated by the character region processing unit 103, and the like. A document reproduction file FL for reproducing an image of a document input by the unit 10g is generated by the following procedure, for example.

文字領域再現用データ70に含まれる二値画像GN(文字画像の線図形)の画像データおよび文字背景画像GHの画像データを圧縮する。前者は二値データなので、G4圧縮方式(MMR圧縮方式)で圧縮するのが望ましい。後者は、色または模様の画像データなので、GIFまたはJPEGなどの圧縮方式で圧縮するのが望ましい。   The image data of the binary image GN (line figure of the character image) and the image data of the character background image GH included in the character region reproduction data 70 are compressed. Since the former is binary data, it is desirable to compress it by G4 compression method (MMR compression method). Since the latter is image data of color or pattern, it is desirable to compress it by a compression method such as GIF or JPEG.

二値画像GNおよび文字背景画像GHの圧縮処理と並行してまたは前後して、非文字領域画像再現用データ71に含まれる非文字画像GCの画像データを圧縮する。非文字領域RHには写真などの大きなサイズの画像が配置されているので、JPEGのような、非可逆の圧縮方式によってサイズが小さくなるように圧縮する。または、非文字画像GCごとに画像のタイプを判別し、JPEGまたはGIFなどの圧縮方式を使い分けるようにしてもよい。   In parallel with or before or after the compression processing of the binary image GN and the character background image GH, the image data of the non-character image GC included in the non-character area image reproduction data 71 is compressed. Since an image of a large size such as a photograph is arranged in the non-character area RH, the image is compressed so as to be reduced in size by an irreversible compression method such as JPEG. Alternatively, the image type may be determined for each non-character image GC, and a compression method such as JPEG or GIF may be used properly.

さらに、生成する原稿再現用ファイルFLの属性(ファイル名、サイズ、作成者など)を示すファイル属性データ72を生成する。属性の一部(例えばファイル名など)は、ユーザに指定させるようにしてもよい。   Further, file attribute data 72 indicating the attributes (file name, size, creator, etc.) of the document reproduction file FL to be generated is generated. A part of the attribute (for example, a file name) may be specified by the user.

そして、圧縮処理を施した各文字領域RMの文字領域再現用データ70および各非文字領域RHの非文字領域画像再現用データ71と生成したファイル属性データ72とを統合しファイル化する。このようにして、原稿再現用ファイルFLが生成される。例えば、図4のような原稿画像GA0がスキャナユニット10gによって入力され、その原稿画像GA0に対して図3の各部が処理を実行すると、図14に示すようなデータ構造の原稿再現用ファイルFLが生成される。   Then, the character area reproduction data 70 of each character area RM subjected to the compression process, the non-character area image reproduction data 71 of each non-character area RH, and the generated file attribute data 72 are integrated into a file. In this way, the document reproduction file FL is generated. For example, when an original image GA0 as shown in FIG. 4 is input by the scanner unit 10g and each part of FIG. 3 executes processing on the original image GA0, an original reproduction file FL having a data structure as shown in FIG. Generated.

なお、同じ種類のオブジェクトの領域が複数個ある場合は、これらの領域を1つに統合し、全体のオブジェクト数を減らす処理を行ってもよい。   If there are a plurality of areas of the same type of object, these areas may be integrated into one and processing for reducing the total number of objects may be performed.

生成された原稿再現用ファイルFLは、ハードディスク10dに保存される。または、電子メールまたはFTPなどによって通信回線3を介して端末装置2などに転送される。原稿再現用ファイルFLを、アクロバット社のPDFなどの既存のフォーマットに従って生成してもよい。PDFに関しては、例えば、次の公知技術文献1に記載されている。   The generated document reproduction file FL is stored in the hard disk 10d. Alternatively, it is transferred to the terminal device 2 or the like via the communication line 3 by e-mail or FTP. The document reproduction file FL may be generated in accordance with an existing format such as Acrobat PDF. The PDF is described in, for example, the following known technical document 1.

〔公知技術文献1〕”Adobe PDFってなに?−PDF初級編”、アドビシステムズ社、平成17年5月14日検索、インターネット<URL:http://www.adobe.co.jp/products/acrobat/adobepdf13.html>
生成された原稿再現用ファイルFLを使用することによって、原稿の画像を再現することができる。ここで、原稿の画像の再現の手順について説明する。
[Prior Art Document 1] “What is Adobe PDF?-PDF Beginner's Edition”, Adobe Systems, May 14, 2005 search, Internet <URL: http://www.adobe.co.jp/products /acrobat/adobepdf13.html>
By using the generated document reproduction file FL, an image of the document can be reproduced. Here, a procedure for reproducing an image of a document will be described.

画像形成装置1または端末装置2は、原稿再現用ファイルFLに対応したアプリケーションソフト(例えば、原稿再現用ファイルFLがPDFファイルである場合はアドビシステムズ社のアクロバットリーダなど)を起動し、原稿再現用ファイルFLをRAMにロードする。圧縮されているデータは、適宜解凍する。   The image forming apparatus 1 or the terminal device 2 activates application software corresponding to the document reproduction file FL (for example, Acrobat Reader of Adobe Systems if the document reproduction file FL is a PDF file) and reproduces the document. Load file FL into RAM. The compressed data is decompressed as appropriate.

文字領域RMの画像を、その文字領域RMに係る文字領域再現用データ70に基づいて次のような手順で再現する。文字領域RMを構成する各ブロックBRについて、文字背景画像GHを再現するとともに、文字画像の線図形を再現する。その文字画像の線図形には、そのブロックBRに係る文字色データ83に示される原稿文字色を着色する。着色した文字画像の線図形を文字背景画像GHに嵌め込んでブロックBR全体の画像を再現し、これをブロック位置データ82に示される位置に配置することによって、文字領域RM全体の画像を再現する。文字領域RMが複数存在する場合つまり原稿再現用ファイルFLの中に複数の文字領域再現用データ70が含まれている場合は、文字領域RMごとに本処理を実行する。   The image of the character region RM is reproduced in the following procedure based on the character region reproduction data 70 related to the character region RM. For each block BR constituting the character region RM, the character background image GH is reproduced and the line figure of the character image is reproduced. The line figure of the character image is colored with the original character color indicated by the character color data 83 related to the block BR. The image of the entire character region RM is reproduced by fitting the line figure of the colored character image into the character background image GH to reproduce the image of the entire block BR and disposing it at the position indicated by the block position data 82. . When there are a plurality of character areas RM, that is, when a plurality of character area reproduction data 70 are included in the document reproduction file FL, this processing is executed for each character area RM.

文字領域RM全体の画像を再現する処理と前後してまたは並行して、非文字領域RH全体の画像つまり非文字画像GCを、その非文字領域RHに係る非文字領域画像再現用データ71に基づいて再現する。非文字領域RHが複数存在する場合つまり原稿再現用ファイルFLの中に複数の非文字領域画像再現用データ71が含まれている場合は、非文字領域RHごとに本処理を実行する。   Based on the non-character area image reproduction data 71 related to the non-character area RH, the image of the entire non-character area RH, that is, the non-character image GC, is processed before or after or in parallel with the process of reproducing the image of the entire character area RM. To reproduce. When there are a plurality of non-character areas RH, that is, when a plurality of non-character area image reproduction data 71 are included in the document reproduction file FL, this processing is executed for each non-character area RH.

そして、再現された文字領域RM全体の画像を、それに対応する文字領域位置データ80に示される位置に配置する。また、再現された非文字領域RH全体の画像を、それに対応する非文字領域位置データ81に示される位置に配置する。これにより、原稿再現用ファイルFLに係る画像が再現される。   Then, the reproduced image of the entire character area RM is arranged at a position indicated by the corresponding character area position data 80. Further, the reproduced image of the entire non-character area RH is arranged at a position indicated by the corresponding non-character area position data 81. As a result, the image related to the document reproduction file FL is reproduced.

再現された画像は、用紙に印刷しまたはディスプレイに表示することによって、ユーザに対して出力することができる。   The reproduced image can be output to the user by printing it on paper or displaying it on a display.

図15は画像形成装置1の全体的な処理の流れの例を説明するためのフローチャート、図16は非文字領域処理の流れの例を説明するためのフローチャート、図17は文字領域処理の流れの例を説明するためのフローチャートである。   15 is a flowchart for explaining an example of the overall processing flow of the image forming apparatus 1, FIG. 16 is a flowchart for explaining an example of the flow of non-character area processing, and FIG. 17 is a flow of character area processing. It is a flowchart for demonstrating an example.

次に、原稿の画像をスキャンし原稿再現用ファイルFLを生成する一連の処理の流れを、フローチャートを参照して説明する。   Next, a flow of a series of processing for scanning a document image and generating a document reproduction file FL will be described with reference to a flowchart.

図15において、画像形成装置1は、ファイル化の対象である原稿の画像をスキャンし(#1)、得られた画像に対して解像度変換処理および下地除去処理などの前処理を施す(#2)。   In FIG. 15, the image forming apparatus 1 scans an image of a document to be filed (# 1), and performs preprocessing such as resolution conversion processing and background removal processing on the obtained image (# 2). ).

原稿の画像の中の、文字以外のオブジェクト(写真など)が描かれている領域つまり非文字領域RHに対して図16に示すような処理を行うことによって、非文字領域RHの非文字領域画像再現用データ71を生成する(#3)。   A non-character area image of the non-character area RH is obtained by performing processing as shown in FIG. 16 on an area in which an object (photograph or the like) other than a character is drawn in the original image, that is, the non-character area RH. Reproduction data 71 is generated (# 3).

すなわち、原稿の画像の各画素の明度を算出し(図16の#11)、ラベリング処理を実行することによって非文字領域RHを抽出する(#12)。その際に、各非文字領域RHの位置情報(非文字領域位置データ81)も取得しておく。   That is, the brightness of each pixel of the document image is calculated (# 11 in FIG. 16), and the non-character region RH is extracted by executing a labeling process (# 12). At this time, position information (non-character area position data 81) of each non-character area RH is also acquired.

そして、非文字領域RHの画像の階調などの補正処理を必要に応じて行い(#13)、その画像のデータおよび非文字領域位置データ81などに基づいて非文字領域画像再現用データ71を生成する(#14)。   Then, correction processing such as the gradation of the image of the non-character region RH is performed as necessary (# 13), and the non-character region image reproduction data 71 is obtained based on the image data, the non-character region position data 81, and the like. Generate (# 14).

図15に戻って、ステップ#3の処理と前後してまたは並行して、原稿の画像の中の、文字が描かれている領域つまり文字領域RMに対して図17に示すような処理を施すことによって、文字領域RMの文字領域再現用データ70を生成する。   Returning to FIG. 15, before or after or in parallel with the process of step # 3, the process shown in FIG. 17 is performed on the area where the character is drawn, that is, the character area RM in the document image. Thus, the character area reproduction data 70 of the character area RM is generated.

すなわち、原稿の画像の各画素の明度を算出し(図17の#21)、ラベリング処理を実行することによって文字領域RMを抽出する(#22)。その際に、各文字領域RMの位置情報(文字領域位置データ80)も抽出しておく。なお、明度の算出の処理およびラベリングの処理は、図16のステップ#11、#12の処理と共通に行ってもよい。   That is, the brightness of each pixel of the document image is calculated (# 21 in FIG. 17), and the character region RM is extracted by executing a labeling process (# 22). At that time, position information (character area position data 80) of each character area RM is also extracted. The lightness calculation process and the labeling process may be performed in common with the processes of steps # 11 and # 12 in FIG.

文字領域RMに多くの文字が示されている場合は、これを複数のブロックBRに分割し(#23)、ブロックBRごとに二値画像GNを生成する(#24)。この二値画像GNによってブロックBRの中の文字画像と文字背景画像とを分けることができる。   When many characters are shown in the character region RM, it is divided into a plurality of blocks BR (# 23), and a binary image GN is generated for each block BR (# 24). With this binary image GN, the character image and the character background image in the block BR can be separated.

各ブロックBRの文字画像が表わす文字の色を判別する処理を行う。すなわち、原稿に書かれている文字の本来の色に近い画素(近似色画素PK)を選び出し(#25)、それらの画素値に基づいて原稿文字色を判別する(#26)。なお、近似色画素PKの選出方法は、前に図12で説明した通りである。ステップ#25の処理と前後してまたは並行して、文字背景画像GHのデータを生成する(#27)。   A process of determining the color of the character represented by the character image of each block BR is performed. That is, a pixel (approximate color pixel PK) close to the original color of the character written on the original is selected (# 25), and the original character color is determined based on these pixel values (# 26). Note that the method of selecting the approximate color pixel PK is as described above with reference to FIG. Data of the character background image GH is generated before or after or in parallel with the process of step # 25 (# 27).

そして、各ブロックBRの二値画像GNのデータ、文字色データ83、文字背景画像GHのデータ、およびブロック位置データ82と文字領域RMの文字領域位置データ80とに基づいて文字領域再現用データ70を生成する(#28)。   Then, based on the data of the binary image GN, the character color data 83, the character background image GH, and the block position data 82 and the character area position data 80 of the character area RM, the character area reproduction data 70 is obtained. Is generated (# 28).

図15に戻って、原稿再現用ファイルFLに関する属性を示すファイル属性データ72を生成する(#5)。そして、ステップ#3、#4の処理によって得られた原稿の画像中の各非文字領域RHの非文字領域画像再現用データ71および各文字領域RMの文字領域再現用データ70を圧縮し(#6)、圧縮したデータとファイル属性データ72とを統合することによって原稿再現用ファイルFLを生成する(#7)。   Returning to FIG. 15, file attribute data 72 indicating attributes relating to the document reproduction file FL is generated (# 5). Then, the non-character area image reproduction data 71 of each non-character area RH and the character area reproduction data 70 of each character area RM in the original image obtained by the processes of steps # 3 and # 4 are compressed (# 6) The original reproduction file FL is generated by integrating the compressed data and the file attribute data 72 (# 7).

本実施形態によると、文字の線図形の中央線にできるだけ近い画素を参照することによって原稿文字色を判別する。よって、色滲みの影響を低減し、従来よりも正確に原稿文字色を判別することができる。   According to this embodiment, the character color of the original is determined by referring to a pixel as close as possible to the center line of the character line figure. Therefore, the influence of color blur can be reduced and the original character color can be determined more accurately than in the past.

また、本実施形態によると、解像度を落とした二値画像GNおよび細線化画像GSを用いて原稿文字色の判別のための処理を行うので、処理に要する時間を短縮することができる。   Further, according to the present embodiment, since the process for determining the document character color is performed using the binary image GN and the thinned image GS with reduced resolution, the time required for the process can be shortened.

図18は近似色画素選出処理の流れの変形例を説明するためのフローチャート、図19はテンプレートTMPおよび参照画素位置フレームSGPの例を示す図である。   FIG. 18 is a flowchart for explaining a modified example of the flow of the approximate color pixel selection process, and FIG. 19 is a diagram showing an example of the template TMP and the reference pixel position frame SGP.

本実施形態では、文字画像が表わす色を判別する処理(図17のステップ#25)を、図11および図12などで説明した方法で行った。つまり、図11(a)のような細線化画像GSの細線上の各画素に対応する文字色候補領域RCを原稿画像GA0’の中から抽出し、抽出したそれぞれの文字色候補領域RCから近似色画素PKを1つずつ選出し、そして、それらの近似色画素PKのRGBの各原色の階調の値に基づいて原稿文字色を判別した。しかし、文字色候補領域RC以外から近似色画素PKを選出してもよい。例えば、図18に示すような方法で、近似色画素PKを選出してもよい。   In the present embodiment, the process for determining the color represented by the character image (step # 25 in FIG. 17) is performed by the method described with reference to FIGS. That is, a character color candidate region RC corresponding to each pixel on the thin line of the thinned image GS as shown in FIG. 11A is extracted from the document image GA0 ′ and approximated from each extracted character color candidate region RC. The color pixels PK are selected one by one, and the original character color is determined based on the gradation values of the RGB primary colors of the approximate color pixels PK. However, the approximate color pixel PK may be selected from other than the character color candidate region RC. For example, the approximate color pixel PK may be selected by a method as shown in FIG.

図19(a)〜(d)に示すようなテンプレートTMP(TMP1〜TMP4)を予め用意しておく。これらのテンプレートTMPには、それぞれ、図中の右側に示すような、参照画素の位置を求めるための参照画素位置フレームSGP(SGP1〜SGP4)を対応付けておく。なお、テンプレートTMP1〜TMP4の1つのセルは、細線化画像GSの解像度(75dpi)における1画素に対応する。一方、参照画素位置フレームSGP1〜SGP4の1つのセルは、原稿画像GA0’の解像度(300dpi)における1画素に対応する。   Templates TMP (TMP1 to TMP4) as shown in FIGS. 19A to 19D are prepared in advance. Each of these templates TMP is associated with a reference pixel position frame SGP (SGP1 to SGP4) for obtaining the position of the reference pixel as shown on the right side of the drawing. Note that one cell of the templates TMP1 to TMP4 corresponds to one pixel in the resolution (75 dpi) of the thinned image GS. On the other hand, one cell of the reference pixel position frames SGP1 to SGP4 corresponds to one pixel in the resolution (300 dpi) of the document image GA0 '.

まず、細線化画像GSの細線上の各画素に対応する文字色候補領域RCから1つずつ近似色画素PKを選出する(図18の#501〜#503)。この処理の内容は、前に図12で説明した処理の内容と同様である。つまり、文字色候補領域RCの端を除いた中央部分から明度の最も低い画素を近似色画素PKとして選出する。   First, the approximate color pixels PK are selected one by one from the character color candidate regions RC corresponding to the respective pixels on the thin line of the thinned image GS (# 501 to # 503 in FIG. 18). The contents of this process are the same as the contents of the process described above with reference to FIG. That is, the pixel with the lowest brightness is selected as the approximate color pixel PK from the central portion excluding the end of the character color candidate region RC.

テンプレートTMP1〜TMP4を次のように使用して、さらに近似色画素PKを選出する。細線化画像GSの中の、細線に隣接する画素に注目し、その注目した画素(以下、「注目画素」と記載する。)にテンプレートTMP1の中心つまり図19(a)の太線枠で示すセルを合わせるようにして、テンプレートTMP1を重ねる(#506)。   Templates TMP1 to TMP4 are used as follows to further select approximate color pixels PK. In the thinned image GS, attention is paid to a pixel adjacent to the thin line, and the cell indicated by the center of the template TMP1, that is, the thick line frame in FIG. The template TMP1 is overlapped so as to match (# 506).

このとき、テンプレートTMPの灰色で示す所定のセルのいずれかに細線化画像GSの細線が重なったら(#507でYes)、テンプレートTMP1に対応する参照画素位置フレームSGP1を用いて、近似色画素PKの候補として参照すべき画素を、次のように決定する(#508)。すなわち、原稿画像GA0’の中の、その注目画素に対応する4×4個の画素に、その参照画素位置フレームSGP1を重ねる。参照画素位置フレームSGP1の中の太線枠のセルと重なった画素を、参照すべき画素に決定する。   At this time, if the thin line of the thinned image GS overlaps any one of the predetermined cells indicated by gray of the template TMP (Yes in # 507), the approximate color pixel PK is used using the reference pixel position frame SGP1 corresponding to the template TMP1. The pixel to be referred to as a candidate for is determined as follows (# 508). That is, the reference pixel position frame SGP1 is superimposed on 4 × 4 pixels corresponding to the target pixel in the document image GA0 ′. The pixel that overlaps the cell of the thick line frame in the reference pixel position frame SGP1 is determined as a pixel to be referred to.

そして、これらの参照すべき画素の中から明度の最も低いものを、近似色画素PKとして選出する(#509)。   Then, the pixel with the lowest brightness is selected as the approximate color pixel PK from these pixels to be referred to (# 509).

ステップ#506〜#509の処理を、細線化画像GSの細線に隣接する他の画素についても実行する。さらに、テンプレートTMP2〜TMP4を使用して同様の処理を実行する。以上のようにして、近似色画素PKが追加される。   The processes of steps # 506 to # 509 are also executed for other pixels adjacent to the thin line of the thinned image GS. Further, similar processing is executed using the templates TMP2 to TMP4. As described above, the approximate color pixel PK is added.

近似色画素PKを選出した後に実行する処理は、本実施形態で説明した通りである。つまり、選出した近似色画素PKのRGB成分ごとのヒストグラムを求め(図13参照)、ピークの値を求ることによって、原稿文字色を決定する。   The processing to be executed after selecting the approximate color pixel PK is as described in this embodiment. That is, the original character color is determined by obtaining a histogram for each RGB component of the selected approximate color pixel PK (see FIG. 13) and obtaining a peak value.

本実施形態では、文字色候補領域RC(図11(c)参照)の中央の4つの画素の中から1つだけ近似色画素PKを選出したが、複数選出してもよい。例えば、中央の4つの画素すべてを選出してもよい。同様に、図18で説明した選出方法においても、参照画素位置フレームSGP(図19参照)の太線枠のセルに重なった3つの画素の中から1つだけを近似色画素PKとして選出するのではなく、2つまたは3つを選出するようにしてもよい。   In the present embodiment, only one approximate color pixel PK is selected from the center four pixels of the character color candidate region RC (see FIG. 11C), but a plurality of approximate color pixels PK may be selected. For example, all the four central pixels may be selected. Similarly, in the selection method described with reference to FIG. 18, only one of the three pixels overlapping the thick line frame cell of the reference pixel position frame SGP (see FIG. 19) is selected as the approximate color pixel PK. Alternatively, two or three may be selected.

本実施形態では、原稿の画像を読み取る機能、画像を補正する機能、および画像データのファイル化を行う機能などがすべて画像形成装置1に備わっている場合を例に説明したが、これらの機能を複数の装置に分散して実現することも可能である。例えば、原稿の画像を読み取る機能をパーソナルコンピュータ用のスキャナで実現し、それ以外の機能をパーソナルコンピュータによって実現するようにしてもよい。この場合は、パーソナルコンピュータには、図3の各部の機能を実現するためのプログラムなどをインストールしておく。または、画像形成装置1で読み取った原稿画像GA0の画像データを端末装置2に転送し、端末装置2が図3の各部の処理を実行するようにしてもよい。   In the present embodiment, the case where the image forming apparatus 1 has all of the functions for reading an image of a document, the function for correcting an image, the function for filing image data, and the like has been described as an example. It can also be realized by being distributed to a plurality of devices. For example, a function for reading an image of a document may be realized by a scanner for a personal computer, and other functions may be realized by a personal computer. In this case, a program or the like for realizing the functions of the respective units in FIG. 3 is installed in the personal computer. Alternatively, the image data of the document image GA0 read by the image forming apparatus 1 may be transferred to the terminal device 2 so that the terminal device 2 executes the processing of each unit in FIG.

本実施形態では、スキャナで読み取った原稿の画像をファイル化する場合を例に説明したが、本発明は、それ以外の種類の画像読取装置で取得した画像をファイル化する場合にも適用可能である。例えば、デジタルカメラで撮影した原稿の画像をファイル化するためにも適用することができる。   In this embodiment, the case where an image of a document read by a scanner is converted into a file has been described as an example. However, the present invention can also be applied to a case where an image acquired by another type of image reading apparatus is converted into a file. is there. For example, the present invention can be applied to file an image of a document shot with a digital camera.

文字領域RMを再現するためのデータとしてリッチテキストフォーマットのデータを生成してもよい。   Rich text format data may be generated as data for reproducing the character region RM.

文字領域RMの文字画像よりも文字背景画像の色のほうが濃い場合、つまり、いわゆる白抜き文字が描かれている場合は、画像形成装置1の各部は、次のように処理内容を変更する。図6の二値化処理部134は、ブロックBRの各画素の濃度を算出し、算出した濃度が濃度閾値β未満であればその画素の値を「1」とし、濃度閾値β以上であればその画素の値を「0」とする。つまり、濃度が低いほうの画素を、文字画像を構成する画素であるものとする。図8の近似色画素選出部304は、文字色候補領域RC(図11(c)参照)の中央の4つの画素の中から明度が最も高い画素つまり濃度が最も低い画素を近似色画素PKとして選出する。   When the color of the character background image is darker than the character image in the character region RM, that is, when a so-called white character is drawn, each part of the image forming apparatus 1 changes the processing content as follows. The binarization processing unit 134 in FIG. 6 calculates the density of each pixel of the block BR. If the calculated density is less than the density threshold β, the pixel value is set to “1”, and if the calculated density is equal to or greater than the density threshold β. The value of the pixel is “0”. That is, the pixel with the lower density is a pixel constituting the character image. The approximate color pixel selection unit 304 in FIG. 8 uses, as the approximate color pixel PK, a pixel having the highest lightness, that is, the pixel having the lowest density among the four pixels at the center of the character color candidate region RC (see FIG. 11C). elect.

本実施形態では、ブロックBRの画像よりも低解像度の細線化画像GSを生成することによって文字の線図形の中央線およびその付近の領域を抽出したが、解像度を落とさずに細線化画像を生成し、これに基づいて抽出してもよい。この場合は、この細線化画像とブロックBRの画像とを重ね合わせることによって、中央線およびその付近の領域を知ることができる。そして、その領域から図11(c)に示すような4×4の画素の領域を複数個選び出し、それ以降の処理を行うようにすればよい。   In this embodiment, the center line of the character line figure and the area in the vicinity thereof are extracted by generating a thinned image GS having a lower resolution than the image of the block BR, but a thinned image is generated without reducing the resolution. However, it may be extracted based on this. In this case, the center line and the area in the vicinity thereof can be known by superimposing the thinned image and the image of the block BR. Then, a plurality of 4 × 4 pixel regions as shown in FIG. 11C may be selected from the region, and the subsequent processing may be performed.

その他、画像形成装置1の全体または各部の構成、処理内容、処理順序、テーブルの内容などは、本発明の趣旨に沿って適宜変更することができる。   In addition, the configuration of the entire image forming apparatus 1 or each unit, processing contents, processing order, table contents, and the like can be appropriately changed in accordance with the spirit of the present invention.

本発明に係る画像形成装置を有するシステム構成の例を示す図である。1 is a diagram illustrating an example of a system configuration having an image forming apparatus according to the present invention. 画像形成装置のハードウェア構成の例を示す図である。2 is a diagram illustrating an example of a hardware configuration of an image forming apparatus. FIG. 画像形成装置の機能的構成の例を示す図である。2 is a diagram illustrating an example of a functional configuration of an image forming apparatus. FIG. 原稿画像の例を示す図である。It is a figure which shows the example of a manuscript image. 非文字領域処理部の構成の例を示す図である。It is a figure which shows the example of a structure of a non-character area | region process part. 文字領域処理部の構成の例を示す図である。It is a figure which shows the example of a structure of a character area process part. 複数のブロックに分割した文字領域RMの例を示す図である。It is a figure which shows the example of the character area | region RM divided | segmented into the some block. 文字色判別部の構成の例を示す図である。It is a figure which shows the example of a structure of a character color discrimination | determination part. 細線化画像の生成方法の例を説明するための図である。It is a figure for demonstrating the example of the production | generation method of a thin line image. 文字の線図形の中央線の位置の例を示す図である。It is a figure which shows the example of the position of the center line of the line figure of a character. 文字の線図形の中央線およびその付近の領域を複数の文字色候補領域に分割する方法の例を説明するための図である。It is a figure for demonstrating the example of the method of dividing | segmenting the centerline of a character line figure, and the area | region of the vicinity into a some character color candidate area | region. 近似色画素選出処理の流れの例を説明するためのフローチャートである。It is a flowchart for demonstrating the example of the flow of an approximate color pixel selection process. 各原色の階調の分布の例を示す図である。It is a figure which shows the example of distribution of the gradation of each primary color. 原稿再現用ファイルの構造の例を示す図である。3 is a diagram illustrating an example of a structure of a document reproduction file. FIG. 画像形成装置の全体的な処理の流れの例を説明するためのフローチャートである。5 is a flowchart for explaining an example of the overall processing flow of the image forming apparatus. 非文字領域処理の流れの例を説明するためのフローチャートである。It is a flowchart for demonstrating the example of the flow of a non-character area | region process. 文字領域処理の流れの例を説明するためのフローチャートである。It is a flowchart for demonstrating the example of the flow of a character area process. 近似色画素選出処理の流れの変形例を説明するためのフローチャートである。It is a flowchart for demonstrating the modification of the flow of an approximate color pixel selection process. テンプレートおよび参照画素位置フレームの例を示す図である。It is a figure which shows the example of a template and a reference pixel position frame.

符号の説明Explanation of symbols

1 画像形成装置(文字色判別装置)
302 細線化画像生成部(中央領域検出手段)
303 文字画像分割部(小領域抽出手段)
304 近似色画素選出部(条件合致画素検出手段)
306 文字色決定部(色判別手段)
RC 文字色候補領域(小領域)
PK 近似色画素(条件合致画素)
1 Image forming device (character color discrimination device)
302 Thinned image generating unit (central area detecting means)
303 Character image segmentation unit (small area extraction means)
304 Approximate color pixel selection unit (condition matching pixel detection means)
306 Character color determination unit (color discrimination means)
RC character color candidate area (small area)
PK approximate color pixel (condition matching pixel)

Claims (5)

画像入力装置によって入力された入力画像に表れる文字の線図形の中央線およびその付近の領域からなる中央領域を検出する中央領域検出手段と、
複数の画素からなりかつ前記中央線の一部分が中央に位置する小領域を複数、前記中央領域から抽出する小領域抽出手段と、
前記小領域ごとに、当該小領域に属する画素の中から所定の条件に合う画素を条件合致画素として検出する条件合致画素検出手段と、
前記入力画像に表れる文字の色を前記各小領域の前記条件合致画素の色情報に基づいて判別する色判別手段と、
を有することを特徴とする文字色判別装置。
A center area detecting means for detecting a center area consisting of a center line of a line figure of a character appearing in an input image input by the image input device and an area in the vicinity thereof;
A small area extracting means for extracting a small area portion of Li Kui said center line, such a plurality of pixels located at the center plurality, from the central region,
Condition matching pixel detection means for detecting, as a condition matching pixel, a pixel that meets a predetermined condition from the pixels belonging to the small area for each of the small areas;
Color discriminating means for discriminating the color of the character appearing in the input image based on the color information of the condition-matching pixels of the small areas;
A character color discriminating apparatus characterized by comprising:
前記中央領域検出手段は、前記入力画像に対して細線化処理を施すことによって検出した細線またはその付近の領域を、前記中央領域として検出し、
前記所定の条件とは、明度が最も低いことであり、
前記色判別手段は、原色ごとに、前記条件合致画素の当該原色の階調のピークを算出し、当該各原色の当該ピークによって表わされる色を、前記入力画像に表れる文字の色であると判別する、
請求項1記載の文字色判別装置。
The central area detecting means detects a thin line detected by performing a thinning process on the input image or an area in the vicinity thereof as the central area,
The predetermined condition is that the brightness is the lowest,
The color determining means calculates a peak of the gradation of the primary color of the condition-matching pixel for each primary color, and determines that the color represented by the peak of each primary color is the color of a character appearing in the input image. To
The character color discrimination device according to claim 1.
画像入力装置によって入力された入力画像に表れる文字の線図形の中央線を検出する中央線検出手段と、
前記中央線の画素に各方向の周囲の領域のそれぞれから、所定の条件に合う画素を条件合致画素として検出する条件合致画素検出手段と、
前記入力画像に表れる文字の色を前記各小領域の前記条件合致画素の色情報に基づいて判別する色判別手段と、
を有することを特徴とする文字色判別装置。
Center line detecting means for detecting the center line of the line figure of the character appearing in the input image input by the image input device;
Condition-matching pixel detection means for detecting a pixel that meets a predetermined condition as a condition-matching pixel from each of the surrounding areas in each direction of the centerline pixel,
Color discriminating means for discriminating the color of the character appearing in the input image based on the color information of the condition-matching pixels of the small areas;
A character color discriminating apparatus characterized by comprising:
画像入力装置によって入力された入力画像に表れる文字の線図形の中央線およびその付近の領域からなる中央領域を検出し、
複数の画素からなりかつ前記中央線の一部分が中央に位置する小領域を複数、前記中央領域から抽出し、
前記小領域ごとに、当該小領域に属する画素の中から所定の条件に合う画素を条件合致画素として検出し、
前記入力画像に表れる文字の色を前記各小領域の前記条件合致画素の色情報に基づいて判別する、
ことを特徴とする文字色判別方法。
Detect the center area consisting of the center line of the line figure of the character appearing in the input image input by the image input device and the area near it,
Extracting a small area portion of Li Kui said center line, such a plurality of pixels located at the center plurality, from the central region,
For each small area, a pixel that meets a predetermined condition is detected as a condition-matching pixel from among the pixels belonging to the small area.
Determining the color of characters appearing in the input image based on the color information of the condition-matching pixels of the small areas;
Character color discrimination method characterized by the above.
画像入力装置によって入力された入力画像を取り扱うコンピュータに用いられるコンピュータプログラムであって、
前記入力画像に表れる文字の線図形の中央線およびその付近の領域からなる中央領域を検出する処理と、
複数の画素からなりかつ前記中央線の一部分が中央に位置する小領域を複数、前記中央領域から抽出する処理と、
前記小領域ごとに、当該小領域に属する画素の中から所定の条件に合う画素を条件合致画素として検出する処理と、
前記入力画像に表れる文字の色を前記各小領域の前記条件合致画素の色情報に基づいて判別する処理と、
をコンピュータに実行させるためのコンピュータプログラム。
A computer program used in a computer that handles an input image input by an image input device,
A process for detecting the central line and the central region consisting of a region near the line graphic characters appearing in the input image,
A plurality of small areas a portion of Li Kui said center line, such a plurality of pixels located at the center, the process of extracting from said central region,
For each of the small areas, a process of detecting a pixel that satisfies a predetermined condition from among pixels belonging to the small area as a condition matching pixel;
A process of determining the color of a character appearing in the input image based on color information of the condition-matching pixels of the small areas;
A computer program for causing a computer to execute.
JP2006074507A 2006-03-17 2006-03-17 Character color discrimination device, character color discrimination method, and computer program Expired - Fee Related JP4710672B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006074507A JP4710672B2 (en) 2006-03-17 2006-03-17 Character color discrimination device, character color discrimination method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006074507A JP4710672B2 (en) 2006-03-17 2006-03-17 Character color discrimination device, character color discrimination method, and computer program

Publications (2)

Publication Number Publication Date
JP2007249774A JP2007249774A (en) 2007-09-27
JP4710672B2 true JP4710672B2 (en) 2011-06-29

Family

ID=38593972

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006074507A Expired - Fee Related JP4710672B2 (en) 2006-03-17 2006-03-17 Character color discrimination device, character color discrimination method, and computer program

Country Status (1)

Country Link
JP (1) JP4710672B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5206503B2 (en) 2009-03-03 2013-06-12 富士ゼロックス株式会社 Image processing apparatus and image processing program
JP5182523B2 (en) 2009-03-04 2013-04-17 富士ゼロックス株式会社 Image processing apparatus and image processing program
JP6553239B2 (en) * 2018-04-10 2019-07-31 株式会社東芝 INFORMATION PROCESSING APPARATUS, IMAGE MODIFICATION METHOD, AND PROGRAM

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003244447A (en) * 2002-02-15 2003-08-29 Canon Inc Image processor and image processing method
JP2005198007A (en) * 2004-01-07 2005-07-21 Ricoh Co Ltd Image processing device, image processing method, program, and information recording medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003244447A (en) * 2002-02-15 2003-08-29 Canon Inc Image processor and image processing method
JP2005198007A (en) * 2004-01-07 2005-07-21 Ricoh Co Ltd Image processing device, image processing method, program, and information recording medium

Also Published As

Publication number Publication date
JP2007249774A (en) 2007-09-27

Similar Documents

Publication Publication Date Title
US7545992B2 (en) Image processing system and image processing method
US7339695B2 (en) Data processing device, data processing method, and data processing program for recognizing characters in a URL
JP4772888B2 (en) Image processing apparatus, image forming apparatus, image processing method, program, and recording medium thereof
JP4333708B2 (en) Method, apparatus, and computer program for processing input data related to generation of electronic file
JP4927122B2 (en) Image processing method, image processing apparatus, image forming apparatus, program, and recording medium
JP5164368B2 (en) Image processing apparatus and image processing method
US7133559B2 (en) Image processing device, image processing method, image processing program, and computer readable recording medium on which image processing program is recorded
JP5972578B2 (en) Image processing apparatus, image forming apparatus, program, and recording medium
US20080101698A1 (en) Area testing method, area testing device, image processing apparatus, and recording medium
JP2005073015A (en) Device and method for image processing and computer program
JP5178490B2 (en) Image processing apparatus, image processing method, and computer program
JP4710672B2 (en) Character color discrimination device, character color discrimination method, and computer program
US8284459B2 (en) Image processing apparatus and image processing method
JP4442701B2 (en) Area discriminating method, image compressing method, image compressing apparatus, and computer program
JP2008288912A (en) Image processor and image forming apparatus
JP4396710B2 (en) Image processing apparatus, image processing apparatus control method, and image processing apparatus control program
JP4571758B2 (en) Character recognition device, character recognition method, image processing device, image processing method, and computer-readable recording medium
JP5454466B2 (en) Character detection device, character detection method, and computer program
JP3882657B2 (en) Image processing apparatus, image processing method, image processing program, and computer-readable recording medium on which image processing program is recorded
JP2004048130A (en) Image processing method, image processing apparatus, and image processing program
JP4412339B2 (en) Image forming apparatus and image data correction method
JP2022189063A (en) Image data generation device and image data generation method
JP2020043461A (en) Image processing system and image processing method, and program
JP2007174523A (en) Image processing apparatus, image processing method, program code and storage medium
JP2007043756A (en) Image processing apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080828

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101021

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101026

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20101217

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101217

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110222

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110307

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees