JP4442651B2 - Image processing apparatus and program - Google Patents

Image processing apparatus and program Download PDF

Info

Publication number
JP4442651B2
JP4442651B2 JP2007176900A JP2007176900A JP4442651B2 JP 4442651 B2 JP4442651 B2 JP 4442651B2 JP 2007176900 A JP2007176900 A JP 2007176900A JP 2007176900 A JP2007176900 A JP 2007176900A JP 4442651 B2 JP4442651 B2 JP 4442651B2
Authority
JP
Japan
Prior art keywords
color
character
background
image
procedure
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
JP2007176900A
Other languages
Japanese (ja)
Other versions
JP2009017247A (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 JP2007176900A priority Critical patent/JP4442651B2/en
Publication of JP2009017247A publication Critical patent/JP2009017247A/en
Application granted granted Critical
Publication of JP4442651B2 publication Critical patent/JP4442651B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、画像処理技術に関し、特にスキャン画像に対する画像処理技術に関する。   The present invention relates to an image processing technique, and more particularly to an image processing technique for a scanned image.

スキャナ機器で文書(紙原稿等)を読み取ったスキャン画像を高い圧縮率で圧縮し、比較的小さな画像サイズのファイルを生成して保存する技術が存在する。このようなファイルとしては、例えば、高圧縮PDFなどのPDF(Portable Document Format)ファイルが存在する。   There is a technique for compressing a scanned image obtained by scanning a document (paper document or the like) with a scanner device at a high compression rate, and generating and storing a file having a relatively small image size. Examples of such a file include a PDF (Portable Document Format) file such as a highly compressed PDF.

このようなファイルにおいては、文字領域とその他の領域とが区別され、各領域の特質に応じた処理が施されることによって、文字の判読性とファイル容量の低減とが実現される。具体的には、文字領域に関しては、文字の判読性を保つため、高解像度のまま二値化処理が施されて生成されたデータが保存される。一方、文字領域以外の領域に関しては、階調性を保ちつつファイル容量を低減するため、二値化処理が施されることなく低解像度化された後に高い圧縮率で圧縮されたデータが保存される。また、文字領域に関しては、所定の範囲(単語あるいは行等)を1つの単位として、当該単位ごとに一つの代表色が文字色として決定される。これによれば、ファイルサイズの更なる低減を図ることができる。   In such a file, a character area is distinguished from other areas, and processing according to the characteristics of each area is performed, so that character readability and file capacity reduction are realized. Specifically, with respect to the character area, in order to maintain the legibility of the character, data generated by performing binarization processing with high resolution is stored. On the other hand, for areas other than the character area, data that has been compressed at a high compression rate after being reduced in resolution without being binarized is stored in order to reduce the file capacity while maintaining gradation. The As for the character area, a predetermined range (word or line) is set as one unit, and one representative color is determined as the character color for each unit. According to this, the file size can be further reduced.

このようなファイルにおいては、文字が小さくなると様々な問題が生じる。例えば、文字が小さくなると、文字のエッジの抽出が困難になる。このような問題を解決する技術としては、例えば特許文献1に記載の技術が存在する。   In such a file, various problems occur when the characters become smaller. For example, when the character becomes small, it becomes difficult to extract the edge of the character. As a technique for solving such a problem, there is a technique described in Patent Document 1, for example.

特開2002−10075号公報JP 2002-10075 A

ところで、上記のようなファイルに関しては、別の問題、具体的には文字の色に関する問題も存在する。   By the way, regarding the above file, there is another problem, specifically, a problem regarding the color of characters.

詳細には、文字が細い場合には、スキャン時の条件等によっては、文字のエッジ付近の画素の色が下地の色と混ざりやすくなる。例えば、文字が赤色且つ下地が緑色の場合には、スキャン後のファイル(スキャンファイルとも称する)における文字の赤色は、本来の「赤」ではなく、緑色(ないし黄色)側に寄った色になる。すなわち、スキャンファイルの文字色が、背景色の影響を受けて、原稿(紙文書等)上での本来の色とは異なる色になってしまう。そして、この結果、文字の判読性が低下するという問題が存在する。   Specifically, when the character is thin, the color of the pixel near the edge of the character is likely to be mixed with the background color depending on scanning conditions and the like. For example, when the character is red and the background is green, the red color of the character in the scanned file (also referred to as a scan file) is not the original “red” but a color closer to the green (or yellow) side. . In other words, the character color of the scan file is influenced by the background color and becomes a color different from the original color on the original (paper document or the like). As a result, there is a problem that the legibility of the character is lowered.

そこで、この発明の課題は、スキャン画像における背景色の影響を排除して文字の判読性を向上することが可能な技術を提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is to provide a technique capable of improving the legibility of a character by eliminating the influence of a background color in a scanned image.

上記課題を解決すべく、請求項1の発明は、画像処理装置であって、スキャン画像に対して二値化処理を施し、文字に対応する部分である文字部を背景から分離して抽出する文字部抽出手段と、前記文字部の代表色である文字色を決定する決定手段であって、前記文字部の色成分値に基づいて前記文字部の色の候補である第1の色を求め、前記第1の色と前記スキャン画像における前記背景の色である背景色との差を拡大するように前記第1の色を補正して得られる第2の色を前記文字色として決定する決定手段と、前記文字の太さを検出する検出手段と、を備え、前記決定手段は、前記検出手段によって検出された前記文字の太さに応じて、補正時における前記差の拡大の程度を変更するものであって、前記文字が細くなるにつれて、前記差の拡大の程度を大きくするものであることを特徴とする In order to solve the above problems, the invention of claim 1 is an image processing apparatus, which performs binarization processing on a scanned image and extracts a character portion corresponding to a character from a background. A character part extraction unit and a determination unit that determines a character color that is a representative color of the character part, and obtains a first color that is a candidate color of the character part based on a color component value of the character part; Determination to determine, as the character color, a second color obtained by correcting the first color so as to enlarge a difference between the first color and a background color that is the background color in the scanned image And a detecting means for detecting the thickness of the character, wherein the determining means changes the degree of enlargement of the difference at the time of correction according to the thickness of the character detected by the detecting means. as be one which in the character becomes narrower, the Characterized in that it is intended to increase the degree of expansion

請求項の発明は、請求項1の発明に係る画像処理装置において、前記検出手段は、前記文字部の画素総数に対する非境界画素の割合を前記文字の太さとして算出することを特徴とする。 According to a second aspect of the present invention, in the image processing apparatus according to the first aspect of the invention, the detecting means calculates a ratio of non-boundary pixels to the total number of pixels of the character portion as the thickness of the character. .

請求項の発明は、請求項1または請求項の発明に係る画像処理装置において、前記決定手段は、前記文字部に含まれる少なくとも一部の画素の平均色を前記第1の色として決定することを特徴とする。 According to a third aspect of the invention, in the image processing apparatus according to the first or second aspect of the invention, the determining means determines an average color of at least some of the pixels included in the character portion as the first color. It is characterized by doing.

請求項の発明は、請求項1または請求項の発明に係る画像処理装置において、前記決定手段は、前記文字部に含まれる代表画素の色を前記第1の色として決定することを特徴とする。 According to a fourth aspect of the invention, in the image processing apparatus according to the first or second aspect of the invention, the determining means determines the color of a representative pixel included in the character portion as the first color. And

請求項の発明は、コンピュータに、a)スキャン画像に対して二値化処理を施し、文字に対応する部分である文字部を背景から分離して抽出する手順と、b)前記文字の太さを検出する手順と、c)前記文字部の色成分値に基づいて前記文字部の色の候補である第1の色を求め、前記第1の色と前記スキャン画像における前記背景の色である背景色との差を拡大するように前記第1の色を補正して得られる第2の色を、前記文字部の代表色である文字色として決定する手順と、を実行させるためのプログラムであって、前記手順c)は、c−1)前記手順b)で検出された前記文字の太さに応じて、補正時における前記差の拡大の程度を変更する手順であって、前記文字が細くなるにつれて前記差の拡大の程度が大きくなるように、前記差の拡大の程度を変更する手順を含むことを特徴とする。
請求項の発明は、請求項の発明に係るプログラムにおいて、前記手順b)は、前記文字部の画素総数に対する非境界画素の割合を前記文字の太さとして算出する手順を含むことを特徴とする。
請求項の発明は、請求項5または請求項の発明に係るプログラムにおいて、前記手順c)は、前記文字部に含まれる少なくとも一部の画素の平均色を前記第1の色として決定する手順を含むことを特徴とする。
請求項の発明は、請求項5または請求項の発明に係るプログラムにおいて、前記手順c)は、前記文字部に含まれる代表画素の色を前記第1の色として決定する手順を含むことを特徴とする。
The invention according to claim 5 is: a) a procedure for performing binarization processing on a scanned image and extracting a character part, which is a part corresponding to a character, from a background; b) a thickness of the character And c) obtaining a first color that is a candidate for the color of the character portion based on the color component value of the character portion, and using the first color and the background color in the scanned image A program for executing a procedure for determining a second color obtained by correcting the first color so as to enlarge a difference from a certain background color as a character color that is a representative color of the character portion. a is one of the steps c) is, c-1) the procedure b) in accordance with the thickness of said detected characters, a procedure for changing the degree of expansion of the difference in the correction time, the character The difference is increased so that the degree of enlargement of the difference increases as the thickness becomes thinner. The method includes a procedure for changing the degree of enlargement .
According to a sixth aspect of the invention, in the program according to the fifth aspect of the invention, the step b) includes a step of calculating a ratio of non-boundary pixels with respect to the total number of pixels of the character portion as the thickness of the character. And
According to a seventh aspect of the invention, in the program according to the fifth or sixth aspect of the invention, the procedure c) determines an average color of at least some of the pixels included in the character portion as the first color. It includes a procedure.
According to an eighth aspect of the present invention, in the program according to the fifth or sixth aspect , the step c) includes a step of determining a color of a representative pixel included in the character portion as the first color. It is characterized by.

請求項1ないし請求項に記載の発明によれば、文字部の色成分値に基づいて文字部の色の候補である第1の色が求められ、当該第1の色とスキャン画像における背景の色である背景色との差を拡大するように第1の色を補正して得られる第2の色が文字色として決定されるので、スキャン画像における背景色の影響を排除して文字の判読性を向上することができる。また特に、検出された文字の太さに応じて第1の色と背景色との差の拡大の程度が変更され、より詳細には、当該文字が細くなるにつれて当該差の拡大の程度が大きくされるので、文字の太さに応じて補正の程度の適正化を図ることが可能である。 According to the first to eighth aspects of the present invention, the first color that is a candidate for the color of the character portion is obtained based on the color component value of the character portion, and the background in the first color and the scanned image is obtained. Since the second color obtained by correcting the first color so as to enlarge the difference from the background color which is the color of the character is determined as the character color, the influence of the background color in the scanned image is eliminated and the character color The legibility can be improved. In particular, the degree of enlargement of the difference between the first color and the background color is changed according to the detected thickness of the character , and more specifically, the degree of enlargement of the difference increases as the character becomes thinner. since the, it is possible to achieve an appropriate degree of correction in accordance with the thickness of a character.

<1.第1実施形態>
<1−1.構成>
図1は、第1実施形態に係る原稿電子化システム100(100A)を示す概略図である。ここでは、原稿電子化システム100は、マルチ・ファンクション・ペリフェラル(MFPとも略称する)1(1A)を備えて構成される。MFP1は、その画像処理部3を用いて所定の画像処理を実行することによって、画像処理装置としても機能する。
<1. First Embodiment>
<1-1. Configuration>
FIG. 1 is a schematic view showing an original digitizing system 100 (100A) according to the first embodiment. Here, the electronic document system 100 includes a multi-function peripheral (abbreviated as MFP) 1 (1A). The MFP 1 also functions as an image processing apparatus by executing predetermined image processing using the image processing unit 3.

この原稿電子化システム100は、原稿(紙文書等)を光学的に読み取って得られる画像(原稿画像とも称する)を電子データ化するシステムである。詳細には、MFP1が原稿画像を生成するとともに当該原稿画像に対する画像処理等を実行することによって、原稿が電子データ化される。   The document digitizing system 100 is a system that converts an image (also referred to as a document image) obtained by optically reading a document (such as a paper document) into electronic data. Specifically, when the MFP 1 generates a document image and executes image processing on the document image, the document is converted into electronic data.

MFP1は、スキャナ機能、プリンタ機能、コピー機能およびファクシミリ機能などを備える装置(複合機とも称する)である。具体的には、MFP1は、画像読取部2と、画像処理部3と、印刷出力部4と、通信部5と、入出力部6と、格納部8と、コントローラ9とを備えており、これらの各部を複合的に動作させることによって、上記の各機能を実現する。   The MFP 1 is a device (also referred to as a multi function device) having a scanner function, a printer function, a copy function, a facsimile function, and the like. Specifically, the MFP 1 includes an image reading unit 2, an image processing unit 3, a print output unit 4, a communication unit 5, an input / output unit 6, a storage unit 8, and a controller 9. The above functions are realized by operating these units in a complex manner.

画像読取部2は、MFP1の所定の位置に載置された原稿を光学的に読み取って、当該原稿の画像(原稿画像とも称する)を生成する処理部である。画像読取部2は、スキャナ部とも称される。   The image reading unit 2 is a processing unit that optically reads a document placed at a predetermined position of the MFP 1 and generates an image (also referred to as a document image) of the document. The image reading unit 2 is also referred to as a scanner unit.

画像処理部3は、画像読取部2によって生成されたスキャン画像に対して各種の画像処理を施す処理部である。画像処理部3は、文字部抽出部31および文字色決定部32を有している。文字部抽出部31は、スキャン画像に含まれる文字を背景から分離して抽出する処理等を実行する。また、文字色決定部32は、文字部抽出部31によって抽出された文字部の色(代表色)を決定する処理等を実行する。これらの処理については後に詳述する。   The image processing unit 3 is a processing unit that performs various types of image processing on the scanned image generated by the image reading unit 2. The image processing unit 3 includes a character part extraction unit 31 and a character color determination unit 32. The character part extraction unit 31 performs a process of separating and extracting characters included in the scanned image from the background. Further, the character color determination unit 32 executes a process for determining the color (representative color) of the character part extracted by the character part extraction unit 31. These processes will be described in detail later.

印刷出力部4は、対象画像に関する画像データに基づいて紙などの各種の媒体に画像を印刷出力する出力部である。   The print output unit 4 is an output unit that prints an image on various media such as paper based on image data related to the target image.

通信部5は、公衆回線等を介したファクシミリ通信を行うことが可能な処理部である。また、通信部5は、通信ネットワークNWを介したネットワーク通信が可能である。このネットワーク通信を利用することによって、MFP1は、所望の相手先との間で各種のデータを授受することが可能である。また、MFP1は、このネットワーク通信を利用することによって、電子メールの送受信を行うことも可能である。   The communication unit 5 is a processing unit capable of performing facsimile communication via a public line or the like. The communication unit 5 can perform network communication via the communication network NW. By using this network communication, the MFP 1 can exchange various data with a desired destination. The MFP 1 can also send and receive e-mails using this network communication.

入出力部6は、MFP1に対する入力を受け付ける操作入力部61と、各種情報の表示出力を行う表示部62とを備えている。   The input / output unit 6 includes an operation input unit 61 that receives input to the MFP 1 and a display unit 62 that displays and outputs various types of information.

格納部8は、ハードディスクドライブ(HDD)等の格納装置で構成される。この格納部8には、画像読取部2等で生成された原稿画像等が格納される。   The storage unit 8 includes a storage device such as a hard disk drive (HDD). The storage unit 8 stores a document image or the like generated by the image reading unit 2 or the like.

コントローラ9は、MFP1を統括的に制御する制御装置であり、CPUと、各種の半導体メモリ(RAMおよびROM等)とを備えて構成される。コントローラ9の制御下において各種の処理部が動作することによって、MFP1の各種の機能が実現される。例えば、コントローラ9の制御下において、画像読取部2を用いて所望の画像を光学的に読み取ることによって、原稿をスキャニングした画像(原稿画像ないしスキャン画像とも称する)が取得され、スキャナ機能が実現される。   The controller 9 is a control device that controls the MFP 1 in an integrated manner, and includes a CPU and various semiconductor memories (such as a RAM and a ROM). Various functions of the MFP 1 are realized by operating various processing units under the control of the controller 9. For example, by scanning a desired image optically using the image reading unit 2 under the control of the controller 9, an image obtained by scanning a document (also referred to as a document image or a scanned image) is acquired, and a scanner function is realized. The

<1−2.画像処理の概要>
MFP1は、スキャン画像に対して所定の画像処理を施して、所定の形式のファイル(例えば、PDF(Portable Document Format)ファイル)を生成する機能を有している。以下では、このようなファイル生成処理について説明する。なお、このファイル生成機能は、画像処理部3などによって実現される。
<1-2. Overview of image processing>
The MFP 1 has a function of performing predetermined image processing on a scanned image to generate a file in a predetermined format (for example, a PDF (Portable Document Format) file). Hereinafter, such a file generation process will be described. This file generation function is realized by the image processing unit 3 or the like.

図2に示されるように、まず、画像読取部2によって取得されたスキャン画像に対して、所定の前処理が施される(ステップS11)。この前処理には、例えば画像形式の変換処理、および解像度の調整処理等が含まれ得る。   As shown in FIG. 2, first, a predetermined pre-process is performed on the scanned image acquired by the image reading unit 2 (step S11). This preprocessing can include, for example, image format conversion processing, resolution adjustment processing, and the like.

次に、文字に関する領域である文字領域(第1の領域とも称する)とその他の領域(第2の領域とも称する)とを区別する領域判別処理が実行される(ステップS13)。その後、各領域の特質に応じた処理が施されることによって、文字の判読性を維持しつつファイル容量を低減することが可能である。なお、第2の領域としては、写真あるいは図表等を含む領域が例示される。   Next, an area determination process for distinguishing between a character area (also referred to as a first area) that is an area related to characters and another area (also referred to as a second area) is executed (step S13). Thereafter, by performing processing according to the characteristics of each area, it is possible to reduce the file capacity while maintaining the legibility of the characters. In addition, as a 2nd area | region, the area | region containing a photograph or a chart is illustrated.

文字領域(第1の領域)の画像に関しては、文字領域に対する処理(ステップS15)および可逆圧縮処理(ステップS16)が施される。文字領域に関しては、文字の判読性を保つため、高解像度のまま二値化処理等が施されてデータDTが生成される。また、このデータDTは、所定形式(MMR(Modified Modified READ)等)で可逆圧縮されて保存される。可逆圧縮することによれば、文字の判読性が低下することを回避できる。   With respect to the image of the character area (first area), the process for the character area (step S15) and the lossless compression process (step S16) are performed. With respect to the character region, in order to maintain the legibility of the character, binarization processing or the like is performed with high resolution, and data DT is generated. The data DT is stored in a reversible compression format in a predetermined format (MMR (Modified Modified READ) or the like). According to the reversible compression, it is possible to avoid deterioration of the legibility of characters.

一方、文字領域以外の領域(第2の領域)の画像に関しては、階調性を保ちつつファイル容量を低減するため、二値化処理が施されることなく低解像度化処理が施されてデータDGが生成される(ステップS17,S18)。また、このデータDGは、所定形式(JPEG等)で非可逆圧縮されて保存される。非可逆圧縮することによれば、生成されるファイルのファイルサイズを非常に小さくすることが可能である。   On the other hand, regarding the image of the area other than the character area (second area), the data is subjected to the resolution reduction process without being subjected to the binarization process in order to reduce the file capacity while maintaining the gradation. A DG is generated (steps S17 and S18). The data DG is stored in a predetermined format (such as JPEG) after being irreversibly compressed. By irreversible compression, the file size of the generated file can be made very small.

そして、両データDT,DGが合成されることなどによって、所定の形式のファイルが生成される(ステップS19)。   Then, a file in a predetermined format is generated by combining both data DT and DG (step S19).

<1−3.文字データ生成処理>
次に、文字領域に対する画像処理(ステップS15)についてさらに詳細に説明する。
<1-3. Character data generation processing>
Next, the image processing (step S15) for the character area will be described in more detail.

図3は、ステップS15における処理の概要を示す図である。また、図4〜図11は、白色背景の赤色文字に関する処理結果の変遷を示す図である。詳細には、図4〜図7は、6ポイントの大きさを有する文字「I」に関する処理結果の変遷を示す図であり、図8〜図11は、10.5ポイントの大きさを有する文字「I」に関する処理結果の変遷を示す図である。図4および図8は、原稿上の文字「I」を示す図であり、図5および図9は、スキャン画像における文字「I」を示す図である。例えば、上述のようにMFP1が原稿をスキャンしてスキャン画像を生成すると、原稿上の6ポイント文字「I」(図4参照)は、スキャン画像において図5に示すような状態で得られる。同様に、原稿上の10.5ポイント文字「I」(図8参照)は、スキャン画像において図9に示すような状態で得られる。図5および図9の状態においては、各画素が多階調値を有している。また、図6および図10は、スキャン画像を二値化して得られる画像、詳細には、後述する補正処理(ステップS24)前の画像における文字「I」を示す図であり、図7および図11は、当該補正処理(ステップS24)後の画像における文字「I」を示す図である。   FIG. 3 is a diagram showing an overview of the processing in step S15. Moreover, FIGS. 4-11 is a figure which shows the transition of the processing result regarding the red character of a white background. Specifically, FIGS. 4 to 7 are diagrams showing the transition of the processing result related to the character “I” having a size of 6 points, and FIGS. 8 to 11 are characters having a size of 10.5 points. It is a figure which shows the transition of the processing result regarding "I". 4 and 8 are diagrams showing the letter “I” on the document, and FIGS. 5 and 9 are diagrams showing the letter “I” in the scanned image. For example, when the MFP 1 scans an original to generate a scanned image as described above, the 6-point character “I” (see FIG. 4) on the original is obtained in the state shown in FIG. 5 in the scanned image. Similarly, the 10.5 point character “I” (see FIG. 8) on the document is obtained in the scan image as shown in FIG. 5 and 9, each pixel has a multi-tone value. 6 and 10 are diagrams showing a character “I” in an image obtained by binarizing the scanned image, specifically, an image before a correction process (step S24) described later, and FIG. 7 and FIG. 11 is a diagram showing the character “I” in the image after the correction process (step S24).

ここにおいて、MFP1は、カラー画像をスキャン画像として取得しているものとする。具体的には、R(レッド)成分、G(グリーン)成分、B(ブルー)成分の3つの三原色成分で構成されるカラー画像(RGB画像とも称する)が、スキャン画像として取得されているものとする。各色成分画像(すなわち、R成分画像、G成分画像、B成分画像)は、それぞれ、所定ビット(例えば8ビット)に対応する多段階(例えば256段階)の階調値を有している。したがって、RGB画像は、各色成分の所定ビット数の3倍のビット数(例えば24ビット)のデータとして構成される。   Here, it is assumed that the MFP 1 acquires a color image as a scan image. Specifically, a color image (also referred to as an RGB image) composed of three primary color components of an R (red) component, a G (green) component, and a B (blue) component is acquired as a scan image. To do. Each color component image (that is, an R component image, a G component image, and a B component image) has gradation values of multiple levels (for example, 256 levels) corresponding to predetermined bits (for example, 8 bits). Therefore, the RGB image is configured as data having a bit number (for example, 24 bits) that is three times the predetermined bit number of each color component.

この文字データの生成処理においては、RGB画像のデータ(単にRGBデータとも称する)の他に、RGBデータに基づいて「明度データ」をも生成する。この明度データは、その各画素の画素値を、RGBデータの各色成分値にそれぞれ対応係数を乗じた値を加算した値として算出することによって、取得される。また、明度データは、所定ビット数(例えば8ビット)に応じた階調値を有する値として取得される。明度データは、グレースケール画像データとも表現される。以下の文字抽出処理等においては基本的に明度データを用いることによって、演算負荷を低減することが可能である。   In this character data generation process, in addition to RGB image data (also simply referred to as RGB data), “brightness data” is also generated based on RGB data. The brightness data is obtained by calculating the pixel value of each pixel as a value obtained by adding a value obtained by multiplying each color component value of RGB data by a corresponding coefficient. Further, the brightness data is acquired as a value having a gradation value corresponding to a predetermined number of bits (for example, 8 bits). The brightness data is also expressed as grayscale image data. In the following character extraction processing and the like, the calculation load can be reduced by basically using the brightness data.

ステップS21(図3)においては、文字領域の明度データに対して二値化処理が施される。この二値化処理によって、スキャン画像の文字領域内の「文字」に対応する部分(「文字部」とも称する)が、背景から分離して抽出される。   In step S21 (FIG. 3), binarization processing is performed on the brightness data of the character area. By this binarization processing, a portion (also referred to as “character portion”) corresponding to “character” in the character region of the scanned image is extracted separately from the background.

例えば、図5のスキャン画像上の6ポイント文字「I」は、ステップS21の二値化処理によって、図6に示すように、文字「I」を示す画素集合として得られることになる。また、図12は、この状態を模式的に表現した図である。図12においては、小さな矩形が1つの画素を表現しており、文字「I」が62画素の集合として構成される状態が示されている。換言すれば、全62画素の集合体である文字部CPによって、文字「I」が構成されている。   For example, the 6-point character “I” on the scanned image in FIG. 5 is obtained as a pixel set indicating the character “I” as shown in FIG. 6 by the binarization processing in step S21. FIG. 12 is a diagram schematically representing this state. In FIG. 12, a small rectangle represents one pixel, and the state where the character “I” is configured as a set of 62 pixels is shown. In other words, the character “I” is constituted by the character portion CP which is an aggregate of all 62 pixels.

同様に、図9のスキャン画像上の10.5ポイント文字「I」は、ステップS21の二値化処理によって、図10に示すように、文字「I」を示す画素集合として得られることになる。また、図13は、この状態を模式的に表現した図である。図13においては、小さな矩形が1つの画素を表現しており、文字「I」が196画素の集合として構成される状態が示されている。換言すれば、全196画素の集合体である文字部CPによって、文字「I」が構成されている。   Similarly, the 10.5 point character “I” on the scanned image of FIG. 9 is obtained as a pixel set indicating the character “I” as shown in FIG. 10 by the binarization processing in step S21. . FIG. 13 is a diagram schematically representing this state. In FIG. 13, a small rectangle represents one pixel, and the state where the character “I” is configured as a set of 196 pixels is shown. In other words, the character “I” is constituted by the character portion CP which is an aggregate of all 196 pixels.

ここにおいて、この文字部CPの色は、1文字以上を含む所定の範囲(1文字、単語、行、段落、あるいはブロック等)を1つの単位として、当該単位ごとに一つの代表色が、「文字色」として決定される。これによれば、当該文字部CPを構成する画素ごとに異なる色が決定される場合に比べて、ファイルサイズの更なる低減を図ることができる。なお、以下では説明の簡易化のため、1文字単位で文字色を決定する場合について例示する。   Here, the color of the character part CP is a predetermined range (one character, word, line, paragraph, block, etc.) including one or more characters as one unit, and one representative color for each unit is “ It is determined as “character color”. According to this, compared with the case where a different color is determined for each pixel constituting the character part CP, the file size can be further reduced. In the following, for simplification of description, the case where the character color is determined in units of one character will be exemplified.

そのため、第1段階の処理として、ステップS22(図3)の処理が実行される。具体的には、文字部CPに含まれる全画素の平均色を第1の色V1として求める。換言すれば、文字部CPの代表色(「文字色」)の候補として、第1の色V1を求める。例えば、6ポイント文字「I」(図6ないし図12参照)の全62画素について、各色成分ごとに平均値を求め、各色成分の平均値で構成される色を「第1の色」として求めることができる。   Therefore, the process of step S22 (FIG. 3) is executed as the first stage process. Specifically, the average color of all the pixels included in the character part CP is obtained as the first color V1. In other words, the first color V1 is obtained as a candidate for the representative color (“character color”) of the character part CP. For example, for all 62 pixels of the 6-point character “I” (see FIGS. 6 to 12), an average value is obtained for each color component, and a color constituted by the average value of each color component is obtained as the “first color”. be able to.

ただし、この第1の色V1は、原稿における文字の色とは異なっていることがある。特に、細い文字においては、背景色の影響を受けて本来の色よりも背景色に近い色になっていることが多い。例えば、図14に示すように、本来赤色(R=255,G=0,B=0)の6ポイント文字に関する「第1の色」は、背景(下地)の白色(R=255,G=255,B=255)の影響を受けて、少しくすんだ赤色(R=246,G=79,B=81)になる。なお、図14は、補正前後の色の変化等を示す図である。   However, the first color V1 may be different from the character color in the document. In particular, thin characters are often closer to the background color than the original color due to the influence of the background color. For example, as shown in FIG. 14, the “first color” related to a six-point character that is originally red (R = 255, G = 0, B = 0) is white (R = 255, G = 255, B = 255), it becomes a slightly dull red color (R = 246, G = 79, B = 81). FIG. 14 is a diagram showing a change in color before and after correction.

そこで、この実施形態においては、ステップS24(図3)において、第1の色V1と背景の色(背景色)VBとの差を拡大するように第1の色V1を補正して得られる第2の色V2を、「文字色」として決定する。   Therefore, in this embodiment, in step S24 (FIG. 3), the first color V1 obtained by correcting the first color V1 so as to increase the difference between the first color V1 and the background color (background color) VB. The second color V2 is determined as the “character color”.

また、ここでは、文字の太さに応じて、補正時における、第1の色V1と背景色VBとの差の拡大の程度を変更する。これは、文字の混色の程度が文字の太さに応じて異なる、という知見に基づくものである。そのため、ステップS23で文字の太さを求めた後に、ステップS24の文字色の決定動作を実行する。   Here, the degree of enlargement of the difference between the first color V1 and the background color VB at the time of correction is changed according to the thickness of the character. This is based on the knowledge that the degree of color mixing of characters varies depending on the thickness of the characters. Therefore, after obtaining the thickness of the character in step S23, the character color determining operation in step S24 is executed.

まず、ステップS23の処理について説明する。   First, the process of step S23 will be described.

ステップS23では、文字の太さを検出する。   In step S23, the thickness of the character is detected.

具体的には、まず、文字部CPを構成する全画素の数を求めることに加えて、全画素のうち、背景(下地)との境界上の画素(境界画素)を除いた内部画素(非境界画素とも称する)の数を求める。図12の場合には、全画素数が62画素、内部画素数が16画素である、として算出される。   Specifically, first, in addition to obtaining the number of all pixels constituting the character part CP, the internal pixels (non-pixels) excluding the pixels (boundary pixels) on the boundary with the background (background) among all the pixels. The number of boundary pixels). In the case of FIG. 12, it is calculated that the total number of pixels is 62 pixels and the number of internal pixels is 16 pixels.

そして、全画素に対する内部画素(非境界画素)の比率(内部比率)αを算出する。図12の場合には、内部比率αは、26%(=(16/62)×100)、として算出される。   Then, the ratio (internal ratio) α of internal pixels (non-boundary pixels) to all pixels is calculated. In the case of FIG. 12, the internal ratio α is calculated as 26% (= (16/62) × 100).

また、図13の場合には、全画素数が196画素、内部画素数が102画素であり、内部比率αが52%(=(102/196)×100)、として算出される。   In the case of FIG. 13, the total number of pixels is 196 pixels, the number of internal pixels is 102 pixels, and the internal ratio α is calculated as 52% (= (102/196) × 100).

内部比率α、換言すれば文字部CPの画素総数に対する内部画素(非境界画素)の割合は、文字が太くなるにつれて大きな値となる。このような特質を利用して、この実施形態においては、この内部比率αを「文字の太さ」を表す指標値として用いる。   The ratio of the internal pixel (non-boundary pixel) to the internal ratio α, in other words, the total number of pixels of the character part CP increases as the character becomes thicker. Using this characteristic, in this embodiment, the internal ratio α is used as an index value representing “character thickness”.

つぎに、ステップS24の処理について説明する。   Next, the process of step S24 will be described.

ステップS24においては、次の式(1)にしたがって、背景色VBの各成分値(VBr,VBg,VBb)等を用いて上記の第1の色V1の各成分値(V1r,V1g,V1b)を補正し、第2の色V2の各成分値(V2r,V2g,V2b)を算出する。なお、式(1)における値βは、適宜の定数であり、例えば0.75(=75%)として定められる。また、背景色VBは、上記の二値化処理(ステップS21)によって文字部CP以外の部分として判定された背景部分(下地部分)の平均色を求めることによって、得ることができる。   In step S24, the component values (V1r, V1g, V1b) of the first color V1 using the component values (VBr, VBg, VBb) of the background color VB and the like according to the following equation (1). Are corrected, and the component values (V2r, V2g, V2b) of the second color V2 are calculated. Note that the value β in the equation (1) is an appropriate constant, and is determined as 0.75 (= 75%), for example. The background color VB can be obtained by obtaining the average color of the background portion (background portion) determined as a portion other than the character portion CP by the binarization process (step S21).

ただし、式(1)による各算出値(V2r,V2g,V2b)は、それぞれ、最小値Vmin(例えば、0(ゼロ))よりも小さい場合には当該最小値Vminに修正され、最大値Vmax(例えば、255)よりも大きい場合には当該最大値Vmaxに修正される。   However, each calculated value (V2r, V2g, V2b) according to the equation (1) is corrected to the minimum value Vmin when it is smaller than the minimum value Vmin (for example, 0 (zero)), and the maximum value Vmax ( For example, when it is larger than 255), it is corrected to the maximum value Vmax.

式(1)に基づく補正原理について、図15等を参照しながら説明する。なお、記号V1は、RGBの各色成分値を総称する場合にも用いるものとする。記号V2,VBについても同様である。   The correction principle based on Expression (1) will be described with reference to FIG. The symbol V1 is also used when collectively referring to the RGB color component values. The same applies to the symbols V2 and VB.

例えば、内部比率αがβ(例えば75%)に等しい場合には、k=1となる。このとき、式(1)によって、第2の色の成分値V2は、第1の色の成分値V1に等しくなる。特に図15を参照すると、背景色の成分値VBから、背景色の成分値VBと第1の色の成分値V1との差(VB−V1)を引くと、式(1)と同様に、値V1になることが判る。   For example, when the internal ratio α is equal to β (for example, 75%), k = 1. At this time, the component value V2 of the second color is equal to the component value V1 of the first color according to the expression (1). Referring to FIG. 15 in particular, when the difference (VB−V1) between the background color component value VB and the first color component value V1 is subtracted from the background color component value VB, as in Equation (1), It can be seen that the value is V1.

一方、内部比率αがβ(例えば75%)より小さい場合を想定すると、k>1となる。例えば、α=26%、β=75%のときには、k=1.49(149%)となる。この場合、図15に示すように、背景色の成分値VBから、背景色の成分値VBと第1の色の成分値V1との差をk倍(1.49倍)に拡大した値((VB−V1)×k)を差し引いた値が値V2として算出される。換言すれば、第2の色の各成分値(V2r,V2g,V2b)が、第1の色の各対応成分値(V1r,V1g,V1b)と背景色の各対応成分値(VBr,VBg,VBb)との差(詳細には差分値の絶対値)を拡大するように決定される。   On the other hand, assuming that the internal ratio α is smaller than β (for example, 75%), k> 1. For example, when α = 26% and β = 75%, k = 1.49 (149%). In this case, as shown in FIG. 15, a value obtained by expanding the difference between the background color component value VB and the first color component value V1 from the background color component value VB to k times (1.49 times) ( A value obtained by subtracting (VB−V1) × k) is calculated as a value V2. In other words, the component values (V2r, V2g, V2b) of the second color are the corresponding component values (V1r, V1g, V1b) of the first color and the corresponding component values (VBr, VBg, V1b) of the background color. VBb) is determined so as to enlarge the difference (specifically, the absolute value of the difference value).

例えば、文字が細い場合(6ポイント文字の場合)においては、図14に示すように、色V1(R=246,G=79,B=81)は式(1)にしたがって色V2(R=242,G=0,B=0)へと変更される。   For example, when the character is thin (in the case of a 6-point character), as shown in FIG. 14, the color V1 (R = 246, G = 79, B = 81) is the color V2 (R = 242, G = 0, B = 0).

詳細には、R成分V2rは、V2r=255−(255−246)×1.49=241.6、として算出される。また、G成分V2gは、V2g=255−(255−79)×1.49=−7.2、として算出され、B成分V2bは、V2g=255−(255−81)×1.49=−4.3、として算出される。その後、小数点以下を四捨五入して整数化するとともに、負の数をゼロに修正して上述のような値(V2r=242,V2g=0,V2b=0)が算出される。   Specifically, the R component V2r is calculated as V2r = 255− (255−246) × 1.49 = 241.6. The G component V2g is calculated as V2g = 255− (255−79) × 1.49 = −7.2, and the B component V2b is calculated as V2g = 255− (255−81) × 1.49 = −. Calculated as 4.3. After that, the numbers after the decimal point are rounded to an integer, and the negative numbers are corrected to zero to calculate the above values (V2r = 242, V2g = 0, V2b = 0).

これによれば、ステップS22で本来の色V0が背景色の影響により背景色に近づいた色V1として算出されている場合においても、その色V1を背景色から引き離した色V2に補正することができる。この場合には、特に補正後の色V2のG成分およびB成分(値0)が、それぞれ、補正前の色V1(値79あるいは値81)に比べて背景色のG成分およびB成分(値255)から大きく離れることになる。したがって、補正後の色V2は、全体として背景色から離れた色になる。このような色(すなわち背景色との差を拡げた色)で文字を表現することによれば、文字の色がくっきりとし、文字が見やすくなる。すなわち、文字の判読性を向上することができる。   According to this, even when the original color V0 is calculated as the color V1 approaching the background color due to the influence of the background color in step S22, the color V1 can be corrected to the color V2 separated from the background color. it can. In this case, in particular, the G component and B component (value 0) of the color V2 after correction are compared with the G component and B component (value) of the background color compared to the color V1 (value 79 or value 81) before correction, respectively. 255). Therefore, the corrected color V2 is a color that is separated from the background color as a whole. By expressing a character with such a color (that is, a color in which the difference from the background color is widened), the color of the character is clear and the character is easy to see. That is, the legibility of characters can be improved.

また、値kは、文字の太さを表す指標値αに応じて変更される。具体的には、文字が太くなる(指標値αが大きくなる)につれて、値kが小さくなる。逆に、文字が細くなる(指標値αが小さくなる)につれて、値kが大きくなる。   The value k is changed according to the index value α representing the thickness of the character. Specifically, the value k decreases as the character becomes thicker (the index value α increases). Conversely, the value k increases as the character becomes thinner (the index value α decreases).

ここにおいて、図14に示すように、文字が太い場合(10.5ポイント文字の場合)における補正前の色V1(R=233,G=20,B=16)は、文字が細い場合(6ポイント文字の場合)における補正前の色V1(R=246,G=79,B=81)に比べて、本来の色(R=255,G=0,B=0)に比較的近い。   Here, as shown in FIG. 14, the color V1 (R = 233, G = 20, B = 16) before correction when the character is thick (in the case of a 10.5 point character) is when the character is thin (6 Compared to the original color V1 (R = 246, G = 79, B = 81) before correction in the case of a point character, it is relatively close to the original color (R = 255, G = 0, B = 0).

そこで、この実施形態では、文字が太い場合は、値kが比較的小さくなるような式(1)を用いることによって補正の程度を比較的小さくしている。これによれば過剰な補正を防止できる。逆に、文字が細い場合には、式(1)により値kを比較的大きな値とし、補正の程度を比較的大きくしている。   Therefore, in this embodiment, when the character is thick, the degree of correction is made relatively small by using the equation (1) in which the value k becomes relatively small. According to this, excessive correction can be prevented. On the contrary, when the character is thin, the value k is set to a relatively large value by the equation (1), and the degree of correction is made relatively large.

このように、文字の太さに応じて、補正時における、第1の色と背景色との差の拡大の程度を変更することによれば、補正の程度の適正化を図ることができる。   As described above, the degree of correction can be optimized by changing the degree of enlargement of the difference between the first color and the background color at the time of correction according to the thickness of the character.

<1−4.背景色が緑色の場合>
また、図16〜図23は、(文字色は上記と同様に赤色であるが)背景色が白色ではなく緑色の場合における処理結果の変遷を示す図であり、それぞれ、図4〜図11に対応している。図16〜図19は、6ポイントの大きさを有する文字「I」に関する処理結果の変遷を示す図であり、図20〜図23は、10.5ポイントの大きさを有する文字「I」に関する処理結果の変遷を示す図である。図16および図20は、原稿上の文字「I」を示す図であり、図17および図21は、スキャン画像における文字「I」を示す図である。また、図18および図22は、スキャン画像を二値化して得られる画像、詳細には、補正処理(ステップS24)前の画像における文字「I」を示す図であり、図19および図23は、当該補正処理(ステップS24)後の画像における文字「I」を示す図である。
<1-4. When the background color is green>
FIGS. 16 to 23 are diagrams showing changes in processing results when the background color is not white but green (although the character color is red as described above), and FIGS. It corresponds. 16 to 19 are diagrams showing the transition of the processing result related to the character “I” having a size of 6 points, and FIGS. 20 to 23 are related to the character “I” having a size of 10.5 points. It is a figure which shows the transition of a process result. 16 and 20 are diagrams showing the letter “I” on the document, and FIGS. 17 and 21 are diagrams showing the letter “I” in the scanned image. 18 and 22 are diagrams showing the character “I” in the image obtained by binarizing the scan image, specifically, the image before the correction process (step S24). FIG. 19 and FIG. FIG. 10 is a diagram showing the letter “I” in the image after the correction process (step S24).

また、図24は、背景色が白色ではなく緑色の場合の補正前後の色等を示す図である。   FIG. 24 is a diagram showing the color before and after correction when the background color is not white but green.

図24に示すように、例えば6ポイント文字に関しては補正前の文字色V1(R=195,G=23,B=1)は、補正後の文字色V2(R=220,G=0,B=0)へと変更される。すなわち、背景の緑色(R=145,G=201,B=52)の影響によって補正前の文字色V1が本来の赤色(R=255,G=0,B=0)よりも「くすんだ」色(R=195,G=23,B=1)になっている場合であっても、補正後の文字の色V2は、背景との差を大きくした色(R=220,G=0,B=0)に補正される。そのため、観察者は比較的くっきりとした色の文字を視認することができる。したがって、文字の判読性を向上させることができる。   As shown in FIG. 24, for example, for a 6-point character, the character color V1 before correction (R = 195, G = 23, B = 1) is the character color V2 after correction (R = 220, G = 0, B). = 0). That is, the character color V1 before correction is more dull than the original red color (R = 255, G = 0, B = 0) due to the influence of the background green color (R = 145, G = 201, B = 52). Even when the color (R = 195, G = 23, B = 1), the corrected character color V2 is a color (R = 220, G = 0, B = 0). Therefore, the observer can visually recognize characters with relatively clear colors. Therefore, the legibility of characters can be improved.

また、10.5ポイント文字に関しては、図16に示すように補正前の色V1(R=211,G=16,B=1)は、補正後の色V2(R=226,G=0,B=0)へと変更される。このような補正によれば、背景の緑色(R=145,G=201,B=52)の影響によって補正前の文字の色V1が本来の赤色(R=255,G=0,B=0)よりも「くすんだ」色になっている場合であっても、補正後の文字の色V2は、背景との差を大きくした色に補正される。   For the 10.5 point character, as shown in FIG. 16, the uncorrected color V1 (R = 211, G = 16, B = 1) is the corrected color V2 (R = 226, G = 0, B = 0). According to such correction, the color V1 of the character before correction is the original red color (R = 255, G = 0, B = 0) due to the influence of the green background (R = 145, G = 201, B = 52). ), The corrected character color V2 is corrected to a color with a larger difference from the background.

なお、図17〜図19、図21〜図23においては、文字部CPに隣接する背景部分(ないし下地部分)が、写真あるいは図表と同様に上述の第2の領域として扱われ、文字部CPと合成された状態で示されている。そのため、背景部分は、文字部CPのように二値化されておらず、多段階の階調値を有するものとして示されている。また、上述の計算における背景色の緑色(R=145,G=201,B=52)は、このような背景部分の平均色として取得されたものである。   In FIG. 17 to FIG. 19 and FIG. 21 to FIG. 23, the background portion (or the ground portion) adjacent to the character portion CP is treated as the above-described second region in the same manner as the photograph or chart, and the character portion CP. And is shown in a synthesized state. Therefore, the background portion is not binarized like the character portion CP, and is shown as having multi-level gradation values. Further, the green background color (R = 145, G = 201, B = 52) in the above calculation is acquired as the average color of such a background portion.

<1−5.背景色が青色の場合>
また、図25は、(文字色は上記と同様に赤色であるが)背景色が緑色ではなく青色の場合における補正前後の色等を示す図である。さらに、図26〜図33は、背景色が白色ではなく青色の場合における処理結果の変遷を示す図であり、それぞれ、図4〜図11に対応している。図26〜図29は、6ポイントの大きさを有する文字「I」に関する処理結果の変遷を示す図であり、図30〜図33は、10.5ポイントの大きさを有する文字「I」に関する処理結果の変遷を示す図である。図26および図30は、原稿上の文字「I」を示す図であり、図27および図31は、スキャン画像における文字「I」を示す図である。また、図28および図32は、スキャン画像を二値化して得られる画像、詳細には、補正処理(ステップS24)前の画像における文字「I」を示す図であり、図29および図33は、当該補正処理(ステップS24)後の画像における文字「I」を示す図である。
<1-5. When the background color is blue>
FIG. 25 is a diagram illustrating the color before and after correction when the background color is blue instead of green (although the character color is red as described above). Furthermore, FIGS. 26 to 33 are diagrams showing the transition of the processing results when the background color is blue instead of white, and correspond to FIGS. 4 to 11 respectively. 26 to 29 are diagrams showing the transition of the processing result related to the letter “I” having a size of 6 points, and FIGS. 30 to 33 are related to the letter “I” having a size of 10.5 points. It is a figure which shows the transition of a process result. 26 and 30 are diagrams showing the letter “I” on the document, and FIGS. 27 and 31 are diagrams showing the letter “I” in the scanned image. FIGS. 28 and 32 are diagrams showing the character “I” in an image obtained by binarizing the scanned image, specifically, the image before the correction process (step S24). FIGS. FIG. 10 is a diagram showing the letter “I” in the image after the correction process (step S24).

図25に示すように、例えば6ポイント文字に関しては補正前の色V1(R=192,G=80,B=74)は、補正後の色V2(R=255,G=77,B=31)へと変更される。このような補正によれば、背景の青色(R=26,G=86,B=161)の影響によって補正前の文字の色V1が本来の赤色(R=255,G=0,B=0)よりも「くすんだ」色(R=192,G=80,B=74)になっている場合であっても、補正後の文字の色V2は、背景との差を大きくした色(R=255,G=77,B=31)に補正される。そのため、観察者は比較的くっきりとした色の文字を視認することができる。したがって、文字の判読性を向上させることができる。   As shown in FIG. 25, for a six-point character, for example, the color V1 before correction (R = 192, G = 80, B = 74) is the color V2 after correction (R = 255, G = 77, B = 31). ). According to such correction, the character color V1 before correction is changed to the original red color (R = 255, G = 0, B = 0) due to the influence of the blue color of the background (R = 26, G = 86, B = 161). ), The corrected character color V2 is a color (R) that has a larger difference from the background (R = 192, G = 80, B = 74). = 255, G = 77, B = 31). Therefore, the observer can visually recognize characters with relatively clear colors. Therefore, the legibility of characters can be improved.

また、10.5ポイント文字に関しては、図25に示すように補正前の色V1(R=225,G=63,B=59)は、補正後の色V2(R=255,G=58,B=36)へと変更される。このような補正によれば、背景の青色(R=26,G=86,B=161)の影響によって補正前の文字の色V1が本来の赤色(R=255,G=0,B=0)よりも「くすんだ」色(R=225,G=63,B=59)になっている場合であっても、補正後の文字の色V2は、背景との差を大きくした色(R=255,G=58,B=36)に補正される。   For the 10.5 point character, as shown in FIG. 25, the uncorrected color V1 (R = 225, G = 63, B = 59) is the corrected color V2 (R = 255, G = 58, B = 36). According to such correction, the character color V1 before correction is changed to the original red color (R = 255, G = 0, B = 0) due to the influence of the blue color of the background (R = 26, G = 86, B = 161). ), The corrected character color V2 is a color (R) having a larger difference from the background (R = 225, G = 63, B = 59). = 255, G = 58, B = 36).

なお、図27〜図29、図31〜図33においても、図17〜図19、図21〜図23と同様に、背景部分は、文字部CPのように二値化されておらず、多段階の階調値を有するものとして示されている。また、上述の計算における背景色の青色(R=26,G=86,B=161)は、このような背景部分の平均色として取得されたものである。   27 to 29 and FIGS. 31 to 33, as in FIGS. 17 to 19 and FIGS. 21 to 23, the background portion is not binarized like the character portion CP. It is shown as having graded gradation values. Further, the background color blue (R = 26, G = 86, B = 161) in the above calculation is obtained as the average color of such a background portion.

<2.第2実施形態>
第2実施形態は、第1実施形態の変形例である。以下では、第1実施形態との相違点を中心に説明する。
<2. Second Embodiment>
The second embodiment is a modification of the first embodiment. Below, it demonstrates centering on difference with 1st Embodiment.

上記第1実施形態においては、MFP1が画像処理装置として機能する場合を例示したが、この第2実施形態においては、コンピュータ(パーソナルコンピュータ等)が画像処理装置として機能する場合を例示する。   In the first embodiment, the case where the MFP 1 functions as an image processing apparatus is illustrated, but in the second embodiment, the case where a computer (such as a personal computer) functions as an image processing apparatus is illustrated.

図34は、第2実施形態に係る原稿電子化システム100(100B)を示す概略図である。ここでは、原稿電子化システム100は、複数のスキャナ装置80と、パーソナルコンピュータなどのコンピュータ90とを備えている。なお、スキャナ装置80は、スキャナ専用機器であってもよく、あるいは、上述のMFP1のような複合機等であってもよい。   FIG. 34 is a schematic diagram showing an original digitizing system 100 (100B) according to the second embodiment. Here, the document digitizing system 100 includes a plurality of scanner devices 80 and a computer 90 such as a personal computer. The scanner device 80 may be a scanner-dedicated device, or may be a multifunction device such as the MFP 1 described above.

また、コンピュータ90は、複数のスキャナ装置80に対してネットワークNWを介して通信可能に接続されている。コンピュータ90は、各スキャナ装置80によって生成されたスキャン画像をネットワークNWを介して受信し、当該スキャン画像に対して上述のような画像処理を施す。   The computer 90 is connected to a plurality of scanner devices 80 via a network NW so as to be communicable. The computer 90 receives the scan image generated by each scanner device 80 via the network NW, and performs the above-described image processing on the scan image.

詳細には、コンピュータ90は、所定のプログラムPGが記録された記録媒体91(例えば、フレキシブルディスク、CD−ROM、DVD−ROM等)から当該プログラムPGを読み出し、当該プログラムPGをそのCPU等を用いて実行することによって、上記の画像処理部3と同様の機能を実現する。なお、当該プログラムPGは、記録媒体によって供給されてもよいが、インターネットを介してダウンロードすることなどによって供給されてもよい。   Specifically, the computer 90 reads the program PG from a recording medium 91 (for example, a flexible disk, a CD-ROM, a DVD-ROM, etc.) on which a predetermined program PG is recorded, and uses the program PG using the CPU or the like. By executing these functions, the same function as that of the image processing unit 3 is realized. The program PG may be supplied by a recording medium, or may be supplied by downloading via the Internet.

これによって、コンピュータ90は、第1実施形態と同様の画像処理を実現し、文字の色をくっきりとさせた状態のファイルを作成することができる。   As a result, the computer 90 can realize image processing similar to that of the first embodiment, and can create a file in which the character color is clear.

