JP2008113446A - Image processing device, image processing program and recording medium - Google Patents

Image processing device, image processing program and recording medium Download PDF

Info

Publication number
JP2008113446A
JP2008113446A JP2007287738A JP2007287738A JP2008113446A JP 2008113446 A JP2008113446 A JP 2008113446A JP 2007287738 A JP2007287738 A JP 2007287738A JP 2007287738 A JP2007287738 A JP 2007287738A JP 2008113446 A JP2008113446 A JP 2008113446A
Authority
JP
Japan
Prior art keywords
color
class
original image
background
character
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.)
Granted
Application number
JP2007287738A
Other languages
Japanese (ja)
Other versions
JP4350778B2 (en
JP2008113446A5 (en
Inventor
Hirofumi Nishida
広文 西田
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2007287738A priority Critical patent/JP4350778B2/en
Publication of JP2008113446A publication Critical patent/JP2008113446A/en
Publication of JP2008113446A5 publication Critical patent/JP2008113446A5/ja
Application granted granted Critical
Publication of JP4350778B2 publication Critical patent/JP4350778B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Color, Gradation (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To maintain a gradation of a middle-tone area in an original image inputted from various image input apparatuses, and to also automatically adjust a contrast between a black character and a ground in an output image without a user performing an operation, such as setting a parameter. <P>SOLUTION: On the basis of a feature value calculated from an original image, which is a digital image, in a step S4, a character area is extracted from the original image in a step S5, and the original image is divided into blocks in a step S6. Pixels belonging to the extracted character area are classified into a first class and a second class according to colors, in each of the blocks in a step S7. On the basis of a black character color and a ground color on the original image estimated in each of the blocks in a step S8 according to the classification of the pixels belonging to the extracted character area, a tone correction is then performed on the black character color and the estimated ground color in a step S9 so as to adjust a contrast of the black character and the ground in an output image. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、画像処理装置、画像処理プログラムおよび記憶媒体に関する。 The present invention relates to an image processing apparatus, an image processing program, and a storage medium.

例えば、内容の伝達を目的とする印刷文書をスキャナ等の画像入力機器でスキャンして得られる画像(文書画像)を画像出力機器が取り扱う対象とする場合、文書画像の目的も内容の伝達であるため、出力された該文書画像における文章の読み易さを向上させることは、文書画像の出力に際して最重要課題である。
しかしながら、例えば、白い下地を下地として印刷された文書をカラースキャナ等のカラー画像入力機器を用いて入力することにより得られるデジタル画像をカラープリンタ等のカラー画像出力機器から印刷する場合に、該画像に対して何も画像処理を施さずにそのまま印刷すると、文字と下地との間のコントラストが低かったり、本来黒であるべき黒文字や白であるべき下地に色が付いたりすることによって、文章としての読み易さが低下することがある。
For example, when an image output device handles an image (document image) obtained by scanning a print document intended for content transmission with an image input device such as a scanner, the purpose of the document image is also content transmission. Therefore, improving the readability of the text in the output document image is the most important issue when outputting the document image.
However, for example, when printing a digital image obtained by inputting a document printed with a white background using a color image input device such as a color scanner from a color image output device such as a color printer, the image If the image is printed as it is without any image processing, the contrast between the characters and the background will be low, or the black characters that should be black or the background that should be white will be colored. May be less readable.

これは、画像入力機器と画像出力機器との間で、色や階調の整合性がとれていないためである。画像入力機器や画像出力機器等の画像処理機器がスタンドアロンの場合、画像処理アルゴリズムやパラメータを機器の特性に合わせて設計することが多い。
ここで、関連する技術としては、例えば、コピア等に実装され、黒文字に相当する画素を強調する処理(例えば、特許文献1〜5参照)や、中間調領域を特定する処理(例えば、特許文献6〜9参照)に加えて、画素信号値のヒストグラムを基に階調補正する処理(例えば、特許文献10〜21参照)を行なうようにした技術がある。このような技術では、画像処理のアルゴリズムやパラメータが、通常、入力機器の色特性、解像度、周波数特性に大きく依存する。
This is because the color and gradation are not consistent between the image input device and the image output device. When an image processing device such as an image input device or an image output device is stand-alone, an image processing algorithm and parameters are often designed according to the characteristics of the device.
Here, as related techniques, for example, a process that is implemented in a copier or the like and emphasizes a pixel corresponding to a black character (for example, see Patent Documents 1 to 5) or a process that specifies a halftone area (for example, Patent Document) In addition to 6-9, there is a technique in which gradation correction processing (for example, see Patent Documents 10 to 21) is performed based on a histogram of pixel signal values. In such a technique, image processing algorithms and parameters usually depend greatly on the color characteristics, resolution, and frequency characteristics of the input device.

また、印刷文書をスキャナなどのカラー画像機器から入力することで得られるデジタル画像を、このデジタル画像に対する画像処理を何も施さずにそのままカラープリンタから印刷したりディスプレイ上に表示したりすると、入力時のスキャナの違い(読み取り条件の違い)によっては下地や背景の色が一様でなかったり、裏面に印刷されている内容が透けて入力されるいわゆる「裏写り」が生じたりすることがある。このような場合、画像が全体として汚く見える現象がしばしば起こる。   Also, if a digital image obtained by inputting a print document from a color image device such as a scanner is directly printed from a color printer or displayed on a display without performing any image processing on the digital image, Depending on the difference in scanner (difference in scanning conditions), the background and background colors may not be uniform, or so-called “show-through” may occur in which the content printed on the back side is shown through . In such a case, the phenomenon that the image looks dirty as a whole often occurs.

対象となるデジタル画像における地肌や背景の色が白の場合には、上述した不具合現象に対する対策として、地肌や背景の部分を白に置換する、いわゆる「下地除去」や「地肌除去」と呼ばれる処理の実行が有効である。   When the background color or background color of the target digital image is white, as a countermeasure against the above-mentioned malfunction phenomenon, processing called so-called “background removal” or “background removal” that replaces the background or background part with white Is effective.

このような「下地除去」や「地肌除去」と呼ばれる処理としては、例えば、画素信号値のヒストグラムをもとに下地レベルを検出し下地を飛ばす処理(例えば、特許文献22、特許文献23参照)が知られている。このような処理により、地肌や背景の色が白の場合には、スキャナの違い(読み取り条件の違い)や裏写りによる画像劣化を防止することができる。   As a process called “background removal” or “background removal”, for example, a background level is detected based on a histogram of pixel signal values and the background is skipped (see, for example, Patent Document 22 and Patent Document 23). It has been known. By such processing, when the background or background color is white, it is possible to prevent image deterioration due to differences in scanner (difference in reading conditions) or show-through.

また、原稿の背景色を推定し、該背景色とターゲットとなる画素値との差を用いて該ターゲット画素の画素値を変更する処理がある(例えば、特許文献24参照)。この処理では、同じ色であるヒストグラムから最も明るい領域を探すことによって背景色を決定し、以下に示す4つのうちのいずれか一つを背景色として識別した識別結果に応じて色分布から背景基準色を決定し、決定した基準色と各画素との差に基づいて各画素の色を調整する。この技術においては、背景色として識別される4つのパターンは、(1)ニアホワイト,コントーン(白地のコピー用紙や新聞印刷用紙など)、(2)ニアホワイト,ハーフトーン(雑誌印刷用紙など)、(3)ファーホワイト,コントーン(写真や着色紙など)、および、(4)ファーホワイト,ハーフトーン(雑誌印刷用紙など)とされている。   Also, there is a process of estimating the background color of the document and changing the pixel value of the target pixel using the difference between the background color and the target pixel value (see, for example, Patent Document 24). In this process, the background color is determined by searching for the brightest region from the histogram of the same color, and the background reference is determined from the color distribution according to the identification result in which one of the following four is identified as the background color. The color is determined, and the color of each pixel is adjusted based on the difference between the determined reference color and each pixel. In this technology, the four patterns identified as background colors are (1) near white, contone (such as white copy paper and newspaper printing paper), (2) near white, halftone (such as magazine printing paper), (3) Far white and contone (photograph, colored paper, etc.) and (4) Far white, halftone (magazine printing paper, etc.).

また、階調分布のヒストグラムに対して、そのピークの分布状態を解析することにより、画像/地肌/それ以外に領域判定するための閾値を決定し、画像領域は無処理のまま出力し、地肌領域は地肌色に変換し、その他の領域では所定の条件に従って処理することで画像劣化を防止するようにした技術がある(例えば、特許文献25参照)。
特許第2558915号公報 特開2000−196871公報 特開2000−316097公報 特開2001−078036公報 特開2001−169133公報 特許第3158498号公報 特開2001−036748公報 特開2001−144962公報 特開平11−220631号公報 特開2000−013616公報 特開2000−013625公報 特開2000−115538公報 特開2000−242777公報 特開2001−045303公報 特開2001−148785公報 特開2001−167260公報 特開2001−189862公報 特開2001−189863公報 特開2001−197312公報 特開2001−222711公報 特開平10−281470号公報 特開2000−022971公報 特開2000−078408公報 特開2000−050083公報 特開2001−045297公報
In addition, by analyzing the distribution state of the peak of the gradation distribution histogram, a threshold value for determining the area of the image / background / other area is determined, and the image area is output without being processed. There is a technique in which an area is converted to a background color and image degradation is prevented by processing in other areas according to a predetermined condition (see, for example, Patent Document 25).
Japanese Patent No. 2558915 JP 2000-196871 A JP 2000-316097 A JP 2001-0778036 A JP 2001-169133 A Japanese Patent No. 3158498 JP 2001-036748 A Japanese Patent Laid-Open No. 2001-144972 JP-A-11-220631 JP 2000-013616 A JP 2000-013625 A JP 2000-115538 A JP 2000-242777 A JP 2001-045303 A JP 2001-148785 A JP 2001-167260 A JP 2001-189862 A JP 2001-189863 A JP 2001-197312 A JP 2001-222711 A JP-A-10-281470 JP 2000-022971 A JP 2000-078408 JP 2000-050083 A JP 2001-045297 A

ところで、近年のネットワーク環境の普及に伴い、画像機器を通して入力された画像がネットワークを介して遠隔地に送信され、受信者が該画像をPC上で編集・再利用・印刷・再送信するという状況が出現している。このようなネットワーク環境では、未知の画像機器を通して入力された画像に対して編集・再利用・印刷・再送信といった処理を行なうため、上述した各種特許文献に示されるような従来技術にはなかった新たな技術的課題が考えられる。   By the way, with the spread of the network environment in recent years, an image input through an image device is transmitted to a remote place via a network, and a recipient edits, reuses, prints, and retransmits the image on a PC. Has appeared. In such a network environment, processing such as editing / reuse / printing / retransmission is performed on an image input through an unknown image device. New technical issues can be considered.

つまり、ネットワーク環境下では、入出力機器の特性が多様であり、さらに、デジタル画像が遠隔地で入力・送信されてきたような場合には、入力機器が未知のことすらあるが、ある特定の機種に対して最適な画像処理系が、特性が異なる機種に対して効果を発揮するとは限らないため、画像入力機器で入力された画像を画像出力機器で出力する場合に、画像の識別の精度がばらつき、出力画像の品質が低下して、文章としての読み易さが低下してしまうことがある。   In other words, in a network environment, the characteristics of input / output devices are diverse, and when a digital image is input / transmitted at a remote location, the input device may be unknown, but The image processing system that is optimal for the model may not be effective for models with different characteristics. Therefore, when an image input by an image input device is output by an image output device, the accuracy of image identification May vary, the quality of the output image may be reduced, and readability as a sentence may be reduced.

この対策として、文字と下地とのコントラストの問題と、黒文字や下地の色付きの問題とに限れば、適応的二値化が有効である。二値化技術の研究開発は、文書画像処理において、OCRの前処理としての機能として盛んに行われてきた。しかしながら、二値化を施すと中間調領域の階調や色が失われるという問題がある。   As a countermeasure, adaptive binarization is effective only for the problem of contrast between characters and background and the problem of coloring of black characters and background. Research and development of binarization technology has been actively performed as a function as preprocessing of OCR in document image processing. However, when binarization is performed, there is a problem that the gradation and color of the halftone area are lost.

この問題の解決策としては、文書画像認識で用いられ、画像をテキスト,写真,線画等の領域に分割する手法を用いて、白地に黒文字が書かれている領域に限って二値化を適用することが考えられる。しかしながら、このような技術は、出力形態がHTML等のテキストファイルであるOCRにおいては領域識別を誤った場合でも、編集・修正が容易であるが、文書画像の高画質再出力を目的とする場合に領域識別を誤った場合には、画像編集・修正が非常に複雑になる可能性がある。   As a solution to this problem, binarization is applied only to areas where black characters are written on a white background, using a technique that is used in document image recognition and dividing the image into areas such as text, photographs, and line drawings. It is possible to do. However, such a technique is easy to edit and correct even if the area identification is wrong in OCR which is a text file such as HTML, but the purpose is to re-output a document image with high image quality. If region identification is mistaken, image editing / correction may become very complicated.

このため、中間調領域の階調性は保持しながら、白い下地を白に、黒文字を黒に変換するような、文書画像に適した大局的な階調補正、いわゆる、「ソフト」な大局的閾値処理が望まれている。ここで、大局的な階調補正、いわゆる、「ソフト」な大局的閾値処理とは、全ての画素に同じ変換を施すような処理を意味する。   Therefore, global tone correction suitable for document images, such as converting white background to white and black characters to black, while maintaining the gradation of the halftone area, so-called "soft" global Threshold processing is desired. Here, global tone correction, so-called “soft” global threshold processing, means processing for performing the same conversion on all pixels.

また、画像入力機器の特性が多様であるため、例えば、飽和度が規定の閾値以下の画素の色を白に置き換えるような処理や、飽和度が規定の閾値以下の画素をモノクロと見なすような処理を行なう場合に、「規定の閾値」となるパラメータをハードコーディングするようなことは避けなければならず、上記の処理を特定するパラメータ(下地や黒文字の色)を画像から適応的に計算できることが望まれる。   In addition, since the characteristics of the image input device are diverse, for example, processing for replacing the color of a pixel with a saturation level equal to or less than a predetermined threshold with white, or a pixel with a saturation level equal to or lower than a predetermined threshold is considered as monochrome. When processing, it is necessary to avoid hard-coding the parameters that will be the “specified threshold”, and the parameters that specify the above processing (background and black character color) can be calculated adaptively from the image. Is desired.

特に、ハイライト色の表現能力は、プリンタ等の各画像出力機器によってばらつきが大きく、同じ信号でもクリップされて白(何も印刷されない)になったり、可視的に印刷されたりする等、統一性がないため、上述した画像処理に際しては、画像出力機器の特性に応じて、処理の調整をユーザが簡単に行なうことができることが望まれる。   In particular, the ability to express highlight colors varies widely among image output devices such as printers, and even if the same signal is clipped to white (nothing printed) or printed visually, etc. Therefore, in the above-described image processing, it is desirable that the user can easily adjust the processing according to the characteristics of the image output device.

また、カラー文書画像では、地肌や背景の色が任意であり、背景の構造が複雑で、複数の背景色から構成されている場合も多くある。   In a color document image, the background and background colors are arbitrary, the background structure is complicated, and there are many cases where the background is composed of a plurality of background colors.

そして、背景の構造が複雑なカラー文書画像における色や階調分布を単純に調べた場合に得られるヒストグラムの形態としては、ヒストグラム中に多くのピークや谷が現れるような「混合分布」となるため、真の背景色を推定することが難しくなる。   The histogram form obtained when the color and gradation distribution in a color document image with a complicated background structure is simply examined is a “mixed distribution” in which many peaks and valleys appear in the histogram. Therefore, it is difficult to estimate the true background color.

上述したような特許文献22、特許文献23あるいは特許文献25に記載された技術では、このような混合分布を有するカラー文書画像から背景や地肌色を抽出する方式を述べているが、実際に得られるヒストグラム中にはノイズによるピークや谷も多く含まれるため、正確に所望の背景や地肌色が抽出できるとは限らず、抽出の誤りも多くなる。   In the technique described in Patent Document 22, Patent Document 23, or Patent Document 25 described above, a method of extracting a background or background color from a color document image having such a mixed distribution is described. Since the histogram includes many peaks and valleys due to noise, it is not always possible to accurately extract a desired background or background color, and the number of extraction errors increases.

また、特許文献24に開示された技術では、背景や地肌を、コントーンとハーフトーン(網点)に識別しているが、網点の識別は入力機器の周波数特性(MTF)に強く依存するため、ネットワークを介して遠隔地から送られてきたデータのように入力機器が未知の場合に適用するのは難しい。   In the technique disclosed in Patent Document 24, the background and background are identified as a contone and a halftone (halftone dot), but the halftone dot identification strongly depends on the frequency characteristics (MTF) of the input device. It is difficult to apply when the input device is unknown, such as data sent from a remote place via a network.

本発明の目的は、多様な画像入力機器から入力された原画像の中間調領域の階調性を保持しながら、ユーザがパラメータを設定する等の作業を行なうことなく自動的に出力画像の黒文字と下地とのコントラストを調整することである。   An object of the present invention is to automatically maintain black characters of an output image without performing a work such as setting a parameter while maintaining a gradation property of a halftone area of an original image input from various image input devices. And adjusting the contrast between the substrate and the background.

請求項1記載の発明の画像処理装置は、デジタル画像である原画像から文字領域を抽出する文字領域抽出手段と、前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに分類するクラス分類手段と、前記文字領域に属する画素のクラス分類に基づいて前記原画像上の黒文字色と背景色とを推定する黒文字色/下地色推定手段と、推定された黒文字色と下地色とに基づいて前記原画像に対する階調補正を行なう階調補正手段と、を具備する。   The image processing apparatus according to the first aspect of the present invention includes a character area extracting unit that extracts a character area from an original image that is a digital image, and a first class and a second class of pixels belonging to the character area according to colors. Class classification means for classifying the black character color / background color estimation means for estimating a black character color and a background color on the original image based on a class classification of pixels belonging to the character area, and an estimated black character color Gradation correction means for performing gradation correction on the original image based on the background color.

したがって、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、文字領域に属する画素を色に応じて分類したクラス分類に基づいて原画像上の黒文字色と下地色とが推定され、推定された黒文字色と下地色とに基づいて、規定のパラメータを用いることなく原画像に対する階調補正を行なうことができる。   Therefore, for example, when an original image, which is a digital image input from an image input device, is output from the image output device, black characters on the original image based on a class classification in which pixels belonging to the character area are classified according to color. Based on the estimated black character color and background color, tone correction can be performed on the original image without using specified parameters.

請求項2記載の発明の画像処理装置は、デジタル画像である原画像から文字領域を抽出する文字領域抽出手段と、前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに分類するクラス分類手段と、前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定手段と、推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定手段と、特定された背景領域の色を推定された背景色に置換することで前記原画像に対する階調補正を行なう階調補正手段と、を具備する。   An image processing apparatus according to a second aspect of the present invention includes a character area extracting unit that extracts a character area from an original image that is a digital image, and a pixel belonging to the character area is classified into a first class and a second class according to color. Classifying means for classifying into the original image, background color estimating means for estimating the background color on the original image based on the class classification of the pixels belonging to the character area, and on the original image based on the estimated background color Background area specifying means for specifying a background area, and gradation correction means for performing gradation correction on the original image by replacing the color of the specified background area with the estimated background color.

したがって、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、文字領域に属する画素を色に応じて分類したクラス分類に基づき原画像上から推定される背景色に基づいて特定される背景領域の色を推定された背景色に置換することにより、規定のパラメータを用いることなく原画像に対する階調補正を行なうことができる。   Therefore, for example, when an original image, which is a digital image input from an image input device, is output from the image output device, it is estimated from the original image based on a class classification in which pixels belonging to the character area are classified according to color. By replacing the color of the background area specified based on the background color with the estimated background color, it is possible to perform gradation correction on the original image without using a prescribed parameter.

請求項3記載の発明の画像処理装置は、デジタル画像である原画像から文字領域を抽出する文字領域抽出手段と、前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに分類するクラス分類手段と、前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定手段と、推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定手段と、特定された背景領域の色を白色に置換することで前記原画像に対する階調補正を行なう階調補正手段と、を具備する。   According to a third aspect of the present invention, there is provided an image processing apparatus for extracting a character region from an original image which is a digital image, and a first class and a second class of pixels belonging to the character region according to color. Classifying means for classifying into the original image, background color estimating means for estimating the background color on the original image based on the class classification of the pixels belonging to the character area, and on the original image based on the estimated background color Background area specifying means for specifying a background area, and gradation correction means for correcting gradation of the original image by replacing the color of the specified background area with white.

したがって、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、文字領域に属する画素を色に応じて分類したクラス分類に基づき原画像上から推定される背景色に基づいて特定される背景領域の色を白色に置換することにより、規定のパラメータを用いることなく原画像に対する階調補正を行なうことができる。   Therefore, for example, when an original image, which is a digital image input from an image input device, is output from the image output device, it is estimated from the original image based on a class classification in which pixels belonging to the character area are classified according to color. By replacing the color of the background area specified based on the background color with white, it is possible to perform gradation correction on the original image without using a prescribed parameter.

請求項4記載の発明の画像処理装置は、デジタル画像である原画像に対して、特徴量を計算する特徴量計算手段と、前記特徴量に基づいて、前記原画像から文字領域を抽出する文字領域抽出手段と、前記原画像をブロック分割するブロック分割手段と、前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに前記ブロック毎に分類するクラス分類手段と、前記文字領域に属する画素のクラス分類に基づいて前記原画像上の黒文字色と下地色とを推定する黒文字色/下地色推定手段と、推定された黒文字色と下地色とに基づいて前記原画像に対する階調補正を行なう階調補正手段と、を具備する。   The image processing apparatus according to claim 4 is a feature amount calculating means for calculating a feature amount with respect to an original image that is a digital image, and a character that extracts a character region from the original image based on the feature amount. Area extracting means, block dividing means for dividing the original image into blocks, class classification means for classifying pixels belonging to the character area into first and second classes according to color, for each block; A black character color / background color estimating means for estimating a black character color and a background color on the original image based on a class classification of pixels belonging to the character area; and the original image based on the estimated black character color and the background color. Gradation correction means for performing gradation correction with respect to.

したがって、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、原画像の特徴量から計算された値に基づき抽出された文字領域に属する画素を色に応じて分類したクラス分類に基づき、原画像上から推定される黒文字色と下地色とに基づいて、規定のパラメータを用いることなく原画像に対する階調補正を行なうことができる。   Therefore, for example, when an original image, which is a digital image input from an image input device, is output from the image output device, pixels belonging to a character area extracted based on a value calculated from the feature amount of the original image are colored. On the basis of the classification classified according to the above, tone correction can be performed on the original image based on the black character color and the background color estimated from the original image without using the prescribed parameters.

請求項5記載の発明の画像処理装置は、デジタル画像である原画像に対して、特徴量を計算する特徴量計算手段と、前記特徴量に基づいて、前記原画像から文字領域を抽出する文字領域抽出手段と、前記原画像をブロック分割するブロック分割手段と、前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに前記ブロック毎に分類するクラス分類手段と、前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定手段と、推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定手段と、特定された背景領域の色を推定された背景色に置換することで前記原画像に対する階調補正を行なう階調補正手段と、を具備する。   An image processing apparatus according to claim 5 is a feature amount calculating means for calculating a feature amount for an original image which is a digital image, and a character for extracting a character region from the original image based on the feature amount. Area extracting means, block dividing means for dividing the original image into blocks, class classification means for classifying pixels belonging to the character area into first and second classes according to color, for each block; Background color estimation means for estimating a background color on the original image based on a class classification of pixels belonging to the character area, and background area specifying means for specifying a background area on the original image based on the estimated background color And gradation correction means for performing gradation correction on the original image by replacing the color of the specified background area with the estimated background color.

したがって、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、原画像の特徴量から計算された値に基づき抽出された文字領域に属する画素を色に応じて分類したクラス分類に基づき、原画像上から推定される背景色に基づいて特定される背景領域の色を推定された背景色に置換することにより、規定のパラメータを用いることなく原画像に対する階調補正を行なうことができる。   Therefore, for example, when an original image, which is a digital image input from an image input device, is output from the image output device, pixels belonging to a character area extracted based on a value calculated from the feature amount of the original image are colored. By replacing the background region color specified based on the background color estimated from the original image with the estimated background color based on the classification classified according to the original image, without using the specified parameters Tone correction can be performed.

請求項6記載の発明の画像処理装置は、デジタル画像である原画像に対して、特徴量を計算する特徴量計算手段と、前記特徴量に基づいて、前記原画像から文字領域を抽出する文字領域抽出手段と、前記原画像をブロック分割するブロック分割手段と、前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに前記ブロック毎に分類するクラス分類手段と、前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定手段と、推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定手段と、特定された背景領域の色を白色に置換することで前記原画像に対する階調補正を行なう階調補正手段と、を具備する。   An image processing apparatus according to claim 6 is a feature amount calculating means for calculating a feature amount with respect to an original image that is a digital image, and a character that extracts a character region from the original image based on the feature amount. Area extracting means, block dividing means for dividing the original image into blocks, class classification means for classifying pixels belonging to the character area into first and second classes according to color, for each block; Background color estimation means for estimating a background color on the original image based on a class classification of pixels belonging to the character area, and background area specifying means for specifying a background area on the original image based on the estimated background color And gradation correction means for performing gradation correction on the original image by replacing the color of the specified background area with white.

したがって、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、原画像の特徴量から計算された値に基づき抽出された文字領域に属する画素を色に応じて分類したクラス分類に基づき、原画像上から推定される背景色に基づいて特定される背景領域の色を白色に置換することにより、規定のパラメータを用いることなく原画像に対する階調補正を行なうことができる。   Therefore, for example, when an original image, which is a digital image input from an image input device, is output from the image output device, pixels belonging to a character area extracted based on a value calculated from the feature amount of the original image are colored. Tone correction for the original image without using specified parameters by replacing the color of the background area specified based on the background color estimated from the original image with white based on the classification classified according to Can be performed.

請求項7記載の発明は、請求項4、5または6記載の画像処理装置において、前記特徴量計算手段は、各画素の周囲に設定したウィンドウ内での色信号の平均値および標準偏差を計算し、前記文字領域抽出手段は、前記ウィンドウ内での色信号の平均値および標準偏差によって設定される閾値に対する該ウィンドウ内での注目画素の色信号値に基づいて、この注目画素およびこの注目画素の周囲の画素を前記文字領域として抽出する。   According to a seventh aspect of the present invention, in the image processing apparatus according to the fourth, fifth, or sixth aspect, the feature amount calculating means calculates an average value and a standard deviation of color signals in a window set around each pixel. The character region extracting means is configured to detect the target pixel and the target pixel based on the color signal value of the target pixel in the window with respect to a threshold set by the average value and standard deviation of the color signals in the window. Are extracted as the character region.

したがって、各画素の周囲に設定されたウィンドウ内での色信号の平均値および標準偏差によって設定される閾値に対する該ウィンドウ内での注目画素の色信号値に基づいてウィンドウ毎に文字領域が抽出されるため、例えば、請求項4記載の画像処理装置においては黒文字色と下地色とを正確に推定することができ、請求項5または6記載の画像処理装置においては背景色を正確に推定することができる。   Therefore, a character area is extracted for each window based on the color signal value of the pixel of interest in the window with respect to the threshold value set by the average value and standard deviation of the color signal in the window set around each pixel. Therefore, for example, the image processing apparatus according to claim 4 can accurately estimate the black character color and the background color, and the image processing apparatus according to claim 5 or 6 can accurately estimate the background color. Can do.

請求項8記載の発明は、請求項4、5または6記載の画像処理装置において、前記特徴量計算手段は、各画素のエッジ量を計算し、前記文字領域抽出手段は、前記エッジ量が規定閾値以上の画素およびこの画素の周囲の画素を前記文字領域として抽出する。   The invention according to claim 8 is the image processing apparatus according to claim 4, 5 or 6, wherein the feature amount calculation means calculates an edge amount of each pixel, and the character region extraction means determines the edge amount. Pixels above the threshold and surrounding pixels are extracted as the character region.

したがって、エッジ量が規定閾値以上の画素およびこの画素の周囲の画素が文字領域として抽出されるため、例えば、請求項4記載の画像処理装置においては黒文字色と下地色とを正確に推定することができ、請求項5または6記載の画像処理装置においては背景色を正確に推定することができる。   Therefore, since the pixels whose edge amount is equal to or larger than the predetermined threshold and the pixels around the pixels are extracted as the character region, for example, in the image processing apparatus according to claim 4, the black character color and the background color are accurately estimated. In the image processing apparatus according to claim 5 or 6, the background color can be accurately estimated.

請求項9記載の発明は、請求項4、5または6記載の画像処理装置において、前記特徴量計算手段は、各画素のエッジ量と各画素の周囲に設定したウィンドウ内での色信号の平均値および標準偏差を計算し、前記文字領域抽出手段は、前記エッジ量が前記規定閾値以上の画素およびこの画素の周囲の画素と、前記ウィンドウ内での色信号の平均値および標準偏差によって設定される閾値に対する該ウィンドウ内での注目画素の色信号値に基づいて、この注目画素およびこの注目画素の周囲の画素とを前記文字領域として抽出する。   According to a ninth aspect of the present invention, in the image processing device according to the fourth, fifth, or sixth aspect, the feature amount calculating means calculates the average of the edge amount of each pixel and the color signal in a window set around each pixel. The character area extracting means is set by a pixel whose edge amount is equal to or greater than the specified threshold and pixels around the pixel, and an average value and standard deviation of color signals in the window. Based on the color signal value of the target pixel in the window with respect to the threshold value, the target pixel and pixels around the target pixel are extracted as the character region.

したがって、エッジ量が規定閾値以上の画素およびこの画素の周囲の画素が文字領域として抽出されるとともに、各画素の周囲に設定されたウィンドウ内での色信号の平均値および標準偏差によって設定される閾値に対する該ウィンドウ内での注目画素の色信号値に基づいてウィンドウ毎に文字領域が抽出されるため、例えば、請求項4記載の画像処理装置においては黒文字色と下地色とを正確に推定することができ、請求項5または6記載の画像処理装置においては背景色を正確に推定することができる。   Therefore, pixels whose edge amount is equal to or greater than a predetermined threshold and pixels around this pixel are extracted as character areas, and are set by the average value and standard deviation of the color signals in the window set around each pixel. Since the character region is extracted for each window based on the color signal value of the target pixel in the window with respect to the threshold value, for example, in the image processing apparatus according to claim 4, the black character color and the background color are accurately estimated. In the image processing apparatus according to claim 5 or 6, the background color can be accurately estimated.

請求項10記載の発明は、請求項1ないし9のいずれか一に記載の画像処理装置において、前記クラス分類手段は、各画素の色信号から計算される輝度に基づいて輝度閾値を取得し、この輝度閾値よりも輝度が低い画素群を前記第1のクラスとし、前記輝度閾値よりも輝度が高い画素群を前記第2のクラスとして分類する。   According to a tenth aspect of the present invention, in the image processing apparatus according to any one of the first to ninth aspects, the class classification unit acquires a luminance threshold based on luminance calculated from a color signal of each pixel, A pixel group whose luminance is lower than the luminance threshold is classified as the first class, and a pixel group whose luminance is higher than the luminance threshold is classified as the second class.

したがって、各画素の色信号から計算される輝度の閾値処理によりクラス分類することができる。   Therefore, classification can be performed by threshold processing of luminance calculated from the color signal of each pixel.

請求項11記載の発明は、請求項4記載の画像処理装置において、前記黒文字色/下地色推定手段は、前記ブロック毎のクラス分類結果に基づいて、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第1のクラスに属する画素群の平均色を黒文字色とし、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を下地色として推定する。   According to an eleventh aspect of the present invention, in the image processing apparatus according to the fourth aspect, the black character color / background color estimation means has a maximum number of pixels belonging to the second class based on a class classification result for each block. The average color of the pixel group belonging to the second class in the block where the average color of the pixel group belonging to the first class in the block is black character color and the number of pixels belonging to the second class is the maximum Is estimated as the background color.

したがって、ブロック毎のクラス分類結果に基づいて、第2のクラスに属する画素数が最大になるブロックにおける第1のクラスに属する画素群の平均色を黒文字色とし、同じブロックにおける第2のクラスに属する画素群の平均色を下地色として推定することにより、黒文字色と下地色とを正確に推定することができる。   Therefore, based on the class classification result for each block, the average color of the pixel group belonging to the first class in the block having the maximum number of pixels belonging to the second class is set to the black character color, and the second class in the same block is set to the second class. By estimating the average color of the pixel group to which it belongs as the background color, it is possible to accurately estimate the black character color and the background color.

請求項12記載の発明は、請求項5または6記載の画像処理装置において、前記背景色推定手段は、前記ブロック毎のクラス分類結果に基づいて、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を背景色として推定する。   According to a twelfth aspect of the present invention, in the image processing apparatus according to the fifth or sixth aspect, the background color estimation means maximizes the number of pixels belonging to the second class based on a class classification result for each block. An average color of a pixel group belonging to the second class in the block is estimated as a background color.

したがって、ブロック毎のクラス分類結果に基づいて、第2のクラスに属する画素数が最大になるブロックにおける第2のクラスに属する画素群の平均色を背景色として推定することにより、背景色を正確に推定することができる。   Therefore, based on the classification result for each block, the background color is accurately determined by estimating the average color of the pixel group belonging to the second class in the block having the maximum number of pixels belonging to the second class as the background color. Can be estimated.

請求項13記載の発明は、請求項4記載の画像処理装置において、前記黒文字色/下地色推定手段は、前記ブロック毎のクラス分類結果に基づいて、前記第1のクラスに属する画素群の平均輝度と前記第2のクラスに属する画素群の平均輝度との差が最大になる前記ブロックにおける前記第1のクラスに属する画素群の平均色を黒文字色とし、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を下地色として推定する。   According to a thirteenth aspect of the present invention, in the image processing apparatus according to the fourth aspect, the black character color / background color estimation means calculates the average of the pixel groups belonging to the first class based on the class classification result for each block. The number of pixels belonging to the second class, where the average color of the pixel group belonging to the first class in the block in which the difference between the luminance and the average luminance of the pixel group belonging to the second class is maximized is a black character color The average color of the pixel group belonging to the second class in the block having the maximum is estimated as the background color.

したがって、第1のクラスに属する画素群の平均輝度と第2のクラスに属する画素群の平均輝度との差が最大になるブロックにおける第1のクラスに属する画素群の平均色を黒文字色とし、同じブロックにおける第2のクラスに属する画素群の平均色を下地色として推定することにより、黒文字色と下地色とを正確に推定することができる。   Therefore, the average color of the pixel group belonging to the first class in the block in which the difference between the average luminance of the pixel group belonging to the first class and the average luminance of the pixel group belonging to the second class is the maximum is a black character color, By estimating the average color of the pixel group belonging to the second class in the same block as the background color, the black character color and the background color can be accurately estimated.

請求項14記載の発明は、請求項5または6記載の画像処理装置において、前記背景色推定手段は、前記ブロック毎のクラス分類結果に基づいて、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を背景色として推定する。   According to a fourteenth aspect of the present invention, in the image processing apparatus according to the fifth or sixth aspect, the background color estimation means maximizes the number of pixels belonging to the second class based on a class classification result for each block. An average color of a pixel group belonging to the second class in the block is estimated as a background color.

したがって、第1のクラスに属する画素群の平均輝度と第2のクラスに属する画素群の平均輝度との差が最大になるブロックにおける第2のクラスに属する画素群の平均色を背景色として推定することにより、背景色を正確に推定することができる。   Therefore, the average color of the pixel group belonging to the second class in the block in which the difference between the average luminance of the pixel group belonging to the first class and the average brightness of the pixel group belonging to the second class is maximized is estimated as the background color. By doing so, the background color can be accurately estimated.

請求項15記載の発明は、請求項10記載の画像処理装置において、前記階調補正手段は、前記ブロック毎のクラス分類結果に基づいて、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第1のクラスに属する画素群の輝度の平均値および標準偏差と、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の輝度の平均値および標準偏差とに基づき設定される階調変換曲線に応じて階調補正を行なう。   According to a fifteenth aspect of the present invention, in the image processing apparatus according to the tenth aspect, the gradation correction unit is configured to maximize the number of pixels belonging to the second class based on a class classification result for each block. Average luminance and standard deviation of the pixel group belonging to the first class in the block, and average luminance of the pixel group belonging to the second class in the block in which the number of pixels belonging to the second class is maximized The gradation correction is performed according to the gradation conversion curve set based on the value and the standard deviation.

したがって、ブロック毎のクラス分類結果に基づいて、第2のクラスに属する画素数が最大になるブロックにおける第1のクラスに属する画素群の輝度の平均値および標準偏差と、同じブロックにおける第2のクラスに属する画素群の輝度の平均値および標準偏差とに基づき設定される階調変換曲線に応じて、原画像全体に亘る黒文字と下地との階調補正または背景領域の階調補正が同じ階調変換曲線に応じて行われるため、黒文字と下地とのコントラストの調整を画像全体に亘って安定化(均一化)することができる。   Therefore, based on the class classification result for each block, the average value and standard deviation of the luminance of the pixel group belonging to the first class in the block having the maximum number of pixels belonging to the second class, and the second value in the same block Depending on the gradation conversion curve set based on the average value and standard deviation of the brightness of the pixel group belonging to the class, the gradation correction of the black character and the background or the gradation correction of the background area over the entire original image is the same level. Since it is performed in accordance with the tone conversion curve, the contrast between the black character and the background can be stabilized (uniformized) over the entire image.

請求項16記載の発明は、請求項10記載の画像処理装置において、前記階調補正手段は、前記ブロック毎のクラス分類結果に基づいて、前記第1のクラスに属する画素群の平均輝度と前記第2のクラスに属する画素群の平均輝度との差が最大になる前記ブロックにおける前記第1のクラスに属する画素群の輝度の平均値および標準偏差と、前記第1のクラスに属する画素群の平均輝度と前記第2のクラスに属する画素群の平均輝度との差が最大になる前記ブロックにおける前記第2のクラスに属する画素群の輝度の平均値および標準偏差とに基づき設定される階調変換曲線に応じて階調補正を行なう。   According to a sixteenth aspect of the present invention, in the image processing apparatus according to the tenth aspect, the gradation correction unit is configured to determine an average luminance of the pixel group belonging to the first class based on a class classification result for each block, and the The average value and standard deviation of the luminance value of the pixel group belonging to the first class in the block having the largest difference from the average luminance value of the pixel group belonging to the second class, and the pixel group belonging to the first class. A gradation set based on an average value and a standard deviation of the luminance values of the pixel group belonging to the second class in the block in which the difference between the average luminance value and the average luminance value of the pixel group belonging to the second class is maximized. Gradation correction is performed according to the conversion curve.

したがって、ブロック毎のクラス分類結果に基づいて、第1のクラスに属する画素群の平均輝度と第2のクラスに属する画素群の平均輝度との差が最大になるブロックにおける第1のクラスに属する画素群の輝度の平均値および標準偏差と、同じブロックにおける第2のクラスに属する画素群の輝度の平均値および標準偏差とに基づき設定される階調変換曲線に応じて、原画像全体に亘る黒文字と下地との階調補正または背景領域の階調補正が同じ階調変換曲線に応じて行われるため、黒文字と下地とのコントラストの調整を画像全体に亘って安定化(均一化)することができる。   Therefore, based on the class classification result for each block, it belongs to the first class in the block in which the difference between the average luminance of the pixel group belonging to the first class and the average luminance of the pixel group belonging to the second class is maximized. Depending on the gradation conversion curve set based on the average value and standard deviation of the luminance of the pixel group and the average value and standard deviation of the luminance of the pixel group belonging to the second class in the same block, the entire original image is covered. Tone correction between black text and background or background area is performed according to the same tone conversion curve, so that the contrast adjustment between black text and background is stabilized (uniformized) over the entire image. Can do.

請求項17記載の発明は、請求項1ないし16のいずれか一に記載の画像処理装置において、前記原画像よりも解像度の低い低解像度画像を生成する低解像度画像生成手段を具備し、前記特徴量計算手段は、前記低解像度画像から特徴量を計算し、前記文字領域抽出手段は、前記低解像度画像から前記文字領域を抽出する。   A seventeenth aspect of the present invention is the image processing apparatus according to any one of the first to sixteenth aspects, further comprising a low-resolution image generating unit that generates a low-resolution image having a resolution lower than that of the original image. The quantity calculation means calculates a feature quantity from the low resolution image, and the character area extraction means extracts the character area from the low resolution image.

したがって、各処理での計算量を減らし、処理を簡易化することができる。   Therefore, the amount of calculation in each process can be reduced and the process can be simplified.

請求項18記載の発明の画像処理プログラムは、コンピュータに解釈され、このコンピュータに、デジタル画像である原画像から文字領域を抽出する文字領域抽出機能と、前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに分類するクラス分類機能と、前記文字領域に属する画素のクラス分類に基づいて前記原画像上の黒文字色と下地色とを推定する黒文字色/下地色推定手段と、推定された黒文字色と下地色とに基づいて前記原画像に対する階調補正を行なう階調補正機能と、を実行させる。   An image processing program according to an eighteenth aspect of the present invention is interpreted by a computer, and in this computer, a character region extraction function for extracting a character region from an original image which is a digital image, and pixels belonging to the character region according to color Black character color / background color estimation for estimating a black character color and a background color on the original image based on a class classification function for classifying into a first class and a second class, and a class classification of pixels belonging to the character area And a gradation correction function for performing gradation correction on the original image based on the estimated black character color and background color.

したがって、本発明の画像処理プログラムをコンピュータに実行させることにより、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、文字領域に属する画素を色に応じて分類したクラス分類に基づいて原画像上の黒文字色と下地色とを推定し、推定された黒文字色と下地色とに基づいて、規定のパラメータを用いることなく原画像に対する階調補正を行なうことができる。   Therefore, by causing a computer to execute the image processing program of the present invention, for example, when outputting an original image, which is a digital image input from an image input device, from an image output device, pixels belonging to a character area are colored. The black character color and background color on the original image are estimated based on the classified classification, and tone correction is performed on the original image without using the specified parameters based on the estimated black character color and background color. Can be done.

請求項19記載の発明の画像処理プログラムは、コンピュータに解釈され、このコンピュータに、デジタル画像である原画像から文字領域を抽出する文字領域抽出機能と、前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに分類するクラス分類機能と、前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定機能と、推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定機能と、特定された背景領域の色を推定された背景色に置換することで前記原画像に対する階調補正を行なう階調補正機能と、を実行させる。   According to a nineteenth aspect of the present invention, there is provided an image processing program that is interpreted by a computer, and that the computer extracts a character region from an original image, which is a digital image, and a pixel belonging to the character region in accordance with a color. A class classification function for classifying into a first class and a second class, a background color estimation function for estimating a background color on the original image based on a class classification of pixels belonging to the character area, and an estimated background A background area specifying function for specifying a background area on the original image based on a color, and a gradation correction for performing gradation correction on the original image by replacing the color of the specified background area with an estimated background color And execute the function.

したがって、本発明の画像処理プログラムをコンピュータに実行させることにより、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、文字領域に属する画素を色に応じて分類したクラス分類に基づき原画像上から推定される背景色に基づいて特定される背景領域の色を推定された背景色に置換するし、規定のパラメータを用いることなく原画像に対する階調補正を行なうことができる。   Therefore, by causing a computer to execute the image processing program of the present invention, for example, when outputting an original image, which is a digital image input from an image input device, from an image output device, pixels belonging to a character area are colored. The background color specified based on the background color estimated from the original image based on the classified classification is replaced with the estimated background color, and the gradation for the original image without using the specified parameters Correction can be performed.

請求項20記載の発明の画像処理プログラムは、コンピュータに解釈され、このコンピュータに、デジタル画像である原画像から文字領域を抽出する文字領域抽出機能と、前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに分類するクラス分類機能と、前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定機能と、推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定機能と、特定された背景領域の色を白色に置換することで前記原画像に対する階調補正を行なう階調補正機能と、を実行させる。   The image processing program according to the invention of claim 20 is interpreted by a computer, and in this computer, a character region extraction function for extracting a character region from an original image which is a digital image, and pixels belonging to the character region according to color A class classification function for classifying into a first class and a second class, a background color estimation function for estimating a background color on the original image based on a class classification of pixels belonging to the character area, and an estimated background A background region specifying function for specifying a background region on the original image based on a color, and a tone correction function for performing tone correction on the original image by replacing the color of the specified background region with white. Let it run.

したがって、本発明の画像処理プログラムをコンピュータに実行させることにより、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、文字領域に属する画素を色に応じて分類したクラス分類に基づき原画像上から推定される背景色に基づいて特定される背景領域の色を白色に置換し、規定のパラメータを用いることなく原画像に対する階調補正を行なうことができる。   Therefore, by causing a computer to execute the image processing program of the present invention, for example, when outputting an original image, which is a digital image input from an image input device, from an image output device, pixels belonging to a character area are colored. The color of the background area specified based on the background color estimated from the original image based on the classified classification is replaced with white, and gradation correction is performed on the original image without using a specified parameter. it can.

請求項21記載の発明の画像処理プログラムは、コンピュータに解釈され、このコンピュータに、デジタル画像である原画像に対して、特徴量を計算する特徴量計算機能と、前記特徴量に基づいて、前記原画像から文字領域を抽出する文字領域抽出機能と、前記原画像をブロック分割するブロック分割機能と、前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに前記ブロック毎に分類するクラス分類機能と、前記文字領域に属する画素のクラス分類に基づいて前記原画像上の黒文字色と下地色とを推定する黒文字色/下地色推定機能と、推定された黒文字色と下地色とに基づいて前記原画像に対する階調補正を行なう階調補正機能と、を実行させる。   The image processing program of the invention according to claim 21 is interpreted by a computer, and based on the feature amount, a feature amount calculation function for calculating a feature amount with respect to an original image that is a digital image, A character area extracting function for extracting a character area from an original image, a block dividing function for dividing the original image into blocks, and the pixels belonging to the character area in the first class and the second class according to color A class classification function for classifying each, a black character color / background color estimation function for estimating a black character color and a background color on the original image based on a class classification of pixels belonging to the character area, and an estimated black character color And a gradation correction function for performing gradation correction on the original image based on the background color.

したがって、本発明の画像処理プログラムをコンピュータに実行させることにより、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、原画像の特徴量から計算された値に基づき抽出された文字領域に属する画素を色に応じて分類したクラス分類に基づき、原画像上から推定される黒文字色と下地色とに基づいて、規定のパラメータを用いることなく原画像に対する階調補正を行なうことができる。   Therefore, by causing a computer to execute the image processing program of the present invention, for example, when outputting an original image, which is a digital image input from an image input device, from an image output device, it is calculated from the feature amount of the original image. The original image without using the specified parameters based on the black character color and background color estimated from the original image based on the class classification that classifies the pixels belonging to the character area extracted based on the obtained values according to the color Tone correction can be performed.

請求項22記載の発明の画像処理プログラムは、コンピュータに解釈され、このコンピュータに、デジタル画像である原画像に対して、特徴量を計算する特徴量計算機能と、前記特徴量に基づいて、前記原画像から文字領域を抽出する文字領域抽出機能と、前記原画像をブロック分割するブロック分割機能と、前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに前記ブロック毎に分類するクラス分類機能と、前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定機能と、推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定機能と、特定された背景領域の色を推定された背景色に置換することで前記原画像に対する階調補正を行なう階調補正機能と、を実行させる。   The image processing program according to the invention of claim 22 is interpreted by a computer, and based on the feature amount, a feature amount calculation function for calculating a feature amount with respect to an original image that is a digital image, A character area extracting function for extracting a character area from an original image, a block dividing function for dividing the original image into blocks, and the pixels belonging to the character area in the first class and the second class according to color A class classification function for classifying each image, a background color estimation function for estimating a background color on the original image based on a class classification of pixels belonging to the character area, and a function on the original image based on the estimated background color A background area specifying function for specifying a background area, and a gradation correction function for performing gradation correction on the original image by replacing the color of the specified background area with the estimated background color. To row.

したがって、本発明の画像処理プログラムをコンピュータに実行させることにより、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、原画像の特徴量から計算された値に基づき抽出された文字領域に属する画素を色に応じて分類したクラス分類に基づき、原画像上から推定される背景色に基づいて特定される背景領域の色を推定された背景色に置換し、規定のパラメータを用いることなく原画像に対する階調補正を行なうことができる。   Therefore, by causing a computer to execute the image processing program of the present invention, for example, when outputting an original image, which is a digital image input from an image input device, from an image output device, it is calculated from the feature amount of the original image. Based on the class classification that classifies the pixels belonging to the character area extracted based on the obtained values according to the color, the color of the background area specified based on the background color estimated from the original image is changed to the estimated background color It is possible to perform gradation correction on the original image without using a predetermined parameter.

請求項23記載の発明の画像処理プログラムは、コンピュータに解釈され、このコンピュータに、デジタル画像である原画像に対して、特徴量を計算する特徴量計算機能と、前記特徴量に基づいて、前記原画像から文字領域を抽出する文字領域抽出機能と、前記原画像をブロック分割するブロック分割機能と、前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに前記ブロック毎に分類するクラス分類機能と、前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定機能と、推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定機能と、特定された背景領域の色を白色に置換することで前記原画像に対する階調補正を行なう階調補正機能と、を実行させる。   An image processing program according to a twenty-third aspect of the invention is interpreted by a computer, and based on the feature amount, a feature amount calculation function for calculating a feature amount with respect to an original image that is a digital image, A character area extracting function for extracting a character area from an original image, a block dividing function for dividing the original image into blocks, and the pixels belonging to the character area in the first class and the second class according to color A class classification function for classifying each image, a background color estimation function for estimating a background color on the original image based on a class classification of pixels belonging to the character area, and a function on the original image based on the estimated background color A background area specifying function for specifying a background area and a tone correction function for correcting the tone of the original image by replacing the color of the specified background area with white are executed.

したがって、本発明の画像処理プログラムをコンピュータに実行させることにより、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、原画像の特徴量から計算された値に基づき抽出された文字領域に属する画素を色に応じて分類したクラス分類に基づき、原画像上から推定される背景色に基づいて特定される背景領域の色を白色に置換することにより、規定のパラメータを用いることなく原画像に対する階調補正を行なうことができる。   Therefore, by causing a computer to execute the image processing program of the present invention, for example, when outputting an original image, which is a digital image input from an image input device, from an image output device, it is calculated from the feature amount of the original image. By replacing the color of the background area specified based on the background color estimated from the original image with white based on the class classification that classifies the pixels belonging to the character area extracted based on the value Therefore, tone correction can be performed on the original image without using specified parameters.

請求項24記載の発明は、請求項21、22または23記載の画像処理プログラムにおいて、前記特徴量計算機能により、各画素の周囲に設定したウィンドウ内での色信号の平均値および標準偏差を計算し、前記文字領域抽出機能により、前記ウィンドウ内での色信号の平均値および標準偏差によって設定される閾値に対する該ウィンドウ内での注目画素の色信号値に基づいて、この注目画素およびこの注目画素の周囲の画素を前記文字領域として抽出する。   According to a twenty-fourth aspect of the present invention, in the image processing program according to the twenty-first, twenty-second, or twenty-third aspect, an average value and a standard deviation of color signals in a window set around each pixel are calculated by the feature amount calculation function. Then, by the character region extraction function, the target pixel and the target pixel based on the color signal value of the target pixel in the window with respect to a threshold set by the average value and the standard deviation of the color signal in the window Are extracted as the character region.

したがって、各画素の周囲に設定されたウィンドウ内での色信号の平均値および標準偏差によって設定される閾値に対する該ウィンドウ内での注目画素の色信号値に基づいてウィンドウ毎に文字領域が抽出されるため、例えば、請求項21記載の画像処理装置においては黒文字色と下地色とを正確に推定することができ、請求項22または23記載の画像処理装置においては背景色を正確に推定することができる。   Therefore, a character area is extracted for each window based on the color signal value of the pixel of interest in the window with respect to the threshold value set by the average value and standard deviation of the color signal in the window set around each pixel. Therefore, for example, in the image processing device according to claim 21, the black character color and the background color can be accurately estimated, and in the image processing device according to claim 22 or 23, the background color is accurately estimated. Can do.

請求項25記載の発明は、請求項21、22または23記載の画像処理プログラムにおいて、前記特徴量計算機能により、各画素のエッジ量を計算し、前記文字領域抽出機能により、前記エッジ量が規定閾値以上の画素およびこの画素の周囲の画素を前記文字領域として抽出する。   According to a twenty-fifth aspect of the invention, in the image processing program according to the twenty-first, twenty-second, or twenty-third aspect, an edge amount of each pixel is calculated by the feature amount calculation function, and the edge amount is defined by the character region extraction function Pixels above the threshold and surrounding pixels are extracted as the character region.

したがって、エッジ量が規定閾値以上の画素およびこの画素の周囲の画素が文字領域として抽出されるため、例えば、請求項21記載の画像処理装置においては黒文字色と下地色とを正確に推定することができ、請求項22または23記載の画像処理装置においては背景色を正確に推定することができる。   Accordingly, since the pixels whose edge amount is equal to or greater than the predetermined threshold and the pixels around the pixels are extracted as the character region, for example, in the image processing device according to claim 21, the black character color and the background color are accurately estimated. In the image processing apparatus according to claim 22 or 23, the background color can be accurately estimated.

請求項26記載の発明は、請求項21、22または23記載の画像処理プログラムにおいて、前記特徴量計算機能により、各画素のエッジ量と各画素の周囲に設定したウィンドウ内での色信号の平均値および標準偏差とを計算し、前記文字領域抽出機能により、前記エッジ量が前記規定閾値以上の画素およびこの画素の周囲の画素と、前記ウィンドウ内での色信号の平均値および標準偏差によって設定される閾値に対する該ウィンドウ内での注目画素の色信号値に基づいて、この注目画素およびこの注目画素の周囲の画素とを前記文字領域として抽出する。   According to a twenty-sixth aspect of the present invention, in the image processing program according to the twenty-first, twenty-second, or twenty-third aspect, the edge amount of each pixel and an average of color signals in a window set around each pixel are obtained by the feature amount calculation function. The value and standard deviation are calculated, and the character area extraction function is used to set a pixel whose edge amount is equal to or larger than the specified threshold, pixels around the pixel, and an average value and standard deviation of the color signal in the window. Based on the color signal value of the target pixel in the window with respect to the threshold value, the target pixel and pixels around the target pixel are extracted as the character region.

したがって、エッジ量が規定閾値以上の画素およびこの画素の周囲の画素が文字領域として抽出されるとともに、各画素の周囲に設定されたウィンドウ内での色信号の平均値および標準偏差によって設定される閾値に対する該ウィンドウ内での注目画素の色信号値に基づいてウィンドウ毎に文字領域が抽出されるため、例えば、請求項21記載の画像処理装置においては黒文字色と下地色とを正確に推定することができ、請求項22または23記載の画像処理装置においては背景色を正確に推定することができる。   Therefore, pixels whose edge amount is equal to or greater than a predetermined threshold and pixels around this pixel are extracted as character areas, and are set by the average value and standard deviation of the color signals in the window set around each pixel. Since the character region is extracted for each window based on the color signal value of the target pixel in the window with respect to the threshold value, for example, in the image processing apparatus according to claim 21, the black character color and the background color are accurately estimated. In the image processing apparatus according to claim 22 or 23, the background color can be accurately estimated.

請求項27記載の発明は、請求項18ないし26のいずれか一に記載の画像処理プログラムにおいて、前記クラス分類機能により、各画素の色信号から計算される輝度に基づいて輝度閾値を取得し、この輝度閾値よりも輝度が低い画素群を前記第1のクラスとし、前記輝度閾値よりも輝度が高い画素群を前記第2のクラスとして分類する。   The invention according to claim 27 is the image processing program according to any one of claims 18 to 26, wherein the class classification function acquires a brightness threshold based on brightness calculated from a color signal of each pixel, A pixel group whose luminance is lower than the luminance threshold is classified as the first class, and a pixel group whose luminance is higher than the luminance threshold is classified as the second class.

したがって、各画素の色信号から計算される輝度の閾値処理によりクラス分類することができる。   Therefore, classification can be performed by threshold processing of luminance calculated from the color signal of each pixel.

請求項28記載の発明は、請求項21記載の画像処理プログラムにおいて、前記黒文字色/下地色推定機能により、前記ブロック毎のクラス分類結果に基づいて、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第1のクラスに属する画素群の平均色を黒文字色とし、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を下地色として推定する。   According to a twenty-eighth aspect of the present invention, in the image processing program according to the twenty-first aspect, the number of pixels belonging to the second class is maximized based on the class classification result for each block by the black character color / background color estimation function. The average color of the pixel group belonging to the second class in the block where the average color of the pixel group belonging to the first class in the block is black character color and the number of pixels belonging to the second class is the maximum Is estimated as the background color.

したがって、ブロック毎のクラス分類結果に基づいて、第2のクラスに属する画素数が最大になるブロックにおける第1のクラスに属する画素群の平均色を黒文字色とし、同じブロックにおける第2のクラスに属する画素群の平均色を下地色として推定することにより、黒文字色と下地色とを正確に推定することができる。   Therefore, based on the class classification result for each block, the average color of the pixel group belonging to the first class in the block having the maximum number of pixels belonging to the second class is set to the black character color, and the second class in the same block is set to the second class. By estimating the average color of the pixel group to which it belongs as the background color, the black character color and the background color can be accurately estimated.

請求項29記載の発明は、請求項22または23記載の画像処理プログラムにおいて、前記背景色推定機能により、前記ブロック毎のクラス分類結果に基づいて、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を背景色として推定する。   The invention according to claim 29 is the image processing program according to claim 22 or 23, wherein the background color estimation function maximizes the number of pixels belonging to the second class based on the class classification result for each block. An average color of a pixel group belonging to the second class in the block is estimated as a background color.

したがって、ブロック毎のクラス分類結果に基づいて、第2のクラスに属する画素数が最大になるブロックにおける第2のクラスに属する画素群の平均色を背景色として推定することにより、背景色を正確に推定することができる。   Therefore, based on the classification result for each block, the background color is accurately determined by estimating the average color of the pixel group belonging to the second class in the block having the maximum number of pixels belonging to the second class as the background color. Can be estimated.

請求項30記載の発明は、請求項21記載の画像処理プログラムにおいて、前記黒文字色/下地色推定機能により、前記ブロック毎のクラス分類結果に基づいて、前記第1のクラスに属する画素群の平均輝度と前記第2のクラスに属する画素群の平均輝度との差が最大になる前記ブロックにおける前記第1のクラスに属する画素群の平均色を黒文字色とし、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を下地色として推定する。   According to a thirty-third aspect of the invention, in the image processing program according to the twenty-first aspect, an average of pixel groups belonging to the first class based on a class classification result for each block by the black character color / background color estimation function The number of pixels belonging to the second class, where the average color of the pixel group belonging to the first class in the block in which the difference between the luminance and the average luminance of the pixel group belonging to the second class is maximized is a black character color The average color of the pixel group belonging to the second class in the block having the maximum is estimated as the background color.

したがって、第1のクラスに属する画素群の平均輝度と第2のクラスに属する画素群の平均輝度との差が最大になるブロックにおける第1のクラスに属する画素群の平均色を黒文字色とし、同じブロックにおける第2のクラスに属する画素群の平均色を下地色として推定することにより、黒文字色と下地色とを正確に推定することができる。   Therefore, the average color of the pixel group belonging to the first class in the block in which the difference between the average luminance of the pixel group belonging to the first class and the average luminance of the pixel group belonging to the second class is the maximum is a black character color, By estimating the average color of the pixel group belonging to the second class in the same block as the background color, the black character color and the background color can be accurately estimated.

請求項31記載の発明は、請求項22または23記載の画像処理プログラムにおいて、前記背景色推定機能により、前記ブロック毎のクラス分類結果に基づいて、前記第1のクラスに属する画素群の平均輝度と前記第2のクラスに属する画素群の平均輝度との差が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を背景色として推定する。   According to a thirty-first aspect of the invention, in the image processing program according to the twenty-second or twenty-third aspect, the average luminance of the pixel group belonging to the first class based on the class classification result for each block by the background color estimation function. And the average color of the pixel group belonging to the second class in the block in which the difference between the average luminance of the pixel group belonging to the second class is the maximum is estimated as the background color.

したがって、第1のクラスに属する画素群の平均輝度と第2のクラスに属する画素群の平均輝度との差が最大になるブロックにおける第2のクラスに属する画素群の平均色を背景色として推定することにより、背景色を正確に推定することができる。   Therefore, the average color of the pixel group belonging to the second class in the block in which the difference between the average luminance of the pixel group belonging to the first class and the average brightness of the pixel group belonging to the second class is maximized is estimated as the background color. By doing so, the background color can be accurately estimated.

請求項32記載の発明は、請求項27記載の画像処理プログラムにおいて、前記階調補正機能により、前記ブロック毎のクラス分類結果に基づいて、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第1のクラスに属する画素群の輝度の平均値および標準偏差と、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の輝度の平均値および標準偏差とに基づき設定される階調変換曲線に応じて階調補正を行なう。   According to a thirty-second aspect of the present invention, in the image processing program according to the twenty-seventh aspect, the number of pixels belonging to the second class is maximized by the gradation correction function based on a class classification result for each block. Average luminance and standard deviation of the pixel group belonging to the first class in the block, and average luminance of the pixel group belonging to the second class in the block in which the number of pixels belonging to the second class is maximized The gradation correction is performed according to the gradation conversion curve set based on the value and the standard deviation.

したがって、ブロック毎のクラス分類結果に基づいて、第2のクラスに属する画素数が最大になるブロックにおける第1のクラスに属する画素群の輝度の平均値および標準偏差と、同じブロックにおける第2のクラスに属する画素群の輝度の平均値および標準偏差とに基づき設定される階調変換曲線に応じて、原画像全体に亘る黒文字と下地との階調補正または背景領域の階調補正が同じ階調変換曲線に応じて行われるため、黒文字と下地とのコントラストの調整または背景領域のコントラストの調整を画像全体に亘って安定化(均一化)することができる。   Therefore, based on the class classification result for each block, the average value and standard deviation of the luminance of the pixel group belonging to the first class in the block having the maximum number of pixels belonging to the second class, and the second value in the same block Depending on the gradation conversion curve set based on the average value and standard deviation of the brightness of the pixel group belonging to the class, the gradation correction of the black character and the background or the gradation correction of the background area over the entire original image is the same level. Since it is performed according to the tone conversion curve, the adjustment of the contrast between the black character and the background or the adjustment of the contrast of the background region can be stabilized (uniformized) over the entire image.

請求項33記載の発明は、請求項27記載の画像処理プログラムにおいて、前記階調補正機能により、前記ブロック毎のクラス分類結果に基づいて、前記第1のクラスに属する画素群の平均輝度と前記第2のクラスに属する画素群の平均輝度との差が最大になる前記ブロックにおける前記第1のクラスに属する画素群の輝度の平均値および標準偏差と、前記第1のクラスに属する画素群の平均輝度と前記第2のクラスに属する画素群の平均輝度との差が最大になる前記ブロックにおける前記第2のクラスに属する画素群の輝度の平均値および標準偏差とに基づき設定される階調変換曲線に応じて階調補正を行なう。   According to a thirty-third aspect of the present invention, in the image processing program according to the twenty-seventh aspect, the gradation correction function causes the average luminance of the pixel group belonging to the first class and the average brightness based on the classification result for each block. The average value and standard deviation of the luminance value of the pixel group belonging to the first class in the block having the largest difference from the average luminance value of the pixel group belonging to the second class, and the pixel group belonging to the first class. A gradation set based on an average value and a standard deviation of the luminance values of the pixel group belonging to the second class in the block in which the difference between the average luminance value and the average luminance value of the pixel group belonging to the second class is maximized. Gradation correction is performed according to the conversion curve.

したがって、ブロック毎のクラス分類結果に基づいて、第1のクラスに属する画素群の平均輝度と第2のクラスに属する画素群の平均輝度との差が最大になるブロックにおける第1のクラスに属する画素群の輝度の平均値および標準偏差と、同じブロックにおける第2のクラスに属する画素群の輝度の平均値および標準偏差とに基づき設定される階調変換曲線に応じて、原画像全体に亘る黒文字と下地との階調補正または背景領域の階調補正が同じ階調変換曲線に応じて行われるため、黒文字と下地とのコントラストの調整または背景領域のコントラストの調整を画像全体に亘って安定化(均一化)することができる。   Therefore, based on the class classification result for each block, it belongs to the first class in the block in which the difference between the average luminance of the pixel group belonging to the first class and the average luminance of the pixel group belonging to the second class is maximized. Depending on the gradation conversion curve set based on the average value and standard deviation of the luminance of the pixel group and the average value and standard deviation of the luminance of the pixel group belonging to the second class in the same block, the entire original image is covered. Tone correction for black text and background or background area is performed according to the same tone conversion curve, so the adjustment of contrast between black text and background or the contrast of background area is stable over the entire image. Can be made uniform.

請求項34記載の発明は、請求項18ないし33のいずれか一に記載の画像処理プログラムにおいて、前記原画像よりも解像度の低い低解像度画像を生成する低解像度画像生成機能を前記コンピュータに実行させ、前記特徴量計算機能により、前記低解像度画像から特徴量を計算し、前記文字領域抽出機能により、前記低解像度画像から前記文字領域を抽出する。   According to a thirty-fourth aspect of the present invention, in the image processing program according to any one of the eighteenth to thirty-third aspects, the computer executes a low-resolution image generation function for generating a low-resolution image having a lower resolution than the original image. The feature amount is calculated from the low-resolution image by the feature amount calculation function, and the character region is extracted from the low-resolution image by the character region extraction function.

したがって、各処理での計算量を減らし、処理を簡易化することができる。   Therefore, the amount of calculation in each process can be reduced and the process can be simplified.

請求項35記載の発明の記憶媒体は、請求項18ないし34のいずれか一記載の画像処理プログラムをコンピュータによる読み取り可能に記憶する。   A storage medium according to a thirty-fifth aspect stores the image processing program according to any one of the eighteenth to thirty-fourth aspects so as to be readable by a computer.

したがって、請求項18ないし34のいずれか一記載の発明の作用を奏することが可能になる。   Therefore, the operation of the invention according to any one of claims 18 to 34 can be achieved.

請求項1記載の発明の画像処理装置および請求項18記載の発明の画像処理プログラムによれば、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、文字領域に属する画素を色に応じて分類したクラス分類に基づいて原画像上の黒文字色と下地色とが推定され、推定された黒文字色と下地色とに基づいて、規定のパラメータを用いることなく原画像に対する階調補正を行なうことができるので、多様な画像入力機器から入力された原画像の中間調領域の階調性を保持しながら、ユーザがパラメータを設定する等の作業を行なうことなく自動的に出力画像の黒文字と下地とのコントラストを調整することができる。   According to the image processing apparatus of the first aspect of the invention and the image processing program of the invention of the eighteenth aspect, for example, when outputting an original image, which is a digital image input from the image input device, from the image output device The black character color and the background color on the original image are estimated based on the class classification in which the pixels belonging to the character area are classified according to the color, and the specified parameters are used based on the estimated black character color and the background color. Therefore, the user can set parameters while maintaining the gradation of the halftone area of the original image input from various image input devices. The contrast between the black characters of the output image and the background can be automatically adjusted without any problem.

請求項2記載の発明の画像処理装置および請求項19記載の発明の画像処理プログラムによれば、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、文字領域に属する画素を色に応じて分類したクラス分類に基づき原画像上から推定される背景色に基づいて特定される背景領域の色を推定された背景色に置換することにより、規定のパラメータを用いたりユーザがパラメータを設定する等の作業を行なったりすることなく、多様な画像入力機器から入力された原画像における背景の色変動や裏写り等の背景部分に起因する画像劣化を自動的に補正し、背景部分をより適正化することで文字等を見易くした出力画像を得ることができる。   According to the image processing apparatus of the invention of claim 2 and the image processing program of the invention of claim 19, for example, when outputting an original image, which is a digital image input from the image input device, from the image output device By replacing the color of the background area specified based on the background color estimated from the original image based on the class classification that classifies the pixels belonging to the character area according to the color with the estimated background color, Automatic image degradation caused by background parts such as background color fluctuations and show-through in original images input from various image input devices without using parameters or setting parameters by the user Therefore, it is possible to obtain an output image in which characters and the like are easy to see by making corrections and optimizing the background portion.

請求項3記載の発明の画像処理装置および請求項20記載の発明の画像処理プログラムによれば、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、文字領域に属する画素を色に応じて分類したクラス分類に基づき原画像上から推定される背景色に基づいて特定される背景領域の色を白色に置換することにより、規定のパラメータを用いたりユーザがパラメータを設定する等の作業を行なったりすることなく、多様な画像入力機器から入力された原画像における背景の色変動や裏写り等の画像劣化を自動的に補正することができる。   According to the image processing apparatus of the invention of claim 3 and the image processing program of the invention of claim 20, for example, when outputting an original image which is a digital image input from the image input device from the image output device The specified parameters can be used by replacing the color of the background area specified based on the background color estimated from the original image based on the class classification that classifies the pixels belonging to the character area according to the color with white. It is possible to automatically correct image deterioration such as background color fluctuation and show-through in the original image input from various image input devices without the user performing a task such as setting parameters.

請求項4記載の発明の画像処理装置および請求項21記載の発明の画像処理プログラムによれば、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、原画像の特徴量から計算された値に基づき抽出された文字領域に属する画素を色に応じて分類したクラス分類に基づき、原画像上から推定される黒文字色と下地色とに基づいて、規定のパラメータを用いることなく原画像に対する階調補正を行なうことができる。これによって、多様な画像入力機器から入力された原画像の中間調領域の階調性を保持しながら、ユーザがパラメータを設定する等の作業を行なうことなく自動的に出力画像の黒文字と下地とのコントラストを調整することができる。   According to the image processing apparatus of the invention of claim 4 and the image processing program of the invention of claim 21, for example, when outputting an original image which is a digital image input from the image input device from the image output device Based on the classification of the pixels belonging to the character region extracted based on the value calculated from the feature value of the original image according to the color, based on the black character color and the background color estimated from the original image, It is possible to perform gradation correction on the original image without using the specified parameters. As a result, while maintaining the gradation of the halftone area of the original image input from various image input devices, the user can automatically set the black character and the background of the output image without performing operations such as setting parameters. The contrast can be adjusted.

請求項5記載の発明の画像処理装置および請求項22記載の発明の画像処理プログラムによれば、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、原画像の特徴量から計算された値に基づき抽出された文字領域に属する画素を色に応じて分類したクラス分類に基づき、原画像上から推定される背景色に基づいて特定される背景領域の色を推定された背景色に置換することにより、規定のパラメータを用いたりユーザがパラメータを設定する等の作業を行なったりすることなく、多様な画像入力機器から入力された原画像における背景の色変動や裏写り等の背景部分に起因する画像劣化を自動的に補正し、背景部分をより適正化することで文字等を見易くした出力画像を得ることができる。   According to the image processing apparatus of the invention of claim 5 and the image processing program of the invention of claim 22, for example, when an original image that is a digital image input from the image input device is output from the image output device A background region identified based on a background color estimated from the original image based on a class classification in which pixels belonging to the character region extracted based on a value calculated from the feature value of the original image are classified according to color By substituting the background color with the estimated background color, the background of the original image input from various image input devices can be used without using the specified parameters or the user setting the parameters. It is possible to automatically correct image degradation caused by the background portion such as color variation and show-through, and to optimize the background portion, thereby obtaining an output image in which characters and the like are easy to see.

請求項6記載の発明の画像処理装置および請求項23記載の発明の画像処理プログラムによれば、例えば、画像入力機器から入力されたデジタル画像である原画像を画像出力機器から出力する際には、原画像の特徴量から計算された値に基づき抽出された文字領域に属する画素を色に応じて分類したクラス分類に基づき、原画像上から推定される背景色に基づいて特定される背景領域の色を白色に置換することにより、規定のパラメータを用いたりユーザがパラメータを設定する等の作業を行なったりすることなく、多様な画像入力機器から入力された原画像における背景の色変動や裏写り等の画像劣化を自動的に補正することができる。   According to the image processing apparatus of the invention of claim 6 and the image processing program of the invention of claim 23, for example, when outputting an original image which is a digital image input from the image input device from the image output device A background region identified based on a background color estimated from the original image based on a class classification in which pixels belonging to the character region extracted based on a value calculated from the feature value of the original image are classified according to color By replacing the color of the image with white, the background color fluctuations and backgrounds in the original images input from various image input devices can be used without using the specified parameters or the user setting the parameters. Image deterioration such as reflection can be automatically corrected.

請求項7記載の発明および請求項24記載の発明によれば、請求項4、5または6記載の画像処理装置または請求項21、22または23記載の画像処理プログラムにおいて、各画素の周囲に設定されたウィンドウ内での色信号の平均値および標準偏差によって設定される閾値に対する該ウィンドウ内での注目画素の色信号値に基づいてウィンドウ毎に文字領域が抽出されるため、例えば、請求項4記載の画像処理装置および請求項21記載の画像処理プログラムにおいては黒文字色と下地色とを正確に推定することができ、請求項5または6記載の画像処理装置および請求項22または23記載の画像処理プログラムにおいては背景色を正確に推定することができる。   According to the invention described in claim 7 and the invention described in claim 24, in the image processing apparatus according to claim 4, 5 or 6, or the image processing program according to claim 21, 22 or 23, it is set around each pixel. The character region is extracted for each window based on the color signal value of the pixel of interest in the window with respect to the threshold value set by the average value and the standard deviation of the color signal in the specified window. The image processing apparatus according to claim 5 and the image processing program according to claim 21 can accurately estimate the black character color and the background color. The image processing apparatus according to claim 5 or 6 and the image according to claim 22 or 23 In the processing program, the background color can be accurately estimated.

請求項8記載の発明および請求項25記載の発明によれば、請求項4、5または6記載の画像処理装置または請求項21、22または23記載の画像処理プログラムにおいて、エッジ量が規定閾値以上の画素およびこの画素の周囲の画素が文字領域として抽出されるため、例えば、請求項4記載の画像処理装置および請求項21記載の画像処理プログラムにおいては黒文字色と下地色とを正確に推定することができ、請求項5または6記載の画像処理装置および請求項22または23記載の画像処理プログラムにおいては背景色を正確に推定することができる。   According to the invention described in claim 8 and the invention described in claim 25, in the image processing device according to claim 4, 5 or 6 or the image processing program according to claim 21, 22 or 23, the edge amount is not less than a specified threshold value. Therefore, for example, in the image processing apparatus according to claim 4 and the image processing program according to claim 21, the black character color and the background color are accurately estimated. In the image processing apparatus according to claim 5 or 6 and the image processing program according to claim 22 or 23, the background color can be accurately estimated.

請求項9記載の発明および請求項26記載の発明によれば、請求項4、5または6記載の画像処理装置または請求項21、22または23記載の画像処理プログラムにおいて、エッジ量が規定閾値以上の画素およびこの画素の周囲の画素が文字領域として抽出されるとともに、各画素の周囲に設定されたウィンドウ内での色信号の平均値および標準偏差によって設定される閾値に対する該ウィンドウ内での注目画素の色信号値に基づいてウィンドウ毎に文字領域が抽出されるため、例えば、請求項4記載の画像処理装置および請求項21記載の画像処理プログラムにおいては黒文字色と下地色とを正確に推定することができる、請求項5または6記載の画像処理装置および請求項22または23記載の画像処理プログラムにおいては背景色を正確に推定することができる。   According to the invention described in claim 9 and the invention described in claim 26, in the image processing apparatus according to claim 4, 5 or 6, or the image processing program according to claim 21, 22 or 23, the edge amount is equal to or greater than a specified threshold value. And a pixel surrounding this pixel are extracted as a character area, and attention is paid to the threshold value set by the average value and the standard deviation of the color signal in the window set around each pixel. Since the character region is extracted for each window based on the color signal value of the pixel, for example, in the image processing apparatus according to claim 4 and the image processing program according to claim 21, the black character color and the background color are accurately estimated. In the image processing apparatus according to claim 5 or 6, and the image processing program according to claim 22 or 23, the background color can be set. It is possible to estimate the probability.

請求項10記載の発明および請求項27記載の発明によれば、請求項1ないし9のいずれか一に記載の画像処理装置または請求項18ないし26のいずれか一に記載の画像処理において、各画素の色信号から計算される輝度の閾値処理によりクラス分類することができるので、画像入力機器に関する知識・特性情報を一切必要とせずに出力画像を補正することができる。また、例えば、下地色(背景色)の変動や裏写り等による画像劣化の補正に際してユーザがパラメータを指定する場合にも、指定パラメータを単純化することができる。   According to the invention of claim 10 and the invention of claim 27, in the image processing apparatus according to any one of claims 1 to 9 or the image processing according to any one of claims 18 to 26, Since classification can be performed by threshold processing of luminance calculated from pixel color signals, the output image can be corrected without requiring any knowledge / characteristic information about the image input device. In addition, for example, when the user designates a parameter when correcting image deterioration due to a change in background color (background color) or show-through, the designated parameter can be simplified.

請求項11記載の発明および請求項28記載の発明によれば、請求項4記載の画像処理装置または請求項21記載の画像処理プログラムにおいて、ブロック毎のクラス分類結果に基づいて、第2のクラスに属する画素数が最大になるブロックにおける第1のクラスに属する画素群の平均色を黒文字色とし、同じブロックにおける第2のクラスに属する画素群の平均色を下地色として推定することにより、黒文字色と下地色とを正確に推定することができるので、より効果的に出力画像を補正することができる。   According to the invention described in claim 11 and the invention described in claim 28, in the image processing device according to claim 4 or the image processing program according to claim 21, the second class based on the class classification result for each block. By making the average color of the pixel group belonging to the first class in the block having the maximum number of pixels belonging to the black character color and estimating the average color of the pixel group belonging to the second class in the same block as the background color, Since the color and the background color can be accurately estimated, the output image can be corrected more effectively.

請求項12記載の発明および請求項29記載の発明によれば、請求項5または6記載の画像処理装置または請求項22または23記載の画像処理プログラムにおいて、ブロック毎のクラス分類結果に基づいて、第2のクラスに属する画素数が最大になるブロックにおける第2のクラスに属する画素群の平均色を背景色として推定することにより、背景色を正確に推定することができるので、より効果的に出力画像を補正することができる。   According to the invention of claim 12 and the invention of claim 29, in the image processing apparatus of claim 5 or 6, or the image processing program of claim 22 or 23, based on the class classification result for each block, Since the background color can be accurately estimated by estimating the average color of the pixel group belonging to the second class in the block having the maximum number of pixels belonging to the second class as the background color, more effectively The output image can be corrected.

請求項13記載の発明およい請求項30記載の発明によれば、請求項4記載の画像処理装置または請求項21記載の画像処理プログラムにおいて、第1のクラスに属する画素群の平均輝度と第2のクラスに属する画素群の平均輝度との差が最大になるブロックにおける第1のクラスに属する画素群の平均色を黒文字色とし、同じブロックにおける第2のクラスに属する画素群の平均色を下地色として推定することにより、黒文字色と下地色とを正確に推定することができるので、より効果的に出力画像を補正することができる。   According to the invention of claim 13 and the invention of claim 30, in the image processing device according to claim 4 or the image processing program according to claim 21, the average luminance of the pixel group belonging to the first class and the The average color of the pixel group belonging to the first class in the block having the largest difference from the average luminance of the pixel group belonging to the second class is a black character color, and the average color of the pixel group belonging to the second class in the same block is By estimating as the background color, the black character color and the background color can be accurately estimated, so that the output image can be corrected more effectively.

請求項14記載の発明および請求項31記載の発明によれば、請求項5または6記載の画像処理装置または請求項22または23記載の画像処理プログラムにおいて、第1のクラスに属する画素群の平均輝度と第2のクラスに属する画素群の平均輝度との差が最大になるブロックにおける第2のクラスに属する画素群の平均色を背景色として推定することにより、背景色を正確に推定することができるので、より効果的に出力画像を補正することができる。   According to the invention described in claim 14 and the invention described in claim 31, in the image processing device according to claim 5 or 6, or the image processing program according to claim 22 or 23, the average of the pixel groups belonging to the first class Accurately estimating the background color by estimating the average color of the pixel group belonging to the second class in the block where the difference between the luminance and the average luminance of the pixel group belonging to the second class is the maximum as the background color Therefore, the output image can be corrected more effectively.

請求項15記載の発明および請求項32記載の発明によれば、請求項10記載の画像処理装置または請求項27記載の画像処理プログラムにおいて、ブロック毎のクラス分類結果に基づいて、第2のクラスに属する画素数が最大になるブロックにおける第1のクラスに属する画素群の輝度の平均値および標準偏差と、同じブロックにおける第2のクラスに属する画素群の輝度の平均値および標準偏差とに基づき設定される階調変換曲線に応じて、原画像全体に亘る黒文字と下地との階調補正または背景領域の階調補正が同じ階調変換曲線に応じて行われるため、黒文字と下地とのコントラストの調整を画像全体に亘って安定化(均一化)することができる。   According to the invention described in claim 15 and the invention described in claim 32, in the image processing apparatus according to claim 10 or the image processing program according to claim 27, the second class based on the class classification result for each block. Based on the average value and standard deviation of the luminance values of the pixel groups belonging to the first class in the block having the maximum number of pixels belonging to the pixel group, and the average value and standard deviation of the luminance values of the pixel groups belonging to the second class in the same block. Depending on the gradation conversion curve that is set, the gradation correction of the black character and the background over the entire original image or the gradation correction of the background area is performed according to the same gradation conversion curve, so the contrast between the black character and the background is the same. Can be stabilized (uniformized) over the entire image.

請求項16記載の発明および請求項33記載の発明によれば、請求項10記載の画像処理装置または請求項27記載の画像処理プログラムにおいて、ブロック毎のクラス分類結果に基づいて、第1のクラスに属する画素群の平均輝度と第2のクラスに属する画素群の平均輝度との差が最大になるブロックにおける第1のクラスに属する画素群の輝度の平均値および標準偏差と、同じブロックにおける第2のクラスに属する画素群の輝度の平均値および標準偏差とに基づき設定される階調変換曲線に応じて、原画像に対する補正を原画像全体に亘って行うことにより、黒文字と下地とのコントラストの調整や背景領域の補正を画像全体に亘って安定化(均一化)することができる。   According to the invention of claim 16 and the invention of claim 33, in the image processing apparatus of claim 10 or the image processing program of claim 27, the first class is based on the class classification result for each block. The average value and standard deviation of the luminance values of the pixel groups belonging to the first class in the block in which the difference between the average luminance value of the pixel groups belonging to the pixel group and the average luminance value of the pixel group belonging to the second class is the maximum, and the The contrast between the black character and the background is obtained by performing correction on the entire original image in accordance with the gradation conversion curve set based on the average value and the standard deviation of the luminance of the pixel group belonging to the second class. Adjustment and background area correction can be stabilized (uniformized) over the entire image.

請求項17記載の発明および請求項34記載の発明によれば、請求項1ないし16のいずれか一に記載の画像処理装置または請求項18ないし33のいずれか一に記載の画像処理プログラムにおいて、各処理での計算量を減らし、処理を簡易化することができ、処理の高速化を図ることができる。   According to the invention of claim 17 and the invention of claim 34, in the image processing apparatus according to any one of claims 1 to 16, or the image processing program according to any one of claims 18 to 33, The amount of calculation in each process can be reduced, the process can be simplified, and the speed of the process can be increased.

請求項35記載の発明の記憶媒体によれば、請求項18ないし34のいずれか一記載の発明の効果を奏することができる。   According to the storage medium of the invention of claim 35, the effect of the invention of any one of claims 18 to 34 can be obtained.

本発明の第1の実施の形態について図1ないし図9を参照して説明する。
図1は、本実施の形態のシステム構築例を示す模式図である。図1に示すように、本実施の形態のシステムでは、サーバコンピュータ101にLAN等のネットワーク201を介して画像処理装置としてのパーソナルコンピュータ301が複数台接続されたサーバクライアントシステム11を想定している。
A first embodiment of the present invention will be described with reference to FIGS.
FIG. 1 is a schematic diagram showing a system construction example of the present embodiment. As shown in FIG. 1, the system according to the present embodiment assumes a server client system 11 in which a plurality of personal computers 301 as image processing apparatuses are connected to a server computer 101 via a network 201 such as a LAN. .

このサーバクライアントシステム11は、スキャナやデジタルカメラ等の画像入力機器401、および、プリンタ等の画像出力機器501をネットワーク201上でシェアし得るように整えられた環境を備えている。ネットワーク201上には、マルチファンクションペリフェラル(以下、MFPとする)601が接続されている。サーバクライアントシステム11では、このMFP601が、画像入力機器401や画像出力機器501として機能するような環境として構築しても良い。   The server client system 11 includes an environment arranged so that an image input device 401 such as a scanner or a digital camera and an image output device 501 such as a printer can be shared on the network 201. A multifunction peripheral (hereinafter referred to as MFP) 601 is connected on the network 201. In the server client system 11, the MFP 601 may be constructed as an environment that functions as the image input device 401 or the image output device 501.

サーバクライアントシステム11は、例えばイントラネット21を介して別のサーバクライアントシステム31とのデータ通信可能に構築され、インターネット通信網41を介して外部環境とデータ通信可能に構築されている。   The server client system 11 is constructed so as to be capable of data communication with another server client system 31 via, for example, the intranet 21 and is constructed so as to be capable of data communication with an external environment via the Internet communication network 41.

次に、パーソナルコンピュータ301のモジュール構成について図2を参照して説明する。図2は、本実施の形態におけるパーソナルコンピュータ301のモジュール構成図である。パーソナルコンピュータ301は、情報処理を行なうCPU302、情報を格納するROM303、および、RAM304等の一次記憶装置305、HDD306(ハードディスクドライブ)等の二次記憶装置307、情報を保管したり外部に情報を配布したり等外部から情報を入手したりするための可搬性を有するメディア308aに記憶された情報を読み取るリムーバブルディスク装置308、外部の他のコンピュータと通信により情報を伝達するためのネットワークインターフェイス309、処理経過や結果等を操作者に表示する表示装置310、操作者がパーソナルコンピュータ301に命令や情報等を入力するためのキーボード311、マウス等のポインティングディバイス312等から構成されている。   Next, the module configuration of the personal computer 301 will be described with reference to FIG. FIG. 2 is a module configuration diagram of the personal computer 301 in the present embodiment. The personal computer 301 includes a CPU 302 for information processing, a ROM 303 for storing information, a primary storage device 305 such as a RAM 304, a secondary storage device 307 such as an HDD 306 (hard disk drive), and stores information and distributes information to the outside. A removable disk device 308 that reads information stored in a portable medium 308a for obtaining information from outside such as a network, a network interface 309 for communicating information with other external computers, and processing A display device 310 that displays progress and results to the operator, a keyboard 311 for the operator to input commands and information to the personal computer 301, a pointing device 312 such as a mouse, and the like.

なお、本実施の形態では、可搬性を有するメディア308aとしてCD−ROMを用いるものとし、CD−ROMに記憶された情報の読み取りが可能なCD−ROMドライブによってリムーバブルディスク装置308を実現するようにした。   In this embodiment, a CD-ROM is used as the portable medium 308a, and the removable disk device 308 is realized by a CD-ROM drive capable of reading information stored in the CD-ROM. did.

CPU302、一次記憶装置305、二次記憶装置307、リムーバブルディスク装置308、ネットワークインターフェイス309、表示装置310、キーボード311、ポインティングディバイス312等のパーソナルコンピュータ301が備える各部間でのデータの送受信は、バスコントローラ313によって調停され、パーソナルコンピュータ301が備える各部はバスコントローラ313によって調停されるデータ等に基づいて動作する。   The CPU 302, the primary storage device 305, the secondary storage device 307, the removable disk device 308, the network interface 309, the display device 310, the keyboard 311, the pointing device 312, etc. Each unit included in the personal computer 301 that is arbitrated by 313 operates based on data that is arbitrated by the bus controller 313.

パーソナルコンピュータ301では、ユーザが電源を投入するとCPU302がROM303内のローダーというプログラムを起動させ、コンピュータのハードウェアとソフトウェアとを管理するプログラムをHDD306からRAM304に読み込み、読み込んだプログラムを起動させる。本実施の形態では、HDD306からRAM304に読み込まれて、コンピュータのハードウェアとソフトウェアとを管理するプログラムをオペレーティングシステムという。オペレーティングシステムは、ユーザの操作に応じてアプリケーションプログラム等を起動したり、情報を読み込んだり、保存を行ったりする。オペレーティングシステムのうち代表的なものとしては、例えば、Windows(登録商標)、UNIX(登録商標)等が知られている。なお、本実施の形態では、オペレーティングシステム上で実行される動作プログラムをアプリケーションプログラムとする。   In the personal computer 301, when the user turns on the power, the CPU 302 activates a program called a loader in the ROM 303, reads a program for managing computer hardware and software from the HDD 306 to the RAM 304, and activates the read program. In the present embodiment, a program that is read from the HDD 306 into the RAM 304 and manages computer hardware and software is called an operating system. The operating system starts application programs and the like, reads information, and stores information in response to user operations. As typical operating systems, for example, Windows (registered trademark), UNIX (registered trademark), and the like are known. In the present embodiment, an operation program executed on the operating system is an application program.

本実施の形態のパーソナルコンピュータ301は、アプリケーションプログラムとして、画像処理プログラムをHDD306に記憶している。このため、本実施の形態では、HDD306によって画像処理プログラムを記憶する記憶媒体が実現される。   The personal computer 301 of this embodiment stores an image processing program in the HDD 306 as an application program. For this reason, in the present embodiment, a storage medium for storing the image processing program is realized by the HDD 306.

HDD306等の二次記憶装置307にインストールされる画像処理プログラム等の各種動作プログラムは、例えば、各種動作プログラムを記憶するCD−ROM等の光情報記録メディアやFD等の磁気メディア等からインストールすることが可能である。このため、CD−ROM等の光情報記録メディアやFD等の磁気メディア等の可搬性を有する記憶媒体によっても、画像処理プログラムを記憶する記憶媒体を実現することが可能である。   Various operation programs such as an image processing program installed in the secondary storage device 307 such as the HDD 306 are installed from, for example, an optical information recording medium such as a CD-ROM storing various operation programs or a magnetic medium such as an FD. Is possible. For this reason, it is possible to realize a storage medium for storing an image processing program also by a portable storage medium such as an optical information recording medium such as a CD-ROM or a magnetic medium such as an FD.

また、HDD306等の二次記憶装置307にインストールされる画像処理プログラム等の各種動作プログラムは、例えば、ネットワークインターフェイス309を介して外部から二次記憶装置307にインストールしたものであっても良い。   In addition, various operation programs such as an image processing program installed in the secondary storage device 307 such as the HDD 306 may be installed in the secondary storage device 307 from the outside via the network interface 309, for example.

なお、本実施の形態では、HDD306によって記憶媒体を実現したが、これに限るものではなく、HDD306等の二次記憶装置307にインストールされる画像処理プログラム等の各種動作プログラムは、例えば、CD−ROM等の光情報記録メディアやFD等の磁気メディア等からインストールすることも可能であり、CD−ROM等の光情報記録メディアやFD等の磁気メディア等の可搬性を有する各種メディアによっても、画像処理プログラムを記憶する記憶媒体を実現することが可能である。   In this embodiment, the storage medium is realized by the HDD 306. However, the present invention is not limited to this, and various operation programs such as an image processing program installed in the secondary storage device 307 such as the HDD 306 are, for example, CD- It can also be installed from an optical information recording medium such as a ROM or a magnetic medium such as an FD, and an image can also be obtained from various media having portability such as an optical information recording medium such as a CD-ROM or a magnetic medium such as an FD. A storage medium for storing the processing program can be realized.

また、本実施の形態では、HDD306等の二次記憶装置307にインストールされた画像処理プログラムにしたがって後述する画像処理を実行するようにしたが、これに限るものではなく、例えば、ネットワークインターフェイス309を介して外部から二次記憶装置307にダウンロードした画像処理プログラムにしたがって後述する画像処理を実行するようにしても良い。   In this embodiment, image processing to be described later is executed according to an image processing program installed in the secondary storage device 307 such as the HDD 306. However, the present invention is not limited to this. The image processing described later may be executed in accordance with an image processing program downloaded to the secondary storage device 307 from outside.

次に、パーソナルコンピュータ301で実行される手段について図3ないし図8を参照して模式的に説明する。図3は、画像処理プログラムにしたがってパーソナルコンピュータ301よって実行される手段を模式的に示す機能ブロック図である。また、図4は、この機能ブロック図に含まれる各種の手段の実行手順を示すフローチャートである。   Next, means executed by the personal computer 301 will be schematically described with reference to FIGS. FIG. 3 is a functional block diagram schematically showing means executed by the personal computer 301 in accordance with the image processing program. FIG. 4 is a flowchart showing an execution procedure of various means included in this functional block diagram.

パーソナルコンピュータ301は、オペレーティングシステム上で実行される画像処理プログラムを起動させ、この画像処理プログラムにしたがって、CPU302で各種の演算処理を実行することにより、パーソナルコンピュータ301が備える各部を集中的に制御する。画像処理プログラムの実行に際して、パーソナルコンピュータ301は、図3の機能ブロック図に示す各機能によって、図4のフローチャートに示す各種の手段を実行する。   The personal computer 301 activates an image processing program executed on the operating system, and executes various arithmetic processes by the CPU 302 according to the image processing program, thereby centrally controlling each unit included in the personal computer 301. . When executing the image processing program, the personal computer 301 executes various means shown in the flowchart of FIG. 4 by each function shown in the functional block diagram of FIG.

1.処理の概要
まず、処理の概要について説明する。文書画像には多くの文字が印刷されているが、一般的な通常の文書には、紙面の何も印刷されていない部分に黒い文字が直接印刷されている部分がある。このため、入力画像から黒文字がありそうな領域を抽出し、該入力画像を十分に小さいブロックに分割することで、内部に黒い文字が紙面に直接印刷されているようなあるブロックが存在すると仮定できる。このことから、下地色となる紙面色が白であるとすると、以下のように画像処理の流れを規定することができる。
1. Overview of Processing First, an overview of processing will be described. Many characters are printed on the document image, but a general ordinary document has a portion in which black characters are directly printed on an unprinted portion of the paper. For this reason, it is assumed that there is a certain block in which black characters are directly printed on the paper surface by extracting an area where black characters are likely from the input image and dividing the input image into sufficiently small blocks. it can. Therefore, if the paper color as the background color is white, the flow of image processing can be defined as follows.

本実施の形態における画像処理プログラムは、図4のフローチャートに示すように、ネットワークインターフェイス309を介して、パーソナルコンピュータ301が原画像I(入力画像)を受信していることを前提として実行される(ステップS1)。ここで、原画像Iは、デジタル化されたカラー画像とする。 The image processing program according to the present embodiment is executed on the assumption that the personal computer 301 receives the original image I 0 (input image) via the network interface 309, as shown in the flowchart of FIG. (Step S1). Here, the original image I 0 is a digitized color image.

低解像度画像生成手段1001は、原画像(I)から原画像(I)よりも解像度の低い低解像度画像(I)を生成する(S2)。 The low resolution image generating means 1001 generates a low resolution image (I) having a lower resolution than the original image (I 0 ) from the original image (I 0 ) (S2).

低解像度処理手段2000は、低解像度画像生成手段1001によって生成した低解像度画像(I)を、平滑化手段2001によって平滑化し(S3)、特徴量計算手段2002によって該低解像度画像(I)の各画素の周りに固定サイズのウィンドウを設定してR,G,Bの各チャンネルで信号の平均値μと標準偏差σを計算することで低解像度画像(I)の特徴量を計算する(S4)。   The low resolution processing unit 2000 smoothes the low resolution image (I) generated by the low resolution image generating unit 1001 by the smoothing unit 2001 (S3), and the feature amount calculating unit 2002 converts each of the low resolution images (I). A feature size of the low-resolution image (I) is calculated by setting a fixed-size window around the pixel and calculating the average value μ and standard deviation σ of the signal in each of the R, G, and B channels (S4). .

文字領域抽出手段3001は、低解像度画像(I)に対して局所適応的閾値処理と膨張処理とを行なってカラー成分の局所適応的二値化を行なうことにより、文字領域C(図6参照)の抽出検出を行なう(S5)。   The character region extraction unit 3001 performs local adaptive threshold processing and dilation processing on the low-resolution image (I) to perform local adaptive binarization of the color components, so that the character region C (see FIG. 6). Is detected (S5).

黒文字色/下地色統計量推定手段4001は、入力された原画像(I)を固定サイズの互いに重なりのないブロックに分割し(S6)、分割した各ブロックにおいて、文字領域Cに属する画素を2つの代表色に応じて第1のクラスと第2のクラスとの2クラスに分類する(S7)。ここに、ブロック分割手段およびクラス分類手段としての機能が実行される。文字領域Cに属する画素の輝度に基づいて、通常は、明るい色の方を文字領域の背景色に、暗い色の方を文字色に対応させる。 The black character color / background color statistic estimation means 4001 divides the input original image (I 0 ) into fixed-size non-overlapping blocks (S6), and in each divided block, pixels belonging to the character region C are divided. According to the two representative colors, the first class and the second class are classified into two classes (S7). Here, functions as block dividing means and class classification means are executed. Based on the luminance of the pixels belonging to the character area C, normally, the lighter color corresponds to the background color of the character area and the darker color corresponds to the character color.

また、黒文字色/下地色統計量推定手段4001は、文字領域Cに属する画素が2つの代表色に分類された各ブロックから、一方のクラスに分類された画素数が最大になるブロックBをウィンドウWとして選択し、このウィンドウWにおける2つの代表色を入力画像における下地の平均色および黒文字の平均色としてそれぞれ設定し、さらに、輝度の統計量に基づいて、黒文字色と下地色とを推定する(S8)。ここで、輝度は、例えば、以下に示す(1)式の演算により取得されるR,G,B信号の平均値であり、この輝度から取得される該輝度の平均値および標準偏差を輝度の統計量とする。   Further, the black character color / background color statistic estimation means 4001 displays a block B in which the number of pixels classified into one class is maximized from each block in which pixels belonging to the character region C are classified into two representative colors. W is selected, the two representative colors in this window W are set as the average color of the background and the average color of black characters in the input image, respectively, and the black character color and the background color are estimated based on the statistics of luminance. (S8). Here, the luminance is, for example, an average value of R, G, and B signals acquired by the calculation of the following equation (1), and the average value and standard deviation of the luminance acquired from the luminance are expressed as luminance values. Use statistics.

Figure 2008113446
階調補正手段5001は、輝度の統計量から計算された飽和基準値に基づいて、各ブロック内における各画素の階調補正を行なう(S9)。ここでは、下地色を白(輝度最大)とし、黒文字色を黒(輝度最小)とする。
Figure 2008113446
The gradation correction unit 5001 performs gradation correction of each pixel in each block based on the saturation reference value calculated from the luminance statistics (S9). Here, the background color is white (luminance maximum), and the black character color is black (luminance minimum).

このようにして得られた補正画像をネットワークインターフェイス等を介して、パーソナルコンピュータから出力/送信する(S10)。   The corrected image thus obtained is output / transmitted from a personal computer via a network interface or the like (S10).

2.処理の詳細
次に、パーソナルコンピュータ301よって実行される上述した各手段の詳細について説明する。ここでは、図5に示すような原画像(I)を入力画像の例として説明する。
2. Details of Processing Next, details of each means described above executed by the personal computer 301 will be described. Here, an original image (I 0 ) as shown in FIG. 5 will be described as an example of an input image.

(1)低解像度画像の生成[低解像度画像生成手段1001]
低解像度画像生成手段1001は、計算量を減らすために、原画像(I)を100dpi程度の低解像度画像(I)に変換する。まず、単純に、入力画像を重なりのないブロックBに分割し(図6参照)、各ブロックB内での信号の平均値を、低解像度画像(I)で対応する画素の信号として設定する。このとき、ブロックBの大きさ、すなわち、縮小率をrとすると、ブロックB内での信号の平均値は(2)式の演算により取得することができる。
(1) Generation of low-resolution image [low-resolution image generation means 1001]
The low resolution image generation means 1001 converts the original image (I 0 ) into a low resolution image (I) of about 100 dpi in order to reduce the amount of calculation. First, the input image is simply divided into non-overlapping blocks B (see FIG. 6), and the average value of the signals in each block B is set as the corresponding pixel signal in the low resolution image (I). At this time, if the size of the block B, that is, the reduction ratio is r, the average value of the signal in the block B can be obtained by the calculation of the equation (2).

Figure 2008113446
ここで、縮小率rは、常に自然数になるようにし、原画像(I)の解像度が100で割り切れない場合、rは自然数に丸めた値にする。例えば、360dpiの場合、rは3となる。
Figure 2008113446
Here, the reduction ratio r is always a natural number, and when the resolution of the original image (I 0 ) is not divisible by 100, r is a value rounded to a natural number. For example, r is 3 in the case of 360 dpi.

このように、原画像(I)よりも解像度の低い低解像度画像(I)を用いることにより、画像処理における以降の計算量を減らすことができ、処理を簡易化することができる。 As described above, by using the low resolution image (I) having a resolution lower than that of the original image (I 0 ), it is possible to reduce the subsequent calculation amount in the image processing and to simplify the processing.

(2)平滑化[平滑化手段2001]
平滑化手段2001は、ノイズ除去のため、低解像度画像(I)を線形フィルタで平滑化する。
(2) Smoothing [smoothing means 2001]
The smoothing unit 2001 smoothes the low resolution image (I) with a linear filter in order to remove noise.

(3)特徴量の計算[特徴量計算手段2002]
特徴量計算手段2002は、低解像度画像(I)に対して、各画素の周りに固定サイズのウィンドウを設定して、R,G,Bの各チャンネルで信号の平均値μと標準偏差σとを計算する。
(3) Feature quantity calculation [feature quantity calculation means 2002]
The feature amount calculation unit 2002 sets a fixed size window around each pixel for the low resolution image (I), and calculates the average value μ and the standard deviation σ of the signal in each of the R, G, and B channels. Calculate

(4)文字領域の抽出[文字領域抽出手段3001]
文字領域抽出手段3001は、低解像度画像(I)に対して、カラー成分の局所適応的二値化を行なうことにより、文字領域Cの抽出を行なう。文字領域Cの抽出に際しては、aとbとをパラメータとした閾値μ(a+bσ)と各画素の信号値との比較を行ない、信号値が閾値μ(a+bσ)よりも高いか低いかに基づいて文字領域Cを抽出する。例えば、下地に黒文字が直接印刷された画像である場合、R,G,Bのすべてのチャンネルにおいてコントラストが強くなる傾向がある。このため、本実施の形態では、信号値が、すべてのチャンネルにおいて、閾値μ(a+bσ)よりも低い画素[i、j]を文字領域Cの要素として設定する((3)式参照)。
(4) Extraction of character area [character area extraction means 3001]
The character region extraction unit 3001 extracts the character region C by performing local adaptive binarization of the color component on the low resolution image (I). When extracting the character region C, the threshold value μ (a + bσ) using a and b as parameters is compared with the signal value of each pixel, and based on whether the signal value is higher or lower than the threshold value μ (a + bσ). Region C is extracted. For example, in the case of an image in which black characters are directly printed on the background, the contrast tends to increase in all the R, G, and B channels. For this reason, in this embodiment, a pixel [i, j] whose signal value is lower than the threshold value μ (a + bσ) is set as an element of the character region C in all channels (see equation (3)).

Figure 2008113446
また、文字領域抽出手段3001は、原画像(I)と同じサイズで、文字領域(Cの要素)ではON値、それ以外ではOFF値を持つような2値画像を構成し(図6参照)、この2値画像において背景画素(OFF値の画素)が横方向に沿う横方向のランを構築する。ここで、あるランの長さが予め規定された閾値τよりも短ければ、その画素を一時的にONにする。このようにして、横方向に対して、背景画素のランのsmearingを行ない、同様にして、縦方向にも背景画素のランのsmearingを行なう。そして、横方向背景画素のランと縦方向の背景画素のランとのsmearingのANDをとり、両方のsmearingでON値になる画素だけを最終的なモノクロ前景画素(文字領域C)として設定する。これにより、例えば、図5に示すような原画像(I)から、図6に示すように、文字領域Cを抽出した画像I'を得ることができる。
Figure 2008113446
Further, the character area extraction means 3001 constructs a binary image having the same size as the original image (I 0 ) and having an ON value in the character area (element C) and an OFF value in the other areas (see FIG. 6). ) In this binary image, background pixels (off-value pixels) construct a horizontal run along the horizontal direction. Here, if the length of a certain run is shorter than a predetermined threshold τ, the pixel is temporarily turned on. In this way, background pixel runs are smeared in the horizontal direction, and similarly, background pixel runs are smeared in the vertical direction as well. Then, AND of the running of the background pixel in the horizontal direction and the running of the background pixel in the vertical direction is performed, and only the pixel that is turned ON by both the smearing is set as the final monochrome foreground pixel (character area C). Thereby, for example, an image I ′ obtained by extracting the character region C as shown in FIG. 6 can be obtained from the original image (I 0 ) as shown in FIG.

(5)ブロック分割と文字領域のクラス分類[ブロック分割手段、クラス分類手段]
クラス分類手段(図示せず)は、原画像(I)を互いに重なりのない十分に小さいブロックBに分割する(図6参照)。このとき、各ブロックBのサイズおよび形は、例えば、辺の長さrが20mm(200dpiで160画素、400dpiで320画素)相当の正方形などとすればよい。クラス分類手段は、分割した各ブロックB内において、文字領域Cに属する画素を輝度に応じて2つのクラスに分類する。
(5) Block division and character area classification [block division means, class classification means]
The class classification means (not shown) divides the original image (I 0 ) into sufficiently small blocks B that do not overlap each other (see FIG. 6). At this time, the size and shape of each block B may be, for example, a square corresponding to a side length r of 20 mm (160 pixels at 200 dpi and 320 pixels at 400 dpi). The class classification means classifies the pixels belonging to the character area C into two classes according to the luminance in each divided block B.

分類に際しては、各画素の色信号から輝度を計算し、閾値処理する。閾値処理には、判別分析法、モーメント保持法、エントロピ法等の既知の方法を用いることができる。なお、判別分析法、モーメント保持法、エントロピ法等を用いた閾値処理については既知の技術であるため説明を省略する。クラス分類手段は、ブロックBにおいて、暗い方の(輝度が低い)画素群を第1のクラスRi1として分類し、明るい方の(輝度が高い)画素群を第2のクラスRi2として分類する。通常は、明るい色の方を文字領域の背景色に対応させ、暗い色の方を文字色に対応させることから、ここでは、第1のクラスRi1が文字に対応し、Ri2が背景(下地)に対応するものとする。このようにして、すべてのブロックBにおいて、文字領域Cに属する画素をRi1とRi2とに分類する。 In classification, luminance is calculated from the color signal of each pixel, and threshold processing is performed. For the threshold processing, a known method such as a discriminant analysis method, a moment holding method, an entropy method, or the like can be used. Note that threshold processing using a discriminant analysis method, a moment holding method, an entropy method, or the like is a known technique, and thus description thereof is omitted. The class classification unit classifies the darker (low luminance) pixel group as the first class R i1 and the brighter (high luminance) pixel group as the second class R i2 in the block B i . To do. Usually, since the lighter color corresponds to the background color of the character area and the darker color corresponds to the character color, here, the first class R i1 corresponds to the character, and R i2 corresponds to the background ( Corresponding to the ground). In this way, in all the blocks B, the pixels belonging to the character area C are classified into R i1 and R i2 .

(6)黒文字色と下地色の推定[黒文字色/下地色統計量推定手段(黒文字色/下地色推定手段)4001]
黒文字色/下地色統計量推定手段4001は、黒文字領域Cに属する画素をRi1とRi2とに分類した全てのブロックから、第2のクラスRi2に属する画素数が最大になるブロックBをウィンドウWとして選択し、選択されたウィンドウWにおいて第1のクラスRi1に属する画素(画素群Rw1)の平均色を原画像の黒文字色として設定する。図7には、図5の入力画像に対して、ウィンドウWとして選ばれた領域と、その中での画素群Rw1,Rw2とが示されている。図7中、画素群Rw1の平均色を原画像の黒文字の色とし、画素群Rw2の平均色を原画像の下地色として設定する。
(6) Black character color and background color estimation [black character color / background color statistic estimation means (black character color / background color estimation means) 4001]
The black character color / background color statistic estimation means 4001 selects a block B having the maximum number of pixels belonging to the second class R i2 from all blocks in which the pixels belonging to the black character region C are classified into R i1 and R i2. The window W is selected, and the average color of the pixels (pixel group R w1 ) belonging to the first class R i1 in the selected window W is set as the black character color of the original image. FIG. 7 shows a region selected as the window W and the pixel groups R w1 and R w2 in the region selected for the input image of FIG. In FIG. 7, the average color of the pixel group R w1 is set as the color of the black character of the original image, and the average color of the pixel group R w2 is set as the background color of the original image.

(7)黒文字色と下地色との統計量に基づく階調補正[階調補正手段5001]
階調補正手段5001は、Rw1とRw2とのそれぞれにおける輝度の統計量(平均,標準偏差)を計算し、ウィンドウWにおいて計算された入力画像の黒文字と下地の色に関する統計量l,σ,l,σを基にして階調補正を行なう。ここで、計算されたRw1での輝度の平均値lとし、標準偏差をσとする。また、Rw2での輝度の平均値をlとし、標準偏差をσとする。ただし、l<lとする。
(7) Gradation correction based on the statistic of the black character color and the background color [gradation correction unit 5001]
The tone correction unit 5001 calculates the statistics (average, standard deviation) of the luminance in each of R w1 and R w2, and calculates the statistics l 1 , black and background colors of the input image calculated in the window W, Gradation correction is performed based on σ 1 , l 2 , and σ 2 . Here, it is assumed that the calculated average value l 1 of the luminance at R w1 and the standard deviation is σ 1 . In addition, the average value of luminance at R w2 is l 2 and the standard deviation is σ 2 . However, it is assumed that l 1 <l 2 .

階調補正手段5001が行なう階調補正のデフォルトとしては、以下に説明する(4)式に示すように、lを0に、lを255に写すような関数によってR,G,Bの各成分を変換すればよい。 As the default of the gradation correction performed by the gradation correction means 5001, as shown in the following equation (4), R 1, G, and B are expressed by a function that maps l 1 to 0 and l 2 to 255. Each component may be converted.

Figure 2008113446
ここで、0や255にクリップされる入力信号値の範囲は、画像出力機器の特性によって調整する必要がある。例えば、ハイライト色の表現能力が高いプリンタでは、白にクリップされる入力信号の輝度値が低めになるように設定する必要がある。一方で、例えば、ハイライト色の表現能力が低いプリンタでは、白にクリップされる入力信号の輝度値を低めにするような設定は必要ない。
Figure 2008113446
Here, the range of the input signal value clipped to 0 or 255 needs to be adjusted according to the characteristics of the image output device. For example, in a printer with high highlight color expression capability, it is necessary to set the luminance value of an input signal clipped in white to be low. On the other hand, for example, a printer with low highlight color expression capability does not require a setting that lowers the luminance value of an input signal clipped to white.

また、階調補正手段5001による黒文字色と下地色との階調補正は、入力画像の下地色の変動を考慮しなければならないため、計算しておいた黒文字色の分散σと下地色の分散σとに基づいて、補正の程度を調整する。具体的には、以下に示す(5)式の演算による補正を施せばよい(図8参照)。なお、調整パラメータaとbとの値は、ユーザによって指定され、印刷に用いるプリンタの特性やユーザの好み等に応じて適宜設定される。 Further, since the gradation correction between the black character color and the background color by the gradation correction means 5001 must take into account the variation of the background color of the input image, the calculated black character color dispersion σ 1 and the background color are calculated. The degree of correction is adjusted based on the variance σ 2 . Specifically, correction by the calculation of the following equation (5) may be performed (see FIG. 8). Note that the values of the adjustment parameters a and b are designated by the user and are appropriately set according to the characteristics of the printer used for printing, the user's preferences, and the like.

Figure 2008113446
図8からも判るように、調整パラメータa,bの値が大きいほど、黒文字の強調,下地の除去,コントラスト強調が強く作用する。図9に、図5に示した入力画像(原画像(I))に対して階調補正を行なった画像I''を示す。
Figure 2008113446
As can be seen from FIG. 8, the larger the values of the adjustment parameters a and b, the stronger the black character enhancement, background removal, and contrast enhancement. FIG. 9 shows an image I ″ obtained by performing gradation correction on the input image (original image (I 0 )) shown in FIG.

ところで、階調補正は画像出力機器の特性に依存するため、下地や黒文字に対する補正の程度を簡単に調整できなくてはならない。例えば、ハイライト色の表現能力が高いプリンタでは、白にクリップされる入力信号の輝度値が低めになるように設定する必要があり、表現能力が低ければそのような必要はない。さらに、ここでの調整は、入力画像の下地色の変動を考慮しなければならない。「中間調領域の階調性は保持しながら、下地を白に,黒文字を黒に変換するような、文書画像に適した大局的な階調補正」と「処理を特定するパラメータ(下地や黒文字の色)を画像から適応的に計算できる」という問題の解決のためには、黒文字色と下地色とを正確に推定することが必要である。   By the way, since the gradation correction depends on the characteristics of the image output device, it is necessary to be able to easily adjust the degree of correction for the background and black characters. For example, in a printer having a high highlight color expression capability, it is necessary to set the luminance value of an input signal clipped in white to be low, and this is not necessary if the expression capability is low. Furthermore, the adjustment here must take into account variations in the background color of the input image. “Global tone correction suitable for document images, such as converting the background to white and black characters to black, while maintaining the gradation of the halftone area” and “Parameters for specifying processing (background and black characters In order to solve the problem that “the color can be adaptively calculated from the image”, it is necessary to accurately estimate the black character color and the background color.

本実施の形態では、計算しておいた黒文字と下地の色の分散(標準偏差)に基づいて、例えば、デフォルトでは、下地色の平均を白(輝度最大)に、黒文字色の平均を黒(輝度最小)に写すような階調補正を施し、補正程度を調整する場合には、標準偏差に調整パラメータを掛けた分だけ、平均からシフトさせることにより補正の程度を調整する。これにより、出力機器の特性に応じて、ユーザが簡単に処理を調整できる。   In the present embodiment, based on the calculated black character and background color dispersion (standard deviation), for example, by default, the background color average is white (maximum brightness) and the black character color average is black ( In the case of performing gradation correction as shown in (minimum luminance) and adjusting the correction level, the correction level is adjusted by shifting from the average by the standard deviation multiplied by the adjustment parameter. Thereby, according to the characteristic of an output apparatus, a user can adjust a process easily.

本実施の形態によれば、画像入力機器から入力されたデジタル画像である原画像(I)をプリンタ等の画像出力機器501から出力する際には、原画像(I)の特徴量から計算された値に基づき原画像(I)上から推定される黒文字色と下地色とに基づいて、規定のパラメータを用いることなく原画像(I)に対する階調補正を行なうことで、多様な画像入力機器401から入力された原画像(I)の中間調領域の階調性を保持しながら、ユーザがパラメータを設定する等の作業を行なうことなく、出力画像の黒文字と下地とのコントラストを自動的に調整することができる。 According to the present embodiment, when an original image (I 0 ), which is a digital image input from an image input device, is output from an image output device 501 such as a printer, the feature amount of the original image (I 0 ) is used. By performing tone correction on the original image (I 0 ) without using specified parameters based on the black text color and background color estimated from the calculated value on the original image (I 0 ), various While maintaining the gradation of the halftone area of the original image (I 0 ) input from the correct image input device 401, the user does not perform operations such as setting parameters, and the black characters and the background of the output image The contrast can be adjusted automatically.

また、本実施の形態によれば、ブロックB毎のクラス分類結果に基づいて、第2のクラスRi2に属する画素数が最大になるブロックBであるウィンドウWにおける第1のクラスRi1に属する画素群Rw1の平均色を黒文字色とし、同じブロックBであるウィンドウWにおける第2のクラスRi2に属する画素群Rw2の平均色を下地色として推定することにより、黒文字色と下地色とを正確に推定することができる。 Further, according to the present embodiment, based on the classification result for each block B, it belongs to the first class R i1 in the window W that is the block B having the maximum number of pixels belonging to the second class R i2. By estimating the average color of the pixel group R w1 as the black character color and estimating the average color of the pixel group R w2 belonging to the second class R i2 in the window W that is the same block B as the background color, Can be estimated accurately.

次に、本発明の第2の実施の形態について図10ないし図15を参照して説明する。なお、第1の実施の形態と同一部分は同一符号で示し、説明も省略する。以下、同様とする。   Next, a second embodiment of the present invention will be described with reference to FIGS. Note that the same parts as those of the first embodiment are denoted by the same reference numerals, and description thereof is also omitted. The same shall apply hereinafter.

図10は本発明の第2の実施の形態において画像処理プログラムにしたがってパーソナルコンピュータ301よって実行される手段を模式的に示す機能ブロック図であり、図11はこの機能ブロック図に含まれる各種の手段の実行手順を示すフローチャートである。パーソナルコンピュータ301は、画像処理プログラムの実行に際し、図10の機能ブロック図に示す各機能によって、図11のフローチャートに示す各種の手段を実行する。   FIG. 10 is a functional block diagram schematically showing means executed by the personal computer 301 in accordance with the image processing program in the second embodiment of the present invention. FIG. 11 shows various means included in this functional block diagram. It is a flowchart which shows the execution procedure of. When executing the image processing program, the personal computer 301 executes various means shown in the flowchart of FIG. 11 by each function shown in the functional block diagram of FIG.

本実施の形態では、平滑化手段2001、特徴量計算手段2002に加えて、低解像度画像(I)に対して局所適応的閾値処理と膨張処理とを行なってカラー成分の局所適応的二値化を行なうことにより、文字領域C(図6参照)の抽出検出を行なう文字領域抽出手段2003(図3中文字領域抽出手段3001参照)も低解像度処理手段2000に含まれる。   In the present embodiment, in addition to the smoothing unit 2001 and the feature amount calculating unit 2002, the local adaptive threshold processing and the expansion processing are performed on the low resolution image (I) to perform local adaptive binarization of the color components. Thus, the low resolution processing unit 2000 also includes character region extraction means 2003 (see character region extraction means 3001 in FIG. 3) that performs extraction detection of the character region C (see FIG. 6).

加えて、本実施の形態では、以下に説明する背景色推定手段2004および背景領域抽出手段2005が、低解像度処理手段2000に含まれている。   In addition, in the present embodiment, background color estimation means 2004 and background area extraction means 2005 described below are included in low resolution processing means 2000.

図11におけるステップS1からステップS7までの処理は、図4におけるステップS1からステップS7までの処理と同様の処理を実行し、背景色推定手段2004によって明るい方のクラスに分類される画素数と,明るい方の色の輝度をもとにして決められる評価関数の値が最大になるようなウィンドウを選択し、入力画像における背景の平均色としてこのウィンドウにおける明るい方の代表色を設定し、さらに輝度の統計量を計算することで背景色を推定する(S20)。そして、これらの統計量をもとにして背景領域を抽出し(S21)、そして抽出した背景領域の色を推定した背景の平均色に置換するとともに背景以外の画素については背景領域との階調不連続が生じないように階調補正を施し(S22)、ステップS10に進む。   The processing from step S1 to step S7 in FIG. 11 performs the same processing as the processing from step S1 to step S7 in FIG. 4, and the number of pixels classified into the brighter class by the background color estimation means 2004; Select a window that maximizes the value of the evaluation function determined based on the brightness of the brighter color, set the brighter representative color in this window as the average background color in the input image, and then increase the brightness The background color is estimated by calculating the statistic (S20). Then, based on these statistics, a background area is extracted (S21), and the color of the extracted background area is replaced with the estimated average color of the background, and for the pixels other than the background, the gradation with the background area is replaced. Gradation correction is performed so as not to cause discontinuity (S22), and the process proceeds to step S10.

次に、パーソナルコンピュータ301によって実行される上述した各手段の詳細について説明する。なお、本実施の形態では、図12に示すような原画像(I')を例として説明する。原画像(I')は、原画像(I)と比較して、背景部分となる領域が複数の背景色から構成されている。 Next, details of the above-described means executed by the personal computer 301 will be described. In the present embodiment, an original image (I 0 ′) as shown in FIG. 12 will be described as an example. In the original image (I 0 ′), as compared to the original image (I 0 ), a region serving as a background portion is composed of a plurality of background colors.

(8)背景の色の推定[背景色推定手段2004]
背景色推定手段2004は、第2のクラスRi2に属する画素数Nと、Ri2の平均輝度Lとに基づく評価関数を定義し、その値が最大になるブロックWを見つける。ここで、定義する評価関数としては、例えば,N×Lのように,画素数が多く、平均輝度が高い程大きい値をとるような関数を定義する(図7参照)。本実施の形態では、画素群Rw2の平均色を原画像の背景色として設定する。背景色推定手段は、さらに,Rw2において,輝度の統計量(平均l,標準偏差σ)を計算しておく。
(8) Estimation of background color [background color estimation means 2004]
The background color estimation unit 2004 defines an evaluation function based on the number of pixels N i belonging to the second class R i2 and the average luminance L i of R i2 , and finds a block W having the maximum value. Here, as an evaluation function to be defined, for example, a function that takes a larger value as the number of pixels is larger and the average luminance is higher, such as N i × L i is defined (see FIG. 7). In the present embodiment, the average color of the pixel group Rw2 is set as the background color of the original image. The background color estimation means further calculates a brightness statistic (average l B , standard deviation σ) in R w2 .

(9)背景領域の抽出[背景領域抽出手段2005]
背景領域抽出手段2005は、背景の輝度の統計量に基づいて背景領域を抽出する。本実施の形態では、低解像度画像(I)において、輝度Lが,l−aσ<L<l(ただし、aは正のパラメータ)であるような画素を背景領域とする。ここで、パラメータaは,背景の変動や裏写りの程度などにより決まり、例えば、裏写りが強ければ、調整パラメータaを大きめに設定すればよい。図13中には、背景として抽出された画素が黒で示された画像I'が示されている。
(9) Background area extraction [background area extraction means 2005]
The background area extraction unit 2005 extracts the background area based on the statistics of the background brightness. In the present embodiment, in the low-resolution image (I), a pixel whose luminance L is l B −aσ <L <l B (where a is a positive parameter) is set as the background region. Here, the parameter a is determined by the background fluctuation, the degree of show-through, and the like. For example, if the show-through is strong, the adjustment parameter a may be set larger. FIG. 13 shows an image I 1 ′ in which pixels extracted as a background are shown in black.

なお、ここでは、Rw2における輝度の平均lと標準偏差σに基づいて、背景領域を決定したが、これに限るものではなく、代わりにRw2における輝度分布のメディアンmやαパーセント分位点α(αは、例えば25)を用いて、α<L<mであるような画素を背景領域として抽出するようにしてもよい。 Here, based on the average l B and the standard deviation of the luminance σ in R w2, it was determined background region, not limited to this, instead of median m B and α% of the luminance distribution in R w2 A pixel such that α B <L <m B may be extracted as a background region using the position point α B (α is 25, for example).

(10)背景の色の統計量に基づく階調補正[階調補正手段5001]
本実施の形態の階調補正手段5001は、原画像(I')において、まず、背景領域の画素の色をブロックWにおいて計算された背景の平均色に置換する。背景以外の画素については,背景との階調不連続が生じないように,以下に示す(6)式を用いてRGBの各成分を変換する(図14参照)。
(10) Gradation correction based on background color statistics [gradation correction means 5001]
In the original image (I 0 ′), the gradation correction unit 5001 according to the present embodiment first replaces the pixel color in the background area with the average background color calculated in the block W. For pixels other than the background, each component of RGB is converted using the following equation (6) so that gradation discontinuity with the background does not occur (see FIG. 14).

Figure 2008113446
ここで、図15に、図12に示した入力画像(原画像(I'))に対して階調補正を行った画像I''を示す。
なお、本実施の形態では、(6)式に基づいてRGBの各成分を変換するようにしたが、これに限るものではなく、代わりに、以下に示す(7)式を用いてRGBの各成分を変換してもよい。
Figure 2008113446
FIG. 15 shows an image I 1 ″ obtained by performing tone correction on the input image (original image (I 0 ′)) shown in FIG.
In the present embodiment, the RGB components are converted based on the equation (6). However, the present invention is not limited to this. Instead, the RGB components are converted using the following equation (7). Components may be converted.

Figure 2008113446
このように本実施の形態では、局所的に見て、カラー文書画像が前景と背景との2種類の領域から構成されていることに着目し、背景色の統計量推定問題を単純な2クラス問題に帰着させる。具体的には、デジタルカラー画像から真の背景色を含むような部分領域を探索し、その領域を前景と背景にクラス分けして、背景の色・階調分布から背景(地肌,下地)の代表色やばらつき度合を抽出する。これにより、従来行われていたような混合分布から構成されるヒストグラムの解析を避けることができる。
Figure 2008113446
As described above, in the present embodiment, focusing on the fact that the color document image is composed of two types of areas, the foreground and the background, when viewed locally, the problem of estimating the background color statistic is simplified to two classes. Bring back to the problem. Specifically, a partial area including a true background color is searched from a digital color image, the area is classified into a foreground and a background, and the background (background, background) is determined from the background color and gradation distribution. Extract representative colors and degree of variation. As a result, it is possible to avoid the analysis of the histogram composed of the mixture distribution as conventionally performed.

そして、それらの統計量をもとに画像全体から背景領域を抽出し,背景領域を推定された代表色で置換するとともに、背景以外の部分についても背景領域との階調不連続が生じないように階調変換を施す。   Based on these statistics, the background area is extracted from the entire image, the background area is replaced with the estimated representative color, and the gradation discontinuity with the background area does not occur in parts other than the background. Is subjected to gradation conversion.

これにより、入力機器に関する知識・特性情報や既定のパラメータを一切必要とすることなく、背景・地肌の色を画像特徴から統計的処理により自動的に算出することができるので、入力機器に関する知識や特性情報に依存することなく、また、規定のパラメータを用いたりユーザがパラメータを設定する等の作業を行なったりすることなく、多様な画像入力機器から入力された原画像における背景の色変動や裏写り等の背景部分に起因する画像劣化を自動的に補正し、背景部分をより適正化することで文字等を見易くした出力画像を得ることができる。また、本実施の形態によれば、ネットワークを介して遠隔地から送信されてきた原画像のように、入力機器がわからないようなデジタル画像に対しても、背景の色変動や裏写り等の背景部分に起因する画像劣化を自動的に補正し、背景部分をより適正化することで文字等を見易くした出力画像を得ることができる。   This makes it possible to automatically calculate the background / background color from the image features by statistical processing without the need for any knowledge / characteristic information or default parameters for the input device. Without depending on the characteristic information, and without using the specified parameters or setting the parameters by the user, the background color fluctuations and background in the original images input from various image input devices It is possible to automatically correct image deterioration caused by a background portion such as a reflection and to make the background portion more appropriate, thereby obtaining an output image in which characters and the like are easy to see. In addition, according to the present embodiment, backgrounds such as background color fluctuation and show-through can be applied to a digital image in which an input device is not known, such as an original image transmitted from a remote place via a network. By automatically correcting the image deterioration caused by the part and optimizing the background part, it is possible to obtain an output image in which characters and the like are easily seen.

次に、本発明の第3の実施の形態について説明する。特に図示しないが、本実施の形態は、図4あるいは図11のステップS4における特徴量計算と、図4あるいは図11のステップS5における文字領域抽出とを、エッジ量によって行なう点が、第1の実施の形態と異なる。   Next, a third embodiment of the present invention will be described. Although not particularly illustrated, the present embodiment is characterized in that the feature amount calculation in step S4 in FIG. 4 or FIG. 11 and the character region extraction in step S5 in FIG. 4 or FIG. Different from the embodiment.

ここで、下地に直接印刷された黒文字の場合、R,G,Bのすべてのチャンネルにおいてコントラストが強くなる傾向がある。   Here, in the case of black characters printed directly on the background, the contrast tends to be strong in all the R, G, and B channels.

本実施の形態では、このことに注意し、注目画素でのエッジ量を、R,G,Bの各チャンネルで計算されたエッジ量の最小のものとすることで文字領域を抽出する。   In the present embodiment, attention is paid to this, and the character region is extracted by setting the edge amount at the target pixel to the minimum edge amount calculated for each of the R, G, and B channels.

文字領域Cの抽出に際しては、まず、各画素におけるエッジ量を計算し、各画素で計算されたエッジ量が画像処理に先立って予め設定された規定閾値よりも高い画素を文字領域Cの要素に設定する。その後、第1の実施の形態と同様にランのsmearingを行なう。   When extracting the character region C, first, an edge amount in each pixel is calculated, and pixels whose edge amount calculated in each pixel is higher than a predetermined threshold value set in advance prior to image processing are used as elements of the character region C. Set. Thereafter, run smearing is performed as in the first embodiment.

例えば、画素[i,j]におけるエッジ量は、3つのチャンネル(R,G,B)に対して別個に計算されたエッジ量の最大値を求めることにより取得することができる。つまり、画素[i,j]におけるエッジ量は、以下に示す(8)式によって表わすことができる。ここに、特徴量計算手段としての機能が実現される。   For example, the edge amount in the pixel [i, j] can be obtained by obtaining the maximum value of the edge amount separately calculated for the three channels (R, G, B). That is, the edge amount in the pixel [i, j] can be expressed by the following equation (8). Here, the function as the feature amount calculating means is realized.

Figure 2008113446
ただし、S[I;i,j;k]は、低解像度画像(I)のkチャンネルでの画素[i,j]におけるエッジ強度である。
Figure 2008113446
However, S [I; i, j; k] is the edge intensity at pixel [i, j] in the k channel of the low resolution image (I).

このようにして計算されるエッジ量を閾値処理(thr)することにより、規定閾値以上のエッジ量を有する画素が特定されるので、規定閾値以上のエッジ量を有する画素およびこの画素の周囲の画素を文字領域Cとして抽出する。ここに、文字領域抽出手段としての機能が実現される。なお、規定閾値については、予め固定値を設定しても良いし、画像処理プログラムの実行に先立って外部から設定変更できるようにしても良い。   By performing threshold processing (thr) on the edge amount calculated in this way, a pixel having an edge amount equal to or greater than the specified threshold value is specified. Therefore, a pixel having an edge amount equal to or greater than the specified threshold value and pixels surrounding this pixel Is extracted as a character region C. Here, the function as the character area extracting means is realized. Note that the prescribed threshold value may be set in advance, or may be changed from the outside prior to execution of the image processing program.

本実施の形態によれば、黒文字色と下地色(背景色)とを正確に推定することができる。   According to the present embodiment, it is possible to accurately estimate the black character color and the background color (background color).

次に、本発明の第4の実施の形態について説明する。   Next, a fourth embodiment of the present invention will be described.

特に図示しないが、本実施の形態では、図4あるいは図11のステップS4における特徴量の計算と、図4あるいは図11のステップS5における文字領域Cの抽出とを、ウィンドウWの統計量の他に、エッジ量を用いて行なう点が上述した各実施の形態とは異なる。   Although not shown in particular, in the present embodiment, the calculation of the feature amount in step S4 of FIG. 4 or FIG. 11 and the extraction of the character area C in step S5 of FIG. In addition, the point of using the edge amount is different from the above-described embodiments.

特徴量の計算に際しては、第1、第2の実施の形態と同様に、ウィンドウWの統計量とエッジ量とを計算する。ここに、特徴量計算手段としての機能が実現される。   When calculating the feature amount, the statistical amount and edge amount of the window W are calculated as in the first and second embodiments. Here, the function as the feature amount calculating means is realized.

続く、文字領域Cの抽出に際しては、まず、すべてのチャンネルにおいて、信号値が、ウィンドウWの統計量から計算される閾値よりも低い、または、エッジ量が規定閾値よりも高いかを判断する。そして、すべてのチャンネルにおいて、信号値が、ウィンドウWの統計量から計算される閾値よりも低い、または、エッジ量が規定閾値よりも高いと判断した画素およびこの画素の周囲の画素を文字領域Cの要素に設定する。ここに、文字領域抽出手段としての機能が実現される。   In the subsequent extraction of the character region C, it is first determined whether the signal value is lower than the threshold value calculated from the statistics of the window W or the edge amount is higher than the specified threshold value in all channels. Then, in all the channels, the pixel whose signal value is determined to be lower than the threshold value calculated from the statistic of the window W or whose edge amount is higher than the specified threshold value and the surrounding pixels are designated as the character region C. Set to the element. Here, the function as the character area extracting means is realized.

その後、第1の実施の形態と同様にランのsmearingを行なう。   Thereafter, run smearing is performed as in the first embodiment.

本実施の形態によれば、黒文字色と下地色とを正確に推定することができる。   According to the present embodiment, it is possible to accurately estimate the black character color and the background color.

次に、本発明の第5の実施の形態について説明する。   Next, a fifth embodiment of the present invention will be described.

特に図示しないが、本実施の形態では、図4のステップS2における原画像(I)よりも解像度が低い低解像度画像(I)の生成を行なわず、特徴量の計算と文字領域の抽出とを原画像(I)に対して実行する点が、第1、第2または第3の実施の形態とは異なる。 Although not particularly illustrated, in the present embodiment, the calculation of the feature amount and the extraction of the character region are performed without generating the low resolution image (I) having a lower resolution than the original image (I 0 ) in step S2 of FIG. Is different from the first, second or third embodiment in that is executed on the original image (I 0 ).

本実施の形態によれば、低解像度画像(I)の生成を行なわずに特徴量の計算と文字領域の抽出とを原画像(I)に対して実行することにより、低解像度画像(I)の生成処理を省略することが可能となる。
次に、本発明の第6の実施の形態について説明する。本実施の形態は、図4のステップS8における黒文字色の推定方法が第1、第2、第3または第4の実施の形態とは異なる。
According to the present embodiment, the low-resolution image (I) is generated by performing the feature amount calculation and the character region extraction on the original image (I 0 ) without generating the low-resolution image (I). ) Generation processing can be omitted.
Next, a sixth embodiment of the present invention will be described. This embodiment is different from the first, second, third, or fourth embodiment in the black character color estimation method in step S8 of FIG.

(6)'黒文字色と下地色の推定
まず、すべてのブロックBにおいて黒文字領域Cに属する画素をRi1とRi2とに分類する。次に、2つの画素群Ri1とRi2との平均輝度の差が最大になるブロックBを選択し、該ブロックBをウィンドウWとして設定する。そして、設定したウィンドウWにおける画素群Rw1の平均色を原画像(I)の黒文字色とし、ウィンドウWにおける画素群Rw2の平均色を原画像(I)の下地色として設定する。
(6) 'Estimation of Black Character Color and Background Color First, the pixels belonging to the black character region C in all the blocks B are classified into R i1 and R i2 . Next, a block B in which the difference in average luminance between the two pixel groups R i1 and R i2 is maximized is selected, and the block B is set as a window W. Then, the average color of the pixel group R w1 in the set window W is set as the black character color of the original image (I 0 ), and the average color of the pixel group R w2 in the window W is set as the background color of the original image (I 0 ).

加えて、本実施の形態では、階調補正に用いる統計量を、該ウィンドウWで計算する。   In addition, in this embodiment, a statistic used for gradation correction is calculated in the window W.

次に、本発明の第7の実施の形態について説明する。本実施の形態は、第2の実施の形態における階調補正に際して、(6)式の関数に基づいたRGBの各成分を変換することによる階調補正(図14参照)に代えて、(9)式の関数に基づいたRGBの各成分を変換することによる階調補正(図16参照)を行う。   Next, a seventh embodiment of the present invention will be described. In this embodiment, in the tone correction in the second embodiment, instead of tone correction (see FIG. 14) by converting each component of RGB based on the function of equation (6), (9 ) Gradation correction (see FIG. 16) is performed by converting each component of RGB based on the function of the formula.

Figure 2008113446
このように、(9)式の関数に基づいたRGBの各成分を変換することによる階調補正を行うことにより、図17に示すように、背景部分を白に階調変換を施した画像I''を得ることができる。
Figure 2008113446
In this way, by performing gradation correction by converting each component of RGB based on the function of the expression (9), as shown in FIG. 2 '' can be obtained.

なお、本実施の形態では、(9)式に基づいてRGBの各成分を変換するようにしたが、これに限るものではなく、代わりに、以下に示す(10)式を用いてRGBの各成分を変換してもよい。   In the present embodiment, each component of RGB is converted based on the equation (9). However, the present invention is not limited to this. Instead, each component of RGB is converted using the following equation (10). Components may be converted.

Figure 2008113446
なお、本実施の形態の階調補正は、第2の実施の形態に限るものではなく、ステップS20〜S22において第2の実施の形態と同様の処理を実行する第3,4,5,6の実施の形態に適用してもよい。
Figure 2008113446
Note that the gradation correction of the present embodiment is not limited to the second embodiment, and the third, fourth, fifth, and sixth processes that execute the same processing as the second embodiment in steps S20 to S22. It may be applied to the embodiment.

本発明の第1の実施の形態のシステム構築例を示す模式図である。It is a schematic diagram which shows the system construction example of the 1st Embodiment of this invention. パーソナルコンピュータのモジュール構成図である。It is a module block diagram of a personal computer. 画像処理プログラムにしたがってパーソナルコンピュータよって実行される手段を模式的に示す機能ブロック図である。It is a functional block diagram which shows typically the means performed by a personal computer according to an image processing program. この機能ブロック図に含まれる各種の手段の実行手順を示すフローチャートである。It is a flowchart which shows the execution procedure of the various means contained in this functional block diagram. 入力画像を例示する模式図である。It is a schematic diagram which illustrates an input image. 入力画像から抽出された文字領域およびブロック分割を示す模式図である。It is a schematic diagram which shows the character area and block division which were extracted from the input image. ブロック分割した画像から選択されたウィンドウおよび該ウィンドウ内で分類された画素群を示す模式図である。It is a schematic diagram which shows the window selected from the image divided into blocks, and the pixel group classified within the window. 黒文字色と下地色との統計量に基づく階調補正について説明するグラフである。It is a graph explaining the gradation correction based on the statistic of a black character color and a background color. 階調補正後の画像を示す模式図である。It is a schematic diagram which shows the image after gradation correction | amendment. 本発明の第2の実施の形態において画像処理プログラムにしたがってパーソナルコンピュータよって実行される手段を模式的に示す機能ブロック図である。It is a functional block diagram which shows typically the means performed by the personal computer according to the image processing program in the 2nd Embodiment of this invention. この機能ブロック図に含まれる各種の手段の実行手順を示すフローチャートである。It is a flowchart which shows the execution procedure of the various means contained in this functional block diagram. 入力画像を例示する模式図である。It is a schematic diagram which illustrates an input image. 入力画像から背景として抽出された画素を示す模式図である。It is a schematic diagram which shows the pixel extracted as a background from an input image. 背景色との統計量に基づく階調補正について説明するグラフである。It is a graph explaining the gradation correction based on the statistic with the background color. 階調補正後の画像を示す模式図である。It is a schematic diagram which shows the image after gradation correction | amendment. 本発明の第7の実施の形態の背景色との統計量に基づく階調補正について説明するグラフである。It is a graph explaining the gradation correction based on the statistic with the background color of the 7th Embodiment of this invention. 階調補正後の画像を示す模式図である。It is a schematic diagram which shows the image after gradation correction | amendment.

符号の説明Explanation of symbols

301 画像処理装置
306 記憶媒体
1001 低解像度画像生成手段
2002 特徴量計算手段
2003 文字領域抽出手段
2004 背景色推定手段
2005 背景領域抽出手段
3001 文字領域抽出手段
4001 黒文字色/下地色推定手段
5001 階調補正手段
301 Image processing device 306 Storage medium 1001 Low-resolution image generation unit 2002 Feature amount calculation unit 2003 Character region extraction unit 2004 Background color estimation unit 2005 Background region extraction unit 3001 Character region extraction unit 4001 Black character color / background color estimation unit 5001 Gradation correction means

Claims (35)

デジタル画像である原画像から文字領域を抽出する文字領域抽出手段と、
前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに分類するクラス分類手段と、
前記文字領域に属する画素のクラス分類に基づいて前記原画像上の黒文字色と下地色とを推定する黒文字色/下地色推定手段と、
推定された黒文字色と下地色とに基づいて前記原画像に対する階調補正を行なう階調補正手段と、
を具備する画像処理装置。
A character region extracting means for extracting a character region from an original image which is a digital image;
Class classification means for classifying pixels belonging to the character area into a first class and a second class according to color;
A black character color / background color estimation means for estimating a black character color and a background color on the original image based on a class classification of pixels belonging to the character region;
Gradation correction means for performing gradation correction on the original image based on the estimated black character color and background color;
An image processing apparatus comprising:
デジタル画像である原画像から文字領域を抽出する文字領域抽出手段と、
前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに分類するクラス分類手段と、
前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定手段と、
推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定手段と、
特定された背景領域の色を推定された背景色に置換することで前記原画像に対する階調補正を行なう階調補正手段と、
を具備する画像処理装置。
A character region extracting means for extracting a character region from an original image which is a digital image;
Class classification means for classifying pixels belonging to the character area into a first class and a second class according to color;
Background color estimation means for estimating a background color on the original image based on a class classification of pixels belonging to the character area;
Background area specifying means for specifying a background area on the original image based on the estimated background color;
Gradation correction means for performing gradation correction on the original image by replacing the color of the specified background region with the estimated background color;
An image processing apparatus comprising:
デジタル画像である原画像から文字領域を抽出する文字領域抽出手段と、
前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに分類するクラス分類手段と、
前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定手段と、
推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定手段と、
特定された背景領域の色を白色に置換することで前記原画像に対する階調補正を行なう階調補正手段と、
を具備する画像処理装置。
A character region extracting means for extracting a character region from an original image which is a digital image;
Class classification means for classifying pixels belonging to the character area into a first class and a second class according to color;
Background color estimation means for estimating a background color on the original image based on a class classification of pixels belonging to the character area;
Background area specifying means for specifying a background area on the original image based on the estimated background color;
Gradation correction means for performing gradation correction on the original image by replacing the color of the specified background region with white;
An image processing apparatus comprising:
デジタル画像である原画像に対して、特徴量を計算する特徴量計算手段と、
前記特徴量に基づいて、前記原画像から文字領域を抽出する文字領域抽出手段と、
前記原画像をブロック分割するブロック分割手段と、
前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに前記ブロック毎に分類するクラス分類手段と、
前記文字領域に属する画素のクラス分類に基づいて前記原画像上の黒文字色と下地色とを推定する黒文字色/下地色推定手段と、
推定された黒文字色と下地色とに基づいて前記原画像に対する階調補正を行なう階調補正手段と、
を具備する画像処理装置。
A feature amount calculating means for calculating a feature amount for an original image which is a digital image;
A character region extracting means for extracting a character region from the original image based on the feature amount;
Block dividing means for dividing the original image into blocks;
Class classification means for classifying the pixels belonging to the character area into a first class and a second class according to color for each block;
A black character color / background color estimation means for estimating a black character color and a background color on the original image based on a class classification of pixels belonging to the character region;
Gradation correction means for performing gradation correction on the original image based on the estimated black character color and background color;
An image processing apparatus comprising:
デジタル画像である原画像に対して、特徴量を計算する特徴量計算手段と、
前記特徴量に基づいて、前記原画像から文字領域を抽出する文字領域抽出手段と、
前記原画像をブロック分割するブロック分割手段と、
前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに前記ブロック毎に分類するクラス分類手段と、
前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定手段と、
推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定手段と、
特定された背景領域の色を推定された背景色に置換することで前記原画像に対する階調補正を行なう階調補正手段と、
を具備する画像処理装置。
A feature amount calculating means for calculating a feature amount for an original image which is a digital image;
A character region extracting means for extracting a character region from the original image based on the feature amount;
Block dividing means for dividing the original image into blocks;
Class classification means for classifying the pixels belonging to the character area into a first class and a second class according to color for each block;
Background color estimation means for estimating a background color on the original image based on a class classification of pixels belonging to the character area;
Background area specifying means for specifying a background area on the original image based on the estimated background color;
Gradation correction means for performing gradation correction on the original image by replacing the color of the specified background region with the estimated background color;
An image processing apparatus comprising:
デジタル画像である原画像に対して、特徴量を計算する特徴量計算手段と、
前記特徴量に基づいて、前記原画像から文字領域を抽出する文字領域抽出手段と、
前記原画像をブロック分割するブロック分割手段と、
前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに前記ブロック毎に分類するクラス分類手段と、
前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定手段と、
推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定手段と、
特定された背景領域の色を白色に置換することで前記原画像に対する階調補正を行なう階調補正手段と、
を具備する画像処理装置。
A feature amount calculating means for calculating a feature amount for an original image which is a digital image;
A character region extracting means for extracting a character region from the original image based on the feature amount;
Block dividing means for dividing the original image into blocks;
Class classification means for classifying the pixels belonging to the character area into a first class and a second class according to color for each block;
Background color estimation means for estimating a background color on the original image based on a class classification of pixels belonging to the character area;
Background area specifying means for specifying a background area on the original image based on the estimated background color;
Gradation correction means for performing gradation correction on the original image by replacing the color of the specified background region with white;
An image processing apparatus comprising:
前記特徴量計算手段は、
各画素の周囲に設定したウィンドウ内での色信号の平均値および標準偏差を計算し、
前記文字領域抽出手段は、前記ウィンドウ内での色信号の平均値および標準偏差によって設定される閾値に対する該ウィンドウ内での注目画素の色信号値に基づいて、この注目画素およびこの注目画素の周囲の画素を前記文字領域として抽出する請求項4、5または6記載の画像処理装置。
The feature amount calculating means includes:
Calculate the average value and standard deviation of the color signal in the window set around each pixel,
The character region extracting means is configured to detect the target pixel and the surroundings of the target pixel based on the color signal value of the target pixel in the window with respect to a threshold set by an average value and a standard deviation of the color signal in the window. The image processing apparatus according to claim 4, wherein the pixel is extracted as the character region.
前記特徴量計算手段は、
各画素のエッジ量を計算し、
前記文字領域抽出手段は、前記エッジ量が規定閾値以上の画素およびこの画素の周囲の画素を前記文字領域として抽出する請求項4、5または6記載の画像処理装置。
The feature amount calculating means includes:
Calculate the edge amount of each pixel,
The image processing apparatus according to claim 4, 5 or 6, wherein the character region extraction unit extracts pixels having the edge amount equal to or larger than a predetermined threshold and pixels around the pixel as the character region.
前記特徴量計算手段は、
各画素のエッジ量と各画素の周囲に設定したウィンドウ内での色信号の平均値および標準偏差を計算し、
前記文字領域抽出手段は、
前記エッジ量が前記規定閾値以上の画素およびこの画素の周囲の画素と、前記ウィンドウ内での色信号の平均値および標準偏差によって設定される閾値に対する該ウィンドウ内での注目画素の色信号値に基づいて、この注目画素およびこの注目画素の周囲の画素とを前記文字領域として抽出する請求項4、5または6記載の画像処理装置。
The feature amount calculating means includes:
Calculate the average value and standard deviation of the color signal in the window set around each pixel edge amount and each pixel,
The character area extracting means includes:
The color signal value of the pixel of interest in the window with respect to a threshold set by a pixel set with the edge amount equal to or greater than the specified threshold and pixels around the pixel and the average value and standard deviation of the color signals in the window The image processing device according to claim 4, 5 or 6, wherein, based on the pixel of interest and pixels around the pixel of interest, the character region is extracted.
前記クラス分類手段は、
各画素の色信号から計算される輝度に基づいて輝度閾値を取得し、この輝度閾値よりも輝度が低い画素群を前記第1のクラスとし、前記輝度閾値よりも輝度が高い画素群を前記第2のクラスとして分類する請求項1ないし9のいずれか一に記載の画像処理装置。
The class classification means includes:
A luminance threshold is acquired based on the luminance calculated from the color signal of each pixel, a pixel group having a luminance lower than the luminance threshold is defined as the first class, and a pixel group having a luminance higher than the luminance threshold is defined as the first class. The image processing apparatus according to any one of claims 1 to 9, wherein the image processing apparatus is classified into two classes.
前記黒文字色/下地色推定手段は、
前記ブロック毎のクラス分類結果に基づいて、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第1のクラスに属する画素群の平均色を黒文字色とし、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を下地色として推定する請求項4記載の画像処理装置。
The black character color / background color estimation means includes:
Based on the result of class classification for each block, the average color of the pixel group belonging to the first class in the block having the maximum number of pixels belonging to the second class is set to a black character color, and the second class The image processing apparatus according to claim 4, wherein an average color of a pixel group belonging to the second class in the block having the maximum number of pixels belonging is estimated as a background color.
前記背景色推定手段は、
前記ブロック毎のクラス分類結果に基づいて、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を背景色として推定する請求項5または6記載の画像処理装置。
The background color estimation means includes
The average color of the pixel group belonging to the second class in the block having the maximum number of pixels belonging to the second class is estimated as a background color based on the class classification result for each block. The image processing apparatus described.
前記黒文字色/下地色推定手段は、
前記ブロック毎のクラス分類結果に基づいて、前記第1のクラスに属する画素群の平均輝度と前記第2のクラスに属する画素群の平均輝度との差が最大になる前記ブロックにおける前記第1のクラスに属する画素群の平均色を黒文字色とし、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を下地色として推定する請求項4記載の画像処理装置。
The black character color / background color estimation means includes:
Based on the classification result for each block, the first block in the block in which the difference between the average luminance of the pixel group belonging to the first class and the average luminance of the pixel group belonging to the second class is maximized. The average color of the pixel group belonging to the second class in the block in which the average color of the pixel group belonging to the class is a black character color and the number of pixels belonging to the second class is maximum is estimated as the base color. The image processing apparatus described.
前記背景色推定手段は、
前記ブロック毎のクラス分類結果に基づいて、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を背景色として推定する請求項5または6記載の画像処理装置。
The background color estimation means includes
The average color of the pixel group belonging to the second class in the block having the maximum number of pixels belonging to the second class is estimated as a background color based on the class classification result for each block. The image processing apparatus described.
前記階調補正手段は、
前記ブロック毎のクラス分類結果に基づいて、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第1のクラスに属する画素群の輝度の平均値および標準偏差と、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の輝度の平均値および標準偏差とに基づき設定される階調変換曲線に応じて階調補正を行なう請求項10記載の画像処理装置。
The gradation correction means includes
Based on the classification result for each block, the average value and standard deviation of the luminance of the pixel group belonging to the first class in the block in which the number of pixels belonging to the second class is maximized, and the second 11. The gradation correction is performed according to a gradation conversion curve set based on an average value and a standard deviation of luminance of the pixel group belonging to the second class in the block in which the number of pixels belonging to the class is maximum. The image processing apparatus described.
前記階調補正手段は、
前記ブロック毎のクラス分類結果に基づいて、前記第1のクラスに属する画素群の平均輝度と前記第2のクラスに属する画素群の平均輝度との差が最大になる前記ブロックにおける前記第1のクラスに属する画素群の輝度の平均値および標準偏差と、前記第1のクラスに属する画素群の平均輝度と前記第2のクラスに属する画素群の平均輝度との差が最大になる前記ブロックにおける前記第2のクラスに属する画素群の輝度の平均値および標準偏差とに基づき設定される階調変換曲線に応じて階調補正を行なう請求項10記載の画像処理装置。
The gradation correction means includes
Based on the classification result for each block, the first block in the block in which the difference between the average luminance of the pixel group belonging to the first class and the average luminance of the pixel group belonging to the second class is maximized. In the block, the difference between the average value and the standard deviation of the brightness of the pixel group belonging to the class, and the average brightness of the pixel group belonging to the first class and the average brightness of the pixel group belonging to the second class is maximized. The image processing apparatus according to claim 10, wherein gradation correction is performed according to a gradation conversion curve set based on an average value and a standard deviation of luminance of the pixel group belonging to the second class.
前記原画像よりも解像度の低い低解像度画像を生成する低解像度画像生成手段を具備し、
前記特徴量計算手段は、
前記低解像度画像から特徴量を計算し、
前記文字領域抽出手段は、前記低解像度画像から前記文字領域を抽出する請求項1ないし16のいずれか一に記載の画像処理装置。
Comprising low-resolution image generation means for generating a low-resolution image having a lower resolution than the original image,
The feature amount calculating means includes:
Calculating features from the low resolution image;
The image processing apparatus according to claim 1, wherein the character region extraction unit extracts the character region from the low-resolution image.
コンピュータに解釈され、このコンピュータに、
デジタル画像である原画像から文字領域を抽出する文字領域抽出機能と、
前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに分類するクラス分類機能と、
前記文字領域に属する画素のクラス分類に基づいて前記原画像上の黒文字色と下地色とを推定する黒文字色/下地色推定手段と、
推定された黒文字色と下地色とに基づいて前記原画像に対する階調補正を行なう階調補正機能と、
を実行させる画像処理プログラム。
Interpreted by the computer,
A character region extraction function that extracts a character region from an original image that is a digital image;
A class classification function for classifying pixels belonging to the character area into a first class and a second class according to colors;
A black character color / background color estimation means for estimating a black character color and a background color on the original image based on a class classification of pixels belonging to the character region;
A gradation correction function for performing gradation correction on the original image based on the estimated black character color and background color;
An image processing program for executing
コンピュータに解釈され、このコンピュータに、
デジタル画像である原画像から文字領域を抽出する文字領域抽出機能と、
前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに分類するクラス分類機能と、
前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定機能と、
推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定機能と、
特定された背景領域の色を推定された背景色に置換することで前記原画像に対する階調補正を行なう階調補正機能と、
を実行させる画像処理プログラム。
Interpreted by the computer,
A character region extraction function that extracts a character region from an original image that is a digital image;
A class classification function for classifying pixels belonging to the character area into a first class and a second class according to colors;
A background color estimation function for estimating a background color on the original image based on a class classification of pixels belonging to the character area;
A background area specifying function for specifying a background area on the original image based on the estimated background color;
A gradation correction function for performing gradation correction on the original image by replacing the color of the specified background region with the estimated background color;
An image processing program for executing
コンピュータに解釈され、このコンピュータに、
デジタル画像である原画像から文字領域を抽出する文字領域抽出機能と、
前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに分類するクラス分類機能と、
前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定機能と、
推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定機能と、
特定された背景領域の色を白色に置換することで前記原画像に対する階調補正を行なう階調補正機能と、
を実行させる画像処理プログラム。
Interpreted by the computer,
A character region extraction function that extracts a character region from an original image that is a digital image;
A class classification function for classifying pixels belonging to the character area into a first class and a second class according to colors;
A background color estimation function for estimating a background color on the original image based on a class classification of pixels belonging to the character area;
A background area specifying function for specifying a background area on the original image based on the estimated background color;
A gradation correction function for performing gradation correction on the original image by replacing the color of the specified background area with white;
An image processing program for executing
コンピュータに解釈され、このコンピュータに、
デジタル画像である原画像に対して、特徴量を計算する特徴量計算機能と、
前記特徴量に基づいて、前記原画像から文字領域を抽出する文字領域抽出機能と、
前記原画像をブロック分割するブロック分割機能と、
前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに前記ブロック毎に分類するクラス分類機能と、
前記文字領域に属する画素のクラス分類に基づいて前記原画像上の黒文字色と下地色とを推定する黒文字色/下地色推定機能と、
推定された黒文字色と下地色とに基づいて前記原画像に対する階調補正を行なう階調補正機能と、
を実行させる画像処理プログラム。
Interpreted by the computer,
A feature amount calculation function for calculating a feature amount for an original image which is a digital image;
A character region extraction function for extracting a character region from the original image based on the feature amount;
A block division function for dividing the original image into blocks;
A class classification function for classifying pixels belonging to the character area into a first class and a second class according to the color for each block;
A black character color / background color estimation function for estimating a black character color and a background color on the original image based on a class classification of pixels belonging to the character region;
A gradation correction function for performing gradation correction on the original image based on the estimated black character color and background color;
An image processing program for executing
コンピュータに解釈され、このコンピュータに、
デジタル画像である原画像に対して、特徴量を計算する特徴量計算機能と、
前記特徴量に基づいて、前記原画像から文字領域を抽出する文字領域抽出機能と、
前記原画像をブロック分割するブロック分割機能と、
前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに前記ブロック毎に分類するクラス分類機能と、
前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定機能と、
推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定機能と、
特定された背景領域の色を推定された背景色に置換することで前記原画像に対する階調補正を行なう階調補正機能と、
を実行させる画像処理プログラム。
Interpreted by the computer,
A feature amount calculation function for calculating a feature amount for an original image which is a digital image;
A character region extraction function for extracting a character region from the original image based on the feature amount;
A block division function for dividing the original image into blocks;
A class classification function for classifying pixels belonging to the character area into a first class and a second class according to the color for each block;
A background color estimation function for estimating a background color on the original image based on a class classification of pixels belonging to the character area;
A background area specifying function for specifying a background area on the original image based on the estimated background color;
A gradation correction function for performing gradation correction on the original image by replacing the color of the specified background region with the estimated background color;
An image processing program for executing
コンピュータに解釈され、このコンピュータに、
デジタル画像である原画像に対して、特徴量を計算する特徴量計算機能と、
前記特徴量に基づいて、前記原画像から文字領域を抽出する文字領域抽出機能と、
前記原画像をブロック分割するブロック分割機能と、
前記文字領域に属する画素を色に応じて第1のクラスと第2のクラスとに前記ブロック毎に分類するクラス分類機能と、
前記文字領域に属する画素のクラス分類に基づいて前記原画像上の背景色を推定する背景色推定機能と、
推定された背景色に基づいて前記原画像上の背景領域を特定する背景領域特定機能と、
特定された背景領域の色を白色に置換することで前記原画像に対する階調補正を行なう階調補正機能と、
を実行させる画像処理プログラム。
Interpreted by the computer,
A feature amount calculation function for calculating a feature amount for an original image which is a digital image;
A character region extraction function for extracting a character region from the original image based on the feature amount;
A block division function for dividing the original image into blocks;
A class classification function for classifying pixels belonging to the character area into a first class and a second class according to the color for each block;
A background color estimation function for estimating a background color on the original image based on a class classification of pixels belonging to the character area;
A background area specifying function for specifying a background area on the original image based on the estimated background color;
A gradation correction function for performing gradation correction on the original image by replacing the color of the specified background area with white;
An image processing program for executing
前記特徴量計算機能により、各画素の周囲に設定したウィンドウ内での色信号の平均値および標準偏差を計算し、
前記文字領域抽出機能により、前記ウィンドウ内での色信号の平均値および標準偏差によって設定される閾値に対する該ウィンドウ内での注目画素の色信号値に基づいて、この注目画素およびこの注目画素の周囲の画素を前記文字領域として抽出する請求項21、22または23記載の画像処理プログラム。
The feature value calculation function calculates the average value and standard deviation of the color signals in the window set around each pixel,
Based on the color signal value of the target pixel in the window with respect to a threshold set by the average value and standard deviation of the color signal in the window by the character region extraction function, the target pixel and the surroundings of the target pixel 24. The image processing program according to claim 21, 22 or 23, wherein said pixels are extracted as said character area.
前記特徴量計算機能により、各画素のエッジ量を計算し、
前記文字領域抽出機能により、前記エッジ量が規定閾値以上の画素およびこの画素の周囲の画素を前記文字領域として抽出する請求項21、22または23記載の画像処理プログラム。
The feature amount calculation function calculates the edge amount of each pixel,
24. The image processing program according to claim 21, 22 or 23, wherein the character area extraction function extracts pixels having the edge amount equal to or larger than a predetermined threshold and pixels around the pixels as the character area.
前記特徴量計算機能により、各画素のエッジ量と各画素の周囲に設定したウィンドウ内での色信号の平均値および標準偏差とを計算し、
前記文字領域抽出機能により、前記エッジ量が前記規定閾値以上の画素およびこの画素の周囲の画素と、前記ウィンドウ内での色信号の平均値および標準偏差によって設定される閾値に対する該ウィンドウ内での注目画素の色信号値に基づいて、この注目画素およびこの注目画素の周囲の画素とを前記文字領域として抽出する請求項21、22または23記載の画像処理プログラム。
The feature amount calculation function calculates the edge amount of each pixel and the average value and standard deviation of the color signal in a window set around each pixel,
By the character region extraction function, the edge amount in the window with respect to the threshold value set by the average value and the standard deviation of the color signal in the window and the pixels around the pixel and the surrounding pixels of the pixel The image processing program according to claim 21, 22 or 23, wherein the pixel of interest and pixels around the pixel of interest are extracted as the character region based on a color signal value of the pixel of interest.
前記クラス分類機能により、各画素の色信号から計算される輝度に基づいて輝度閾値を取得し、この輝度閾値よりも輝度が低い画素群を前記第1のクラスとし、前記輝度閾値よりも輝度が高い画素群を前記第2のクラスとして分類する請求項18ないし26のいずれか一に記載の画像処理プログラム。   The class classification function obtains a luminance threshold based on the luminance calculated from the color signal of each pixel, sets a pixel group having a luminance lower than the luminance threshold as the first class, and the luminance is higher than the luminance threshold. 27. The image processing program according to claim 18, wherein a high pixel group is classified as the second class. 前記黒文字色/下地色推定機能により、前記ブロック毎のクラス分類結果に基づいて、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第1のクラスに属する画素群の平均色を黒文字色とし、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を下地色として推定する請求項21記載の画像処理プログラム。   Based on the class classification result for each block, the black character color / background color estimation function calculates an average color of the pixel group belonging to the first class in the block having the maximum number of pixels belonging to the second class. The image processing program according to claim 21, wherein an average color of a pixel group belonging to the second class in the block in which the number of pixels belonging to the second class is the maximum is a black character color and is estimated as a background color. 前記背景色推定機能により、前記ブロック毎のクラス分類結果に基づいて、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を背景色として推定する請求項22または23記載の画像処理プログラム。   Based on the result of class classification for each block, the background color estimation function uses the average color of the pixel group belonging to the second class in the block having the maximum number of pixels belonging to the second class as a background color. The image processing program according to claim 22 or 23 to be estimated. 前記黒文字色/下地色推定機能により、前記ブロック毎のクラス分類結果に基づいて、前記第1のクラスに属する画素群の平均輝度と前記第2のクラスに属する画素群の平均輝度との差が最大になる前記ブロックにおける前記第1のクラスに属する画素群の平均色を黒文字色とし、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を下地色として推定する請求項21記載の画像処理プログラム。   Based on the result of class classification for each block, the difference between the average luminance of the pixel group belonging to the first class and the average luminance of the pixel group belonging to the second class is obtained by the black character color / background color estimation function. The average color of the pixel group belonging to the first class in the block having the maximum is a black character color, and the average of the pixel group belonging to the second class in the block having the maximum number of pixels belonging to the second class The image processing program according to claim 21, wherein the color is estimated as a background color. 前記背景色推定機能により、前記ブロック毎のクラス分類結果に基づいて、前記第1のクラスに属する画素群の平均輝度と前記第2のクラスに属する画素群の平均輝度との差が最大になる前記ブロックにおける前記第2のクラスに属する画素群の平均色を背景色として推定する請求項22または23記載の画像処理プログラム。   The background color estimation function maximizes the difference between the average luminance of the pixel group belonging to the first class and the average luminance of the pixel group belonging to the second class based on the class classification result for each block. The image processing program according to claim 22 or 23, wherein an average color of a pixel group belonging to the second class in the block is estimated as a background color. 前記階調補正機能により、前記ブロック毎のクラス分類結果に基づいて、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第1のクラスに属する画素群の輝度の平均値および標準偏差と、前記第2のクラスに属する画素数が最大になる前記ブロックにおける前記第2のクラスに属する画素群の輝度の平均値および標準偏差とに基づき設定される階調変換曲線に応じて階調補正を行なう請求項27記載の画像処理プログラム。   Based on the classification result for each block, the gradation correction function allows the average value and the standard value of the luminance of the pixel group belonging to the first class in the block in which the number of pixels belonging to the second class is maximized. In accordance with the gradation conversion curve set based on the deviation and the average value and standard deviation of the luminance of the pixel group belonging to the second class in the block in which the number of pixels belonging to the second class is maximum. 28. The image processing program according to claim 27, wherein tone correction is performed. 前記階調補正機能により、前記ブロック毎のクラス分類結果に基づいて、前記第1のクラスに属する画素群の平均輝度と前記第2のクラスに属する画素群の平均輝度との差が最大になる前記ブロックにおける前記第1のクラスに属する画素群の輝度の平均値および標準偏差と、前記第1のクラスに属する画素群の平均輝度と前記第2のクラスに属する画素群の平均輝度との差が最大になる前記ブロックにおける前記第2のクラスに属する画素群の輝度の平均値および標準偏差とに基づき設定される階調変換曲線に応じて階調補正を行なう請求項27記載の画像処理プログラム。   The gradation correction function maximizes the difference between the average luminance of the pixel group belonging to the first class and the average luminance of the pixel group belonging to the second class based on the classification result for each block. The difference between the average value and the standard deviation of the luminance of the pixel group belonging to the first class in the block, and the average luminance of the pixel group belonging to the first class and the average luminance of the pixel group belonging to the second class 28. The image processing program according to claim 27, wherein gradation correction is performed according to a gradation conversion curve set on the basis of an average value and a standard deviation of luminance of the pixel group belonging to the second class in the block having the largest value. . 前記原画像よりも解像度の低い低解像度画像を生成する低解像度画像生成機能を前記コンピュータに実行させ、
前記特徴量計算機能により、前記低解像度画像から特徴量を計算し、
前記文字領域抽出機能により、前記低解像度画像から前記文字領域を抽出する請求項18ないし33のいずれか一に記載の画像処理プログラム。
Causing the computer to execute a low-resolution image generation function for generating a low-resolution image having a lower resolution than the original image;
The feature amount calculation function calculates the feature amount from the low-resolution image,
The image processing program according to any one of claims 18 to 33, wherein the character region is extracted from the low-resolution image by the character region extraction function.
請求項18ないし34のいずれか一記載の画像処理プログラムをコンピュータによる読み取り可能に記憶する記憶媒体。   A storage medium for storing the image processing program according to any one of claims 18 to 34 so as to be readable by a computer.
JP2007287738A 2002-09-05 2007-11-05 Image processing apparatus, image processing program, and recording medium Expired - Fee Related JP4350778B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007287738A JP4350778B2 (en) 2002-09-05 2007-11-05 Image processing apparatus, image processing program, and recording medium

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2002259618 2002-09-05
JP2002280789 2002-09-26
JP2003048834 2003-02-26
JP2007287738A JP4350778B2 (en) 2002-09-05 2007-11-05 Image processing apparatus, image processing program, and recording medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2003163565A Division JP4118749B2 (en) 2002-09-05 2003-06-09 Image processing apparatus, image processing program, and storage medium

Publications (3)

Publication Number Publication Date
JP2008113446A true JP2008113446A (en) 2008-05-15
JP2008113446A5 JP2008113446A5 (en) 2008-08-14
JP4350778B2 JP4350778B2 (en) 2009-10-21

Family

ID=39445664

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007287738A Expired - Fee Related JP4350778B2 (en) 2002-09-05 2007-11-05 Image processing apparatus, image processing program, and recording medium

Country Status (1)

Country Link
JP (1) JP4350778B2 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010055558A1 (en) * 2008-11-12 2010-05-20 富士通株式会社 Character area extracting device, image picking-up device provided with character area extracting function and character area extracting program
JP2011142470A (en) * 2010-01-06 2011-07-21 Canon Inc Image processing apparatus, control method, and program
JP2011142471A (en) * 2010-01-06 2011-07-21 Canon Inc Image processing apparatus, control method, and program
JP2013527513A (en) * 2010-03-10 2013-06-27 マイクロソフト コーポレーション Method and system for improving text resolution of text images recognized by optical characters
CN110596746A (en) * 2019-10-17 2019-12-20 中国测试技术研究院辐射研究所 Method for using an automatic test/calibration/verification device for a dose equivalent instrument
JP2020155918A (en) * 2019-03-20 2020-09-24 ブラザー工業株式会社 Image processing apparatus, image processing method, and program
JP7357851B2 (en) 2019-10-29 2023-10-10 京セラドキュメントソリューションズ株式会社 Image processing device, image processing method, and image processing program
JP7357852B2 (en) 2019-10-29 2023-10-10 京セラドキュメントソリューションズ株式会社 Image processing device, image processing method, and image processing program
JP7357853B2 (en) 2019-10-29 2023-10-10 京セラドキュメントソリューションズ株式会社 Image processing device, image processing method, and image processing program
CN110880164B (en) * 2018-09-06 2024-02-27 中兴通讯股份有限公司 Image processing method, device, equipment and computer storage medium

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5229328B2 (en) * 2008-11-12 2013-07-03 富士通株式会社 Character area extraction device, imaging device having character area extraction function, and character area extraction program
US8447113B2 (en) 2008-11-12 2013-05-21 Fujitsu Limited Character area extracting device, imaging device having character area extracting function, recording medium saving character area extracting programs, and character area extracting method
WO2010055558A1 (en) * 2008-11-12 2010-05-20 富士通株式会社 Character area extracting device, image picking-up device provided with character area extracting function and character area extracting program
JP2011142470A (en) * 2010-01-06 2011-07-21 Canon Inc Image processing apparatus, control method, and program
JP2011142471A (en) * 2010-01-06 2011-07-21 Canon Inc Image processing apparatus, control method, and program
KR101795823B1 (en) * 2010-03-10 2017-11-08 지구 홀딩스 리미티드 Text enhancement of a textual image undergoing optical character recognition
JP2013527513A (en) * 2010-03-10 2013-06-27 マイクロソフト コーポレーション Method and system for improving text resolution of text images recognized by optical characters
CN110880164B (en) * 2018-09-06 2024-02-27 中兴通讯股份有限公司 Image processing method, device, equipment and computer storage medium
JP2020155918A (en) * 2019-03-20 2020-09-24 ブラザー工業株式会社 Image processing apparatus, image processing method, and program
JP7207057B2 (en) 2019-03-20 2023-01-18 ブラザー工業株式会社 Image processing device, image processing method, and program
CN110596746A (en) * 2019-10-17 2019-12-20 中国测试技术研究院辐射研究所 Method for using an automatic test/calibration/verification device for a dose equivalent instrument
CN110596746B (en) * 2019-10-17 2024-03-01 中国测试技术研究院辐射研究所 Method for automatic testing/calibrating device using dose equivalent instrument
JP7357851B2 (en) 2019-10-29 2023-10-10 京セラドキュメントソリューションズ株式会社 Image processing device, image processing method, and image processing program
JP7357852B2 (en) 2019-10-29 2023-10-10 京セラドキュメントソリューションズ株式会社 Image processing device, image processing method, and image processing program
JP7357853B2 (en) 2019-10-29 2023-10-10 京セラドキュメントソリューションズ株式会社 Image processing device, image processing method, and image processing program

Also Published As

Publication number Publication date
JP4350778B2 (en) 2009-10-21

Similar Documents

Publication Publication Date Title
JP4118749B2 (en) Image processing apparatus, image processing program, and storage medium
JP4350778B2 (en) Image processing apparatus, image processing program, and recording medium
US7324247B2 (en) Image processing apparatus, image processing program and storage medium storing the program
KR100374019B1 (en) Image processing method and apparatus, image processing system, and storage medium
US7525694B2 (en) Image processing device, image processing method, image processing program, and recording medium
JP4615462B2 (en) Image processing apparatus, image forming apparatus, program, and image processing method
JP4498233B2 (en) Image processing apparatus and image processing method
JP2008011267A (en) Image processor, image processing method, image processing program, and memory medium
US20180288278A1 (en) Image processing apparatus that specifies edge pixel in target image using single-component image data
US8369614B2 (en) Edge control in a digital color image via tone and size dependent dilation of pixels
JP4093413B2 (en) Image processing apparatus, image processing program, and recording medium recording the program
JP5146942B2 (en) CONVERSION METHOD, DEVICE, AND COMPUTER PROGRAM FOR CONVERTING DIGITAL IMAGE OBTAINED BY SCANNER
US7263223B2 (en) Image manipulation according to pixel type
US9338310B2 (en) Image processing apparatus and computer-readable medium for determining pixel value of a target area and converting the pixel value to a specified value of a target image data
JP3689574B2 (en) Image processing method and apparatus, image processing system, and recording medium
JP4249034B2 (en) Halo reduction in space-dependent color gamut mapping
EP0949801B1 (en) Image process apparatus, image process method and storage medium
US7689065B2 (en) Image processing method and apparatus for suppressing positional shift image degradation
JP4059389B2 (en) Image processing apparatus, image processing program, and storage medium
CN105704347A (en) Image processing apparatus and image processing method
JP4169674B2 (en) Image processing apparatus, image processing program, and storage medium
JP6736299B2 (en) Printing device, printing method, and program
US7817303B2 (en) Image processing and image forming with modification of a particular class of colors
JP5067224B2 (en) Object detection apparatus, object detection method, object detection program, and printing apparatus
JP2023030811A (en) Information processing apparatus, extraction processing apparatus, image processing system, control method of information processing apparatus, and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080313

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080321

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080630

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: 20090721

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: 20090722

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

Free format text: PAYMENT UNTIL: 20120731

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4350778

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120731

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130731

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees