JP2008172677A - Image processor and ground color detection method - Google Patents

Image processor and ground color detection method Download PDF

Info

Publication number
JP2008172677A
JP2008172677A JP2007005668A JP2007005668A JP2008172677A JP 2008172677 A JP2008172677 A JP 2008172677A JP 2007005668 A JP2007005668 A JP 2007005668A JP 2007005668 A JP2007005668 A JP 2007005668A JP 2008172677 A JP2008172677 A JP 2008172677A
Authority
JP
Japan
Prior art keywords
image data
color
ground color
histogram
brightness
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.)
Pending
Application number
JP2007005668A
Other languages
Japanese (ja)
Inventor
Naoki Nishioka
直樹 西岡
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.)
Murata Machinery Ltd
Original Assignee
Murata Machinery 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 Murata Machinery Ltd filed Critical Murata Machinery Ltd
Priority to JP2007005668A priority Critical patent/JP2008172677A/en
Publication of JP2008172677A publication Critical patent/JP2008172677A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processor capable of accurately detecting a ground color on the basis of the image data of a color system for which components relating to brightness and components relating to hues are separated, and a color judgement method. <P>SOLUTION: The YCC image data (image data expressed in YCbCr color space) of an original are acquired on the basis of RGB image data acquired by reading the prescribed region of an original, and a luminance histogram h indicating the luminance distribution of the image data is prepared. Then, a section wherein a degree exceeds a prescribed threshold W in the luminance histogram h is extracted as a recording object section R, and the image data belonging to the recording object section R are detected as ground color image data due to the ground color of the original. The luminance component and color difference component of the ground color image data are recorded as the maximum/minimum values of the color region of the base color, and the base color included in the original is specified. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

この発明は、原稿の地色を検出する機能を備える画像処理装置および原稿の地色を検出する方法に関する。   The present invention relates to an image processing apparatus having a function for detecting the background color of a document and a method for detecting the background color of a document.

なお、本明細書における「明るさ」には、側光量としての明るさである「輝度」(例えば、YCbCr表色系におけるY成分)や知覚色としての明るさである「明度」(例えば、L*a*b*表色系におけるL成分)が含まれる。また、「色味」とは、3次元色空間において「明るさ」と分離される成分であり、例えば、YCbCr表色系におけるCb成分およびCr成分(色差成分)や、L*a*b*表色系におけるa成分およびb成分がこれに相当する。   In the present specification, “brightness” includes “brightness” (for example, Y component in the YCbCr color system) as brightness as a side light amount and “brightness” (for example, brightness as perceptual color). L * a * b * L component in the color system). “Color” is a component separated from “brightness” in a three-dimensional color space. For example, Cb component and Cr component (color difference component) in the YCbCr color system, L * a * b * The a component and b component in the color system correspond to this.

ファクシミリ装置、複写機、プリンタのように、原稿を読み取って取得した画像データに対して各種の処理を行う画像処理装置の中には、処理対象となる画像データの色に応じて処理モードを選択可能とするものがある。例えば、画像がカラーの場合は、カラー画像に適した処理モードで画像処理を実行し、原稿がモノクロの場合はモノクロ画像に適した処理モードで画像処理を実行する。このように処理モードを切り替えることによって、原稿の色に応じた適切な処理を実行することが可能となる。   Among image processing devices that perform various types of processing on image data obtained by reading a document, such as facsimile machines, copiers, and printers, select a processing mode according to the color of the image data to be processed. There is something that can be done. For example, when the image is color, the image processing is executed in a processing mode suitable for a color image, and when the original is monochrome, the image processing is executed in a processing mode suitable for a monochrome image. By switching the processing mode in this way, it is possible to execute appropriate processing according to the color of the document.

このような処理モードを選択するためには、処理対象となる画像データの色を判定しなければならない。そこで、処理すべき画像データがカラーかモノクロか等を自動に判定する色判定機能(所謂、ACS(Auto Color Selection)機能)が従来より考案されている。   In order to select such a processing mode, it is necessary to determine the color of image data to be processed. Therefore, a color determination function (so-called ACS (Auto Color Selection) function) that automatically determines whether image data to be processed is color or monochrome has been devised.

色判定機能においては、まず原稿の地色(原稿に存在する背景色)を検出し、地色の検出結果に基づいて原稿の色を判定する方法が採用されることがある。はじめに原稿の地色を特定し、地色をのぞいた画像データの色分布から原稿の色を判定することによって、例えば、黄色地に黒の文字が書かれた原稿を、カラー画像ではなくモノクロ画像と判断することができる。   In the color determination function, there may be employed a method of first detecting the background color of the document (background color existing in the document) and determining the color of the document based on the detection result of the background color. First, by identifying the background color of the document and determining the color of the document from the color distribution of the image data excluding the background color, for example, a document with black characters written on a yellow background is not a color image but a monochrome image It can be judged.

地色を検出する技術は、例えば、特許文献1に開示されている。ここでは、画像データのR値、G値およびB値(すなわち、RGB表色系の3刺激値)のそれぞれについて、ヒストグラムを作成し、度数の最も高い区分の近傍を地色範囲と判断している。   A technique for detecting the ground color is disclosed in Patent Document 1, for example. Here, a histogram is created for each of the R value, G value, and B value (that is, tristimulus values of the RGB color system) of the image data, and the vicinity of the section with the highest frequency is determined as the ground color range. Yes.

また、特許文献2には、画像データのR値、G値およびB値のそれぞれについてヒストグラムを作成するにあたり、データの上位5ビットでヒストグラムを作成することによって、ヒストグラムの作成に必要なメモリ容量を低減する技術が開示されている。   Further, in Patent Document 2, when creating a histogram for each of the R value, G value, and B value of image data, the memory capacity necessary for creating the histogram is increased by creating a histogram with the upper 5 bits of the data. Techniques for reducing are disclosed.

特開2001−313832号公報JP 2001-313832 A 特開2000−22971号公報JP 2000-22971 A

ところで、CCDラインセンサ等の読取素子によって取得されたRGB表色系の画像データは、色調整処理等において扱いにくいため、明るさに関する成分と色味に関する成分とが分離された表色系(例えば、YCbCr表色系や、L*a*b*表色系等)に変換されることが多い。   Incidentally, RGB color system image data acquired by a reading device such as a CCD line sensor is difficult to handle in color adjustment processing and the like, and therefore, a color system (for example, a component related to brightness and a component related to color are separated) , YCbCr color system, L * a * b * color system, etc.).

例えば、複写機においては、原稿を読み取って取得したRGB表色系の画像データをYCbCr表色系や、L*a*b*表色系に変換して各種の画像処理(例えば、画像補正処理、拡大縮小処理等)を行ってから、CMYK画像データに変換してプリント出力するものが多い。   For example, in a copying machine, RGB color system image data obtained by reading a document is converted into a YCbCr color system or L * a * b * color system, and various image processing (for example, image correction processing) is performed. In many cases, the image data is converted into CMYK image data and printed out.

したがって、RGB表色系ではなく、YCbCr表色系やL*a*b*表色系等のように明るさに関する成分と色味に関する成分とが分離された表色系の画像データに基づいて地色を検出する技術が必要とされている。   Therefore, instead of the RGB color system, it is based on image data of a color system in which a component related to brightness and a component related to color are separated, such as the YCbCr color system and the L * a * b * color system. There is a need for technology to detect ground color.

この発明は、このような事情に鑑みてなされたものであって、明るさに関する成分と色味に関する成分とが分離された表色系の画像データに基づいて、地色を正確に検出することができる画像処理装置および色判定方法を提供することを目的としている。   The present invention has been made in view of such circumstances, and accurately detects a ground color based on colorimetric image data in which a component related to brightness and a component related to color are separated. An object of the present invention is to provide an image processing apparatus and a color determination method capable of performing the above.

請求項1の発明は、明るさ成分と色味成分とが分離された表色系の画像データに基づいて原稿の地色を検出する機能を備える画像処理装置であって、前記画像データの前記明るさ成分の分布を示す明るさヒストグラムを作成する明るさヒストグラム作成手段と、前記明るさヒストグラムにおいて、度数が所定の値を超えた区分を記録対象区分として検出する記録対象区分検出手段と、前記記録対象区分に属する画像データを前記原稿の地色に起因する地色画像データとして検出し、前記地色画像データの前記明るさ成分および前記色味成分に基づいて前記原稿に含まれる地色を特定する地色検出手段と、を備える。   The invention according to claim 1 is an image processing apparatus having a function of detecting a ground color of a document based on color system image data in which a brightness component and a color component are separated, and the image data A brightness histogram creating means for creating a brightness histogram showing a distribution of brightness components; a recording target section detecting means for detecting a section whose frequency exceeds a predetermined value in the brightness histogram as a recording target section; Image data belonging to the recording target category is detected as ground color image data resulting from the ground color of the document, and the ground color included in the document is determined based on the brightness component and the color component of the ground color image data. Ground color detection means for specifying.

請求項2の発明は、請求項1に記載の画像処理装置であって、前記原稿の第1の領域の画像データを第1画像データとして取得する第1画像データ取得手段と、前記原稿の第2の領域の画像データを第2画像データとして取得する第2画像データ取得手段と、前記第1画像データの前記明るさ成分の分布を示すヒストグラムを第1区分幅で作成して、絞り込みヒストグラムとして取得する絞り込みヒストグラム作成手段と、前記絞り込みヒストグラムにおいて、度数が最大の区分を特定し、当該区分を含む区分領域を地色潜在領域として抽出する地色潜在領域抽出手段と、を備え、前記明るさヒストグラム作成手段が、前記地色潜在領域における、前記第2前画像データの前記明るさ成分の分布を示す明るさヒストグラムを前記第1区分幅よりも細かな第2区分幅で作成する。   According to a second aspect of the present invention, in the image processing apparatus according to the first aspect, first image data acquisition means for acquiring image data of a first area of the original as first image data, and first of the original A second image data acquisition means for acquiring the image data of the area 2 as the second image data, and a histogram showing the distribution of the brightness component of the first image data with a first section width, A refined histogram creation means to acquire, and a ground color latent area extracting means for identifying a section with the highest frequency in the refined histogram and extracting a section area including the section as a ground color latent area, and the brightness A histogram creating means generates a brightness histogram indicating a distribution of the brightness component of the second previous image data in the ground color latent area according to the first section width. Also created in fine second section width.

請求項3の発明は、請求項2に記載の画像処理装置であって、前記明るさヒストグラムにおける最大度数値が、前記絞り込みヒストグラムにおける最大度数値を前記第2区分幅に換算した値よりも小さい場合に、前記地色画像データの検出に失敗したと判断するエラー検出手段、を備える。   A third aspect of the present invention is the image processing apparatus according to the second aspect, wherein the maximum degree value in the brightness histogram is smaller than a value obtained by converting the maximum degree value in the narrowed histogram into the second section width. An error detecting means for determining that the detection of the ground color image data has failed.

請求項4の発明は、請求項1から3のいずれかに記載の画像処理装置であって、前記地色検出手段が、前記記録対象区分検出手段が前記記録対象区分を検出した場合に、当該記録対象区分に属する画像データとしてその後にカウントされた画像データを、前記地色画像データとして検出する。   The invention of claim 4 is the image processing apparatus according to any one of claims 1 to 3, wherein the ground color detection means detects the recording target section when the recording target section detection means detects the recording target section. Image data counted thereafter as image data belonging to the recording target section is detected as the ground color image data.

請求項5の発明は、請求項1から4のいずれかに記載の画像処理装置であって、前記表色系がYCbCr表色系であり、前記明るさ成分が輝度成分である。   A fifth aspect of the present invention is the image processing apparatus according to any one of the first to fourth aspects, wherein the color system is a YCbCr color system, and the brightness component is a luminance component.

請求項6の発明は、明るさ成分と色味成分とが分離された表色系の画像データに基づいて、原稿の地色を検出する方法であって、前記画像データの前記明るさ成分の分布を示す明るさヒストグラムを作成する明るさヒストグラム作成工程と、前記明るさヒストグラムにおいて、度数が所定の値を超えた区分を記録対象区分として検出する記録対象区分検出工程と、前記記録対象区分に属する画像データを前記原稿の地色に起因する地色画像データとして検出し、前記地色画像データの前記明るさ成分および前記色味成分に基づいて前記原稿に含まれる地色を特定する地色検出工程と、を備える。   The invention according to claim 6 is a method for detecting the ground color of the document based on the color system image data in which the brightness component and the color component are separated, wherein the brightness component of the image data A brightness histogram creating step for creating a brightness histogram showing a distribution, a recording target category detecting step for detecting a category whose frequency exceeds a predetermined value in the brightness histogram as a recording target category, and the recording target category A ground color for detecting ground image data belonging to the background color of the document and identifying a ground color included in the document based on the brightness component and the color component of the ground color image data A detection step.

請求項1、6に記載の発明によれば、明るさに関する成分と色味に関する成分とが分離された表色系の画像データの、特に明るさ成分に基づいて地色を検出することができる。また、明るさヒストグラムにおいて度数が所定の値を超えた区分に属する画像データを原稿の地色に起因する地色画像データと判断する。つまり、度数が所定の値に満たない区分に属する画像データは、地色画像データではないと判断する。この構成によると、地色以外に起因する画像データが誤って地色画像データとして検出されることがないので、地色を正確に検出することができる。   According to the first and sixth aspects of the present invention, it is possible to detect the ground color based on the color component image data in which the component related to brightness and the component related to color are separated, particularly based on the brightness component. . In addition, image data belonging to a section whose frequency exceeds a predetermined value in the brightness histogram is determined as ground color image data resulting from the ground color of the document. That is, it is determined that the image data belonging to the section whose frequency is less than the predetermined value is not the ground color image data. According to this configuration, since the image data caused by other than the ground color is not erroneously detected as the ground color image data, the ground color can be accurately detected.

請求項2に記載の発明によれば、先に地色潜在領域を第1区分幅を持つヒストグラムを用いて特定しておき、当該地色潜在領域の明るさヒストグラムを第1区分幅よりも細かな第2区分幅で作成するので、明るさ成分の全域にわたる明るさヒストグラムを作成する場合に比べて、ハードウェアのリソースを節約しながら高精度に地色を検出することができる。   According to the second aspect of the present invention, the ground color latent area is first identified using the histogram having the first section width, and the brightness histogram of the ground color latent area is finer than the first section width. Therefore, the ground color can be detected with high accuracy while saving hardware resources, as compared with the case of creating a brightness histogram over the entire brightness component.

請求項3に記載の発明によれば、明るさヒストグラムの度数の最大値が、絞り込みヒストグラムの度数最大値を細かな区分幅(第2区分幅)に換算した値よりも小さい場合、すなわち、絞り込みヒストグラムにおいて特定された地色潜在領域が地色の領域として適正ではなかった場合、地色検出に失敗したと判断するので、地色が誤って検出される事態を未然に防止することができる。   According to the third aspect of the present invention, when the maximum value of the frequency of the brightness histogram is smaller than the value obtained by converting the maximum value of the frequency of the narrowed histogram into a fine section width (second section width), that is, narrowing down If the ground color latent area specified in the histogram is not appropriate as the ground color area, it is determined that the ground color detection has failed, so that a situation in which the ground color is erroneously detected can be prevented.

〔第1の実施の形態〕
〈1.構成〉
〈1−1.デジタル複合機〉
この発明の第1の実施の形態に相当する画像処理装置の機能が組み込まれたデジタル複合機1の構成について図1を参照しながら説明する。図1は、この発明の実施の形態に係るデジタル複合機1の構成を示すブロック図である。
[First Embodiment]
<1. Constitution>
<1-1. Digital MFP>
A configuration of a digital multi-function peripheral 1 incorporating a function of an image processing apparatus corresponding to the first embodiment of the present invention will be described with reference to FIG. FIG. 1 is a block diagram showing a configuration of a digital multi-function peripheral 1 according to an embodiment of the present invention.

デジタル複合機1は、FAX機能、コピー機能、スキャン機能、プリント機能などの複数の機能を有する複合機(MFP装置)として構成されている。デジタル複合機1は、制御部11と、ROM12と、RAM13と、フラッシュメモリ14と、操作部15と、表示部16と、画像処理部17と、画像読取部18と、画像記録部19と、画像メモリ20と、大容量蓄積部21と、通信関係の機能部22〜25とを、バスライン26を介して電気的に接続した構成となっている。   The digital multi-function peripheral 1 is configured as a multi-function peripheral (MFP apparatus) having a plurality of functions such as a FAX function, a copy function, a scan function, and a print function. The digital multi-functional peripheral 1 includes a control unit 11, a ROM 12, a RAM 13, a flash memory 14, an operation unit 15, a display unit 16, an image processing unit 17, an image reading unit 18, an image recording unit 19, The image memory 20, the large-capacity storage unit 21, and the communication-related functional units 22 to 25 are electrically connected via a bus line 26.

制御部11は、CPUで構成されている。制御部11は、ROM12に記憶されたプログラムに基づいて上記のハードウエア各部を制御し、デジタル複合機1の機能を実現する。   The control unit 11 is composed of a CPU. The control unit 11 controls each of the above hardware units based on a program stored in the ROM 12 to realize the functions of the digital multi-function peripheral 1.

ROM12は、デジタル複合機1の制御に必要なプログラムやデータを予め格納した読み出し専用の記憶装置である。   The ROM 12 is a read-only storage device that stores programs and data necessary for controlling the digital multifunction machine 1 in advance.

RAM13は、読み出しと書き込みとが可能な記憶装置であり、画像データ、FAX番号、メールアドレスなどの一時的に蓄積される諸データや、制御部11による演算処理の際に発生するデータなどを一時的に記憶する。RAM13はSRAMなどで構成される。   The RAM 13 is a storage device that can be read and written, and temporarily stores various data that are temporarily stored, such as image data, FAX numbers, and mail addresses, and data that is generated during arithmetic processing by the control unit 11. Remember. The RAM 13 is composed of SRAM or the like.

フラッシュメモリ14は、記憶内容を書き換え可能な不揮発性メモリであり、継続的に保持すべき各種の情報を記憶する。   The flash memory 14 is a non-volatile memory in which stored contents can be rewritten, and stores various types of information that should be retained continuously.

操作部15は、文字キー、テンキー、ファンクションキーなどの各種キーによって構成され、コマンドやテキストデータの入力といったユーザ操作を受け付ける。操作部15が受けたユーザ操作は信号として制御部11に入力される。制御部11はユーザ操作に基づいて各部の動作を制御する。   The operation unit 15 includes various keys such as character keys, numeric keys, and function keys, and accepts user operations such as input of commands and text data. The user operation received by the operation unit 15 is input to the control unit 11 as a signal. The control unit 11 controls the operation of each unit based on a user operation.

表示部16は、デジタル複合機1の動作状態や、画像データなどを表示する表示装置であり、液晶ディスプレイなどの表示装置により構成される。なお、操作部15に設けられる各種のキーは、この表示部16のディスプレイ画面上に設けたタッチパネルによって実現されてもよい。   The display unit 16 is a display device that displays the operation state of the digital multi-function peripheral 1, image data, and the like, and includes a display device such as a liquid crystal display. Various keys provided on the operation unit 15 may be realized by a touch panel provided on the display screen of the display unit 16.

画像処理部17は、受信された画像データや、画像読取部18から取得した画像データに種々の画像処理を行う処理部である。例えば、A/D変換、各種の補正処理(例えば、シェーディング補正やガンマ補正)、表色系の変換処理(例えば、行列変換によって、RGB表色系の画像データをYCbCr表色系の画像データに変換する処理)、色調整、画像の合成などといった画像処理を行う。なお、画像処理部17は、ROM12に格納されたプログラムによってソフトウェア的に実現されてもよい。   The image processing unit 17 is a processing unit that performs various image processes on the received image data and the image data acquired from the image reading unit 18. For example, A / D conversion, various correction processes (for example, shading correction and gamma correction), and color system conversion process (for example, matrix conversion converts RGB color system image data to YCbCr color system image data. Conversion processing), color adjustment, image synthesis, and the like. The image processing unit 17 may be realized by software by a program stored in the ROM 12.

画像読取部18は、原稿上の画像を読取素子(CCDラインセンサ181)によって読み取るスキャナーである。画像読取部18が取得した画像データは、例えば、CODEC22によりJPEG方式にて圧縮され、画像メモリ20に記憶される。なお、画像読取部18は、ガラス台上に載置された原稿の表面を読取素子が走査して画像を読み取るタイプ(FBS(Flat Bed Scanner)方式)のスキャナーであってもよく、原稿の載置台(図示省略)に載置された原稿を、ADF(Auto Document Feeder)によって搬送し、搬送される原稿の表面を静止した読取素子によって走査して画像を読み取るタイプ(ADF方式)のスキャナーであってもよい。また、ADF方式には、移動する原稿を静止した読取光学系で読み取る方式(シートスルー方式)と、静止した原稿を移動する読取光学系で読み取る方式とがあるが、いずれの方式であってもよい。後者の方式を採用する場合、画像読取部18は、コンタクトガラス上に原稿を静止させ、移動する読取光学系で静止した原稿を読み取り、読み取りが完了した原稿を排出するという読み取り手順を繰り返し実行する。   The image reading unit 18 is a scanner that reads an image on a document with a reading element (CCD line sensor 181). The image data acquired by the image reading unit 18 is compressed by, for example, the JPEG method by the CODEC 22 and stored in the image memory 20. The image reading unit 18 may be a scanner of a type (FBS (Flat Bed Scanner)) type in which a reading element scans the surface of a document placed on a glass table and reads the image. This is a type (ADF type) scanner that transports a document placed on a table (not shown) by an ADF (Auto Document Feeder), scans the surface of the transported document with a stationary reading element, and reads an image. May be. The ADF method includes a method of reading a moving document with a stationary reading optical system (sheet-through method) and a method of reading a stationary document with a moving reading optical system. Good. When the latter method is adopted, the image reading unit 18 repeatedly executes a reading procedure in which the original is stopped on the contact glass, the stationary original is read by the moving reading optical system, and the original that has been read is discharged. .

CCDラインセンサ181は、所定の走査速度(原稿と読取光学系との相対移動速度)で原稿を走査する読取光学系から導かれた光を受光して、一定の周期で読み取りを繰り返すことにより、RGB色空間で表現された画像データ、すなわち、R(赤),G(緑),B(青)の色成分データを有する画像データ(RGB画像データ)を生成する。なお、読取光学系の走査速度は、CCDラインセンサ181が生成する画像データの解像度(より具体的には、副走査方向の解像度)に基づいて設定する。すなわち、副走査方向の解像度が高くなるほど、読取光学系の走査速度を遅く設定し、副走査方向の解像度が低くなるほど、読取光学系の走査速度を速く設定する。   The CCD line sensor 181 receives light guided from the reading optical system that scans the document at a predetermined scanning speed (relative movement speed between the document and the reading optical system), and repeats reading at a constant cycle. Image data expressed in the RGB color space, that is, image data (RGB image data) having R (red), G (green), and B (blue) color component data is generated. Note that the scanning speed of the reading optical system is set based on the resolution of the image data generated by the CCD line sensor 181 (more specifically, the resolution in the sub-scanning direction). That is, the higher the resolution in the sub-scanning direction, the slower the scanning speed of the reading optical system is set, and the lower the resolution in the sub-scanning direction, the higher the scanning speed of the reading optical system.