また、このコンピュータ90は、複数のスキャナ装置80から送信されてきた画像に基づいて、上述のようなファイル(例えばPDFファイル)を作成することができる。特に、コンピュータ90は、上式(1)におけるパラメータβを、各スキャナ装置に固有の値に設定して、その記憶部に格納している。例えば、或るスキャナ装置向けにはβ=0.75を設定し、別のスキャナ装置向けにはβ=0.85を設定する。これによれば、各スキャナ装置80の特性が互いに異なる場合であっても、それぞれの特性に応じた処理を行うことが可能である。   Further, the computer 90 can create the above-described file (for example, PDF file) based on the images transmitted from the plurality of scanner devices 80. In particular, the computer 90 sets the parameter β in the above equation (1) to a value unique to each scanner device and stores it in the storage unit. For example, β = 0.75 is set for a certain scanner device, and β = 0.85 is set for another scanner device. According to this, even if the characteristics of the scanner devices 80 are different from each other, it is possible to perform processing according to the characteristics.

<3.変形例>
以上、この発明の実施の形態について説明したが、この発明は上記説明した内容のものに限定されるものではない。
<3. Modification>
Although the embodiments of the present invention have been described above, the present invention is not limited to the contents described above.

たとえば、上記各実施形態においては、値kを文字の太さ(α)に応じて変更する場合を例示したが、これに限定されず、値kを固定値にしてもよい。   For example, in each of the above-described embodiments, the case where the value k is changed according to the thickness (α) of the character is exemplified, but the present invention is not limited to this, and the value k may be a fixed value.

また、上記実施形態においては、文字部CP(図12等参照)に含まれる全画素の平均色を第1の色V1として求める場合を例示しているが、これに限定されない。   Moreover, although the case where the average color of all the pixels contained in the character part CP (refer FIG. 12 etc.) is calculated | required as 1st color V1 is illustrated in the said embodiment, it is not limited to this.

例えば、文字部CPに含まれる全画素のうちの一部の画素(例えば、非境界画素の全て又は一部)の平均色を第1の色V1として求めるようにしてもよい。   For example, an average color of a part of all the pixels included in the character part CP (for example, all or part of the non-boundary pixels) may be obtained as the first color V1.

また、文字部CPに含まれる代表画素の色を第1の色V1として決定するようにしてもよい。より詳細には、図12における文字部CPの中央の代表画素R1の色を第1の色V1として決定するようにしてもよい。   Further, the color of the representative pixel included in the character part CP may be determined as the first color V1. More specifically, the color of the representative pixel R1 at the center of the character portion CP in FIG. 12 may be determined as the first color V1.

また、上記各実施形態においては、1文字単位で文字色を決定する場合を中心に例示したが、上述したように、或る範囲(単語、行、段落、あるいはブロック等)を1つの単位として、当該単位ごとに「文字色」を決定してもよい。   Further, in each of the above embodiments, the case where the character color is determined in units of one character has been exemplified. However, as described above, a certain range (word, line, paragraph, block, or the like) is set as one unit. The “character color” may be determined for each unit.

例えば、単語ごとに1つの文字色を決定してもよい。具体的には、単語に含まれる複数の文字の「文字色」をそれぞれ求め、その平均値を当該単語の「文字色」として決定すればよい。   For example, one character color may be determined for each word. Specifically, the “character color” of a plurality of characters included in a word may be obtained, and the average value may be determined as the “character color” of the word.

あるいは、「行」ごとに1つの文字色を決定してもよい。具体的には、「行」に含まれる複数の文字の「文字色」をそれぞれ求め、その平均値を当該「行」の「文字色」として決定すればよい。   Alternatively, one character color may be determined for each “line”. Specifically, the “character color” of a plurality of characters included in the “line” is obtained, and the average value is determined as the “character color” of the “line”.

あるいは、複数の行(あるいは複数の段落)で構成される文字ブロックごとに1つの文字色を決定するようにしてもよい。この場合においては、複数の行ごとに文字色を決定しておき、近傍の行のうち文字色が互いに近い行をまとめて文字のブロックを構成し、当該ブロックに対する文字色を再度決定することが好ましい。これによれば、互いにその色が近似する複数の行を1つのブロックにまとめて「色」を管理することができるので、効率的にファイルサイズを低減することが可能である。   Alternatively, one character color may be determined for each character block composed of a plurality of lines (or a plurality of paragraphs). In this case, the character color is determined for each of a plurality of lines, and among the neighboring lines, the character colors that are close to each other are combined to form a character block, and the character color for the block is determined again. preferable. According to this, since a plurality of rows whose colors are similar to each other can be combined into one block to manage “color”, it is possible to efficiently reduce the file size.

第1実施形態に係る原稿電子化システムを示す概略図である。1 is a schematic diagram illustrating a document digitization system according to a first embodiment. MFP内での画像処理の概要を示す図である。FIG. 2 is a diagram illustrating an overview of image processing in an MFP. 文字に関する処理の概要を示す図である。It is a figure which shows the outline | summary of the process regarding a character. 原稿上の文字「I」(6ポイント文字)を示す図である。It is a figure which shows the character "I" (6 point character) on a manuscript. スキャン画像における文字「I」(6ポイント文字)を示す図である。It is a figure which shows the character "I" (6 point character) in a scan image. 補正処理前の文字「I」(6ポイント文字)を示す図である。It is a figure which shows the character "I" (6-point character) before a correction process. 補正処理後の文字「I」(6ポイント文字)を示す図である。It is a figure which shows the character "I" (6 point character) after a correction process. 原稿上の文字「I」(10.5ポイント文字)を示す図である。It is a figure which shows the character "I" (10.5 point character) on a manuscript. スキャン画像における文字「I」(10.5ポイント文字)を示す図である。It is a figure which shows the character "I" (10.5 point character) in a scan image. 補正処理前の文字「I」(10.5ポイント文字)を示す図である。It is a figure which shows the character "I" (10.5 point character) before a correction process. 補正処理後の文字「I」(10.5ポイント文字)を示す図である。It is a figure which shows the character "I" (10.5 point character) after a correction process. 補正処理前の文字「I」(6ポイント文字)を模式的に示す図である。It is a figure which shows typically the character "I" (6-point character) before a correction process. 補正処理前の文字「I」(10.5ポイント文字)を模式的に示す図である。It is a figure which shows typically character "I" (10.5 point character) before a correction process. 補正前後の色の変化を示す図である(背景が白色の場合)。It is a figure which shows the change of the color before and behind correction | amendment (when a background is white). 補正原理を説明するための図である。It is a figure for demonstrating the correction principle. 原稿上の6ポイント文字(緑色背景)を示す図である。It is a figure which shows the 6 point character (green background) on a manuscript. スキャン画像における6ポイント文字(緑色背景)を示す図である。It is a figure which shows the 6 point character (green background) in a scan image. 補正処理前の6ポイント文字(緑色背景)を示す図である。It is a figure which shows the 6 point character (green background) before a correction process. 補正処理後の6ポイント文字(緑色背景)を示す図である。It is a figure which shows 6 point characters (green background) after a correction process. 原稿上の文字10.5ポイント文字(緑色背景)を示す図である。It is a figure which shows the character 10.5 point character (green background) on a manuscript. スキャン画像における10.5ポイント文字(緑色背景)を示す図である。It is a figure which shows the 10.5 point character (green background) in a scanning image. 補正処理前の10.5ポイント文字(緑色背景)を示す図である。It is a figure which shows the 10.5 point character (green background) before a correction process. 補正処理後の10.5ポイント文字(緑色背景)を示す図である。It is a figure which shows the 10.5 point character (green background) after a correction process. 補正前後の色の変化を示す図である(背景が緑色の場合)。It is a figure which shows the change of the color before and behind correction | amendment (when a background is green). 補正前後の色の変化を示す図である(背景が青色の場合)。It is a figure which shows the change of the color before and behind correction | amendment (when a background is blue). 原稿上の6ポイント文字(青色背景)を示す図である。It is a figure which shows the 6 point character (blue background) on a manuscript. スキャン画像における6ポイント文字(青色背景)を示す図である。It is a figure which shows the 6 point character (blue background) in a scan image. 補正処理前の6ポイント文字(青色背景)を示す図である。It is a figure which shows 6 point characters (blue background) before a correction process. 補正処理後の6ポイント文字(青色背景)を示す図である。It is a figure which shows 6 point characters (blue background) after a correction process. 原稿上の文字10.5ポイント文字(青色背景)を示す図である。It is a figure which shows the character 10.5 point character (blue background) on a manuscript. スキャン画像における10.5ポイント文字(青色背景)を示す図である。It is a figure which shows the 10.5 point character (blue background) in a scanning image. 補正処理前の10.5ポイント文字(青色背景)を示す図である。It is a figure which shows the 10.5 point character (blue background) before a correction process. 補正処理後の10.5ポイント文字(青色背景)を示す図である。It is a figure which shows the 10.5 point character (blue background) after a correction process. 第2実施形態に係る原稿電子化システムを示す概略図である。It is the schematic which shows the original digitization system which concerns on 2nd Embodiment.

