JP2008271364A - Image processor and image processing method - Google Patents
Image processor and image processing method Download PDFInfo
- Publication number
- JP2008271364A JP2008271364A JP2007113892A JP2007113892A JP2008271364A JP 2008271364 A JP2008271364 A JP 2008271364A JP 2007113892 A JP2007113892 A JP 2007113892A JP 2007113892 A JP2007113892 A JP 2007113892A JP 2008271364 A JP2008271364 A JP 2008271364A
- Authority
- JP
- Japan
- Prior art keywords
- region
- document
- histogram
- area
- color
- 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
Links
Images
Abstract
Description
本発明は、読み取った原稿がモノクロかグレーかを自動的に判定することが可能な画像処理装置に関する。 The present invention relates to an image processing apparatus capable of automatically determining whether a read original is monochrome or gray.
近年、読み取った原稿がカラーか否かを自動的に判定する自動カラー判定(ACS;Auto Color Select)機能を有する画像処理装置が提案されている(特許文献1)。これは、1ライン分のRGB(Red Green Blue)信号が一致したら無彩色、すなわち白黒と判断するものである。さらに、これらの信号が0Vか1Vかの何れかであればモノクロと判定し、0〜1Vの中間的な値であればグレーと判定するものである。 In recent years, there has been proposed an image processing apparatus having an automatic color determination (ACS) function for automatically determining whether or not a read document is color (Patent Document 1). In this case, if the RGB (Red Green Blue) signals for one line match, it is determined that the color is achromatic, that is, black and white. Furthermore, if these signals are either 0V or 1V, it is determined as monochrome, and if they are intermediate values between 0 and 1V, they are determined as gray.
しかしながら、上述のように、RGB信号が中間的な値であるか否かというのは、極めて不明瞭な基準であり、しかも該信号で表される画像が、原稿の地色なのか、有意な画像なのかについて正確な判定を行えるものではないと思われる。そこで、本発明の課題は、無彩色と判断された場合に、モノクロかグレーかを高い精度で判定する技術を提供することにある。 However, as described above, whether or not the RGB signal is an intermediate value is a very ambiguous standard, and whether the image represented by the signal is the background color of the document is significant. It seems not to be able to make an accurate judgment as to whether it is an image. Therefore, an object of the present invention is to provide a technique for determining with high accuracy whether monochrome or gray when an achromatic color is determined.
上記課題を解決すべく、第1の発明は、原稿を読み取る読取部と、前記原稿の明るさ成分を抽出する抽出部と、前記抽出部によって抽出される明るさ成分を予め定められた数の領域に分割し、カウント数のヒストグラムを作成する作成部と、前記作成部によって作成されるヒストグラムに基づいて、予め定められた第1領域を除く第2領域における分布数の極大値を検出するピーク検出部と、前記ヒストグラムの前記第2領域にわたって、前記極大値に所定の係数を掛けた分布数よりも多く分布している場合に、前記原稿をモノクロと判断する判断部とを備える、画像処理装置である。
ここで、「明るさ成分」とは、色(色調、色相等)に関係なく無彩色としての明るさのみを表すパラメータのことをいう。例えば、YCbCr表色系における輝度Y、L*a*b*表色系における明度L*を指す。もちろん輝度Y、明度L*に限定されるものではない。
In order to solve the above-described problem, the first invention provides a reading unit that reads a document, an extraction unit that extracts a brightness component of the document, and a predetermined number of brightness components extracted by the extraction unit. A generating unit that divides into regions and creates a histogram of count numbers, and a peak that detects a maximum value of the distribution number in a second region excluding a predetermined first region based on the histogram created by the creating unit An image processing unit including: a detection unit; and a determination unit that determines that the original is monochrome when the distribution is greater than the number of distributions obtained by multiplying the maximum value by a predetermined coefficient over the second region of the histogram. Device.
Here, the “brightness component” refers to a parameter that represents only the brightness of an achromatic color regardless of the color (color tone, hue, etc.). For example, the luminance Y in the YCbCr color system, and the lightness L * in the L * a * b * color system. Of course, it is not limited to luminance Y and lightness L * .
第2の発明は、第1の発明であって、前記判断部は、前記ヒストグラムのうち、前記第2領域のカウント数の総和が所定の第1閾値を超える場合に、前記原稿をグレーと判断する。 2nd invention is 1st invention, Comprising: The said judgment part judges that the said original is gray when the sum total of the count number of the said 2nd area exceeds the predetermined | prescribed 1st threshold value in the said histogram. To do.
第3の発明は、第1の発明であって、前記判断部は、前記ヒストグラムの前記第2領域において、隣接する前記各領域のカウント数の差が所定の第2閾値を超える場合に、前記原稿をグレーと判断する。 3rd invention is 1st invention, Comprising: In the said 2nd area | region of the said histogram, the said judgment part, when the difference of the count number of each said adjacent area | region exceeds predetermined 2nd threshold value, Judge the document as gray.
第4の発明は、原稿を読み取る読取工程と、前記読取工程で読み取られる前記原稿の明るさ成分を抽出する抽出工程と、前記抽出工程で抽出される前記明るさ成分を予め定められた数の領域に分割し、カウント数のヒストグラムを作成する作成工程と、前記作成工程で作成されるヒストグラムに基づいて、予め定められた第1領域を除く第2領域における分布数の極大値を検出するピーク検出工程と、前記作成工程で作成される前記ヒストグラムの前記第2領域にわたって、前記極大値に所定の係数を掛けた分布数よりも多く分布している場合に、前記原稿をモノクロと判断する判断工程とを備える、画像処理方法である。 According to a fourth aspect of the present invention, there is provided a reading step of reading a document, an extraction step of extracting a brightness component of the document read in the reading step, and a predetermined number of the brightness components extracted in the extraction step. A peak for detecting the maximum value of the distribution number in the second region excluding the predetermined first region based on the creation step of creating a histogram of count numbers by dividing into regions and the histogram created in the creation step In the detection step and the second region of the histogram created in the creation step, when the distribution is larger than the number of distributions obtained by multiplying the maximum value by a predetermined coefficient, the determination that the document is determined to be monochrome And an image processing method.
第1の発明によれば、明るさ成分のヒストグラムにについて、第2領域における分布数の極大値を検出し、第2領域にわたって、該極大値に所定の分布数を掛けた分布数よりも多く分布している場合に、原稿をモノクロと判断するので、高い精度でモノクロ・グレー判定を行うことが可能となる。 According to the first invention, for the brightness component histogram, the maximum value of the distribution number in the second region is detected, and the distribution number is larger than the distribution number obtained by multiplying the maximum value by the predetermined distribution number over the second region. If the document is distributed, the document is determined to be monochrome, so that monochrome / gray determination can be performed with high accuracy.
第2の発明によれば、ヒストグラムのうち、第2領域のカウント数の総和が第1閾値を超える場合に、原稿をグレーと判断するので、より高い精度でモノクロ・グレー判定を行うことが可能となる。 According to the second aspect of the invention, when the total number of counts in the second region of the histogram exceeds the first threshold value, the document is determined to be gray, so monochrome / gray determination can be performed with higher accuracy. It becomes.
第3の発明によれば、ヒストグラムの第2領域において、隣接する各領域のカウント数の差が第2閾値を超える場合に、原稿をグレーと判断するので、より高い精度でモノクロ・グレー判定を行うことが可能となる。 According to the third invention, in the second area of the histogram, when the difference in the number of counts of adjacent areas exceeds the second threshold value, the original is determined to be gray, so monochrome / gray determination can be performed with higher accuracy. Can be done.
第4の発明によれば、明るさ成分のヒストグラムについて、第2領域における分布数の極大値を検出し、第2領域にわたって、該極大値に所定の係数を掛けた分布数よりも多く分布している場合に、原稿をモノクロと判断するので、高い精度でモノクロ・グレー判定を行うことが可能となる。 According to the fourth invention, with respect to the histogram of the brightness component, the maximum value of the distribution number in the second region is detected, and the distribution is more than the distribution number obtained by multiplying the maximum value by the predetermined coefficient over the second region. The document is determined to be monochrome, so monochrome / gray determination can be performed with high accuracy.
<第1の実施の形態>
以下、本発明の第1の実施の形態に係る画像処理装置としてコピー機を例に図面を参照しながら説明する。
<First Embodiment>
Hereinafter, a copying machine will be described as an example of the image processing apparatus according to the first embodiment of the present invention with reference to the drawings.
<構成>
図1は、本発明の第1の実施の形態に係るコピー機10の構成例を示す斜視図である。このコピー機10は、原稿を読み取って画像データを生成し、該画像データに基づいて記録紙に描画するものである。なお、図1をはじめとする以下の図には本発明に関係する要素及び/又は機能のみが示されている。また、コピー機10では、明るさ成分として、YCbCr表色系の輝度Yを使用している。
<Configuration>
FIG. 1 is a perspective view showing a configuration example of a
操作部11は、コピー機10を操作するために必要なテンキー、各種ファンクションキー等のメカニカルスイッチを備えている。操作部11は、ユーザによってこれらのキーが操作されることにより、原稿のスキャン及びコピー等の各種コマンドの実行命令等を受け付ける。
The
表示部12はLCD等の表示デバイスによって構成された一般的なディスプレイであって、各種情報を画像として画面に表示する。なお、表示部12にタッチパネルディスプレイを適用して、操作部11の一部又は全部の機能を兼ね備えるようにしても良い。
The
読取部13は、ADF(Automatic Document Feeder;原稿自動送り機能)を有する原稿載置部14に載置された原稿を順次にCCDラインセンサ(図示省略)等の撮像素子で読み取り、該原稿上に記録されている画像に基づいて画像データを生成する。読み取られた原稿は原稿排出トレイ15へ排出される。ここで、原稿は、必ずしもADFによって読み取る必要はなく、FBS(Flat Bed Scanner)方式によって読み取るようにしても良い。なお、FBS方式とは、コンタクトガラス(図示省略)上に載置された原稿を撮像素子で読み取り、読み取りが完了した原稿を排出するという読取手順を々実行する方式である。
The
描画部16は、電子写真方式等のプリンタ装置であり、読取部13によって生成された画像データをハードコピーとしてプリントアウトして記録する。図示は省略するが、具体的にはまず、トナーカセットから供給されるトナーを、画像データに基づいて感光ドラムに付着させる。それを記録紙搬送部によって記録紙カセット17から搬送される記録紙に転写し、転写された記録紙を記録紙排出トレイ18へ排出する。なお、描画部16が記録する画像データは、必ずしも読取部13によって生成された画像データである必要はなく、コピー機10が通信ネットワークに接続されている場合には、該通信ネットワークにより受信した画像データであっても良い。
The
図2は、コピー機10の構成例を示すブロック図である。上述の各構成要素は、バス20を介して電気的に接続されている外、以下の構成要素とも電気的に接続されている。
FIG. 2 is a block diagram illustrating a configuration example of the
画像処理部21は、読取部13によって生成される画像データが、カラーか、グレーか、モノクロか、無記入紙かを判定するACS(Auto Color Selector;自動カラー判定)機能を有する画像処理LSIである。なお、画像処理部21の詳細な処理内容については後に詳述する。
The
MPU22は、操作部11からのコマンド実行命令等の入力信号や、該入力信号に基づくデータ演算、出力信号の生成、表示部12への表示内容の制御、読取部13の制御、描画部16の制御及び画像処理部21の制御等を行う。ROM23は、MPU22によって実行されるプログラムや制御に必要なデータを格納し、RAM24は、MPU22による統括制御に必要なデータを一時記憶する。これにより、コピー機10の各種機能が実現される。すなわち、MPU22は、ROM23及びRAM24と連携してコピー機10の各構成要素を制御する。
The MPU 22 receives input signals such as command execution instructions from the
<画像処理部の処理内容>
図3は、画像処理部21を示すブロック図であり、図4は、画像処理部21が処理する原稿の範囲を示す例である。ここで、原稿40の短辺方向が読取部13の主走査方向(CCDラインセンサの配列方向)、長辺方向が副走査方向(CCDラインセンサの配列方向と垂直な方向)である。画像処理部21は、読取部13が生成する画像データによって表される原稿40を予め定められた複数の領域に分割して、それぞれの領域に対応する処理を実行する。
<Processing content of image processing unit>
FIG. 3 is a block diagram showing the
画像処理部21のACS機能では、まず、平均化縮小部301が例えば、注目画素とその右、右下及び下の画素の階調値の平均を求めて変換後の画素に代入していく。その後、γ補正部302が画像の明るさの変化に対する電圧換算値の変化の比を調節する。なお、原稿をカラーCCDで読み取った場合等のように原稿がRGB表色系によって表現されている場合には、これを行列変換部303が、YCbCr表色系に変換する。これらを実行した後に画像処理部21は以下の処理状態をもっており、地色マスク部304〜ブロック記録部311が連携して以下の処理を行う。すなわち;
(1)前処理1:
前処理1領域41において原稿の地色の有無と、その地色の領域及び輝度の領域を判定する。
(2)前処理2:
前処理1で地色原稿だと判定された場合に、前処理2領域42においてブロック処理で使用する閾値を決定する。
(3)ブロック処理:
前処理1及び前処理2で得られた結果を受けて、画像がカラーであるか、グレーであるか、モノクロであるか、無記入紙であるかを判定する。なお、ここでいうカラーとは、地色のみが有彩色である場合は含まないものとする。
(4)画像判定用データの記録:
ソフトウェアにより画像データの種類を判定するために、以下のデータを記録する。
(a)地色の判定と地色のCbCr色差平面における領域を記録;
(b)地色エリアにおけるYCbCrの最大値及び最小値を記録;
(c)各輝度エリアにおけるトータル輝度カウンタ値を記録;
(d)各カラーエリアにおけるトータルカラーカウンタ値を記録;
(e)ブロック処理におけるカラーブロック番号とカラー判定エリアを記録;
(f)ブロック処理におけるグレーブロック番号とグレー判定エリアを記録。
In the ACS function of the
(1) Pretreatment 1:
In the
(2) Pretreatment 2:
When it is determined in the
(3) Block processing:
Based on the results obtained in the
(4) Recording of image determination data:
In order to determine the type of image data by software, the following data is recorded.
(A) Judgment of the ground color and recording the area of the ground color in the CbCr color difference plane;
(B) Record the maximum and minimum values of YCbCr in the ground color area;
(C) record the total luminance counter value in each luminance area;
(D) Record the total color counter value in each color area;
(E) Record the color block number and color judgment area in the block processing;
(F) Record gray block number and gray determination area in block processing.
上述の前処理1及び前処理2でカラーの地色判定が行われる。カラーの地色判定は、輝度の地色判定とは独立しており、以下の条件が満たされたときに、その領域を地色エリアとして判定する。すなわち;
(1)前処理1で1つの領域のカウント数が第1地色判定閾値を超えている。
(2)隣接する領域のカウント数の総和が第2地色判定閾値を超えている。
In the
(1) In the
(2) The sum of the counts of adjacent areas exceeds the second ground color determination threshold.
ここで、第1地色判定閾値とは、1つの領域のカウント数を地色と判定するときの閾値であり、第2地色判定閾値とは、隣接する領域のカウント数の総和を地色と判定するときの閾値である。ただし、隣接する領域はどの方向で隣接していても良い。 Here, the first ground color determination threshold value is a threshold value when the count number of one area is determined as the ground color, and the second ground color determination threshold value is the sum of the count numbers of adjacent areas. It is a threshold when determining. However, adjacent regions may be adjacent in any direction.
カラーの地色の判定は、前処理1及び前処理2においては前処理有彩色マスクを使用し、ブロック処理においては地色判定を有効にすることにより、選択されたマスクを適用する。ブロック処理用のマスクは、色相マスクと地色マスクとの2種類あり、何れも前処理1及び前処理2で検知した地色の範囲に対して、マスクの範囲を拡張する。地色判定の有無に関わらず、ブロック処理では何れかのマスクに各色相のマージン値を加算した値を使用する。ここで、「マスク」とは、有彩であったとしても、無彩として判定されるような色空間での領域を指す。
In the determination of the color ground color, a pre-processed chromatic color mask is used in the
具体的には、前処理1領域41及び前処理2領域42において、色相判定カウンタ305と輝度カウンタ306と極値記録部307とが連携することにより、原稿40は有彩色であるか無彩色であるかを判定する。原稿40が無彩色である場合には、輝度カウンタ306が該原稿の輝度を抽出してカウントし、ヒストグラムを作成する。一方、原稿40が有彩色である場合には、通常のカラー画像処理を行う。ここで、輝度カウンタ306が、本発明の抽出部及び作成部に相当する。また、極値記録部307が、本発明のピーク検出部に相当する。
Specifically, in the
図5及び図6は、輝度カウンタ306が作成するヒストグラムを示す図である。ここで、図5は、原稿上の画像の大部分が文字である場合のヒストグラムであり、図6は、原稿上の画像の大部分が写真である場合のヒストグラムである。図5に示す如く、輝度カウンタ306は、黒領域(図5においては横軸のB側)から白領域(図5においては横軸のW側)までの領域を予め定められた数に分割(例えば、16分割)して該領域ごとの輝度値をもつ画素をカウントし、ヒストグラム50a,50bを作成する。
5 and 6 are diagrams showing histograms created by the
作成されるヒストグラム50a,50bに対して、地色検知部308が、白領域側で検出されたピークPにより定まる閾値51よりも白領域側を地色領域(第1領域53)として検知する。なお、地色検知部308が検知する地色は、必ずしも閾値51よりも白領域側でなくとも良い。例えば、コピー機10で使用する原稿の色が予め設定されている場合には、その色に合わせた閾値を設定するようにしても良い。
For the
以下、画像処理部21の処理内容を更に詳細に説明する。
Hereinafter, the processing content of the
<カラーの判定>
カラーの判定には、地色をカラーと判定しないために、そのカラーをマスクする処理が行われる。ここでは、それぞれ色相マスク、地色マスク、ゼロエリアマスクと定義するマスクについて説明する。
<Color judgment>
In the determination of color, in order not to determine the ground color as a color, a process of masking the color is performed. Here, masks defined as a hue mask, a ground color mask, and a zero area mask will be described.
<色相マスク>
図7は、色相マスクを示す図である。色相マスク71は、CbCr平面70の中心の無彩領域に対してマスクを掛けるものであり、更にこのマスク71aをブロック処理で使用するマスクとして選択した場合には、地色を検出した領域(以下、「地色領域」と称する)72に対して拡張されたマスク71bを適用する。
<Hue mask>
FIG. 7 shows a hue mask. The
つまり、前処理1及び前処理2で検出する地色領域72に対して、ブロック処理において地色領域72の中心がCbCr平面の中心に来るように座標の移動を行う。このとき、座標移動を行う前の無彩の中心がマスク71aの外側の領域に移動してしまうため、該領域に対してはマスク71bを適用する。ここで、CbCr平面における領域の分割は、図8に示す領域の分割テーブルに従うものとする。
That is, the coordinates of the
<地色マスク>
図9は、地色マスクを示す図である。地色マスク91は、色相マスク71と同様に地色が検出されたときに、地色マスク91を選択しておくことにより、ブロック処理で使用する。地色マスク91は、色相マスク71と併せて使用され、前処理1及び前処理2で検出される地色領域に対して次のように決定する。すなわち、
(1)地色の中心座標92の絶対値が大きい方をx軸、小さい方をy軸と設定する。
(2)中心座標92が、y=x/8からy=xの8分の1刻みの傾きの直線93a〜93hのうち、どの領域に存在するかを検知する。
(3)地色の領域のxの中心座標及びyの最小値の座標から色相マスク71に向けて、地色の中心座標92よりも1つ上に存在する直線(図9では直線93d)と平行な直線94dを引く。この直線94dより上(+y方向)側でかつ色相マスク71を含む上側をマスク領域とする。
(4)上記(3)と同様に、地色の領域のxの中心座標及びyの最大値の座標から色相マスク71に向けて、地色の中心座標92よりも1つ下に存在する直線(図9では直線93e)と平行な直線94eを引く。この直線94eより下(−y方向)側でかつx座標がゼロ以上の領域をマスク領域とする。
(5)上記(3)、(4)で設定される2つのマスク領域が重複する領域と、地色の領域のx,y座標の最大値及び最小値によって囲まれる方形領域95とを含む領域を地色マスク91とする。
<Background mask>
FIG. 9 is a diagram illustrating a ground color mask. The
(1) The larger absolute value of the center coordinates 92 of the ground color is set as the x axis, and the smaller absolute value is set as the y axis.
(2) It is detected in which region of the
(3) A straight line (
(4) Similarly to (3) above, a straight line that is one level lower than the center coordinates 92 of the ground color from the center coordinates of the ground color area and the coordinates of the maximum value of y toward the hue mask 71 A
(5) An area including an area where the two mask areas set in (3) and (4) above overlap and a rectangular area 95 surrounded by the maximum and minimum values of the x and y coordinates of the ground color area Is the
なお、マスクの強化以上にある点はマスク内と判定し、各マスクの範囲にはマージンを追加することが可能となっている。ここで、地色マスク91は、色相マスク71と異なり、原点移動は行わないため、各領域の色が他の領域にずれることはない。
Points that are beyond the mask enhancement are determined to be in the mask, and a margin can be added to the range of each mask. Here, unlike the
<ゼロエリアマスク>
図10は、ゼロエリアマスクを示す図である。マスクは、上述の色相マスク71及び地色マスク91の外、ゼロエリアマスク101を設定することも可能とする。ゼロエリアマスク101は、Cbが正の領域において、ゼロエリアマスク101に覆われる領域を無彩とするマスクである。地色の領域102が特定できたときに、CbCr平面上での回転行列により領域102を回転させ、ゼロエリアマスク101内に移動させることにより、地色の領域102を無彩と判定する。
<Zero area mask>
FIG. 10 shows a zero area mask. As the mask, in addition to the
<輝度の判定>
ブロック処理における輝度の各閾値は、前処理の地色の輝度の範囲から決定する。なお、地色検出をOFFにしている場合は、予め定められたデフォルト値が適用される。
<Determination of brightness>
Each luminance threshold value in the block processing is determined from the luminance range of the ground color in the preprocessing. Note that when the ground color detection is OFF, a predetermined default value is applied.
<前処理1>
前処理1では輝度領域を16分割し、その中で最もカウント数の多い領域を検知して、該領域を地色領域と判定する。現行の地色の輝度の分布は、原稿の種類等により広範囲に亘ったり、若しくは2つの領域にまたがったりする可能性があるため、ここでは最もカウント数が多い領域を検知することで大まかに地色の領域を判定する。ただし、カウント数が第1地色判定閾値に満たなかった場合は、地色であると判断するに十分なカウント数が得られたなかったと判断してフラグGBGF(Gray Back Ground Fail)を立てる。
<
In
<前処理2>
前処理2では、前処理1で最もカウント数の多い領域の前後を含めた領域について、カウント数がレジスタに予め設定されている値を超えた場合、以後その領域における輝度を極値記録部307が記録する最大最小値の対象とする。ただし、記録するのは、カウント数が超えた後で、それまでのその領域の極値を記録するわけではない。また、輝度が地色輝度領域に入った場合のみ、カラーの地色におけるCbCrの極値記録を行う。なお、ここでの最大のカウント値が前処理1でのカウント数の最大値の4分の1に満たない場合は、カウント数不足と見なし、地色判定エラーGBGFを立てる。無彩の地色の有無は、地色の輝度から判断する。
<
In the
<ブロック処理>
各ブロック(第1ブロック処理領域43、第2ブロック処理領域44、…)において、輝度の分布からグレーの可能性が高いブロックについては、該ブロックがグレーであるかどうかを判断する材料となるデータの記録を行う。まず、モノクロの文字の原稿の輝度の分布(図5参照)の傾向として、グレーの部分が輝度によらず安定しており、文字の濃度に当たる全黒の領域のカウント数にピークが現れる(ヒストグラム50a)。又は、ピークは存在しなくとも、グレーの最大値に対してカウント数がそれほど少なくないといった傾向がある(ヒストグラム50b)。その外、全体における全黒の存在する割合が比較的低い(例えば、20%程度未満)といった傾向がある。
<Block processing>
In each block (the first
そこで、以下の2つの条件の何れかを満たしたときに、グレーブロックとして記録する。すなわち;
(1)ヒストグラム50a,50bに基づいて、地色領域(第1領域53)及び全黒の領域(図5においては領域0)を除く領域(第2領域54)における最大カウント数が最小カウント数を超えている。なおかつその最大カウント数に予め定められた係数(例えば、本実施形態においては0.5)を乗じたカウント数を超えている領域にフラグを立てた場合に、レジスタに予め設定されている領域よりも暗い領域(同領域1)にフラグが立っていない(ヒストグラム50bの場合)。
(2)ブロックのグレーカウントが予め定められたグレーカウント閾値(第1閾値)を超えている。つまり、全体における全黒の存在割合が比較的高い(例えば、20%程度以上)。
Therefore, a gray block is recorded when either of the following two conditions is satisfied. Ie;
(1) Based on the
(2) The gray count of the block exceeds a predetermined gray count threshold (first threshold). That is, the ratio of all black in the whole is relatively high (for example, about 20% or more).
例えば、図6に示すようなヒストグラム61が作成される場合には、ブロックのグレーカウントがグレーカウント閾値を超えていないため上記の条件(2)は満足していない。しかし、地色領域が領域Dであるため、領域C〜Fを輝度判定から除き、領域0〜Bで最もカウント数が多い領域7に2分の1を乗じたカウント数を超えている領域(領域2,3,7)にフラグを立てるとき、領域1にはフラグが立っていないので上記の条件(1)は満足する。
For example, when the histogram 61 as shown in FIG. 6 is created, the above condition (2) is not satisfied because the gray count of the block does not exceed the gray count threshold. However, since the ground color area is the area D, the areas C to F are excluded from the luminance determination, and the
したがって、地色マスク部304〜ブロック記録部311が連携することにより、本発明の判断部に相当する処理を行う。
Accordingly, the ground
ブロック処理では、このグレーブロックの判定の外、明点ブロック検知及び非空白ブロック検知を行う。これらは、明点の場合は明点ブロックカウンタにブロック数がカウントされ、非空白ブロックの場合は終端ブロックブランクチェックに記録される。 In block processing, in addition to this gray block determination, bright point block detection and non-blank block detection are performed. In the case of a bright point, the number of blocks is counted in a bright point block counter, and in the case of a non-blank block, these are recorded in a terminal block blank check.
<コピー機10の動作>
コピー機10は、以上のような構成を備えることにより、以下のような動作を行う。図11は、モノクロ・グレー判定手順を示すフローチャートである。このフローチャートでは、コピー機10がモノクロ・グレー判定を行うための処理動作のみを示し、その他の処理動作については図示及び説明を省略している。また、特に記載のない場合は、コピー機10における一連の処理動作は、MPU22の制御下で自動的に行われる。
<Operation of
The
まず、コピー機10の電源がONの状態で、ユーザが原稿載置部14に載置した原稿40を読み取る原稿読取命令が入力されるまで待機する(ステップS1101)。原稿読取命令が入力されるとステップS1101においてYesを選択して、原稿載置部14に載置されている原稿40を読み取る(読取工程:ステップS1102)。ステップS1102において原稿40が読み取られると、前処理1領域41及び前処理2領域42に対して、読み取られた原稿40が無彩色であるか否かを、色相判定カウンタ305が判定する(ステップS1103)。
First, in a state where the power of the
原稿40が有彩色である場合には、ステップS1103においてNoを選択して、通常のカラー画像処理を行う(ステップS1104)。一方、原稿が無彩色である場合には、ステップS1103においてYesを選択して、輝度カウンタ306が輝度成分を抽出(ステップS1105)し、輝度成分のヒストグラムを作成する(作成工程:ステップS1106)。
If the
作成されるヒストグラムに対して、極値記録部307がピークを検出(ステップS1107)し、地色マスク部304〜ブロック記録部311が連携して地色判定を行う(ステップS1108)。そして、原稿40がモノクロかグレーかを判断する(判断工程:ステップS1109)。その後、判断結果に基づいて、描画部16が記録紙カセット17から搬送される記録紙に原稿40の画像データを転写したり、記憶部(図示省略)に記憶したりする。
The extreme
<効果>
以上のように、輝度成分のヒストグラムについて、第2領域54における分布数の極大値を検出し、第2領域54にわたって、該極大値に所定の係数を掛けた分布数よりも多く分布している場合に、原稿をモノクロと判断するので、高い精度でモノクロ・グレー判定を行うことが可能である。
<Effect>
As described above, the maximum value of the number of distributions in the
または、ヒストグラムのうち、第2領域54のカウント数の総和が第1閾値(グレーカウント閾値)を超える場合に、原稿をグレーと判断するので、より高い精度でモノクロ・グレー判定を行うことが可能となる。
Alternatively, when the sum of the counts of the
<変形例>
以上、本発明の実施形態を説明したが、本発明は上述の実施形態に限定されるものではない。例えば、ヒストグラムの第2領域54において、隣接する各領域のカウント数の差が所定の閾値(第2閾値)を超える場合に、原稿をグレーと判断するようにしても良い。これによっても高い精度でモノクロ・グレー判定を行うことが可能となる。
<Modification>
As mentioned above, although embodiment of this invention was described, this invention is not limited to the above-mentioned embodiment. For example, in the
また、本実施形態においては、原稿が読取部13によって読み取られた場合を例に説明したが、ディジタルカメラ等から読み込まれたRGB表色系のRAWデータに基づいて、行列変換部303がYCbCr表色系に変換した後に、画像処理部21が画像処理を行っても良い。また、PC(Personal Computer)等からJPEG形式の画像ファイルを読み取って、該画像ファイルをデコードしてYCbCrを取り出した後に、画像処理部21が画像処理を行っても良い。
In this embodiment, the case where the document is read by the
また、モノクロ・グレー判定は上述の手法の外にもソフトウェアを用いて行う手法がある。例えば、各領域において、領域のカウントビットが立つ期待値を求め、それが記録されている結果に対し、大きな差がないかを確認して、差が小さければモノクロ、差が大きければブロックごとに分布が異なるためにグレーと判定する方法がある。 In addition to the above-described method, there is a method for performing monochrome / gray determination using software. For example, in each area, obtain the expected value where the count bit of the area stands, check whether there is a big difference from the recorded result, and if the difference is small, it is monochrome, if the difference is large, for each block There is a method of determining gray because the distribution is different.
また、輝度を16分割したときのトータルカウントを記録しているため、この値から1ブロックにおけるカウント数の平均値が求められる。文字情報だけの場合は、分布がブロックでそれほど変わらないと仮定すれば、分布が大きく異なるブロックが記録されている場合には、グレーブロックと判定することができる。 Further, since the total count when the luminance is divided into 16 is recorded, the average value of the number of counts in one block is obtained from this value. In the case of only character information, if it is assumed that the distribution does not change so much between blocks, it can be determined that the block is a gray block if a block with a greatly different distribution is recorded.
また、本発明はコピー機10に限定されるものではなく、スキャナ又はファクシミリであっても構わないし、これらを組み合わせたMFP(Multi Function Peripherals;複合機)であっても構わない。さらに、上述の処理を行うことが可能な回路構成であっても良く、上述の各工程に限定されるものでもない。
Further, the present invention is not limited to the
10 コピー機
13 読取部
21 画像処理部
304 地色マスク部
305 色相判定カウンタ
306 輝度カウンタ
307 極値記録部
308 地色検知部
309 カラーマスク設定部
310 輝度閾値設定部
311 ブロック記録部
53 第1領域
54 第2領域
DESCRIPTION OF
Claims (4)
前記原稿の明るさ成分を抽出する抽出部と、
前記抽出部によって抽出される明るさ成分を予め定められた数の領域に分割し、カウント数のヒストグラムを作成する作成部と、
前記作成部によって作成されるヒストグラムに基づいて、予め定められた第1領域を除く第2領域における分布数の極大値を検出するピーク検出部と、
前記ヒストグラムの前記第2領域にわたって、前記極大値に所定の係数を掛けた分布数よりも多く分布している場合に、前記原稿をモノクロと判断する判断部と
を備える、画像処理装置。 A reading section for reading a document;
An extraction unit for extracting a brightness component of the document;
A creation unit that divides the brightness component extracted by the extraction unit into a predetermined number of regions and creates a histogram of count numbers;
Based on the histogram created by the creation unit, a peak detection unit that detects a maximum value of the distribution number in the second region excluding the predetermined first region;
An image processing apparatus comprising: a determination unit configured to determine that the document is monochrome when the distribution is greater than the distribution number obtained by multiplying the maximum value by a predetermined coefficient over the second region of the histogram.
前記判断部は、前記ヒストグラムのうち、前記第2領域のカウント数の総和が所定の第1閾値を超える場合に、前記原稿をグレーと判断する、画像処理装置。 The image processing apparatus according to claim 1,
The determination unit is an image processing apparatus that determines that the original is gray when the total number of counts of the second area exceeds a predetermined first threshold in the histogram.
前記判断部は、前記ヒストグラムの前記第2領域において、隣接する前記各領域のカウント数の差が所定の第2閾値を超える場合に、前記原稿をグレーと判断する、画像処理装置。 The image processing apparatus according to claim 1,
The determination unit determines that the document is gray when the difference in the number of counts of adjacent regions in the second region of the histogram exceeds a predetermined second threshold value.
前記読取工程で読み取られる前記原稿の明るさ成分を抽出する抽出工程と、
前記抽出工程で抽出される前記明るさ成分を予め定められた数の領域に分割し、カウント数のヒストグラムを作成する作成工程と、
前記作成工程で作成されるヒストグラムに基づいて、予め定められた第1領域を除く第2領域における分布数の極大値を検出するピーク検出工程と、
前記作成工程で作成される前記ヒストグラムの前記第2領域にわたって、前記極大値に所定の係数を掛けた分布数よりも多く分布している場合に、前記原稿をモノクロと判断する判断工程と
を備える、画像処理方法。 A reading process for reading a document;
An extraction step of extracting a brightness component of the document read in the reading step;
A step of creating the count number histogram by dividing the brightness component extracted in the extraction step into a predetermined number of regions;
Based on the histogram created in the creation step, a peak detection step of detecting a maximum value of the distribution number in the second region excluding the predetermined first region;
A determination step of determining that the original is monochrome when the distribution is greater than the number of distributions obtained by multiplying the maximum value by a predetermined coefficient over the second region of the histogram created in the creation step. , Image processing method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007113892A JP2008271364A (en) | 2007-04-24 | 2007-04-24 | Image processor and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007113892A JP2008271364A (en) | 2007-04-24 | 2007-04-24 | Image processor and image processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008271364A true JP2008271364A (en) | 2008-11-06 |
Family
ID=40050254
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007113892A Pending JP2008271364A (en) | 2007-04-24 | 2007-04-24 | Image processor and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008271364A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013051652A (en) * | 2011-08-31 | 2013-03-14 | Brother Ind Ltd | Image processing device, image reading device, and image processing program |
JP2013115611A (en) * | 2011-11-29 | 2013-06-10 | Brother Ind Ltd | Image processing device and image processing program |
-
2007
- 2007-04-24 JP JP2007113892A patent/JP2008271364A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013051652A (en) * | 2011-08-31 | 2013-03-14 | Brother Ind Ltd | Image processing device, image reading device, and image processing program |
JP2013115611A (en) * | 2011-11-29 | 2013-06-10 | Brother Ind Ltd | Image processing device and image processing program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8041112B2 (en) | Image processing apparatus, image forming apparatus, image reading apparatus, image processing method, image processing program, computer-readable storage medium for storing the image processing program with segmentation and density correction optimization | |
JP4529888B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2008011267A (en) | Image processor, image processing method, image processing program, and memory medium | |
US8467085B2 (en) | Image processing apparatus, data amount reducing method, and data amount reducing program embodied on computer readable medium | |
CN110691172B (en) | Image processing apparatus, image processing method, and recording medium | |
US7529007B2 (en) | Methods of identifying the type of a document to be scanned | |
JP3931651B2 (en) | Image processing device | |
JP4930423B2 (en) | Image processing apparatus, image forming apparatus, image processing apparatus control method, and image processing apparatus control program | |
JP4420058B2 (en) | Image processing apparatus and image processing method | |
JP4367518B2 (en) | Image processing apparatus and image processing method | |
JP2008271364A (en) | Image processor and image processing method | |
EP1986415B1 (en) | Image processing device and image processing method | |
JP2017135690A (en) | Image processing device, image processing method, and program | |
US7697163B2 (en) | Image processing apparatus, image processing method, and image processing program for distinguishing pixels of an edge portion | |
JP4039911B2 (en) | Image processing apparatus and image processing method | |
JP5549836B2 (en) | Image processing apparatus and image processing method | |
JP2008172677A (en) | Image processor and ground color detection method | |
JP4165599B2 (en) | Image processing device | |
JP4101188B2 (en) | Image processing apparatus, image processing method, and computer program | |
JP6794901B2 (en) | Image processing equipment and computer programs | |
JP6834701B2 (en) | Image processing equipment and computer programs | |
JP4032735B2 (en) | Image processing apparatus and image processing method | |
JP2023112514A (en) | Image processing apparatus, method for controlling the same, and program | |
JP2004336714A (en) | Original image identifying apparatus, color copying machine, and original image identifying method | |
JPH08340447A (en) | Image processor with through prevention function |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20091016 |