画像記録部19は、画像メモリ20に格納された画像データなどを記録紙上へ記録するプリンタである。画像記録部19には、例えば、電子写真方式のプリンタを採用することができる。   The image recording unit 19 is a printer that records image data and the like stored in the image memory 20 on a recording sheet. For the image recording unit 19, for example, an electrophotographic printer can be employed.

画像メモリ20は、LANI/F24やNCU25を通じて外部装置29,32,34から受信した画像データ、画像読取部18において取得された画像データ、画像処理部17において処理された画像データなどを、一時的に記憶するための記憶装置である。画像メモリ20は、読み出しと書き込みとが可能なDRAM等のメモリにより構成される。   The image memory 20 temporarily stores image data received from the external devices 29, 32, and 34 through the LAN I / F 24 and the NCU 25, image data acquired by the image reading unit 18, image data processed by the image processing unit 17, and the like. Is a storage device. The image memory 20 is configured by a memory such as a DRAM capable of reading and writing.

大容量蓄積部21は、ハードディスクなどにより構成される。大容量蓄積部21は、画像読取部18により処理された画像データを蓄積することができる。   The large capacity storage unit 21 is configured by a hard disk or the like. The large capacity storage unit 21 can store the image data processed by the image reading unit 18.

さらにこのデジタル複合機1には、通信関係の機能部として、画像データ等を複数のプロトコルに対応して符号化/復号化するコーデック(CODEC)22と、送受信データの変調および復調を行うモデム23と、LAN(ローカルエリアネットワーク)27とのインターフェイスに相当するLANI/F24と、電話回線の開閉制御を行うNCU25とが、バスライン26を介して電気的に接続した構成となっている。   Further, the digital multi-function peripheral 1 includes a codec (CODEC) 22 that encodes / decodes image data and the like corresponding to a plurality of protocols, and a modem 23 that modulates and demodulates transmission / reception data as communication-related functional units. In addition, a LAN I / F 24 corresponding to an interface with a LAN (local area network) 27 and an NCU 25 that controls opening / closing of a telephone line are electrically connected via a bus line 26.

なお、CODEC22による符号化としては、2値データを符号化する場合には、MH(Modified Huffman)、MR(Modified Read)、MMR(Modified MR)、および、JBIG(Joint Bi-level Image experts Group)のいずれかの方式が採用される。なお、CODEC22は、多値データの符号化も行う。多値データの符号化は、例えばJPEG方式にて行う。   As encoding by CODEC 22, when binary data is encoded, MH (Modified Huffman), MR (Modified Read), MMR (Modified MR), and JBIG (Joint Bi-level Image experts Group). Either method is adopted. The CODEC 22 also encodes multi-value data. Multi-level data is encoded by, for example, the JPEG method.

次に、このデジタル複合機1の通信環境について説明する。デジタル複合機1は、LAN27と接続されている。LAN27にはメールサーバ28や外部端末29などが接続されている。また、LAN27は、ルータ30などを介してインターネット31に接続されている。このような構成によって、デジタル複合機1は、LAN27を介して接続された外部端末29や、インターネット31を介して接続された外部端末32と電子メール通信などを行うことができる。さらに、デジタル複合機1は、アナログ回線用のデータ通信ネットワークであるPSTN(公衆交換電話網)33と接続されている。これによって、デジタル複合機1はPSTN33を介して接続された外部端末34との通信を行うことができる。外部端末29,32,34は、モデム接続されたパソコン、デジタル複合機1と同様の装置、固定電話、携帯電話、FAX専用機、等である。   Next, the communication environment of the digital multifunction device 1 will be described. The digital multifunction device 1 is connected to the LAN 27. A mail server 28 and an external terminal 29 are connected to the LAN 27. The LAN 27 is connected to the Internet 31 through a router 30 and the like. With this configuration, the digital multifunction peripheral 1 can perform e-mail communication with the external terminal 29 connected via the LAN 27 and the external terminal 32 connected via the Internet 31. Further, the digital multi-function peripheral 1 is connected to a PSTN (Public Switched Telephone Network) 33 which is a data communication network for analog lines. Thus, the digital multi-function peripheral 1 can communicate with the external terminal 34 connected via the PSTN 33. The external terminals 29, 32, and 34 are personal computers connected by modems, devices similar to the digital multi-function peripheral 1, fixed telephones, mobile phones, FAX dedicated machines, and the like.

〈1−2.色判定機能〉
デジタル複合機1は、多階調の画像データ(例えば、画像読取部18が読み取った原稿の画像データ)の色を判定する機能(所謂、ACS機能)を備えている。
<1-2. Color judgment function>
The digital multi-function peripheral 1 has a function (so-called ACS function) for determining the color of multi-tone image data (for example, image data of a document read by the image reading unit 18).

この色判定機能においては、はじめに原稿の地色を検出する。より具体的には、図2に示すように、原稿を複数の領域に分割したうちの前領域Pを読み取って取得した画像データに基づいて原稿の地色を検出する。   In this color determination function, first, the background color of the document is detected. More specifically, as shown in FIG. 2, the background color of the document is detected based on the image data obtained by reading the front area P of the document divided into a plurality of areas.

そして、地色の検出結果を受けて、さらに続くブロック領域Bi(i=1,2,・・)を読み取って取得した画像データに基づいて原稿の色を判定する。すなわち、原稿がカラー画像か、グレー画像か、2値画像か、白紙(色紙)かを判定する。より具体的には、先に検出された地色の色領域をマスクして画像データの色分布を作成し、当該色分布に基づいて原稿の色を判定する。例えば、黄色地に黒色の文字が書かれた原稿の場合、検出された地色の色領域をマスクして原稿の色分布を作成すると、原稿上に存在する黒色のみの色分布が得られる。したがって、原稿をカラーではなくモノクロと判定することができる。   Then, in response to the ground color detection result, the color of the document is determined based on the image data obtained by reading the subsequent block area Bi (i = 1, 2,...). That is, it is determined whether the document is a color image, a gray image, a binary image, or a blank sheet (colored sheet). More specifically, a color distribution of the image data is created by masking the previously detected ground color area, and the color of the document is determined based on the color distribution. For example, in the case of a document in which black characters are written on a yellow background, the color distribution of only the black existing on the document can be obtained by creating a color distribution of the document by masking the color area of the detected ground color. Therefore, it can be determined that the document is monochrome instead of color.

上記の色判定結果を受けて、デジタル複合機1は、当該画像データを処理する際の処理モードを選択する。例えば、原稿がカラー画像と判定された場合は「カラーモード」で処理を実行し、グレー画像もしくは2値画像と判定された場合は「モノクロモード」で処理を実行する。原稿の色判定に応じて動作モードを変更することによって、装置の動作効率を高めるとともに画像の色種類に応じた適正な処理を実行することができる。   In response to the color determination result, the digital multi-function peripheral 1 selects a processing mode for processing the image data. For example, if the document is determined to be a color image, the process is executed in “color mode”, and if it is determined to be a gray image or a binary image, the process is executed in “monochrome mode”. By changing the operation mode according to the color determination of the document, it is possible to increase the operation efficiency of the apparatus and to execute appropriate processing according to the color type of the image.

カラーモードで画像データの取得処理を実行する場合は、原稿の多階調YCC画像データ(すなわち、画像読取部18が原稿を読み取って取得した多階調のRGB画像データを、画像処理部17が多階調のYCC画像データ(YCbCr色空間で表現された画像データ)に変換することによって取得された画像データ)を、CODEC22がJPEG方式等で圧縮して画像メモリ20に蓄積する。   When the image data acquisition process is executed in the color mode, the image processing unit 17 uses the multi-gradation YCC image data of the document (that is, the multi-gradation RGB image data acquired by the image reading unit 18 reading the document). The CODEC 22 compresses the multi-gradation YCC image data (image data expressed in the YCbCr color space) into the image memory 20 using the JPEG method or the like.

モノクロモードで画像データの取得処理を実行する場合は、まず、原稿の多階調YCC画像データの輝度成分を画像処理部17が二値化する。ただし、この二値化処理においては、原稿がグレー原稿の場合は組織的ディザ法等を用い、原稿が白黒原稿の場合は単純二値化法等を用いる。そして、CODEC22が、得られたYCC画像データの二階調のデータをMMR方式等で圧縮して画像メモリ20に蓄積する。   When the image data acquisition process is executed in the monochrome mode, first, the image processing unit 17 binarizes the luminance component of the multi-tone YCC image data of the document. However, in this binarization processing, the systematic dither method or the like is used when the document is a gray document, and the simple binarization method or the like is used when the document is a monochrome document. Then, the CODEC 22 compresses the obtained two-tone data of the YCC image data by the MMR method or the like and stores it in the image memory 20.

カラーモードで画像データの記録処理を実行する場合は、まず、原稿の多階調L*a*b*画像データ(すなわち、画像読取部18が原稿を読み取って取得した多階調のRGB画像データを、画像処理部17が多階調のLab画像データ(Lab色空間で表現された画像データ)に変換することによって取得された画像データ)を、画像処理部17が多階調のCMYK画像データ(CMYK色空間で表現された画像データ)に変換し、さらに得られた多階調のCMYK画像データを二階調のCMYK画像データに二値化する。続いて、画像記録部19が、得られた二階調のCMYK画像データを記録紙上に画像形成する。より具体的には、「Y」「M」「C」「K」の画像形成エンジンのうち必要なもの(画像に含まれる色を表現するために必要な画像形成エンジン)を用いて、記録紙上に画像形成する。例えば、画像に含まれる色の色区分が「Y」のみであれば、「Y」の画像形成エンジンのみを動作させる。また、画像に含まれる色の色区分が「R」であれば、「Y」および「M」の画像形成エンジンのみを動作させる。   When executing the image data recording process in the color mode, first, the multi-tone L * a * b * image data of the original (that is, the multi-tone RGB image data acquired by the image reading unit 18 reading the original). Is converted into multi-gradation Lab image data (image data expressed in Lab color space) by the image processing unit 17, and the multi-tone CMYK image data is converted by the image processing unit 17. The image data is converted into (image data expressed in a CMYK color space), and the obtained multi-tone CMYK image data is binarized into two-tone CMYK image data. Subsequently, the image recording unit 19 forms an image of the obtained two-tone CMYK image data on a recording sheet. More specifically, a necessary image forming engine (an image forming engine necessary for expressing a color included in an image) among “Y”, “M”, “C”, and “K” image forming engines is used. To form an image. For example, if the color classification of the color included in the image is only “Y”, only the image forming engine “Y” is operated. If the color classification of the color included in the image is “R”, only the “Y” and “M” image forming engines are operated.

モノクロモードで画像データの記録処理を実行する場合は、まず、原稿の多階調のYCC画像データの輝度成分を画像処理部17が二値化する。続いて、画像記録部19が、得られた二階調の輝度成分を、「K」の画像形成エンジンを用いて、記録紙上に画像形成する。   When executing the image data recording process in the monochrome mode, first, the image processing unit 17 binarizes the luminance component of the multi-tone YCC image data of the document. Subsequently, the image recording unit 19 forms an image of the obtained two-tone luminance component on the recording paper using the “K” image forming engine.

〈1−3.地色判定に関する構成〉
デジタル複合機1における地色判定機能について図3を参照しながら説明する。図3は、地色判定に関する構成を示すブロック図である。デジタル複合機1は、地色判定に関する構成として、地色の明るさ成分を検出する(より具体的には、YCbCr色空間における地色の輝度成分(Y成分)の最大値および最小値を検出する)地色輝度判定部101と、地色の色味成分を検出する(より具体的には、YCbCr色空間における地色の色差成分(Cb成分およびCr成分)の最大値および最小値を検出する)地色色差判定部102とを備えている。地色輝度判定部101が検出した地色の輝度領域と、地色色差判定部102が検出した地色の色差領域とによって、YCbCr色空間における地色領域が検出される。なお、これら各機能部は、制御部11がプログラムを実行することにより実現される構成要素である。
<1-3. Configuration related to ground color determination>
The background color determination function in the digital multi-function peripheral 1 will be described with reference to FIG. FIG. 3 is a block diagram showing a configuration relating to ground color determination. The digital multifunction peripheral 1 detects the brightness component of the ground color as a configuration related to ground color determination (more specifically, detects the maximum value and the minimum value of the brightness component (Y component) of the ground color in the YCbCr color space. The ground color luminance determination unit 101 detects the color component of the ground color (more specifically, the maximum and minimum values of the color difference components (Cb component and Cr component) of the ground color in the YCbCr color space are detected. A ground color difference determination unit 102. The ground color area in the YCbCr color space is detected by the ground color brightness area detected by the ground color brightness determination unit 101 and the ground color difference area detected by the ground color difference determination unit 102. Each of these functional units is a component realized by the control unit 11 executing a program.

〈地色輝度判定部〉
地色輝度判定部101は、第1前領域データ取得部111と、第2前領域データ取得部112と、絞り込みヒストグラム作成部113と、地色潜在領域特定部114と、輝度ヒストグラム作成部115と、記録対象区分検出部116と、輝度最大・最小値記録部117と、ヒストグラム評価部118とを有している。
<Ground color luminance judgment part>
The ground color luminance determination unit 101 includes a first front region data acquisition unit 111, a second front region data acquisition unit 112, a narrowed histogram generation unit 113, a ground color latent region specification unit 114, and a luminance histogram generation unit 115. , A recording target category detection unit 116, a luminance maximum / minimum value recording unit 117, and a histogram evaluation unit 118.

第1前データ取得部111は、前領域Pのうちの前半分の領域(第1前領域P1)(図2参照)の画像データを「第1前領域データdP1」として取得する。より具体的には、画像読取部18が第1前領域P1を読み取って取得したRGB表色系の画像データに対して、画像処理部17が所定の処理(RGB画像データをYCC画像データに変換する行列変換処理や、各種の補正処理等)を行って得られた画像データ(YCC画像データ)を第1前領域データdP1として取得する。なお、画像処理部17に所定の平均化処理を実行させることによって、「画素」単位のデータから、「単位画像」単位のデータを作成してもよい。「単位画像」とは、互いに隣接するn個(nは自然数)の画素からなる画像であり、単位画像のデータは、単位画像内に含まれるn個の画素データの平均値である。画像処理部17が平均化処理を実行した場合、第1前領域データ取得部111は、第1前領域の単位画像のデータを第1前領域データdP1として取得する。   The first previous data acquisition unit 111 acquires the image data of the first half area (first front area P1) (see FIG. 2) of the previous area P as “first front area data dP1”. More specifically, the image processing unit 17 performs predetermined processing (converts RGB image data into YCC image data) for the RGB color system image data acquired by the image reading unit 18 reading the first front area P1. Image data (YCC image data) obtained by performing a matrix transformation process and various correction processes is acquired as first pre-region data dP1. Note that data in units of “unit images” may be created from data in units of “pixels” by causing the image processing unit 17 to execute a predetermined averaging process. The “unit image” is an image composed of n pixels (n is a natural number) adjacent to each other, and the data of the unit image is an average value of n pixel data included in the unit image. When the image processing unit 17 performs the averaging process, the first previous area data acquisition unit 111 acquires the unit image data of the first previous area as the first previous area data dP1.

第2前領域データ取得部112は、前領域Pのうちの後半分の領域(第2前領域P2)(図2参照)の画像データを「第2前領域データdP2」として取得する。より具体的には、画像読取部18が第2前領域P2を読み取って取得したRGB表色系の画像データに対して、画像処理部17が所定の処理(RGB画像データをYCC画像データに変換する行列変換処理や、各種の補正処理、平均化処理等)を行って得られた画像データ(YCC画像データ)を第2前領域データdP2として取得する。   The second front area data acquisition unit 112 acquires the image data of the rear half area (second front area P2) (see FIG. 2) of the front area P as “second front area data dP2”. More specifically, the image processing unit 17 performs predetermined processing (converts RGB image data into YCC image data) for the RGB color system image data acquired by the image reading unit 18 reading the second front area P2. Image data (YCC image data) obtained by performing a matrix conversion process, various correction processes, an averaging process, etc.) is acquired as second pre-region data dP2.

絞り込みヒストグラム作成部113は、第1前領域データdP1の輝度分布を示すヒストグラムを作成して、「絞り込みヒストグラムho」として取得する。より具体的には、YCC画像データの輝度成分がとりうる全領域(例えば、256階調の場合、輝度値0〜輝度値255の領域)を所定の分割数T1(例えば、T1=16(16分割))で区分し、各区分に属する第1前領域データdP1の要素の数をそれぞれカウントしてヒストグラムを作成する(図4参照)。   The narrowed-down histogram creating unit 113 creates a histogram indicating the luminance distribution of the first previous area data dP1 and obtains it as “a narrowed-down histogram ho”. More specifically, the entire area that can be taken by the luminance component of the YCC image data (for example, the area of luminance value 0 to luminance value 255 in the case of 256 gradations) is defined as a predetermined division number T1 (for example, T1 = 16 (16 A histogram is created by counting the number of elements of the first previous area data dP1 belonging to each section (see FIG. 4).

地色潜在領域特定部114は、絞り込みヒストグラムhoにおいて、度数が最大となった区分(第1前領域の輝度最大区分M1)を特定する。そして、特定された輝度最大区分M1を含む区分領域を「地色潜在領域S」として抽出する。地色潜在領域Sは、地色潜在区分領域特定部114が、大まかにみて地色の輝度領域が含まれると判断した領域である。より具体的には、地色潜在区分領域特定部114は、輝度最大区分M1と、当該区分の両側に隣接する区分を加えた区分領域を地色潜在領域Sとして、輝度ヒストグラム作成部115に通知する(図4参照)。輝度値0〜輝度値255の領域を16分割している場合、輝度最大区分M1と当該区分M1に隣接する前後1区分を含めた3区分を含む領域を地色潜在領域Sとする。このように地色潜在領域Sを設定すれば、地色潜在領域S内に地色の輝度領域が確実に含まれることが本願の発明者によって確認されている。   The ground color latent area specifying unit 114 specifies the section having the highest frequency (the luminance maximum section M1 of the first previous area) in the narrowed-down histogram ho. Then, the section area including the specified maximum brightness section M1 is extracted as the “ground color latent area S”. The ground color latent area S is an area that the ground color latent segmented area specifying unit 114 roughly determines that a ground color luminance area is included. More specifically, the ground color latent segment area specifying unit 114 notifies the luminance histogram creating unit 115 of the maximum luminance segment M1 and a segment area obtained by adding segments adjacent to both sides of the segment as the ground color latent area S. (See FIG. 4). When the region of the luminance value 0 to the luminance value 255 is divided into 16, the region including the maximum luminance division M1 and three divisions including the front and rear divisions adjacent to the division M1 is set as the ground color latent region S. If the ground color latent area S is set in this way, it has been confirmed by the inventors of the present application that the ground color luminance area is surely included in the ground color latent area S.

輝度ヒストグラム作成部115は、地色潜在領域Sにおける、第2前領域データdP2の輝度分布を示すヒストグラムを作成して、「輝度ヒストグラムh」として取得する。より具体的には、地色潜在領域Sに含まれる区分のそれぞれを所定の区分分割数T2(例えば、T2=4(4分割))で区分し、各区分に属する第2前領域データdP2の要素の数をそれぞれカウントしてヒストグラムを作成する(図4参照)。   The luminance histogram creation unit 115 creates a histogram indicating the luminance distribution of the second previous region data dP2 in the ground color latent region S, and acquires it as “luminance histogram h”. More specifically, each of the divisions included in the ground color latent area S is divided by a predetermined division division number T2 (for example, T2 = 4 (four divisions)), and the second previous area data dP2 belonging to each division A histogram is created by counting the number of elements (see FIG. 4).

したがって、絞り込みヒストグラムは比較的荒い第1区分幅を持ち、輝度ヒストグラムは比較的細かな第2区分幅を持つことになる。つまり第2区分幅は第1区分幅より小さく、図示例での第2区分幅は第1区分幅の「整数分の1」(具体的には1/4)である。なお、これらの例における各区分は、ヒストグラム用語において「階級」と呼ばれている単位区分に相当する。   Therefore, the narrowed-down histogram has a relatively rough first section width, and the luminance histogram has a relatively fine second section width. In other words, the second section width is smaller than the first section width, and the second section width in the illustrated example is “one integer” (specifically, ¼) of the first section width. Each section in these examples corresponds to a unit section called “class” in histogram terms.

記録対象区分検出部116は、輝度ヒストグラムhにおいて、度数が所定の閾値Wを超えた区分を記録対象区分Rとして検出する(図4参照)。なお、閾値Wは予め設定された任意の値であり、例えば、第2前領域データdP2に含まれるデータの要素数に基づいて規定してもよい。また、閾値に相当する判定基準は、度数そのものではなく度数割合(ヒストグラムの作成対象となった全体画素数の中で占める割合)として定めておいてもよい。この明細書における「度数」は、このように占有割合ないしは比率化された値などで表現された場合も含む。   The recording target section detection unit 116 detects a section whose frequency exceeds a predetermined threshold W as the recording target section R in the luminance histogram h (see FIG. 4). The threshold W is an arbitrary value set in advance, and may be defined based on, for example, the number of data elements included in the second previous area data dP2. In addition, the determination criterion corresponding to the threshold value may be determined not as the frequency itself but as a frequency ratio (a ratio occupied in the total number of pixels for which a histogram is created). “Frequency” in this specification includes a case where it is expressed by an occupation ratio or a ratio value.

輝度最大・最小値記録部117は、記録対象区分Rに属するデータを原稿の地色に起因するデータ(地色画像データ)として検出し、当該データの輝度成分を地色の輝度(地色輝度)の最大値(もしくは最小値)として記録する。より具体的には、記録対象区分抽出部116から特定の輝度区分を記録対象区分Rとする旨の通知を受けた場合、当該通知を受けた以降に、その記録対象区分Rに属するデータとして輝度ヒストグラム作成部115にカウントされたデータを、地色画像データとして検出する。そして、検出された地色画像データの輝度値が、現在記録されている地色輝度の最大値よりも大きな値の場合、当該データの輝度値を新たな最大値として記録する。また、現在記録されている地色輝度の最小値よりも小さな値の場合、当該データの輝度値を新たな最小値として記録する。   The luminance maximum / minimum value recording unit 117 detects data belonging to the recording target section R as data (ground color image data) caused by the background color of the document, and uses the luminance component of the data as the background color luminance (ground color luminance). ) Is recorded as the maximum value (or minimum value). More specifically, when a notification indicating that a specific luminance category is set as the recording target category R is received from the recording target category extracting unit 116, the luminance as data belonging to the recording target category R is received after the notification is received. The data counted by the histogram creation unit 115 is detected as ground color image data. If the detected brightness value of the ground color image data is larger than the currently recorded maximum ground color brightness value, the brightness value of the data is recorded as a new maximum value. Further, in the case of a value smaller than the currently recorded minimum value of the ground color luminance, the luminance value of the data is recorded as a new minimum value.

ヒストグラム評価部118は、輝度ヒストグラムhが地色領域のヒストグラムといえるかどうかを評価する。より具体的には、輝度ヒストグラムhにおいて、データのカウント数が最大となった区分(第2前領域の輝度最大区分M2)を特定する。そして、特定された第2前領域の輝度最大区分M2の度数値が、第1前領域の輝度最大区分M1の度数値を輝度ヒストグラムhと同じ区分幅に換算した値(すなわち、第1前領域の輝度最大区分M1の度数値を、区分分割数T2の値で割って得た値)よりも小さい場合に、輝度ヒストグラムhは地色領域のヒストグラムではないと判断する。すなわち、地色検出に失敗したと判断する。この場合、ヒストグラム評価部118は、所定のエラー処理を行う。   The histogram evaluation unit 118 evaluates whether or not the luminance histogram h is a ground color region histogram. More specifically, in the brightness histogram h, the section having the maximum data count (the brightness maximum section M2 of the second previous region) is specified. Then, the frequency value of the specified luminance maximum section M2 of the second previous area is a value obtained by converting the power value of the luminance maximum section M1 of the first previous area into the same classification width as the luminance histogram h (that is, the first previous area). The luminance histogram h is determined not to be a histogram of the ground color area when it is smaller than the value obtained by dividing the frequency value of the maximum luminance division M1 by the value of the division division number T2. That is, it is determined that the ground color detection has failed. In this case, the histogram evaluation unit 118 performs predetermined error processing.

〈地色色差判定部〉
地色色差判定部102は、色差最大・最小値記録部121を有している。
<Background color difference judgment part>
The ground color difference determination unit 102 includes a color difference maximum / minimum value recording unit 121.

色差最大・最小値記録部121は、輝度最大・最小値記録部117が地色画像データとして検出したデータの色差成分(すなわち、Cb成分およびCr成分のそれぞれ)を地色の色差(地色色差)の最大値(もしくは最小値)として記録する。より具体的には、輝度最大・最小値記録部117が地色画像データとして検出したデータの色差値が、現在記録されている地色色差の最大値よりも大きな値の場合、当該データの色差値を新たな最大値として記録する。また、現在記録されている地色色差の最小値よりも小さな値の場合、当該データの色差値を新たな最小値として記録する。   The color difference maximum / minimum value recording unit 121 converts the color difference component (that is, each of the Cb component and Cr component) of the data detected by the luminance maximum / minimum value recording unit 117 as the ground color image data to the color difference of the ground color (ground color difference). ) Is recorded as the maximum value (or minimum value). More specifically, when the color difference value of the data detected as the ground color image data by the brightness maximum / minimum value recording unit 117 is larger than the maximum value of the ground color difference currently recorded, the color difference of the data Record the value as the new maximum. If the value is smaller than the minimum value of the ground color difference currently recorded, the color difference value of the data is recorded as a new minimum value.

〈2.処理動作〉
次に、デジタル複合機1における色判定処理の1プロセスとして行われる地色判定処理について図4〜図7を参照しながら説明する。地色判定処理は、第1処理、第2処理および第3処理の3段階で実行される。
<2. Processing action>
Next, background color determination processing performed as one process of color determination processing in the digital multi-function peripheral 1 will be described with reference to FIGS. The ground color determination process is executed in three stages of a first process, a second process, and a third process.

〈2−1.第1処理〉
第1処理は、地色の輝度領域を大まかに特定する処理である。第1処理について、図4および図5を参照しながら説明する。図4は、絞り込みヒストグラムhoおよび輝度ヒストグラムhを説明する図である。図5は、地色判定処理における第1処理の流れを示す図である。
<2-1. First treatment>
The first process is a process for roughly specifying the luminance area of the ground color. The first process will be described with reference to FIGS. 4 and 5. FIG. 4 is a diagram for explaining the narrowing-down histogram ho and the luminance histogram h. FIG. 5 is a diagram showing the flow of the first process in the ground color determination process.

はじめに、第1前領域データ取得部111が第1前領域データdP1を取得する(ステップS11)。   First, the first previous area data acquisition unit 111 acquires the first previous area data dP1 (step S11).

続いて、絞り込みヒストグラム作成部113が、ステップS11で取得された第1前領域データdP1の輝度分布(YCC画像データの輝度成分がとりうる全領域における輝度分布)を示すヒストグラムを作成して絞り込みヒストグラムho(図4参照)として取得する(ステップS12)。   Subsequently, the narrowed-down histogram creating unit 113 creates a histogram indicating the brightness distribution of the first previous area data dP1 acquired in step S11 (the brightness distribution in all areas that can be taken by the brightness component of the YCC image data), and the narrowed-down histogram. Acquired as ho (see FIG. 4) (step S12).

ステップS12の処理が終了すると、続いて、地色潜在領域特定部114が、ステップS12で作成された絞り込みヒストグラムhoにおいて、度数が最大となった区分(第1前領域の輝度最大区分M1)を特定する(ステップS13)。   When the processing in step S12 is completed, the ground color latent area specifying unit 114 subsequently selects the section with the highest frequency (the maximum brightness section M1 in the first previous area) in the narrowed-down histogram ho created in step S12. Specify (step S13).

続いて、地色潜在領域特定部114が、ステップS13で特定された第1前領域の輝度最大区分M1に当該区分M1の前後の区分を加えた区分領域を地色潜在領域Sとして特定し、当該特定された地色潜在領域Sを輝度ヒストグラム作成部115に通知する(ステップS14)。以上で、第1処理が終了し、続いて第2処理が行われる。   Subsequently, the ground color latent area specifying unit 114 specifies, as the ground color latent area S, a divided area obtained by adding the sections before and after the section M1 to the luminance maximum section M1 of the first previous area specified in step S13. The specified ground color latent area S is notified to the luminance histogram creating unit 115 (step S14). Thus, the first process is completed, and then the second process is performed.

なお、第1処理のステップS14において、第1前領域の輝度最大区分M1の度数値が所定の閾値よりも大きいか否かを判断し、所定の閾値に満たない場合には、地色の検出に失敗したと判断して所定のエラー処理を行い、第2処理を行うことなく地色判定処理を終了する構成としてもよい。   In step S14 of the first process, it is determined whether or not the frequency value of the luminance maximum section M1 of the first previous region is larger than a predetermined threshold value. The background color determination process may be terminated without performing the second process by determining that it has failed.

〈2−2.第2処理〉
第2処理は、第1処理で大まかに特定された地色の輝度領域(地色潜在領域S)をさらに絞り込んで、地色輝度および地色色差の最大・最小値をそれぞれ特定する処理である。第2処理について、図4および図6を参照しながら説明する。図6は、地色判定処理における第2処理の流れを示す図である。
<2-2. Second treatment>
The second process is a process of further narrowing down the ground color luminance region (ground color latent region S) roughly specified in the first process and specifying the maximum and minimum values of the ground color luminance and the ground color difference. . The second process will be described with reference to FIGS. 4 and 6. FIG. 6 is a diagram showing the flow of the second process in the ground color determination process.

はじめに、第2前領域データ取得部112が、第2前領域データdP2を取得する(ステップS21)。   First, the second previous area data acquisition unit 112 acquires the second previous area data dP2 (step S21).

続いて、輝度ヒストグラム作成部115が、ステップS21で取得された第2前領域データdP2の輝度分布(第1処理のステップS14で通知された地色潜在領域Sにおける輝度分布)を示すヒストグラム(輝度ヒストグラムh)の作成を開始する(ステップS22)。   Subsequently, the luminance histogram creating unit 115 displays a histogram (luminance) indicating the luminance distribution of the second previous area data dP2 acquired in step S21 (the luminance distribution in the ground color latent area S notified in step S14 of the first process). Creation of the histogram h) is started (step S22).

続いて、記録対象区分検出部116が、輝度ヒストグラムhにおいて、度数が所定の閾値Wを超えた区分を検出したか否かを判断する(ステップS23)。   Subsequently, the recording target category detection unit 116 determines whether or not a category whose frequency exceeds a predetermined threshold W is detected in the luminance histogram h (step S23).

ステップS23で度数が所定の閾値Wを超えた区分を検出したと判断した場合、記録対象区分抽出部116は、当該区分を、記録対象区分Rとして輝度最大・最小値記録部117に通知する(ステップS24)。   When it is determined in step S23 that the division whose frequency exceeds the predetermined threshold W is detected, the recording target category extracting unit 116 notifies the luminance maximum / minimum value recording unit 117 as the recording target category R ( Step S24).

輝度最大・最小値記録部117は、記録対象区分Rに属するデータとして輝度ヒストグラム作成部115に新たにカウントされたデータがあるか否かを判断する(ステップS25)。   The luminance maximum / minimum value recording unit 117 determines whether there is data newly counted by the luminance histogram creating unit 115 as data belonging to the recording target section R (step S25).

ステップS25で、記録対象区分Rに属するデータとして新たにカウントされたデータがあると判断した場合、輝度最大・最小値記録部117は、当該データを地色画像データとして検出する。そして、検出した地色画像データの輝度成分を地色輝度の最大値(もしくは最小値)として記録する(ステップS26)。また、色差最大・最小値記録部121は、検出された地色画像データの色差成分を地色色差の最大値(もしくは最小値)として記録する(ステップS27)。   If it is determined in step S25 that there is newly counted data as data belonging to the recording target section R, the luminance maximum / minimum value recording unit 117 detects the data as ground color image data. Then, the detected luminance component of the ground color image data is recorded as the maximum value (or minimum value) of the ground color luminance (step S26). Further, the color difference maximum / minimum value recording unit 121 records the detected color difference component of the ground color image data as the maximum value (or minimum value) of the ground color difference (step S27).

第2前領域データdP2に含まれる全てのデータのカウントが終了すると(ステップS28でYES)、輝度最大・最小値記録部117は、その時点で記録されている最大・最小値を地色輝度の最大・最小値に決定する(ステップS29)。同様に、色差最大・最小値記録部121は、その時点で記録されている最大・最小値を地色色差の最大・最小値に決定する(ステップS30)。以上で、第2処理が終了し、続いて第3処理が行われる。   When the count of all data included in the second previous area data dP2 is completed (YES in step S28), the luminance maximum / minimum value recording unit 117 uses the maximum / minimum values recorded at that time as the ground color luminance. The maximum and minimum values are determined (step S29). Similarly, the color difference maximum / minimum value recording unit 121 determines the maximum / minimum value recorded at that time as the maximum / minimum value of the ground color difference (step S30). Thus, the second process is completed, and then the third process is performed.

〈2−3.第3処理〉
第3処理は、第2処理で特定された地色輝度および地色色差の最大・最小値を地色輝度および地色色差として採用可能か否かを判断する処理である。第3処理について、図4および図7を参照しながら説明する。図7は、地色判定処理における第3処理の流れを示す図である。以下の処理はヒストグラム評価部118によって実行される。
<2-3. Third treatment>
The third process is a process of determining whether or not the maximum / minimum values of the ground color brightness and the ground color difference specified in the second process can be adopted as the ground color brightness and the ground color difference. The third process will be described with reference to FIGS. 4 and 7. FIG. 7 is a diagram showing the flow of the third process in the ground color determination process. The following processing is executed by the histogram evaluation unit 118.

はじめに、第1処理のステップS12で作成された絞り込みヒストグラムhoにおいて、データのカウント数が最大となった区分(第1前領域の輝度最大区分M1)の度数値N1を取得する(ステップS31)。   First, in the narrowed-down histogram ho created in step S12 of the first process, the frequency value N1 of the section having the maximum data count (the maximum brightness section M1 of the first previous region) is acquired (step S31).

続いて、第2処理のステップS22で作成された輝度ヒストグラムhにおいて、データのカウント数が最大となった区分(第2前領域の輝度最大区分M2)を特定し、当該区分の度数値N2を取得する(ステップS32)。   Subsequently, in the brightness histogram h created in step S22 of the second process, the section having the maximum data count (the brightness maximum section M2 of the second previous area) is specified, and the frequency value N2 of the section is determined. Obtain (step S32).

続いて、ステップS31で取得した度数値N1を輝度ヒストグラムhと同じ区分幅に換算した値(換算値)を取得する(ステップS33)。ただし、換算値は、度数値N1を区分分割数T2(図4の場合、T2=4)の値で割ることによって取得される。   Subsequently, a value (converted value) obtained by converting the power value N1 acquired in step S31 into the same segment width as the luminance histogram h is acquired (step S33). However, the conversion value is obtained by dividing the frequency value N1 by the value of the division division number T2 (T2 = 4 in the case of FIG. 4).

続いて、ステップS32で取得した度数値N2が、ステップS33で取得した換算値よりも小さいか否かを判断する(ステップS34)。度数値N2が換算値よりも小さい場合は、輝度ヒストグラムhに否定的評価を与える。すなわち、この場合、第1処理における地色潜在領域Sの特定が失敗しており(すなわち、第1処理で特定された地色潜在領域Sに地色が存在しない)、地色画像データの検出に失敗していると判断し、第2処理で特定された地色輝度および地色色差の最大・最小値は、地色の色領域として採用すべきではないと判断する。逆に、度数値N2が換算値よりも小さくない場合は、輝度ヒストグラムhに肯定的評価を与える。すなわち、この場合、第1処理における地色潜在領域Sの特定は成功しており、地色画像データが適正に検出されていると判断し、第2処理で特定された地色輝度の最大・最小値は、地色の色領域として採用できると判断する。   Subsequently, it is determined whether or not the frequency value N2 acquired in step S32 is smaller than the converted value acquired in step S33 (step S34). If the frequency value N2 is smaller than the converted value, a negative evaluation is given to the luminance histogram h. That is, in this case, the ground color latent area S in the first process has failed to be identified (that is, the ground color does not exist in the ground color latent area S identified in the first process), and the ground color image data is detected. Therefore, it is determined that the ground color luminance and the ground color difference maximum / minimum values specified in the second process should not be adopted as the ground color area. Conversely, if the frequency value N2 is not smaller than the converted value, a positive evaluation is given to the luminance histogram h. That is, in this case, it is determined that the ground color latent area S has been successfully identified in the first process, and the ground color image data has been properly detected. It is determined that the minimum value can be adopted as the ground color area.

ステップS34で否定的評価が得られた場合は、ヒストグラム評価部118が、所定のエラー処理(例えば、地色検出失敗の旨を制御部11に通知する処理)を行う(ステップS35)。この場合、地色の検出には失敗したとして、地色判定処理を終了する。   When a negative evaluation is obtained in step S34, the histogram evaluation unit 118 performs a predetermined error process (for example, a process for notifying the control unit 11 of the background color detection failure) (step S35). In this case, the ground color determination process is terminated because the detection of the ground color has failed.

ステップS34で肯定的評価が得られた場合は、地色輝度判定部101が、第2処理のステップS28で決定された地色輝度の最大・最小値を地色の輝度範囲として記憶し(ステップS36)、ステップS29で決定された地色色差の最大・最小値を地色の色差範囲として記憶する(ステップS37)。以上で、地色判定処理が終了する。   If a positive evaluation is obtained in step S34, the ground color luminance determining unit 101 stores the maximum and minimum values of the ground color luminance determined in step S28 of the second process as the ground color luminance range (step S36) The maximum / minimum value of the ground color difference determined in step S29 is stored as a ground color difference range (step S37). Thus, the ground color determination process ends.

〈3.効果〉
上記の実施の形態によると、YCC画像データのように、明るさ成分が分離された表色系で表現された画像データに基づいて、明るさ成分の値を利用して地色を容易に検出することができる。
<3. effect>
According to the above embodiment, the background color can be easily detected using the value of the brightness component based on the image data expressed in the color system in which the brightness component is separated, such as YCC image data. can do.

また、輝度ヒストグラムhにおいて度数が所定の閾値Wを超えた区分に属する画像データを地色画像データと判断して検出する。つまり、度数が所定の値に満たない区分に属する画像データは地色画像データではないと判断し、そのような画像データの輝度成分値や色差成分値は地色領域の最大・最小値として記録しない。この構成によると、地色以外(例えば、地色に付着したゴミ)に起因する画像データが誤って地色画像データとして検出されることがない。したがって、正しく地色を検出し、地色の色領域を正確に特定することができる。   In addition, image data belonging to a section whose frequency exceeds a predetermined threshold W in the luminance histogram h is detected as ground color image data. In other words, it is determined that image data belonging to a category whose frequency is less than a predetermined value is not ground color image data, and luminance component values and color difference component values of such image data are recorded as maximum and minimum values of the ground color region. do not do. According to this configuration, image data caused by a color other than the ground color (for example, dust attached to the ground color) is not erroneously detected as ground color image data. Therefore, it is possible to correctly detect the ground color and accurately identify the color region of the ground color.

また、上記の実施の形態によると、第1処理で絞り込みヒストグラムhoを作成して地色の輝度領域を大まかに特定し、第2処理で、第1処理で特定された輝度領域(地色潜在領域S)について輝度ヒストグラムhを作成して地色の輝度領域をさらに絞り込んで、地色輝度および色差の最大・最小値を特定する。ここでは、輝度ヒストグラムhとして、輝度領域の全域にわたるヒストグラムではなく、地色潜在領域Sについてのヒストグラムを作成して地色を検出するので、回路や処理を複雑化することなく、精度の高い地色検出を行うことができる。   Further, according to the above embodiment, the narrowed-down histogram ho is generated in the first process to roughly specify the luminance area of the ground color, and the luminance area (ground color latent potential) specified in the first process is specified in the second process. A luminance histogram h is created for the region S) to further narrow down the luminance region of the ground color, and specify the maximum and minimum values of the ground color luminance and the color difference. Here, the brightness histogram h is not a histogram covering the entire brightness area, but a histogram for the ground color latent area S is created and the ground color is detected, so that the ground with high accuracy can be obtained without complicating the circuit and processing. Color detection can be performed.

第1処理において原稿の地色の輝度領域が地色潜在領域Sとして適正に検出されていれば、第2前領域データdP2の明度分布である輝度ヒストグラムhにおいても十分な輝度の偏りが存在する。すなわち、第2前領域の輝度最大区分M2の度数値N2は、換算値よりも小さくなることはない。一方、原稿の地色の輝度領域が地色潜在領域Sとして適正に検出されていなければ(例えば、原稿の先端部(第1前領域)だけが変色しており、当該変色した色の輝度領域が地色潜在領域Sとして誤って検出されてしまった場合)、輝度ヒストグラムhにおいて十分な輝度の偏りが存在しない。すなわち、第2前領域の輝度最大区分M2の度数値は、換算値よりも小さくなる。上記の実施の形態においては、ヒストグラム評価部118が、輝度ヒストグラムhにおける第2前領域の輝度最大区分M2の度数値N2が、絞り込みヒストグラムhoにおける第1前領域の輝度最大区分M1の度数値N1を輝度ヒストグラムhと同じ区分幅に換算した換算値よりも小さいか否かを判断し、小さい場合には、地色検出に失敗したと判断して所定のエラー処理を行うので、地色が誤って検出される事態を未然に防止することができる。   If the luminance area of the background color of the document is properly detected as the background color latent area S in the first process, a sufficient luminance deviation exists in the luminance histogram h that is the brightness distribution of the second previous area data dP2. . That is, the frequency value N2 of the luminance maximum section M2 in the second previous region is never smaller than the converted value. On the other hand, when the luminance area of the background color of the document is not properly detected as the background color latent area S (for example, only the leading end portion (first front area) of the document is discolored, and the luminance area of the discolored color) Is mistakenly detected as the ground color latent area S), there is no sufficient luminance bias in the luminance histogram h. That is, the power value of the maximum luminance division M2 in the second front area is smaller than the converted value. In the above-described embodiment, the histogram evaluation unit 118 determines that the frequency value N2 of the luminance maximum segment M2 of the second previous region in the luminance histogram h is the frequency value N1 of the luminance maximum segment M1 of the first previous region in the narrowed-down histogram ho. Is smaller than the converted value converted to the same segment width as the luminance histogram h, and if it is smaller, it is determined that the ground color detection has failed and a predetermined error processing is performed, so the ground color is incorrect. Can be prevented in advance.

〔第2の実施の形態〕
この発明の第2の実施の形態に相当する画像処理装置の機能が組み込まれたデジタル複合機2について説明する。なお、以下においては、第1の実施の形態と相違する点を説明し、相違しない点については説明を省略する。また、同じ構成部を示す際には、第1の実施の形態の説明で用いた参照符号を用いる。
[Second Embodiment]
A digital multifunction peripheral 2 incorporating the function of an image processing apparatus corresponding to the second embodiment of the present invention will be described. In the following, points that differ from the first embodiment will be described, and descriptions of points that are not different will be omitted. Moreover, when showing the same component, the reference numerals used in the description of the first embodiment are used.

デジタル複合機2は、第1の実施の形態に係るデジタル複合機1と同様のハードウェア構成を備え(図1参照)、多階調の画像データの色を判定する機能を備えている。   The digital multifunction device 2 has the same hardware configuration as that of the digital multifunction device 1 according to the first embodiment (see FIG. 1), and has a function of determining the color of multi-gradation image data.

〈1.地色検出に関する構成〉
デジタル複合機2における地色判定機能について図8を参照しながら説明する。図8は、地色判定に関する構成を示すブロック図である。デジタル複合機2は、地色判定に関する構成として、地色の明るさ成分を検出する地色輝度判定部201と、地色の色味成分を検出する地色色差判定部202とを備えている。地色輝度判定部201が特定した地色の輝度領域と、地色色差判定部202が検出した地色の色差領域とによって、YCbCr色空間における地色領域が検出される。なお、これら各機能部は、制御部11がプログラムを実行することにより実現される構成要素である。
<1. Configuration related to ground color detection>
The background color determination function in the digital multi-function peripheral 2 will be described with reference to FIG. FIG. 8 is a block diagram showing a configuration related to ground color determination. The digital multifunction peripheral 2 includes a ground color luminance determination unit 201 that detects a brightness component of a ground color and a ground color difference determination unit 202 that detects a tint component of the ground color as a configuration related to ground color determination. . A ground color region in the YCbCr color space is detected by the ground color luminance region specified by the ground color luminance determination unit 201 and the ground color difference region detected by the ground color difference determination unit 202. Each of these functional units is a component realized by the control unit 11 executing a program.

〈地色輝度判定部〉
地色輝度判定部201は、前領域データ取得部211と、輝度ヒストグラム作成部212と、記録対象区分検出部213と、輝度最大・最小値記録部214とを有している。
<Ground color luminance judgment part>
The ground color luminance determination unit 201 includes a previous area data acquisition unit 211, a luminance histogram creation unit 212, a recording target category detection unit 213, and a luminance maximum / minimum value recording unit 214.

前領域データ取得部211は、前領域P(図2参照)の画像データを前領域データdPとして取得する。より具体的には、画像読取部18が前領域Pを読み取って取得したRGB表色系の画像データに対して、画像処理部17が所定の処理(RGB画像データをYCC画像データに変換する行列変換処理や、各種の補正処理、平均化処理等)を行って得られた画像データ(YCC画像データ)を前領域データdPとして取得する。   The previous area data acquisition unit 211 acquires the image data of the previous area P (see FIG. 2) as the previous area data dP. More specifically, for the RGB color system image data acquired by the image reading unit 18 reading the previous area P, the image processing unit 17 performs predetermined processing (a matrix for converting RGB image data into YCC image data). Image data (YCC image data) obtained by performing conversion processing, various correction processing, averaging processing, and the like) is acquired as the previous region data dP.

輝度ヒストグラム作成部212は、前領域データdPの輝度分布を示すヒストグラムを作成して、輝度ヒストグラムhとして取得する。より具体的には、YCC画像データの輝度成分がとりうる全領域(例えば、256階調の場合、輝度値0〜輝度値255の領域)を所定の分割数で区分し、各区分に属する前領域データdPの要素の数をそれぞれカウントしてヒストグラムを作成する(図9参照)。   The luminance histogram creation unit 212 creates a histogram indicating the luminance distribution of the previous area data dP and acquires it as the luminance histogram h. More specifically, the entire area that can be taken by the luminance component of the YCC image data (for example, the area of luminance value 0 to luminance value 255 in the case of 256 gradations) is divided by a predetermined number of divisions before A histogram is created by counting the number of elements of the area data dP (see FIG. 9).

記録対象区分検出部213は、輝度ヒストグラムhにおいて、度数が所定の閾値Wを超えた区分を記録対象区分Rとして検出する(図9参照)。   The recording target section detection unit 213 detects a section whose frequency exceeds a predetermined threshold W as the recording target section R in the luminance histogram h (see FIG. 9).

輝度最大・最小値記録部214は、記録対象区分Rに属するデータを地色画像データとして検出し、当該データの輝度成分を地色輝度の最大値(もしくは最小値)として記録する。輝度最大・最小値記録部214が実行する具体的な処理は、輝度最大・最小値記録部117と同様である。   The luminance maximum / minimum value recording unit 214 detects data belonging to the recording target section R as ground color image data, and records the luminance component of the data as the maximum value (or minimum value) of the ground color luminance. Specific processing executed by the luminance maximum / minimum value recording unit 214 is the same as that of the luminance maximum / minimum value recording unit 117.

〈地色色差判定部〉
地色色差判定部202は、色差最大・最小値記録部221を有している。
<Background color difference judgment part>
The ground color difference determination unit 202 includes a color difference maximum / minimum value recording unit 221.

色差最大・最小値記録部221は、輝度最大・最小値記録部214が地色画像データとして検出したデータの色差成分を地色色差の最大値(もしくは最小値)として記録する。色差最大・最小値記録部221が実行する具体的な処理は、色差最大・最小値記録部121と同様である。   The color difference maximum / minimum value recording unit 221 records the color difference component of the data detected by the luminance maximum / minimum value recording unit 214 as the ground color image data as the maximum value (or minimum value) of the ground color difference. The specific processing executed by the color difference maximum / minimum value recording unit 221 is the same as that of the color difference maximum / minimum value recording unit 121.

〈2.処理動作〉
次に、デジタル複合機2における色判定処理の1プロセスとして行われる地色判定処理について図9および図10を参照しながら説明する。図9は、輝度ヒストグラムhを説明する図である。図10は、地色判定処理の流れを示す図である。
<2. Processing action>
Next, ground color determination processing performed as one process of color determination processing in the digital multi-function peripheral 2 will be described with reference to FIGS. 9 and 10. FIG. 9 is a diagram for explaining the luminance histogram h. FIG. 10 is a diagram illustrating the flow of the ground color determination process.

はじめに、前領域データ取得部211が、前領域データdPを取得する(ステップS101)。   First, the previous area data acquisition unit 211 acquires the previous area data dP (step S101).

続いて、ヒストグラム作成部212が、ステップS101で取得された前領域データdPの輝度分布を示すヒストグラム(輝度ヒストグラムh)の作成を開始する(ステップS102)。   Subsequently, the histogram creation unit 212 starts creating a histogram (luminance histogram h) indicating the brightness distribution of the previous region data dP acquired in step S101 (step S102).

続いて、記録対象区分検出部213が、輝度ヒストグラムhにおいて、度数が所定の閾値Wを超えた区分を検出したか否かを判断する(ステップS103)。   Subsequently, the recording target category detection unit 213 determines whether or not a category whose frequency exceeds a predetermined threshold W is detected in the luminance histogram h (step S103).

ステップS103で度数が所定の閾値Wを超えた区分を検出したと判断した場合、記録対象区分検出部213は、当該区分を、記録対象区分Rとして輝度最大・最小値記録部214に通知する(ステップS104)。   When it is determined in step S103 that the division whose frequency exceeds the predetermined threshold W has been detected, the recording target category detection unit 213 notifies the luminance maximum / minimum value recording unit 214 of the category as the recording target category R ( Step S104).

輝度最大・最小値記録部214は、記録対象区分Rに属するデータとして輝度ヒストグラム作成部212に新たにカウントされたデータがあるか否かを判断する(ステップS105)。   The luminance maximum / minimum value recording unit 214 determines whether or not there is data newly counted by the luminance histogram creation unit 212 as data belonging to the recording target section R (step S105).

ステップS105で、記録対象区分Rに属するデータとして新たにカウントされたデータがあると判断した場合、輝度最大・最小値記録部214は、当該データを地色画像データとして検出する。そして、検出した地色画像データの輝度成分を地色地色輝度の最大値(もしくは最小値)として記録する(ステップS106)。また、色差最大・最小値記録部221は、検出された地色画像データの色差成分を地色色差の最大値(もしくは最小値)として記録する(ステップS107)。   If it is determined in step S105 that there is newly counted data as data belonging to the recording target section R, the luminance maximum / minimum value recording unit 214 detects the data as ground color image data. Then, the detected luminance component of the ground color image data is recorded as the maximum value (or minimum value) of the ground color ground color luminance (step S106). Further, the color difference maximum / minimum value recording unit 221 records the detected color difference component of the ground color image data as the maximum value (or minimum value) of the ground color difference (step S107).

第2前領域データdP2に含まれる全てのデータのカウントが終了すると(ステップS108でYES)、輝度最大・最小値記録部214は、その時点で記録されている最大・最小値を地色輝度の最大・最小値として記憶する(ステップS109)。同様に、色差最大・最小値記録部221は、その時点で記録されている最大・最小値を地色色差の最大・最小値として記憶する(ステップS110)。以上で、地色判定処理が終了する。   When the counting of all data included in the second previous area data dP2 is completed (YES in step S108), the luminance maximum / minimum value recording unit 214 sets the maximum / minimum values recorded at that time as the ground color luminance. The maximum / minimum value is stored (step S109). Similarly, the color difference maximum / minimum value recording unit 221 stores the maximum / minimum value recorded at that time as the maximum / minimum value of the ground color difference (step S110). Thus, the ground color determination process ends.

〈3.効果〉
上記の実施の形態によると、第1の実施の形態と同様、YCC画像データのように、明るさ成分が分離された表色系で表現された画像データに基づいて、当該明るさ成分の値を利用して地色を容易に検出することができる。また、度数が所定の閾値Wに満たない区分に属する画像データは地色画像データではないと判断し、そのような画像データの輝度成分値や色差成分値は地色領域の最大・最小値として記録しないので、正しく地色を検出し、地色の色領域を正確に特定することができる。
<3. effect>
According to the above embodiment, as in the first embodiment, the value of the brightness component is based on the image data expressed in the color system in which the brightness component is separated, such as YCC image data. The ground color can be easily detected by using. Further, it is determined that the image data belonging to the category whose frequency does not satisfy the predetermined threshold W is not ground color image data, and the luminance component value and color difference component value of such image data are set as the maximum and minimum values of the ground color region. Since it is not recorded, it is possible to correctly detect the ground color and accurately specify the color region of the ground color.

〔変形例〕
上記の第1の実施の形態においては、まず、第1処理において地色の輝度領域を大まかに絞り込み、第2処理において第1処理で絞り込まれた地色の輝度領域をさらに絞り込んで、地色輝度の最大値および最小値を特定している。すなわち、2段階の処理で地色の輝度検出を行っている。これを、3段階以上の処理で地色の輝度検出を行う構成としてもよい。
[Modification]
In the first embodiment described above, first, the ground color luminance area is roughly narrowed down in the first process, and the ground color brightness area narrowed down in the first process is further narrowed down in the second process. The maximum and minimum luminance values are specified. That is, the luminance of the ground color is detected by two stages of processing. This may be configured to detect the luminance of the ground color through three or more stages of processing.

例えば3段階の処理で地色の輝度検出を行う場合、次のような処理を行えばよい。すなわち、まず、第1処理において、輝度領域を所定の分割数で区分した第1の絞り込みヒストグラムを作成する。そして、当該第1の絞り込みヒストグラムにおける最大度数区分を検出し、当該区分を含む地色潜在領域を特定する。すなわち、地色の輝度領域を大まかに絞り込む。続く第2処理において、第1処理で特定された地色潜在領域をさらに所定の分割数で区分した第2の絞り込みヒストグラムを作成する。そして、当該第2の絞り込みヒストグラムにおける最大度数区分を検出し、当該区分を含む地色潜在領域を特定する。すなわち、地色の輝度領域をさらに絞り込む。続く第3処理において、第2処理で特定された地色潜在領域をさらに所定の分割数で区分した輝度ヒストグラムを作成し、当該輝度ヒストグラムに基づいて、地色輝度の最大値および最小値を特定する。   For example, when the ground color luminance is detected in three stages, the following process may be performed. That is, first, in the first process, a first narrowed histogram in which the luminance area is divided by a predetermined number of divisions is created. And the maximum frequency division in the said 1st narrowing-down histogram is detected, and the ground color latent area containing the said division is specified. That is, the ground color luminance region is roughly narrowed down. In the subsequent second process, a second narrowed histogram is created by further dividing the ground color latent area specified in the first process by a predetermined number of divisions. And the maximum frequency division in the said 2nd narrowing-down histogram is detected, and the ground color latent area containing the said division is specified. That is, the luminance area of the ground color is further narrowed down. In the subsequent third process, a luminance histogram is created by further dividing the ground color latent area specified in the second process by a predetermined number of divisions, and the maximum value and minimum value of the ground color luminance are specified based on the luminance histogram. To do.

また、上記の各実施の形態においては、YCC画像データに基づいて地色判定を行っているが、明るさ成分と色味成分とが分離された各種の表色系(例えば、L*a*b*表色系や、YIQ表色系、Luv表色系等)の画像データに基づいて、同様の地色判定を行うことができる。   In each of the above embodiments, the ground color determination is performed based on the YCC image data, but various color systems (for example, L * a *) in which the brightness component and the color component are separated. (b * color system, YIQ color system, Luv color system, etc.) image data can be determined in the same manner.

また、上記の各実施の形態においては、原稿の前領域を読み取って取得したデータに基づいて地色の判定を行っているが、これに限定されるものでない。地色判定は、例えば、対象画像の後端や、右端先端の一部の画像データを用いて行われてもよい。   In each of the above embodiments, the ground color is determined based on the data obtained by reading the front area of the document. However, the present invention is not limited to this. The ground color determination may be performed using, for example, image data of a part of the rear end of the target image or the front end of the right end.

また、上記の各実施の形態においては、地色輝度判定部101,201および地色色差判定部102,202は、制御部11がプログラムを実行することにより実現される構成要素であるとしたが、回路的(ハードウェア的)に実現されてもよい。   In each of the above-described embodiments, the ground color luminance determination units 101 and 201 and the ground color difference determination units 102 and 202 are components realized by the control unit 11 executing a program. Alternatively, it may be realized in a circuit (hardware) manner.

この発明の実施の形態に係るデジタル複合機の構成を示すブロック図である。1 is a block diagram showing a configuration of a digital multifunction peripheral according to an embodiment of the present invention. 原稿を複数の領域に分割したうちの前領域を模式的に示す図である。It is a figure which shows typically the front area | region which divided | segmented the original into several area | regions. 地色判定に関する構成を示すブロック図である。It is a block diagram which shows the structure regarding a ground color determination. 絞り込みヒストグラムおよび輝度ヒストグラムを説明する図である。It is a figure explaining a narrowing-down histogram and a brightness | luminance histogram. 地色判定処理における第1処理の流れを示す図である。It is a figure which shows the flow of the 1st process in a ground color determination process. 地色判定処理における第2処理の流れを示す図である。It is a figure which shows the flow of the 2nd process in a ground color determination process. 地色判定処理における第3処理の流れを示す図である。It is a figure which shows the flow of the 3rd process in a ground color determination process. 地色判定に関する構成を示すブロック図である。It is a block diagram which shows the structure regarding a ground color determination. 輝度ヒストグラムを説明する図である。It is a figure explaining a brightness | luminance histogram. 地色判定処理の流れを示す図である。It is a figure which shows the flow of a ground color determination process.

符号の説明Explanation of symbols

1、2 デジタル複合機
101、201 地色輝度判定部
102、202 地色色差判定部
111 第1前領域データ取得部
112 第2前領域データ取得部
113 絞り込みヒストグラム作成部
114 地色潜在区分領域特定部
115、212 輝度ヒストグラム作成部
116、213 記録対象区分抽出部
117、214 輝度最大・最小値記録部
118 ヒストグラム評価部
121、221 色差最大・最小値記録部
211 前領域データ取得部
1, 2 Digital MFP 101, 201 Ground color luminance determination unit 102, 202 Ground color difference determination unit 111 First previous area data acquisition unit 112 Second previous area data acquisition unit 113 Narrowed histogram creation unit 114 Background color latent division area specification 115, 212 Luminance histogram creation unit 116, 213 Recording target category extraction unit 117, 214 Luminance maximum / minimum value recording unit 118 Histogram evaluation unit 121, 221 Color difference maximum / minimum value recording unit 211 Pre-region data acquisition unit

Claims (6)

明るさ成分と色味成分とが分離された表色系の画像データに基づいて原稿の地色を検出する機能を備える画像処理装置であって、
前記画像データの前記明るさ成分の分布を示す明るさヒストグラムを作成する明るさヒストグラム作成手段と、
前記明るさヒストグラムにおいて、度数が所定の値を超えた区分を記録対象区分として検出する記録対象区分検出手段と、
前記記録対象区分に属する画像データを前記原稿の地色に起因する地色画像データとして検出し、前記地色画像データの前記明るさ成分および前記色味成分に基づいて前記原稿に含まれる地色を特定する地色検出手段と、
を備えることを特徴とする画像処理装置。
An image processing apparatus having a function of detecting a ground color of a document based on color system image data in which a brightness component and a color component are separated,
A brightness histogram creating means for creating a brightness histogram indicating the distribution of the brightness component of the image data;
In the brightness histogram, a recording target section detection means for detecting a section whose frequency exceeds a predetermined value as a recording target section;
Image data belonging to the recording target category is detected as ground color image data resulting from the ground color of the document, and a ground color included in the document based on the brightness component and the color component of the ground color image data Ground color detection means for identifying
An image processing apparatus comprising:
請求項1に記載の画像処理装置であって、
前記原稿の第1の領域の画像データを第1画像データとして取得する第1画像データ取得手段と、
前記原稿の第2の領域の画像データを第2画像データとして取得する第2画像データ取得手段と、
前記第1画像データの前記明るさ成分の分布を示すヒストグラムを第1区分幅で作成して、絞り込みヒストグラムとして取得する絞り込みヒストグラム作成手段と、
前記絞り込みヒストグラムにおいて、度数が最大の区分を特定し、当該区分を含む区分領域を地色潜在領域として抽出する地色潜在領域抽出手段と、
を備え、
前記明るさヒストグラム作成手段が、前記地色潜在領域における、前記第2前画像データの前記明るさ成分の分布を示す明るさヒストグラムを前記第1区分幅よりも細かな第2区分幅で作成することを特徴とする画像処理装置。
The image processing apparatus according to claim 1,
First image data acquisition means for acquiring image data of the first region of the document as first image data;
Second image data acquisition means for acquiring image data of the second region of the document as second image data;
A narrowed histogram creating means for creating a histogram indicating the distribution of the brightness component of the first image data with a first section width and acquiring the histogram as a narrowed histogram;
In the narrowed-down histogram, a ground color latent area extracting unit that identifies a section having the highest frequency and extracts a section area including the section as a ground color latent area;
With
The brightness histogram creating means creates a brightness histogram showing a distribution of the brightness component of the second previous image data in the ground color latent area with a second section width smaller than the first section width. An image processing apparatus.
請求項2に記載の画像処理装置であって、
前記明るさヒストグラムにおける最大度数値が、前記絞り込みヒストグラムにおける最大度数値を前記第2区分幅に換算した値よりも小さい場合に、前記地色画像データの検出に失敗したと判断するエラー検出手段、
を備えることを特徴とする画像処理装置。
The image processing apparatus according to claim 2,
An error detection means for determining that the detection of the ground color image data has failed when a maximum power value in the brightness histogram is smaller than a value obtained by converting the maximum power value in the narrowing histogram into the second section width;
An image processing apparatus comprising:
請求項1から3のいずれかに記載の画像処理装置であって、
前記地色検出手段が、
前記記録対象区分検出手段が前記記録対象区分を検出した場合に、当該記録対象区分に属する画像データとしてその後にカウントされた画像データを、前記地色画像データとして検出することを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 3,
The ground color detecting means is
When the recording target section detection unit detects the recording target section, image data that is subsequently counted as image data belonging to the recording target section is detected as the ground color image data. apparatus.
請求項1から4のいずれかに記載の画像処理装置であって、
前記表色系がYCbCr表色系であり、前記明るさ成分が輝度成分であることを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 4,
An image processing apparatus, wherein the color system is a YCbCr color system, and the brightness component is a luminance component.
明るさ成分と色味成分とが分離された表色系の画像データに基づいて、原稿の地色を検出する方法であって、
前記画像データの前記明るさ成分の分布を示す明るさヒストグラムを作成する明るさヒストグラム作成工程と、
前記明るさヒストグラムにおいて、度数が所定の値を超えた区分を記録対象区分として検出する記録対象区分検出工程と、
前記記録対象区分に属する画像データを前記原稿の地色に起因する地色画像データとして検出し、前記地色画像データの前記明るさ成分および前記色味成分に基づいて前記原稿に含まれる地色を特定する地色検出工程と、
を備えることを特徴とする地色検出方法。
A method for detecting the background color of a document based on color system image data in which a brightness component and a color component are separated,
A brightness histogram creating step of creating a brightness histogram showing a distribution of the brightness component of the image data;
In the brightness histogram, a recording target section detection step of detecting a section whose frequency exceeds a predetermined value as a recording target section;
Image data belonging to the recording target category is detected as ground color image data resulting from the ground color of the document, and a ground color included in the document based on the brightness component and the color component of the ground color image data A ground color detection process for identifying
A ground color detection method comprising:
JP2007005668A 2007-01-15 2007-01-15 Image processor and ground color detection method Pending JP2008172677A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007005668A JP2008172677A (en) 2007-01-15 2007-01-15 Image processor and ground color detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007005668A JP2008172677A (en) 2007-01-15 2007-01-15 Image processor and ground color detection method

Publications (1)

Publication Number Publication Date
JP2008172677A true JP2008172677A (en) 2008-07-24

Family

ID=39700320

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007005668A Pending JP2008172677A (en) 2007-01-15 2007-01-15 Image processor and ground color detection method

Country Status (1)

Country Link
JP (1) JP2008172677A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017212597A (en) * 2016-05-25 2017-11-30 株式会社デンソー Image processing apparatus
JP2019140480A (en) * 2018-02-08 2019-08-22 富士ゼロックス株式会社 Image processing apparatus, image forming system and program
CN110706237A (en) * 2019-09-06 2020-01-17 上海衡道医学病理诊断中心有限公司 Diaminobenzidine separation and evaluation method based on YCbCr color space

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017212597A (en) * 2016-05-25 2017-11-30 株式会社デンソー Image processing apparatus
WO2017204304A1 (en) * 2016-05-25 2017-11-30 株式会社デンソー Image processing device
JP2019140480A (en) * 2018-02-08 2019-08-22 富士ゼロックス株式会社 Image processing apparatus, image forming system and program
CN110706237A (en) * 2019-09-06 2020-01-17 上海衡道医学病理诊断中心有限公司 Diaminobenzidine separation and evaluation method based on YCbCr color space
CN110706237B (en) * 2019-09-06 2023-06-06 上海衡道医学病理诊断中心有限公司 Diamino benzidine separation and evaluation method based on YCbCr color space

Similar Documents

Publication Publication Date Title
US8792735B2 (en) Image compressing apparatus which extracts black text edge pixels from an image and compresses a layer with black text edge pixels extracted
JP4744623B2 (en) Image compression method, image compression apparatus, image forming apparatus, computer program, and recording medium
JP4315209B2 (en) Image processing apparatus and ground color detection method
JP4293212B2 (en) Image color determination apparatus, image color determination method, and program
JP4861967B2 (en) Image processing apparatus, image processing method, image processing program, image forming apparatus, and storage medium
JP2012105132A (en) Image processing device, image formation device, image reading device, image processing method, program, and recording medium
CN104094586A (en) Image processing device, image formation device, image processing method, program, and memory medium
JP2020010163A (en) Image processing apparatus, image processing method, computer program, and recording medium
US11588954B2 (en) Image processing device, control method, and non-transitory recording medium
JP4438834B2 (en) Image color determination apparatus, image color determination method, and program
JP2008172677A (en) Image processor and ground color detection method
US7835045B2 (en) Image processing device and image processing method
JP4470958B2 (en) Image processing device
US7948662B2 (en) Image processing apparatus and method for performing shade correction on generated image using a shading coefficient
US20080055682A1 (en) Apparatus and Method for Deciding Image Color
JP5549836B2 (en) Image processing apparatus and image processing method
JP2006270148A (en) Image processing method, image processor and image forming apparatus
JP2008277955A (en) Image processing device and image processing system
JP4917952B2 (en) Image reading device
JP2008271364A (en) Image processor and image processing method
JP4101188B2 (en) Image processing apparatus, image processing method, and computer program
JP4386110B2 (en) Image color determination apparatus, image color determination method, and program
JP2006295677A (en) Image processing method, image processing apparatus, and program
JP2024018460A (en) Image processing device, image processing method and program
JP2008259016A (en) Image forming apparatus and image forming method

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20091016