符号の説明Explanation of symbols

1 MFP(画像処理装置)
90 コンピュータ(画像処理装置)
91 記録媒体
100,100A,100B 原稿電子化システム
PG プログラム
R1 代表画素
V1 第1の色
V2 第2の色
VB 背景色
α 内部比率
1 MFP (image processing device)
90 Computer (image processing device)
91 Recording Medium 100, 100A, 100B Electronic Document System PG Program R1 Representative Pixel V1 First Color V2 Second Color VB Background Color α Internal Ratio

Claims (8)

画像処理装置であって、
スキャン画像に対して二値化処理を施し、文字に対応する部分である文字部を背景から分離して抽出する文字部抽出手段と、
前記文字部の代表色である文字色を決定する決定手段であって、前記文字部の色成分値に基づいて前記文字部の色の候補である第1の色を求め、前記第1の色と前記スキャン画像における前記背景の色である背景色との差を拡大するように前記第1の色を補正して得られる第2の色を前記文字色として決定する決定手段と、
前記文字の太さを検出する検出手段と、
を備え、
前記決定手段は、前記検出手段によって検出された前記文字の太さに応じて、補正時における前記差の拡大の程度を変更するものであって、前記文字が細くなるにつれて、前記差の拡大の程度を大きくするものであることを特徴とする画像処理装置。
An image processing apparatus,
Character part extraction means for performing binarization processing on the scanned image and separating and extracting a character part that is a part corresponding to the character from the background;
Determining means for determining a character color that is a representative color of the character portion, wherein a first color that is a candidate color of the character portion is obtained based on a color component value of the character portion; Determining means for determining, as the character color, a second color obtained by correcting the first color so as to enlarge a difference between a background color that is a background color of the scanned image and the background color;
Detecting means for detecting the thickness of the character;
With
Said determining means, depending on the thickness of the character detected by the detecting means, be one that changes the degree of expansion of the difference in the correction time, as the character becomes narrower, the expansion of the difference An image processing apparatus characterized by increasing the degree .
請求項1に記載の画像処理装置において、  The image processing apparatus according to claim 1.
前記検出手段は、前記文字部の画素総数に対する非境界画素の割合を前記文字の太さとして算出することを特徴とする画像処理装置。  The image processing apparatus according to claim 1, wherein the detection unit calculates a ratio of a non-boundary pixel to a total number of pixels of the character portion as a thickness of the character.
請求項1または請求項2に記載の画像処理装置において、  The image processing apparatus according to claim 1 or 2,
前記決定手段は、前記文字部に含まれる少なくとも一部の画素の平均色を前記第1の色として決定することを特徴とする画像処理装置。  The image processing apparatus according to claim 1, wherein the determining unit determines an average color of at least some of the pixels included in the character portion as the first color.
請求項1または請求項2に記載の画像処理装置において、  The image processing apparatus according to claim 1 or 2,
前記決定手段は、前記文字部に含まれる代表画素の色を前記第1の色として決定することを特徴とする画像処理装置。  The image processing apparatus according to claim 1, wherein the determining unit determines a color of a representative pixel included in the character portion as the first color.
コンピュータに、  On the computer,
a)スキャン画像に対して二値化処理を施し、文字に対応する部分である文字部を背景から分離して抽出する手順と、  a) A procedure for performing binarization processing on the scanned image and separating and extracting a character portion that is a portion corresponding to the character from the background;
b)前記文字の太さを検出する手順と、  b) a procedure for detecting the thickness of the character;
c)前記文字部の色成分値に基づいて前記文字部の色の候補である第1の色を求め、前記第1の色と前記スキャン画像における前記背景の色である背景色との差を拡大するように前記第1の色を補正して得られる第2の色を、前記文字部の代表色である文字色として決定する手順と、  c) obtaining a first color that is a candidate for the color of the character part based on the color component value of the character part, and calculating a difference between the first color and a background color that is the background color of the scanned image. Determining a second color obtained by correcting the first color so as to enlarge as a character color that is a representative color of the character portion;
を実行させるためのプログラムであって、A program for executing
前記手順c)は、  The procedure c)
c−1)前記手順b)で検出された前記文字の太さに応じて、補正時における前記差の拡大の程度を変更する手順であって、前記文字が細くなるにつれて前記差の拡大の程度が大きくなるように、前記差の拡大の程度を変更する手順を含むことを特徴とするプログラム。    c-1) A procedure for changing the degree of enlargement of the difference at the time of correction according to the thickness of the character detected in step b), and the degree of enlargement of the difference as the character becomes thinner A program comprising a procedure for changing the degree of enlargement of the difference so as to increase.
請求項5に記載のプログラムにおいて、  The program according to claim 5, wherein
前記手順b)は、前記文字部の画素総数に対する非境界画素の割合を前記文字の太さとして算出する手順を含むことを特徴とするプログラム。  The procedure b) includes a procedure for calculating a ratio of non-boundary pixels to the total number of pixels in the character portion as the thickness of the character.
請求項5または請求項6に記載のプログラムにおいて、  In the program according to claim 5 or 6,
前記手順c)は、前記文字部に含まれる少なくとも一部の画素の平均色を前記第1の色として決定する手順を含むことを特徴とするプログラム。  The procedure c) includes a procedure for determining an average color of at least some pixels included in the character portion as the first color.
請求項5または請求項6に記載のプログラムにおいて、  In the program according to claim 5 or 6,
前記手順c)は、前記文字部に含まれる代表画素の色を前記第1の色として決定する手順を含むことを特徴とするプログラム。  The procedure c) includes a procedure for determining a color of a representative pixel included in the character portion as the first color.
JP2007176900A 2007-07-05 2007-07-05 Image processing apparatus and program Expired - Fee Related JP4442651B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007176900A JP4442651B2 (en) 2007-07-05 2007-07-05 Image processing apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007176900A JP4442651B2 (en) 2007-07-05 2007-07-05 Image processing apparatus and program

Publications (2)

Publication Number Publication Date
JP2009017247A JP2009017247A (en) 2009-01-22
JP4442651B2 true JP4442651B2 (en) 2010-03-31

Family

ID=40357582

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007176900A Expired - Fee Related JP4442651B2 (en) 2007-07-05 2007-07-05 Image processing apparatus and program

Country Status (1)

Country Link
JP (1) JP4442651B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5730595B2 (en) 2011-01-28 2015-06-10 株式会社沖データ Fixing apparatus and image forming apparatus having the same
JP5958023B2 (en) 2012-03-30 2016-07-27 ブラザー工業株式会社 Image processing apparatus and image processing program
JP6370080B2 (en) * 2014-04-02 2018-08-08 キヤノン株式会社 Image processing apparatus, image processing method, and program.
JP7362405B2 (en) 2019-10-09 2023-10-17 キヤノン株式会社 Image processing device, image processing method, and program

Also Published As

Publication number Publication date
JP2009017247A (en) 2009-01-22

Similar Documents

Publication Publication Date Title
JP5220828B2 (en) Image processing apparatus, image forming apparatus, image reading apparatus, image processing method, program, and recording medium
JP5540553B2 (en) Image processing apparatus, image forming apparatus, image processing method, and image processing program
JP4753638B2 (en) Document compression method, system for compressing document, and image processing apparatus
JP4557843B2 (en) Image processing apparatus and method
JP4586891B2 (en) Color reduction method, color reduction processing apparatus, image forming apparatus, and computer program
JP2009232085A (en) Image processing method, image processor, image forming apparatus, program, and storage medium
JP2010103681A (en) Image processing device and method
JP2008005317A (en) Image processor and image processing method, and computer program and recording medium
JP2008099149A (en) Image processor, image processing method and image processing program
JP4582204B2 (en) Image processing apparatus, image conversion method, and computer program
JP4442651B2 (en) Image processing apparatus and program
JP4582200B2 (en) Image processing apparatus, image conversion method, and computer program
US8274515B2 (en) Vector image generation method, image processing apparatus, and computer-readable storage medium for computer program
US8577132B2 (en) Electronic document generation system, electronic document generation method, and program
JP2022147074A (en) Image processing apparatus, image processing method, and program
JP4442701B2 (en) Area discriminating method, image compressing method, image compressing apparatus, and computer program
JP2015015599A (en) Image processing apparatus, image forming apparatus, image processing method, and program and recording medium of the same
JP2003219187A (en) Image processing method and image processor
JP3838981B2 (en) Image processing apparatus, image processing method, and image processing program
JP5090969B2 (en) Image processing device
JP7185451B2 (en) Image processing device, image processing method, and program
JP2007189275A (en) Image processor
JP4412339B2 (en) Image forming apparatus and image data correction method
JP5315637B2 (en) Image processing apparatus, electronic document system, and program
JP2006270816A (en) Image processing apparatus

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081224

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090220

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090421

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090619

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090901

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091030

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20091222

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100104

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130122

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees