Nothing Special   »   [go: up one dir, main page]

JP4584805B2 - Image processing apparatus, image processing method, and image processing program - Google Patents

Image processing apparatus, image processing method, and image processing program Download PDF

Info

Publication number
JP4584805B2
JP4584805B2 JP2005282062A JP2005282062A JP4584805B2 JP 4584805 B2 JP4584805 B2 JP 4584805B2 JP 2005282062 A JP2005282062 A JP 2005282062A JP 2005282062 A JP2005282062 A JP 2005282062A JP 4584805 B2 JP4584805 B2 JP 4584805B2
Authority
JP
Japan
Prior art keywords
color
image
image processing
pixel
category
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005282062A
Other languages
Japanese (ja)
Other versions
JP2007096637A5 (en
JP2007096637A (en
Inventor
史裕 長谷川
幸央 内山
利夫 宮澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2005282062A priority Critical patent/JP4584805B2/en
Publication of JP2007096637A publication Critical patent/JP2007096637A/en
Publication of JP2007096637A5 publication Critical patent/JP2007096637A5/ja
Application granted granted Critical
Publication of JP4584805B2 publication Critical patent/JP4584805B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Color Image Communication Systems (AREA)
  • Image Analysis (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

本発明は、画像処理装置、画像処理方法および画像処理プログラムに関し、特に文書画像の圧縮処理に際しての原稿色種別の判定に関する。
The present invention relates to an image processing apparatus, an image processing method, and an image processing program , and more particularly to determination of a document color type in a document image compression process.

文書画像を取り扱う際に、そのデータサイズが問題となることがある。例えば、大量の文書画像を保存する場合、1画像あたりのデータサイズが大きいほど、一定の記憶領域に対して保存できる画像の数は少なくなってしまう。また、電子メールに文書画像を添付して配布する場合、画像データのサイズが大きければネットワークの負荷もそれだけ高くなり、配布先のメール受信ボックスの記憶容量もそれだけ圧迫することになる。   When a document image is handled, the data size may be a problem. For example, when storing a large amount of document images, the larger the data size per image, the smaller the number of images that can be stored in a certain storage area. In addition, when a document image is attached to an e-mail and distributed, the larger the image data size, the higher the load on the network, and the storage capacity of the mail receiving box at the distribution destination.

カラー画像に対するデータサイズ削減手段としては、JPEG(Joint Photographic Coding Experts Group)のような画像データ圧縮方法が知られているが、文書の可読性に影響しない画質を保った上でのサイズ削減量には限度がある。   Image data compression methods such as JPEG (Joint Photographic Coding Experts Group) are known as data size reduction means for color images. However, the amount of size reduction while maintaining image quality that does not affect the readability of the document There is a limit.

特許文献1、2には、1つのファイルに2枚の圧縮効率の高い多値画像データと可逆圧縮の解像度の高い2値データを持たせ、2枚の多値画像データを解像度の高い2値データ(文字領域)で選択的に画像を切り換えることにより、文字のエッジは2値の解像度で出力することで文字の解像度は高いまま、圧縮効率の高い画像ファイルを作成することを可能とする技術が開示されている。しかし、モノクロで文字のみの原稿である場合は、2枚の多値画像データは不要であるため、圧縮効率が低下してしまう。   In Patent Documents 1 and 2, two multi-value image data with high compression efficiency and binary data with high resolution of reversible compression are provided in one file, and two multi-value image data are binary with high resolution. A technology that enables image files with high compression efficiency to be created while the resolution of characters is high by selectively switching images based on data (character area) so that the edges of characters are output in binary resolution. Is disclosed. However, in the case of a monochrome original only with characters, two pieces of multi-valued image data are unnecessary, and compression efficiency is lowered.

一方、二値画像に対するデータサイズ削減手段としては、MMR(Modified Modified READ(Relative Element ADdress))圧縮のような方法が知られている。そして、文書画像の元となる紙原稿の多くは、紙の色に相当する背景色と、文字の色に相当する前景色からなる二色原稿(例えば白黒)である。従って、二色原稿については、カラー画像としてJPEG圧縮を施して扱うよりも、二値画像としてMMR圧縮を施して扱う方が、一般に画像データサイズははるかに小さくなる。   On the other hand, a method such as MMR (Modified Modified READ (Relative Element ADdress)) compression is known as a data size reduction means for a binary image. Many of the paper originals from which the document image is based are two-color originals (for example, black and white) having a background color corresponding to the paper color and a foreground color corresponding to the character color. Therefore, for a two-color document, the image data size is generally much smaller when the MMR compression is handled as a binary image than when the JPEG compression is handled as a color image.

そこで、特許文献3においては、入力原稿がカラーかモノクロかを判定し、その結果に応じて圧縮方法を切り替えるようにしている。また、特許文献4〜7においては、カラー原稿かモノクロ原稿かを判別し、その結果により紙への印刷手段を変更するようにしている。
特開2002−368986号公報 特許第3193086号公報 特許2791314号公報 特公平6−14213号公報 特開2002−10094号公報 特開平10−155076号公報 特開平8−65530号公報
Therefore, in Patent Document 3, it is determined whether the input document is color or monochrome, and the compression method is switched according to the result. In Patent Documents 4 to 7, a color original or a monochrome original is discriminated, and the printing means for paper is changed according to the result.
JP 2002-368986 A Japanese Patent No. 3193086 Japanese Patent No. 2791314 Japanese Examined Patent Publication No. 6-14213 Japanese Patent Laid-Open No. 2002-10094 JP-A-10-155076 JP-A-8-65530

上述したように、特許文献3においては、入力原稿がカラーかモノクロかを判定し、その結果に応じて圧縮方法を切り替えるようにしていたが、そこでは原稿が表面的に白黒かカラーかを判定するのみであり、白黒以外の二色原稿、例えば着色紙を用いて印刷された原稿等はあくまでカラー原稿として扱われることになる。従って、このような白黒以外の二色原稿についてはカラー原稿として扱われ、圧縮効率の高いMMR圧縮等を使用することができないため、有効な圧縮処理が行えないという問題があった。また、特許文献4〜7など、原稿種の識別を行う技術はいくつかあるが、いずれも圧縮効率は考慮していないものであった。   As described above, in Patent Document 3, it is determined whether the input document is color or monochrome, and the compression method is switched according to the result. In this case, it is determined whether the document is superficially monochrome or color. However, a two-color document other than black and white, for example, a document printed using colored paper, is treated as a color document. Therefore, such a two-color document other than black and white is handled as a color document, and MMR compression with high compression efficiency cannot be used. Therefore, there is a problem that effective compression processing cannot be performed. There are several techniques for identifying the document type, such as Patent Documents 4 to 7, but none of them considers the compression efficiency.

本発明は上記の従来の問題点に鑑み提案されたものであり、その目的とするところは、文書画像を、着色紙を用いて印刷された原稿等を含む、広い範囲の二色原稿と、それ以外のカラー原稿とに分類することができ、分類結果に応じた適切な圧縮方法を選択することのできる画像処理装置、画像処理方法および画像処理プログラムを提供することにある。
The present invention has been proposed in view of the above-described conventional problems, and the object of the present invention is to provide a wide range of two-color originals including originals printed using colored paper, and the like. An object of the present invention is to provide an image processing apparatus, an image processing method, and an image processing program that can be classified into other color originals and can select an appropriate compression method according to the classification result.

上記の課題を解決するため、本発明にあっては、請求項1に記載されるように、カラー画像上の各画素のRGB成分のうちのG成分の値を所定の閾値と比較して二値化することで、前記カラー画像上の各画素を2つのカテゴリに分類するカテゴリ分類手段と、前記カテゴリ分類手段により分類された第1のカテゴリに属する画素を対象として、色の発生頻度が1色に集中している場合には第1の色数を1と算出し、それ以外の場合には第1の色数を2以上と算出する第1の色数算出手段と、前記カテゴリ分類手段により分類された第2のカテゴリに属する画素を対象として、色の発生頻度が1色に集中している場合には第2の色数を1と算出し、それ以外の場合には第2の色数を2以上と算出する第2の色数算出手段と、前記第1の色数と前記第2の色数がともに1である場合は前記カラー画像の原稿色種別を二色原稿であると判定し、それ以外の場合は多色原稿であると判定する原稿色種別判定手段とを備える画像処理装置を要旨としている。 In order to solve the above-described problem, in the present invention, as described in claim 1, the G component value of the RGB components of each pixel on the color image is compared with a predetermined threshold value to obtain two values. The color generation frequency is 1 for the pixel belonging to the first category classified by the category classification means for classifying each pixel on the color image into two categories by the value conversion. A first color number calculating means for calculating the first color number as 1 when concentrated on colors, and a first color number calculating means for calculating the first color number as 2 or more in other cases; For the pixels belonging to the second category classified by the above, the second number of colors is calculated as 1 when the frequency of color occurrence is concentrated in one color, and in the other cases A second color number calculating means for calculating the number of colors to be 2 or more, the first color number and the previous When both of the second colors are 1, it is determined that the original color type of the color image is a two-color original, and in other cases, an original color type determining unit that determines that the original is a multi-color original. The gist is an image processing apparatus.

また、請求項に記載されるように、請求項に記載の画像処理装置において、前記カテゴリ分類手段は、カテゴリの境界部分にあたる画素を分類対象から外す処理を含むものとすることができる。 Further, as described in claim 2, the image processing apparatus according to claim 1, wherein the categorization means may be one that includes a process to remove pixels corresponding to the boundary portion of the categories from the classification target.

また、請求項に記載されるように、請求項に記載の画像処理装置において、前記カテゴリの境界部分にあたる画素は、文字輪郭画素であるものとすることができる。 According to a third aspect of the present invention, in the image processing device according to the second aspect , the pixel corresponding to the boundary portion of the category may be a character outline pixel.

また、請求項に記載されるように、請求項1乃至のいずれか一項に記載の画像処理装置において、前記原稿色種別判定手段は、前記カラー画像が同系色の濃淡からなる濃淡原稿であるか、もしくは前景と背景それぞれ一色ずつからなる二色原稿であるかを判定する処理を含むものとすることができる。 Further, according to a fourth aspect of the present invention, in the image processing apparatus according to any one of the first to third aspects, the original color type determining means is a dark and light original in which the color image is composed of light and shades of similar colors. Or a process for determining whether the foreground and the background are two-color originals each having one color.

また、請求項に記載されるように、請求項1乃至のいずれか一項に記載の画像処理装置において、前記第1の色数算出手段と前記第2の色数算出手段の一方もしくは両方は、前記カラー画像をサブ領域に分割し、各サブ領域において当該カテゴリに属する当該サブ領域内の各画素を対象とした平滑化処理を含むものとすることができる。 In addition, as described in claim 5 , in the image processing apparatus according to any one of claims 1 to 4 , one of the first color number calculation unit and the second color number calculation unit or Both can include a smoothing process that divides the color image into sub-regions and targets each pixel in the sub-region belonging to the category in each sub-region.

また、請求項に記載されるように、請求項に記載の画像処理装置において、前記サブ領域への分割は、画像の周縁部を除いて行うものとすることができる。 In addition, as described in claim 6 , in the image processing apparatus according to claim 5 , the division into the sub-regions can be performed except for a peripheral portion of the image.

また、請求項7に記載されるように、カラー画像上の各画素のRGB成分のうちのG成分の値を所定の閾値と比較して二値化することで、前記カラー画像上の各画素を2つのカテゴリに分類するステップと、分類された第1のカテゴリに属する画素を対象として、色の発生頻度が1色に集中している場合には第1の色数を1と算出し、それ以外の場合には第1の色数を2以上と算出するステップと、分類された第2のカテゴリに属する画素を対象として、色の発生頻度が1色に集中している場合には第2の色数を1と算出し、それ以外の場合には第2の色数を2以上と算出するステップと、前記第1の色数と前記第2の色数がともに1である場合は前記カラー画像の原稿色種別を二色原稿であると判定し、それ以外の場合は多色原稿であると判定するステップとを備える画像処理方法として構成することができる。 In addition, as described in claim 7, each pixel on the color image is binarized by comparing the value of the G component of the RGB components of each pixel on the color image with a predetermined threshold value. For the pixels belonging to the classified first category, and when the color occurrence frequency is concentrated in one color, the first color number is calculated as 1, In other cases, the step of calculating the number of first colors as 2 or more and the case where the color occurrence frequency is concentrated on one color for the pixels belonging to the classified second category are the first. The number of colors of 2 is calculated as 1; otherwise, the step of calculating the number of second colors as 2 or more, and when both the first number of colors and the second number of colors are 1, The original color type of the color image is determined to be a two-color original, otherwise it is a multi-color original. It can be configured as an image processing method comprising the steps of: a constant.

また、請求項に記載されるように、請求項に記載の画像処理方法において、前記入力されたカラー画像上の各画素を2つのカテゴリに分類するステップは、カテゴリの境界部分にあたる画素を分類対象から外す処理を含むものとすることができる。 In addition, as described in claim 8 , in the image processing method according to claim 7 , the step of classifying each pixel on the input color image into two categories includes a pixel corresponding to a boundary portion of the category. It can include a process of removing from the classification target.

また、請求項に記載されるように、請求項に記載の画像処理方法において、前記カテゴリの境界部分にあたる画素は、文字輪郭画素であるものとすることができる。 In addition, as described in claim 9 , in the image processing method according to claim 8 , the pixel corresponding to the boundary portion of the category may be a character outline pixel.

また、請求項10に記載されるように、請求項乃至のいずれか一項に記載の画像処理方法において、前記原稿色種別を判定するステップは、前記カラー画像が同系色の濃淡からなる濃淡原稿であるか、もしくは前景と背景それぞれ一色ずつからなる二色原稿であるかを判定する処理を含むものとすることができる。 In addition, as described in claim 10 , in the image processing method according to any one of claims 7 to 9 , in the step of determining the document color type, the color image is composed of shades of similar colors. It is possible to include a process for determining whether the original is a gray original or a two-color original consisting of one foreground and one background.

また、請求項11に記載されるように、請求項乃至10のいずれか一項に記載の画像処理方法において、前記第1の色数を算出するステップと前記第2の色数を算出するステップの一方もしくは両方は、前記カラー画像をサブ領域に分割し、各サブ領域において当該カテゴリに属する当該サブ領域内の各画素を対象とした平滑化処理を含むものとすることができる。 In addition, as described in claim 11 , in the image processing method according to any one of claims 7 to 10 , the step of calculating the first number of colors and the number of second colors are calculated. One or both of the steps may include a smoothing process that divides the color image into sub-regions and targets each pixel in the sub-region belonging to the category in each sub-region.

また、請求項12に記載されるように、請求項11に記載の画像処理方法において、前記サブ領域への分割は、画像の周縁部を除いて行うものとすることができる。 In addition, as described in claim 12 , in the image processing method according to claim 11 , the division into the sub-regions can be performed except for a peripheral portion of the image.

また、請求項13に記載されるように、請求項乃至12のいずれか一項に記載の各ステップをコンピュータ上で実行する画像処理プログラムとして構成することができる。 Further, as described in claim 13 , it is possible to configure as an image processing program for executing each step described in any one of claims 7 to 12 on a computer.

本発明の画像処理装置、画像処理方法および画像処理プログラムにあっては、着色紙に印刷された原稿等を含む、さまざまな二色原稿の入力に対して、当該入力画像を二色原稿であると判定することができる。更に、原稿色種別に応じた適切な出力画像を構成することで、効率よくデータサイズを削減することができる。 In the image processing apparatus, the image processing method, and the image processing program of the present invention, the input image is a two-color original for the input of various two-color originals including an original printed on colored paper. Can be determined. Furthermore, by configuring an appropriate output image according to the original color type, the data size can be efficiently reduced.

以下、本発明の好適な実施形態につき図面を参照して説明する。   Preferred embodiments of the present invention will be described below with reference to the drawings.

図1は本発明の画像処理装置の構成例を示す図である。図1において、画像処理装置1は、カラー画像データを蓄積するカラー画像バッファ11と、処理の過程で作成される二値化された二値画像データを蓄積する二値画像バッファ12と、元原稿からカラー画像データに変換するスキャナー等からなるカラー画像入力部13と、カラー画像の原稿色種別を判定する原稿色種別判定部14と、原稿色種別にもとづいて出力画像の構成方法を決定する出力画像構成方法決定部15と、決定された方法で出力画像を構成する出力画像構成部16とを備えている。動作にあっては、カラー画像入力部13は元原稿からカラー画像データに変換し、カラー画像をカラー画像バッファ11に蓄える。原稿色種別判定部14は処理の過程で二値画像データを作成し、二値画像データを二値画像バッファ12に蓄える。そして、原稿色種別判定部14はカラー画像の原稿色種別を判定し、出力画像構成方法決定部15は原稿色種別にもとづいて出力画像の構成方法を決定し、出力画像構成部16は決定された方法で出力画像を構成し、ここから出力画像を出力する。   FIG. 1 is a diagram illustrating a configuration example of an image processing apparatus according to the present invention. In FIG. 1, an image processing apparatus 1 includes a color image buffer 11 for storing color image data, a binary image buffer 12 for storing binarized binary image data created in the process, and an original document. A color image input unit 13 comprising a scanner or the like for converting from color to image data, an original color type determining unit 14 for determining the original color type of the color image, and an output for determining an output image configuration method based on the original color type An image configuration method determining unit 15 and an output image configuration unit 16 that configures an output image by the determined method are provided. In operation, the color image input unit 13 converts the original document into color image data, and stores the color image in the color image buffer 11. The document color type determination unit 14 creates binary image data in the course of processing, and stores the binary image data in the binary image buffer 12. Then, the document color type determination unit 14 determines the document color type of the color image, the output image configuration method determination unit 15 determines the output image configuration method based on the document color type, and the output image configuration unit 16 is determined. The output image is constructed by the method described above, and the output image is output therefrom.

図2は原稿色種別判定部14の構成例を示す図である。図2において、原稿色種別判定部14は、カラー画像バッファ11上のカラー画像データを二値化する二値化部141と、カラー画像バッファ11と二値画像バッファ12上の内容にもとづいて背景色数を算出する背景色数算出部142と、カラー画像バッファ11と二値画像バッファ12上の内容にもとづいて前景色数を算出する前景色数算出部143と、背景色数と前景色数から入力画像の原稿色種別を判定する原稿色種別判定部144とを備えている。動作にあっては、二値化部141はカラー画像バッファ11上のカラー画像データを二値化し、二値画像データを二値画像バッファ12に蓄える。背景色数算出部142はカラー画像バッファ11と二値画像バッファ12上の内容にもとづいて背景色数を算出し、同様に、前景色数算出部143は前景色数を算出する。そして、原稿色種別判定部144は背景色数と前景色数から入力画像の原稿色種別を判定し、原稿色種別を出力する。 図3は画像処理装置1のハードウェア構成例を示す図である。図3において、画像処理装置1は、CPU101、メモリ102、ハードディスク103、通信装置104、スキャナ105、ディスプレイ106、キーボード107、CD−ROMドライブ108を備えている。本発明の処理を実行するプログラムは、CD−ROM109等の記録媒体や通信装置104を介したネットワーク経由で、画像処理装置1内のハードディスク103に保存される。プログラムの実行が指示されると、プログラム・コードその他の必要な資源がメモリ102上にロードされ、記述された内容に沿ってCPU101によりプログラムが実行される。入力画像は、スキャナ105や、あるいはCD−ROM109等の記録媒体や通信装置104を介したネットワーク経由で、直接もしくは一旦ハードディスク103への保存を経てメモリ102上へロードされる。プログラムの実行結果はディスプレイ106に出力され、あるいはハードディスク103に保存され、あるいは通信装置104を介してネットワークへ送出される。   FIG. 2 is a diagram illustrating a configuration example of the document color type determination unit 14. In FIG. 2, the document color type determination unit 14 is based on the binarization unit 141 that binarizes the color image data on the color image buffer 11, and the contents on the color image buffer 11 and the binary image buffer 12. A background color number calculation unit 142 that calculates the number of colors, a foreground color number calculation unit 143 that calculates the number of foreground colors based on the contents on the color image buffer 11 and the binary image buffer 12, and the number of background colors and the number of foreground colors A document color type determination unit 144 that determines the document color type of the input image. In operation, the binarization unit 141 binarizes the color image data on the color image buffer 11 and stores the binary image data in the binary image buffer 12. The background color number calculation unit 142 calculates the number of background colors based on the contents of the color image buffer 11 and the binary image buffer 12, and similarly, the foreground color number calculation unit 143 calculates the foreground color number. Then, the document color type determination unit 144 determines the document color type of the input image from the number of background colors and the number of foreground colors, and outputs the document color type. FIG. 3 is a diagram illustrating a hardware configuration example of the image processing apparatus 1. In FIG. 3, the image processing apparatus 1 includes a CPU 101, a memory 102, a hard disk 103, a communication device 104, a scanner 105, a display 106, a keyboard 107, and a CD-ROM drive 108. A program for executing the processing of the present invention is stored in the hard disk 103 in the image processing apparatus 1 via a recording medium such as the CD-ROM 109 or a network via the communication apparatus 104. When the execution of the program is instructed, the program code and other necessary resources are loaded onto the memory 102, and the program is executed by the CPU 101 in accordance with the described contents. The input image is loaded onto the memory 102 directly or temporarily stored in the hard disk 103 via a network via the recording medium such as the scanner 105 or the CD-ROM 109 or the communication device 104. The execution result of the program is output to the display 106, stored in the hard disk 103, or transmitted to the network via the communication device 104.

以下、本発明の処理内容につき説明する。   Hereinafter, processing contents of the present invention will be described.

<第1の実施形態>
図4は第1の実施形態にかかる原稿色種別判定処理を示すフローチャートである。以下、図4に沿って、入力画像が前景1色と背景1色からなる二色原稿か、そうでないかを判定する例について述べる。
<First Embodiment>
FIG. 4 is a flowchart showing document color type determination processing according to the first embodiment. In the following, an example of determining whether an input image is a two-color original composed of one foreground color and one background color or not is described with reference to FIG.

今、各々0(輝度ゼロ)〜255(最高輝度)の範囲の画素値を持つRGB(Red.Green,Blue)成分からなるカラーのデジタル画像が入力されたとすると、まず入力画像のG成分と固定の閾値「110」との比較により二値画像を作成する(ステップS101)。すなわち、
G≦110 → 黒画素
G>110 → 白画素
とする。なお、この二値化方法はあくまで例であって、既知の判別分析法等を用いて閾値を動的に決定してもよい。
Now, assuming that a color digital image composed of RGB (Red. Green, Blue) components each having a pixel value in the range of 0 (zero luminance) to 255 (maximum luminance) is input, first the G component of the input image is fixed. A binary image is created by comparison with the threshold value “110” (step S101). That is,
G ≦ 110 → black pixel G> 110 → white pixel. This binarization method is merely an example, and the threshold value may be dynamically determined using a known discriminant analysis method or the like.

二値化の結果、入力画像上の画素は黒(前景)/白(背景)という2つのカテゴリに分類される。   As a result of the binarization, pixels on the input image are classified into two categories of black (foreground) / white (background).

続いて、得られた二値画像の白画素に対応する入力画像上の画素を対象に、背景色数を判定する(ステップS102)。ここでは、RGBの各成分をそれぞれ3段階ずつに量子化して、対応するインデックス(Ri,Gi,Bi)を得る。すなわち、
Ri=R*3/256
Gi=G*3/256
Bi=B*3/256
とする。
Subsequently, the number of background colors is determined for the pixel on the input image corresponding to the white pixel of the obtained binary image (step S102). Here, each component of RGB is quantized in three stages to obtain corresponding indexes (R i , G i , B i ). That is,
R i = R * 3/256
G i = G * 3/256
B i = B * 3/256
And

いずれも小数点以下切り捨てると、インデックスの取り得る値は、
0≦Ri≦2
0≦Gi≦2
0≦Bi≦2
の範囲の整数となる。
If both are rounded down, the possible index values are
0 ≦ R i ≦ 2
0 ≦ G i ≦ 2
0 ≦ B i ≦ 2
An integer in the range of.

二値画像の白画素に対応する入力画像上の画素を対象に、インデックス(Ri,Gi,Bi)の発生頻度の分布fB(Ri,Gi,Bi)を求めることができ、背景色に相当するインデックスに過半数の頻度が集中していれば背景は1色、そうでなければ背景は2色以上と判定する。すなわち、
(1)ある1つのインデックス(x,y,z)に対し、
fB(x,y,z)>0.5*Σ[Ri=0,1,2]Σ[Gi=0,1,2]Σ[Bi=0,1,2]fB(Ri,Gi,Bi)
が成り立つならば、背景色数=1
(2)上記(1)に該当しない場合は、背景色数=2以上
とする。
It is possible to obtain the distribution f B (R i , G i , B i ) of the occurrence frequency of the index (R i , G i , B i ) for the pixels on the input image corresponding to the white pixels of the binary image. If a majority of the frequencies are concentrated on the index corresponding to the background color, it is determined that the background is one color, and if not, the background is two or more colors. That is,
(1) For one index (x, y, z)
f B (x, y, z)> 0.5 * Σ [R i = 0,1,2] Σ [G i = 0,1,2] Σ [B i = 0,1,2] f B (Ri, Gi, Bi)
If this holds, the number of background colors = 1
(2) If the above (1) is not met, the number of background colors is 2 or more.

同様に、二値画像の黒画素に対応する入力画像上の画素を対象に、インデックス(Ri,Gi,Bi)の発生頻度の分布fF(Ri,Gi,Bi)を求めることができる。そして、前景色に相当するインデックスに過半数の頻度が集中していれば前景色は1色、そうでなければ前景色は2色以上と判定する。すなわち、
(1)ある1つのインデックス(x,y,z)に対し、
fF(x,y,z)>0.5*Σ[Ri=0,1,2]Σ[Gi=0,1,2]Σ[Bi=0,1,2]fF(Ri,Gi,Bi)
が成り立つならば、前景色数=1
(2)上記(1)に該当しない場合は、前景色数=2以上
とする(ステップS103)。
Similarly, the distribution f F (R i , G i , B i ) of the occurrence frequency of the index (R i , G i , B i ) is targeted for the pixel on the input image corresponding to the black pixel of the binary image. Can be sought. If the majority of the frequencies are concentrated in the index corresponding to the foreground color, it is determined that the foreground color is one color, and if not, the foreground color is determined to be two or more colors. That is,
(1) For one index (x, y, z)
f F (x, y, z)> 0.5 * Σ [R i = 0,1,2] Σ [G i = 0,1,2] Σ [B i = 0,1,2] f F (R i , G i , B i )
If foreground color number = 1
(2) If the above (1) is not satisfied, the number of foreground colors is set to 2 or more (step S103).

こうして背景色数と前景色数を求めた後、次のようにして原稿色種別を判定する(ステップS104)。
(1)前景色数=1、かつ、背景色数=1ならば二色原稿(ステップS105)
(2)上記(1)に該当しなければ多色原稿(ステップS106)
このように、前景と背景を個別に色数判定することにより、互いの色分布を混同することがなく、より正確に原稿色種別を判定することができる。
After obtaining the number of background colors and the number of foreground colors in this way, the document color type is determined as follows (step S104).
(1) If the number of foreground colors = 1 and the number of background colors = 1, a two-color document (step S105)
(2) If the above (1) is not met, the multicolor document (step S106)
In this way, by determining the number of colors for the foreground and the background separately, it is possible to more accurately determine the document color type without confusing each other's color distribution.

<第2の実施形態>
図5は第2の実施形態にかかる原稿色種別判定処理を示すフローチャートである。上述した第1の実施形態とほとんど同じであるため、第1の実施形態との差異についてのみ説明する。
<Second Embodiment>
FIG. 5 is a flowchart showing document color type determination processing according to the second embodiment. Since it is almost the same as the first embodiment described above, only the difference from the first embodiment will be described.

第1の実施形態との違いは、入力カラー画像から二値画像を作成(ステップS201)した後、背景色数や前景色数を算出(ステップS203、S204)する前に、黒画素/白画素の太め処理(ステップS202)を行うことである。   The difference from the first embodiment is that after creating a binary image from an input color image (step S201), before calculating the number of background colors and the number of foreground colors (steps S203 and S204), black pixels / white pixels Is a thickening process (step S202).

原稿色種別とかかわりなく、一般にカラー画像に含まれる文字パターンの輪郭部付近は、図6に示すように、前景から背景に向かって、数画素にわたって段階的に画素値が変化している。このため文字輪郭部の画素値を背景色数や前景色数の算出対象に含めると、RGBインデックスの発生頻度分布が広い範囲にわたることにつながり、二色原稿を多色と誤認する一因となる。   Regardless of the document color type, the pixel value generally changes in steps over several pixels from the foreground to the background as shown in FIG. 6 near the outline of the character pattern included in the color image. For this reason, if the pixel value of the character outline part is included in the calculation target of the number of background colors and the number of foreground colors, the occurrence frequency distribution of the RGB index extends over a wide range, which is a cause of misidentifying a two-color document as multicolor. .

そこで、例えば図7(a)のような二値画像が得られた後、二値画像上の各黒画素を中心に、3×3画素の範囲を黒画素で置き換える処理を施して、同図(b)のような黒画素太め処理結果画像を得る。同様に、二値画像上の各白画素を中心に、3×3画素の範囲を白画素で置き換える処理を施して、同図(c)のような白画素太め処理結果画像を得る。   Therefore, for example, after a binary image as shown in FIG. 7A is obtained, a process of replacing a 3 × 3 pixel range with a black pixel around each black pixel on the binary image is performed. A black pixel thickening processing result image as shown in (b) is obtained. Similarly, processing for replacing the 3 × 3 pixel range with white pixels is performed around each white pixel on the binary image to obtain a white pixel thickening processing result image as shown in FIG.

そして黒画素太め処理結果における白画素部分を背景領域、白画素太め処理結果における黒画素部分を前景領域とする。それらのいずれにも該当しない、前景領域と背景領域の境界にあたる文字輪郭画素は分類対象外となる。   The white pixel portion in the black pixel thickening processing result is set as the background region, and the black pixel portion in the white pixel thickening processing result is set as the foreground region. Character outline pixels that fall under the boundary between the foreground region and the background region, which do not correspond to any of them, are not classified.

図5における後段の背景色数算出(ステップS203)においては、背景領域に属する画素(図7(d)の黒太線内)を対象とするようにし、前景色数算出(ステップS204)においては、前景領域に属する画素(図7(e)の白太線内)を対象とする。こうして文字輪郭部の影響を受けにくくすることができる。   In the subsequent background color number calculation in FIG. 5 (step S203), pixels belonging to the background area (inside the thick black line in FIG. 7D) are targeted, and in the foreground color number calculation (step S204), A pixel belonging to the foreground area (within the white thick line in FIG. 7E) is targeted. In this way, it is possible to reduce the influence of the character outline portion.

<第3の実施形態>
図8は第3の実施形態にかかる原稿色種別判定処理を示すフローチャートである。
<Third Embodiment>
FIG. 8 is a flowchart showing document color type determination processing according to the third embodiment.

入力されたカラー画像から二値画像を作成(ステップS301)し、背景色数と前景色数を算出(ステップS302、S303)するステップまでは第1の実施形態と同じであるため、その部分の説明は割愛する。   The steps up to the step of creating a binary image from the input color image (step S301) and calculating the number of background colors and the number of foreground colors (steps S302 and S303) are the same as those in the first embodiment. I will omit the explanation.

前景色数・背景色数が共に1であっても、原稿が中間的な輝度を含むグレースケールである場合、前景=黒・背景=白の二色原稿に分類することには実用上、違和感があるかもしれない。そこで、背景色数と前景色数を求めた後、次のようにして原稿色種別を一次判定する(ステップS304)。
(1)前景色数=1、かつ、背景色数=1ならば、二色原稿または濃淡原稿
(2)上記(1)に該当しない場合は、多色原稿
(2)に該当する場合はここで多色原稿として結果を確定し(ステップS305)、(1)に該当する場合はさらに以下の二次判定へ進む。
Even if the number of foreground colors and the number of background colors are both 1, if the original is a gray scale with intermediate brightness, it is practically uncomfortable to classify it as a two-color original with foreground = black and background = white. There may be. Therefore, after obtaining the number of background colors and the number of foreground colors, the original color type is primarily determined as follows (step S304).
(1) If the number of foreground colors = 1 and the number of background colors = 1, a two-color original or a dark original
(2) If the above (1) does not apply, multicolor original
If the condition corresponds to (2), the result is confirmed as a multicolor original (step S305). If the condition corresponds to (1), the process proceeds to the following secondary determination.

二値画像の黒画素に対応するカラー画像上の各画素を対象に、先述のG成分に関するインデックスGiの発生頻度分布を、前景輝度分布IF(Gi)として求める(ステップS306)。 For each pixel on the color image corresponding to the black pixel of the binary image, the occurrence frequency distribution of the index G i related to the G component described above is obtained as the foreground luminance distribution I F (G i ) (step S306).

同様に、二値画像の白画素に対応するカラー画像上の各画素を対象に、背景輝度分布IB(Gi)を求める(ステップS307)。そして、前景輝度分布と背景輝度分布の重ね合わせにより全体輝度分布I(Gi)を得る(ステップS308)。すなわち、
I(Gi)=IF(Gi)+IB(Gi) (Gi=0,1,2)
とする。
Similarly, the background luminance distribution I B (G i ) is obtained for each pixel on the color image corresponding to the white pixel of the binary image (step S307). Then, an overall luminance distribution I (Gi) is obtained by superimposing the foreground luminance distribution and the background luminance distribution (step S308). That is,
I (G i ) = I F (G i ) + I B (G i ) (G i = 0,1,2)
And

そして、中間輝度にあたるI(1)に過半数の頻度が集中していれば濃淡原稿、そうでなければ二色原稿と判定する(ステップS309)。すなわち、
(1) I(1)>I(0)+I(2)が成り立つならば、濃淡原稿(ステップS310)
(2) I(1)≦I(0)+I(2)が成り立つならば、二色原稿(ステップS311)
とする。
If a majority of the frequencies are concentrated on I (1) corresponding to the intermediate luminance, it is determined that the original is a light and dark original, and if not, it is determined as a two-color original (step S309). That is,
(1) If I (1)> I (0) + I (2) is satisfied, the dark and light original (step S310)
(2) If I (1) ≦ I (0) + I (2) holds, a two-color original (step S311)
And

これにより、入力画像を多色原稿・濃淡原稿・二色原稿に分類することができ、より詳細な原稿色種別を得ることが可能となる。   As a result, the input image can be classified into a multicolor original, a dark original, and a two-color original, and a more detailed original color type can be obtained.

<第4の実施形態>
図9は第4の実施形態にかかる原稿色種別判定処理を示すフローチャートである。上述した第1の実施形態とほとんど同じであるため、第1の実施形態との差異についてのみ説明する。
<Fourth Embodiment>
FIG. 9 is a flowchart showing document color type determination processing according to the fourth embodiment. Since it is almost the same as the first embodiment described above, only the difference from the first embodiment will be described.

第1の実施形態との違いは、入力カラー画像から二値画像を作成(ステップS401)した後、背景色数や前景色数を算出(ステップS403、S404)する前に、カラー画像の平滑化処理(ステップS402)を行うことである。   The difference from the first embodiment is that after a binary image is created from an input color image (step S401), the color image is smoothed before calculating the number of background colors and the number of foreground colors (steps S403 and S404). The process (step S402) is performed.

平滑化処理として、まずカラー画像を8×8画素毎のサブ領域に分割する。その際、画像の周縁部30画素分の幅を除いておく。図10は周縁部30画素分を除いて左下を起点にサブ領域分割を行っており、画像サイズによっては分割の右端や上端の列に関して、幅・高さが8画素に満たないこともある。   As a smoothing process, first, a color image is divided into sub-regions every 8 × 8 pixels. At that time, the width corresponding to 30 pixels in the peripheral portion of the image is removed. In FIG. 10, sub-region division is performed starting from the lower left except for the 30 pixels in the peripheral portion. Depending on the image size, the width / height of the division at the right end or upper end of the division may be less than 8 pixels.

着色紙原稿をスキャナで読み取ると、図11(a)に示すようなパンチ穴や同図(b)に示すようなスキャン時の原稿の傾き・ずれによって、白や黒のノイズ領域が周縁部に現れることがあり、原稿色種別を誤認する一因となる。そこで、周縁部をサブ領域分割対象から除くことにより、これらノイズの影響を受けにくいようにしている。   When a colored paper document is read by a scanner, white and black noise areas are formed at the peripheral edge due to punch holes as shown in FIG. 11A and inclination / deviation of the document during scanning as shown in FIG. May appear and contribute to misidentifying the original color type. Therefore, by removing the peripheral portion from the sub-region division target, it is made difficult to be affected by these noises.

各々のサブ領域について、二値画像の白画素(背景)に対応する当該サブ領域k上の画素iが持つRGB画素値を(R(k,i),G(k,i),B(k,i))として、サブ領域k・背景相当部分の平均画素値(Rmean(k), Gmean(k), Bmean(k))を求める。すなわち、
Rmean(k)=Σ[i]R(k,i)/Σ[i]1
Gmean(k)=Σ[i]G(k,i)/Σ[i]1
Bmean(k)=Σ[i]B(k,i)/Σ[i]1
とする。
For each sub-region, the RGB pixel values of the pixel i on the sub-region k corresponding to the white pixel (background) of the binary image are represented by (R (k, i), G (k, i), B (k , i)), the average pixel value (R mean (k), G mean (k), B mean (k)) of the sub-region k / background equivalent portion is obtained. That is,
R mean (k) = Σ [i] R (k, i) / Σ [i] 1
G mean (k) = Σ [i] G (k, i) / Σ [i] 1
B mean (k) = Σ [i] B (k, i) / Σ [i] 1
And

そしてサブ領域k・背景相当部分のすべての画素値を平均画素値で置き換える。すなわち、
R(k,i) ← Rmean(k)
G(k,i) ← Gmean(k)
B(k,i) ← Bmean(k)
とする。
Then, all pixel values in the sub-region k / background equivalent portion are replaced with the average pixel value. That is,
R (k, i) ← R mean (k)
G (k, i) ← G mean (k)
B (k, i) ← B mean (k)
And

同様に、二値画像の黒画素(前景)に対応するサブ領域k上のすべての画素値を、サブ領域k・前景相当部分の平均画素値で置き換える。すなわち、jを二値画像上の黒画素に相当する各画素として、
R(k,j) ← Σ[j] R(k,j) / Σ[j]1
G(k,j) ← Σ[j] G(k,j) / Σ[j]1
B(k,j) ← Σ[j] B(k,j) / Σ[j]1
とする。
Similarly, all pixel values on the sub-region k corresponding to the black pixels (foreground) of the binary image are replaced with the average pixel values of the sub-region k and the foreground equivalent portion. That is, j is each pixel corresponding to a black pixel on the binary image,
R (k, j) ← Σ [j] R (k, j) / Σ [j] 1
G (k, j) ← Σ [j] G (k, j) / Σ [j] 1
B (k, j) ← Σ [j] B (k, j) / Σ [j] 1
And

こうしてサブ領域毎の平滑化処理を行った後、背景色数・前景色数を算出する。   After performing the smoothing process for each sub-region in this way, the number of background colors and the number of foreground colors are calculated.

スキャン時に発生する画素毎の画素値揺らぎや、カラー画像を非可逆圧縮(例えばJPEG形式で保存する等)した場合に発生する画素毎の画素値変化によって、カラー画像の色成分の分布は原稿の実態に比べて幅広くなる。つまりRGBインデックスの発生頻度分布が広い範囲にわたることにつながり、二色原稿を多色と誤認する一因となっている。   The distribution of the color components of the color image is determined by the fluctuation of the pixel value for each pixel that occurs during scanning and the change in the pixel value for each pixel that occurs when the color image is irreversibly compressed (for example, stored in JPEG format) It becomes wider than the actual situation. That is, the occurrence frequency distribution of the RGB index extends over a wide range, which is a cause of misidentifying a two-color document as multicolor.

このようなサブ領域単位の平滑化処理を行うことで、前景色・背景色が局所的に統一され、画素毎の画素値揺らぎや変化からくる色成分分布の広がりが抑えられるので、二色原稿を多色と誤認するおそれを低減できる。   By performing smoothing processing in units of sub-regions, the foreground color and background color are locally unified, and the spread of the color component distribution resulting from pixel value fluctuation and change for each pixel is suppressed. The risk of misidentifying as multicolor can be reduced.

<第5の実施形態>
図12は第5の実施形態にかかる原稿色種別に応じた出力画像構成処理を示すフローチャートである。二色原稿の場合、入力されたカラー画像をそのままフルカラーの画像として保存するよりも、前景色=ONビット・背景色=OFFビットからなる二値画像として適切な圧縮を施して保存する方がデータサイズはずっと小さくなるため、二色原稿と判断された場合には前景色情報および背景色情報を求めた上で、二値画像としてMMR圧縮するようにしている。
<Fifth Embodiment>
FIG. 12 is a flowchart showing output image composition processing according to the document color type according to the fifth embodiment. In the case of a two-color manuscript, it is better to store the input color image with appropriate compression as a binary image consisting of the foreground color = ON bit and the background color = OFF bit, rather than storing it as a full color image as it is Since the size is much smaller, when it is determined that the document is a two-color document, the foreground color information and the background color information are obtained and then MMR compression is performed as a binary image.

図12において、カラー画像を入力(ステップS501)した後、原稿色種別を判定(ステップS502)する。原稿色種別の判定は上述した第1〜第4の実施形態に述べた方法を用いる。   In FIG. 12, after inputting a color image (step S501), the document color type is determined (step S502). The document color type is determined using the method described in the first to fourth embodiments.

原稿色種別が二色原稿であるか判定し(ステップS503)、判定の結果、二色原稿でない(多色原稿もしくは濃淡原稿)ならば、入力画像をそのままフルカラー画像として、JPEG圧縮して出力する(ステップS504)。   It is determined whether the document color type is a two-color document (step S503). If the result of determination is that the document is not a two-color document (multi-color document or dark document), the input image is directly subjected to JPEG compression and output as a full-color image. (Step S504).

一方、判定結果が二色原稿であれば、まず入力画像から二値画像を作成する(ステップS505)。ここでは原稿色種別判定処理の中で作成済みの二値画像を再利用することができる。   On the other hand, if the determination result is a two-color document, first, a binary image is created from the input image (step S505). Here, it is possible to reuse a binary image that has already been created in the document color type determination process.

続いて、二値画像の黒画素に相当するカラー画像上の各画素を対象に、前景平均画素値を求める(ステップS506)。すなわち、iを二値画像上の黒画素に相当する各画素として、
RF-mean=Σ[i]R(i)/Σ[i]1
GF-mean=Σ[i]G(i)/Σ[i]1
BF-mean=Σ[i]B(i)/Σ[i]1
とする。
Subsequently, the foreground average pixel value is obtained for each pixel on the color image corresponding to the black pixel of the binary image (step S506). That is, let i be each pixel corresponding to a black pixel on a binary image,
R F-mean = Σ [i] R (i) / Σ [i] 1
G F-mean = Σ [i] G (i) / Σ [i] 1
B F-mean = Σ [i] B (i) / Σ [i] 1
And

そして、求めた前景平均画素値を前景色情報として出力する(ステップS507)。   Then, the obtained foreground average pixel value is output as foreground color information (step S507).

同様に、二値画像の白画素に相当するカラー画像上の各画素を対象に、背景平均画素値を求める(ステップS508)。すなわち、jを二値画像上の白画素に相当する各画素として、
RB-mean=Σ[j]R(j)/Σ[j]1
GB-mean=Σ[j]G(j)/Σ[j]1
BB-mean=Σ[j]B(j)/Σ[j]1
とする。
Similarly, a background average pixel value is obtained for each pixel on the color image corresponding to the white pixel of the binary image (step S508). That is, j is each pixel corresponding to a white pixel on the binary image,
R B-mean = Σ [j] R (j) / Σ [j] 1
G B-mean = Σ [j] G (j) / Σ [j] 1
B B-mean = Σ [j] B (j) / Σ [j] 1
And

そして求めた背景平均画素値を背景色情報として出力する(ステップS509)。   The obtained background average pixel value is output as background color information (step S509).

最後に、二値画像をMMR圧縮して出力する(ステップS510)。   Finally, the binary image is output after being MMR compressed (step S510).

一般に、同じカラー画像から派生していれば、MMR圧縮された二値画像とJPEG圧縮されたフルカラー画像とでは、前者の方がはるかにデータサイズが小さい。また前景色情報と背景色情報は2組のRGB成分値であるから、数バイト〜たかだか数十バイト程度のデータである。よって、二色原稿の場合には前景/背景色情報+MMR圧縮二値画像という構成にすると、効果的にデータサイズを小さくできる。   In general, if derived from the same color image, the data size of the former is much smaller between the binary image compressed by MMR and the full color image compressed by JPEG. Since the foreground color information and the background color information are two sets of RGB component values, the data is several bytes to about several tens of bytes. Therefore, in the case of a two-color document, the data size can be effectively reduced if the configuration is foreground / background color information + MMR compressed binary image.

なお、前景色情報+背景色情報+MMR二値画像の構成が可能なファイルフォーマットとしては、PDF(Portable Document Format)(PDFはAdobe社の商標)が知られており、このような構成からなるPDFファイルを既存のビューワでブラウズすると、二値画像のONビット=前景色、OFFビット=背景色が割り当てられた二色画像が表示される。   Note that PDF (Portable Document Format) (PDF is a trademark of Adobe) is known as a file format that allows foreground information + background color information + MMR binary image to be configured. When the file is browsed with an existing viewer, a two-color image to which the ON bit = foreground color and OFF bit = background color of the binary image are assigned is displayed.

<第6の実施形態>
図13は第6の実施形態にかかる原稿色種別に応じた出力画像構成処理を示すフローチャートである。この第6の実施形態では、上述した第5の実施形態を実行する際、二色原稿でない場合(多色原稿もしくは濃淡原稿の場合)は、画像を複数のレイヤーに分離し、各々個別に圧縮をした上で重ね合わせる形態でまとめることで、単にJPEGで圧縮するよりもファイルサイズを小さくすることができるようにしている。
<Sixth Embodiment>
FIG. 13 is a flowchart showing output image configuration processing according to the document color type according to the sixth embodiment. In the sixth embodiment, when the above-described fifth embodiment is executed, if the document is not a two-color document (a multi-color document or a dark document), the image is separated into a plurality of layers and compressed individually. Then, the file size can be made smaller than by simply compressing with JPEG.

図13の処理フローのうち、二色原稿でないと判断された場合について述べ、本実施形態の説明とする。   A case where it is determined that the document is not a two-color original in the processing flow of FIG. 13 will be described, and this embodiment will be described.

原稿種判定(ステップS603)の結果、二色原稿でない(多色原稿もしくは濃淡原稿)ならば、図14に示すように画像を3層(第一多値画像、第二多値画像、二値画像)に分割する(ステップS604)。具体的な手法については本出願人の既に行っている特許出願(特願2004−358532号)に詳細に記されている。   As a result of the document type determination (step S603), if the document is not a two-color document (multi-color document or dark document), the image is composed of three layers (first multi-value image, second multi-value image, binary image) as shown in FIG. (Step S604). A specific method is described in detail in a patent application already filed by the present applicant (Japanese Patent Application No. 2004-358532).

その結果、図14にあるように、画像は多値画像2枚と二値画像1枚に分割される。そして、それぞれを個別に圧縮符号化して重ね合わせ表示可能な形態にまとめる(ステップS605)。このような表現が可能な形態には、先に述べたPDF形式がある。   As a result, as shown in FIG. 14, the image is divided into two multi-value images and one binary image. Then, they are individually compressed and encoded into a form that can be superimposed and displayed (step S605). As a form capable of such expression, there is the PDF format described above.

なお、上記の分離画像の生成(ステップS604)は、本出願人の他の特許出願(特願2005−024188号)にあるように4層に分割してもよい。   The generation of the separated image (step S604) may be divided into four layers as in another patent application (Japanese Patent Application No. 2005-024188) of the present applicant.

これにより、二色原稿でない場合でも単にJPEGで圧縮するよりもファイルサイズを小さくすることができる。   As a result, even when the document is not a two-color document, the file size can be made smaller than when simply compressing with JPEG.

以上、本発明の好適な実施の形態により本発明を説明した。ここでは特定の具体例を示して本発明を説明したが、特許請求の範囲に定義された本発明の広範な趣旨および範囲から逸脱することなく、これら具体例に様々な修正および変更を加えることができることは明らかである。すなわち、具体例の詳細および添付の図面により本発明が限定されるものと解釈してはならない。   The present invention has been described above by the preferred embodiments of the present invention. While the invention has been described with reference to specific embodiments, various modifications and changes may be made to the embodiments without departing from the broad spirit and scope of the invention as defined in the claims. Obviously you can. In other words, the present invention should not be construed as being limited by the details of the specific examples and the accompanying drawings.

本発明の画像処理装置の構成例を示す図である。It is a figure which shows the structural example of the image processing apparatus of this invention. 原稿色種別判定部の構成例を示す図である。6 is a diagram illustrating a configuration example of a document color type determination unit. FIG. 画像処理装置のハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of an image processing apparatus. 第1の実施形態にかかる原稿色種別判定処理を示すフローチャートである。6 is a flowchart illustrating document color type determination processing according to the first embodiment. 第2の実施形態にかかる原稿色種別判定処理を示すフローチャートである。10 is a flowchart illustrating document color type determination processing according to the second embodiment. 文字パターン輪郭部付近の画素の例を示す図である。It is a figure which shows the example of the pixel of the character pattern outline part vicinity. 黒画素/白画素の太め処理の例を示す図である。It is a figure which shows the example of the thickening process of a black pixel / white pixel. 第3の実施形態にかかる原稿色種別判定処理を示すフローチャートである。10 is a flowchart illustrating document color type determination processing according to the third embodiment. 第4の実施形態にかかる原稿色種別判定処理を示すフローチャートである。10 is a flowchart illustrating document color type determination processing according to a fourth embodiment. カラー画像のサブ領域分割の例を示す図である。It is a figure which shows the example of the sub area | region division | segmentation of a color image. 画像周縁部に見られるノイズの例を示す図である。It is a figure which shows the example of the noise seen by the image peripheral part. 第5の実施形態にかかる原稿色種別に応じた出力画像構成処理を示すフローチャートである。10 is a flowchart illustrating output image configuration processing according to a document color type according to a fifth embodiment. 第6の実施形態にかかる原稿色種別に応じた出力画像構成処理を示すフローチャートである。It is a flowchart which shows the output image structure process according to the document color classification concerning 6th Embodiment. 分離画像生成の例を示す図である。It is a figure which shows the example of a separated image generation.

符号の説明Explanation of symbols

1 画像処理装置
11 カラー画像バッファ
12 二値画像バッファ
13 カラー画像入力部
14 原稿色種別判定部
141 二値化部
142 背景色数算出部
143 前景色数算出部
144 原稿色種別判定部
15 出力画像構成方法決定部
16 出力画像構成部
101 CPU
102 メモリ
103 ハードディスク
104 通信装置
105 スキャナ
106 ディスプレイ
107 キーボード
108 CD−ROMドライブ
109 CD−ROM
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 11 Color image buffer 12 Binary image buffer 13 Color image input part 14 Original color type determination part 141 Binarization part 142 Background color number calculation part 143 Foreground color number calculation part 144 Original color type determination part 15 Output image Configuration method determination unit 16 Output image configuration unit 101 CPU
102 Memory 103 Hard Disk 104 Communication Device 105 Scanner 106 Display 107 Keyboard 108 CD-ROM Drive 109 CD-ROM

Claims (13)

カラー画像上の各画素のRGB成分のうちのG成分の値を所定の閾値と比較して二値化することで、前記カラー画像上の各画素を2つのカテゴリに分類するカテゴリ分類手段と、
前記カテゴリ分類手段により分類された第1のカテゴリに属する画素を対象として、色の発生頻度が1色に集中している場合には第1の色数を1と算出し、それ以外の場合には第1の色数を2以上と算出する第1の色数算出手段と、
前記カテゴリ分類手段により分類された第2のカテゴリに属する画素を対象として、色の発生頻度が1色に集中している場合には第2の色数を1と算出し、それ以外の場合には第2の色数を2以上と算出する第2の色数算出手段と、
前記第1の色数と前記第2の色数がともに1である場合は前記カラー画像の原稿色種別を二色原稿であると判定し、それ以外の場合は多色原稿であると判定する原稿色種別判定手段とを備えたことを特徴とする画像処理装置。
Category classification means for classifying each pixel on the color image into two categories by comparing the G component value of the RGB component of each pixel on the color image with a predetermined threshold value,
For pixels belonging to the first category classified by the category classification means, the first color number is calculated as 1 when the frequency of color occurrence is concentrated in one color, and in other cases Is a first color number calculating means for calculating the first color number to be 2 or more;
For the pixels belonging to the second category classified by the category classification means, the second color number is calculated as 1 when the frequency of color occurrence is concentrated in one color, and in other cases A second color number calculating means for calculating the second color number as 2 or more;
When both the first color number and the second color number are 1, it is determined that the original color type of the color image is a two-color original, and in other cases, it is determined that the original is a multi-color original. An image processing apparatus comprising: an original color type determining unit.
請求項1に記載の画像処理装置において、
前記カテゴリ分類手段は、カテゴリの境界部分にあたる画素を分類対象から外す処理を含むことを特徴とする画像処理装置。
The image processing apparatus according to claim 1.
The image processing apparatus according to claim 1, wherein the category classification unit includes a process of excluding a pixel corresponding to a category boundary from a classification target.
請求項2に記載の画像処理装置において、
前記カテゴリの境界部分にあたる画素は、文字輪郭画素であることを特徴とする画像処理装置。
The image processing apparatus according to claim 2,
The image processing apparatus according to claim 1, wherein a pixel corresponding to a boundary portion of the category is a character outline pixel.
請求項1乃至3のいずれか一項に記載の画像処理装置において、
前記原稿色種別判定手段は、前記カラー画像が同系色の濃淡からなる濃淡原稿であるか、もしくは前景と背景それぞれ一色ずつからなる二色原稿であるかを判定する処理を含むことを特徴とする画像処理装置。
In the image processing device according to any one of claims 1 to 3,
The document color type determination unit includes a process of determining whether the color image is a light / dark document composed of shades of similar colors or a two-color document composed of one foreground and one background. Image processing device.
請求項1乃至4のいずれか一項に記載の画像処理装置において、
前記第1の色数算出手段と前記第2の色数算出手段の一方もしくは両方は、前記カラー画像をサブ領域に分割し、各サブ領域において当該カテゴリに属する当該サブ領域内の各画素を対象とした平滑化処理を含むことを特徴とする画像処理装置。
In the image processing device according to any one of claims 1 to 4,
One or both of the first color number calculation unit and the second color number calculation unit divide the color image into sub-regions, and target each pixel in the sub-region belonging to the category in each sub-region. An image processing apparatus including the smoothing process described above.
請求項5に記載の画像処理装置において、
前記サブ領域への分割は、画像の周縁部を除いて行うことを特徴とする画像処理装置。
The image processing apparatus according to claim 5.
The image processing apparatus according to claim 1, wherein the division into the sub-regions is performed except for a peripheral portion of the image.
カラー画像上の各画素のRGB成分のうちのG成分の値を所定の閾値と比較して二値化することで、前記カラー画像上の各画素を2つのカテゴリに分類するステップと、
分類された第1のカテゴリに属する画素を対象として、色の発生頻度が1色に集中している場合には第1の色数を1と算出し、それ以外の場合には第1の色数を2以上と算出するステップと、
分類された第2のカテゴリに属する画素を対象として、色の発生頻度が1色に集中している場合には第2の色数を1と算出し、それ以外の場合には第2の色数を2以上と算出するステップと、
前記第1の色数と前記第2の色数がともに1である場合は前記カラー画像の原稿色種別を二色原稿であると判定し、それ以外の場合は多色原稿であると判定するステップとを備えたことを特徴とする画像処理方法。
Classifying each pixel on the color image into two categories by comparing the G component value of the RGB component of each pixel on the color image with a predetermined threshold and binarizing;
For the pixels belonging to the classified first category, the first color number is calculated as 1 when the color occurrence frequency is concentrated in one color, and the first color in other cases. Calculating the number as 2 or more;
For pixels belonging to the classified second category, the second color number is calculated as 1 when the color occurrence frequency is concentrated in one color, and the second color in other cases. Calculating the number as 2 or more;
When both the first color number and the second color number are 1, it is determined that the original color type of the color image is a two-color original, and in other cases, it is determined that the original is a multi-color original. An image processing method comprising: a step.
請求項7に記載の画像処理方法において、
前記入力されたカラー画像上の各画素を2つのカテゴリに分類するステップは、カテゴリの境界部分にあたる画素を分類対象から外す処理を含むことを特徴とする画像処理方法。
The image processing method according to claim 7.
The step of classifying each pixel on the input color image into two categories includes a process of excluding a pixel corresponding to a boundary portion of the category from a classification target.
請求項8に記載の画像処理方法において、
前記カテゴリの境界部分にあたる画素は、文字輪郭画素であることを特徴とする画像処理方法。
The image processing method according to claim 8.
A pixel corresponding to a boundary portion of the category is a character outline pixel.
請求項7乃至9のいずれか一項に記載の画像処理方法において、
前記原稿色種別を判定するステップは、前記カラー画像が同系色の濃淡からなる濃淡原稿であるか、もしくは前景と背景それぞれ一色ずつからなる二色原稿であるかを判定する処理を含むことを特徴とする画像処理方法。
The image processing method according to any one of claims 7 to 9,
The step of determining the color type of the document includes a process of determining whether the color image is a light / dark document composed of shades of similar colors or a two-color document composed of one color for each of the foreground and the background. An image processing method.
請求項7乃至10のいずれか一項に記載の画像処理方法において、
前記第1の色数を算出するステップと前記第2の色数を算出するステップの一方もしくは両方は、前記カラー画像をサブ領域に分割し、各サブ領域において当該カテゴリに属する当該サブ領域内の各画素を対象とした平滑化処理を含むことを特徴とする画像処理方法。
In the image processing method according to any one of claims 7 to 10,
One or both of the step of calculating the first number of colors and the step of calculating the second number of colors divide the color image into sub-regions, and in each sub-region, within the sub-region belonging to the category An image processing method comprising a smoothing process for each pixel.
請求項11に記載の画像処理方法において、
前記サブ領域への分割は、画像の周縁部を除いて行うことを特徴とする画像処理方法。
The image processing method according to claim 11.
An image processing method according to claim 1, wherein the division into the sub-regions is performed excluding a peripheral portion of the image.
請求項7乃至12のいずれか一項に記載の各ステップをコンピュータ上で実行することを特徴とする画像処理プログラム。   An image processing program that executes each step according to any one of claims 7 to 12 on a computer.
JP2005282062A 2005-09-28 2005-09-28 Image processing apparatus, image processing method, and image processing program Expired - Fee Related JP4584805B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005282062A JP4584805B2 (en) 2005-09-28 2005-09-28 Image processing apparatus, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005282062A JP4584805B2 (en) 2005-09-28 2005-09-28 Image processing apparatus, image processing method, and image processing program

Publications (3)

Publication Number Publication Date
JP2007096637A JP2007096637A (en) 2007-04-12
JP2007096637A5 JP2007096637A5 (en) 2008-11-13
JP4584805B2 true JP4584805B2 (en) 2010-11-24

Family

ID=37981821

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005282062A Expired - Fee Related JP4584805B2 (en) 2005-09-28 2005-09-28 Image processing apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP4584805B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11233922B2 (en) * 2018-08-22 2022-01-25 Kyocera Document Solutions Inc. Image processing device having a function of automatically determining whether a document sheet is a color document or black and white document

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH096946A (en) * 1995-06-22 1997-01-10 Toshiba Corp Image processing method and image processor
JPH10155076A (en) * 1996-11-23 1998-06-09 Ricoh Co Ltd Color image forming device
JP3304858B2 (en) * 1997-11-28 2002-07-22 富士ゼロックス株式会社 Image transmission apparatus and image transmission method
JP2000188693A (en) * 1998-12-22 2000-07-04 Toshiba Corp Color image processor
JP4387584B2 (en) * 2000-12-27 2009-12-16 キヤノン株式会社 Image processing apparatus and image processing method

Also Published As

Publication number Publication date
JP2007096637A (en) 2007-04-12

Similar Documents

Publication Publication Date Title
JP5036844B2 (en) Image compression apparatus, image output apparatus, image reading apparatus, image compression method, computer program, and recording medium
JP4732488B2 (en) Image processing apparatus, image forming apparatus, image reading apparatus, image processing method, image processing program, and computer-readable recording medium
JP4662066B2 (en) Image processing apparatus, image forming apparatus, image distribution apparatus, image processing method, program, and recording medium
US8509530B2 (en) Image processing apparatus, image forming apparatus, image processing method, computer program and computer-readable medium
US8503036B2 (en) System and method of improving image quality in digital image scanning and printing by reducing noise in output image data
JP4176114B2 (en) Image compression apparatus, image reading apparatus including the same, image processing apparatus including the image compression apparatus, image forming apparatus including the same, and image compression processing method
JP5132517B2 (en) Image processing apparatus and image processing method
US7667711B2 (en) Image processing system, a method thereof, and a recording medium thereof
JP4744623B2 (en) Image compression method, image compression apparatus, image forming apparatus, computer program, and recording medium
US8395813B2 (en) Subtractive color method, subtractive color processing apparatus, image forming apparatus, and computer-readable storage medium for computer program
CN101902549A (en) Image processing apparatus and image processing method
US20080031549A1 (en) Image processing apparatus, image reading apparatus, image forming apparatus, image processing method, and recording medium
JP2008005317A (en) Image processor and image processing method, and computer program and recording medium
US8395820B2 (en) Image processing apparatus for printing in black coloring material based on attribute information
US8620081B2 (en) Image processing apparatus, method, and storage medium for determining attributes
JP5151708B2 (en) Image processing apparatus and image processing program
JP4442651B2 (en) Image processing apparatus and program
JP6693310B2 (en) Image processing apparatus, image processing method and program
JP4584805B2 (en) Image processing apparatus, image processing method, and image processing program
JP4759502B2 (en) Image processing method, image processing apparatus, image processing program, and computer-readable recording medium recording the image processing program
JP2003219187A (en) Image processing method and image processor
JP4501696B2 (en) Image processing apparatus and program
JP7185451B2 (en) Image processing device, image processing method, and program
JP4926118B2 (en) Image compression apparatus, image processing apparatus, image forming apparatus, computer program, and recording medium
JP4476172B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080926

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080926

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100205

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100223

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100421

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100525

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100722

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 4584805

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

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees