JP3039675B2 - Color image processing equipment - Google Patents

Color image processing equipment

Info

Publication number
JP3039675B2
JP3039675B2 JP2206610A JP20661090A JP3039675B2 JP 3039675 B2 JP3039675 B2 JP 3039675B2 JP 2206610 A JP2206610 A JP 2206610A JP 20661090 A JP20661090 A JP 20661090A JP 3039675 B2 JP3039675 B2 JP 3039675B2
Authority
JP
Japan
Prior art keywords
color
pixel
pixels
document
saturation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2206610A
Other languages
Japanese (ja)
Other versions
JPH0490676A (en
Inventor
順一 宍塚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2206610A priority Critical patent/JP3039675B2/en
Priority to EP91302326A priority patent/EP0448330B1/en
Priority to DE69121439T priority patent/DE69121439T2/en
Publication of JPH0490676A publication Critical patent/JPH0490676A/en
Priority to US08/292,049 priority patent/US5786906A/en
Application granted granted Critical
Publication of JP3039675B2 publication Critical patent/JP3039675B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は例えばカラー複写機、カラースキヤナ、カラ
ーフアクシミリなどのカラー画像処理装置、特に、カラ
ー白黒判別を行う機能を有するカラー画像処理装置に関
するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a color image processing apparatus such as a color copier, a color scanner, and a color facsimile, and more particularly, to a color image processing apparatus having a function of performing color / monochrome discrimination. It is.

〔従来の技術〕[Conventional technology]

従来のカラー原稿を読み取るシステムでは、入力画像
信号の3原色(RGB,XYZなど)の3成分の比を用いて有
彩/無彩を判定していた。例えば、3原色の入力レベル
が同じような値であれば無彩色、レベルにバラツキがあ
れば有彩色であると判定していた。この1画素毎の判定
を原稿の全画素について繰り返して、有彩色の画素が存
在すれば、原稿はカラー、また逆に、存在しなければ原
稿は白黒とする技術が知られている。
In a conventional system for reading a color original, chromaticity / achromaticity is determined using the ratio of three components of three primary colors (RGB, XYZ, etc.) of an input image signal. For example, if the input levels of the three primary colors have similar values, it is determined that the color is an achromatic color, and if the levels vary, the color is determined to be a chromatic color. A technique is known in which the determination for each pixel is repeated for all the pixels of the document, and if a chromatic pixel is present, the document is colored, and if not, the document is black and white.

〔発明が解決しようとしている課題〕[Problems to be solved by the invention]

しかしながら、上記従来技術では、画像入力用のカラ
ーセンサの読み取り精度がよくない場合、入力画像の黒
文字の周辺部の画素を有彩色と誤判定することが多かっ
た。そのために、白黒原稿にもかかわらず、カラー原稿
と誤判別してしまう問題があった。また、原稿の下地に
薄い色がついている場合に誤判定をする場合もあった。
However, in the above prior art, when the reading accuracy of the color sensor for image input is not good, pixels around the black characters of the input image are often erroneously determined to be chromatic. Therefore, there is a problem that a monochrome document is erroneously determined as a color document. In some cases, an erroneous determination is made when the base of the document has a light color.

また次のような問題点もある。例えば第11図の斜線部
分に彩度の分布がある色の下地で、黒文字が印刷されて
いる原稿を考えると、これは白黒原稿と判断してもらい
たい。さらに、第11図の斜線部分に彩度分布がある彩度
の低いカラー原稿があった場合、この原稿はカラー原稿
と判別してもらいたい。このように彩度の低い原稿に対
しては原稿の判別が非常に困難である。白黒の原稿を、
カラー原稿として誤判別すると次のような問題が起こ
る。
There are also the following problems. For example, consider a document in which black characters are printed on a background of a color having a saturation distribution in a shaded portion in FIG. 11, and it is desired that this is determined as a monochrome document. Further, if there is a low-saturation color document having a saturation distribution in the hatched portion in FIG. 11, this document should be discriminated as a color document. It is very difficult to determine the original of such a low-saturation original. Black and white manuscript
The following problem occurs when a color document is erroneously determined.

カラー複写機の場合には、カラーのインク(CMY)を
重ね合わせて白黒原稿を複写すると、色ずれや、インク
の分光特性の違いにより、文字や線や網点の締りが悪く
見づらくなる。カラーフアクシミリの場合には、上記の
印刷品位が悪いという欠点のほかに、白黒原稿であるに
も関わらず、3原色を送信すると伝送時間がかかり、通
信コストが高くなるという欠点もある。
In the case of a color copying machine, when a black-and-white document is copied by superimposing color inks (CMY), characters, lines, and halftone dots are poorly tightened due to color misregistration and differences in spectral characteristics of the ink, making it difficult to see. In the case of a color facsimile, in addition to the above-described disadvantage of poor print quality, there is also a disadvantage that transmission of three primary colors, even though it is a black-and-white document, requires a long transmission time and increases communication costs.

本発明は上記課題に鑑みてなされたものであり、彩度
の低い下地に黒文字が重畳されている画像と彩度の低い
カラー画像とを良好に識別することができるカラー画像
処理装置を提供することを目的とする。
The present invention has been made in view of the above problems, and provides a color image processing apparatus capable of satisfactorily distinguishing an image in which black characters are superimposed on a low-saturation background from a low-saturation color image. The purpose is to:

又、入力カラー画像信号に含まれる中間彩度の画素数
に応じた値が所定値以上であれば、対象画素の白黒/カ
ラーの判別において白黒と判別されやすくすべく判別基
準を制御し、入力カラー画像信号に含まれる中間彩度の
画素数に応じた値が所定値以下であれば、前記判別にお
いてカラーと判別されやすくすべく判別基準を制御する
カラー画像処理装置を提供することを目的とする。
If the value corresponding to the number of pixels of the intermediate saturation included in the input color image signal is equal to or greater than a predetermined value, the determination criterion is controlled so that the target pixel can be easily determined to be black and white in the black / white / color determination. It is an object of the present invention to provide a color image processing apparatus that controls a determination criterion so as to make it easier to determine a color in the determination if a value according to the number of pixels of intermediate saturation included in a color image signal is equal to or less than a predetermined value. I do.

〔課題を解決するための手段〕[Means for solving the problem]

上記目的を達成するために本発明は、入力カラー画像
信号の有彩・無彩を判定する判定手段と、前記判定手段
による判定結果と対象画像が白黒であるかカラーである
かを判別するための判別基準に基づき入力カラー画像信
号によって表される前記対象画像の白黒/カラーを判別
する判別手段と、前記入力カラー画像信号に含まれる中
間彩度の画素数に応じた値が所定値より大きい際には、
前記判別手段において白黒と判別されやすくすべく前記
判別基準を制御し、前記入力カラー画像信号に含まれる
中間彩度の画素数に応じた値が所定値未満の際には、前
記判別手段においてカラーと判別されやすくすべく前記
判別基準を制御する制御手段とを有することを特徴とす
る。
In order to achieve the above object, the present invention provides a determining means for determining chromaticity / achromaticity of an input color image signal, and a determination result by the determining means and determining whether a target image is monochrome or color. Determining means for determining the black and white / color of the target image represented by the input color image signal based on the determination criterion, and a value corresponding to the number of pixels of intermediate saturation included in the input color image signal being larger than a predetermined value In some cases,
The discrimination criterion is controlled so that the discrimination means can be easily discriminated as black and white, and when the value corresponding to the number of pixels of the intermediate saturation included in the input color image signal is less than a predetermined value, the discrimination means determines Control means for controlling the determination criterion so as to make it easier to determine

〔実施例〕〔Example〕

(本発明の原理) 原稿をカラースキヤナから読み取り、そのデータをNT
SCのRGBに変換し、さらに明度データYと色度データI
とQに変換する。そしてIQをグラフにプロツトしたもの
が第6図と、第7図である。
(Principle of the present invention) A manuscript is read from a color scanner, and the data is read by NT.
Convert to SC RGB, and furthermore, brightness data Y and chromaticity data I
And Q. FIGS. 6 and 7 show IQ plotted on a graph.

第6図は白黒原稿、第7図はカラー原稿を読み込んだ
場合の分布を示すものである。白黒原稿を読み込んだと
きは、原点付近に分布し、カラー原稿では、原点から離
れたところに分布するのがわかる。よって、原点(I=
0、Q=0)からの距離を計算して、距離が離れた画素
が多ければカラー原稿、少なければ白黒原稿とする。こ
のような考え方に基づいて原稿の判別を行うことができ
る。
FIG. 6 shows the distribution when a monochrome document is read, and FIG. 7 shows the distribution when a color document is read. It can be seen that when a black-and-white document is read, it is distributed near the origin, and for a color document, it is distributed away from the origin. Therefore, the origin (I =
(0, Q = 0), the color original is determined if there are many pixels farther away, and the monochrome original is determined if there are fewer pixels. The original can be determined based on such a concept.

(スキヤナの読み取り精度) 白黒の文字をスキヤナから読み取ると、スキヤナの精
度がよくないと入力画像としては、第8図のように色ず
れを起こした画像になってしまう。これでは、色ずれの
画素を色画素と判別してしまい、その結果白黒原稿にも
関わらずカラー原稿と誤判別する可能性がある。そこ
で、入力画素の周囲に黒画素(白黒画素であって、かつ
暗画素)が存在すれば、入力画素は色ずれの画素であ
り、実際は白黒画素であると判断する。そうすることに
よりスキヤナの読み取りの誤差を少なくすることができ
る。
(Scanner Reading Accuracy) When black and white characters are read from the scanner, if the accuracy of the scanner is not good, the input image will be an image having a color shift as shown in FIG. In this case, a pixel having a color misregistration is determined as a color pixel, and as a result, there is a possibility that a color original is erroneously determined in spite of a black and white original. Therefore, if a black pixel (black and white pixel and a dark pixel) exists around the input pixel, it is determined that the input pixel is a color-shifted pixel and is actually a black and white pixel. By doing so, it is possible to reduce the reading error of the scanner.

(彩度の低い中間彩度の画素を有する原稿に対して) 第11図の斜線部分に含まれる画素は、しきい値αより
も彩度が低いので白黒画素と判断される。そこで彩度の
低い色の下地(例えば再生紙)の黒文字原稿を考える
と、下地部分の彩度がαよりも小さい場合には、その原
稿は白黒原稿、逆に大きければカラー原稿となる。次に
彩度の低い写真原稿に対しては、斜線部分に分布する画
素が比較的多くなる。この場合にはしきい値αより小さ
いので白黒原稿と判別されてしまう。そこで下地に彩度
の低い色がついている原稿の場合、斜線部に含まれる画
素の数が、写真原稿の場合に比べて非常に多いというこ
とに注目して、原稿中に中彩度の画素が所定値βより多
ければ、白黒原稿と判定し易いように、逆に多くなけれ
ばカラー原稿と判定するように制御する。
(For a document having pixels of intermediate saturation with low saturation) The pixels included in the hatched portions in FIG. 11 are determined as monochrome pixels because the saturation is lower than the threshold value α. Considering a black character original with a low-saturation color background (for example, recycled paper), if the saturation of the background portion is smaller than α, the original is a black-and-white original; Next, for a photo document with low saturation, the number of pixels distributed in the hatched portion becomes relatively large. In this case, since it is smaller than the threshold value α, it is determined that the document is a monochrome document. Therefore, in the case of a document with a low-saturation background, the number of pixels included in the shaded area is much larger than in the case of a photo document. Is larger than the predetermined value β, the control is performed so that it is easy to determine that the document is a monochrome document.

〔第1の実施例〕 第9図に処理のフローチヤートを示す。処理は大き
く、画素判別処理(S1〜S4)と画素補正処理(S5〜S1
1)、そして原稿判別処理(S12〜S15)に分けられる。
画素判別処理は注目画素がカラーか白黒かを判別する処
理で、原稿判別処理は原稿全体がカラー原稿か、白黒原
稿かを判別する処理である。以下アルゴリズムの詳細を
フローに従って説明する。
First Embodiment FIG. 9 shows a flowchart of the process. The processing is large, and the pixel discrimination processing (S1 to S4) and the pixel correction processing (S5 to S1)
1) and original discrimination processing (S12 to S15).
The pixel determination process is a process of determining whether the pixel of interest is color or monochrome, and the document determination process is a process of determining whether the entire document is a color document or a monochrome document. The details of the algorithm will be described below according to the flow.

〈画素判定処理〉 はじめにカラー画素判定処理について説明する。カラ
ー画素判定はS1〜S4で処理される。入力画素がカラー画
素であるか、白黒画素であるかを画素毎に判定するもの
である。
<Pixel Determination Process> First, the color pixel determination process will be described. The color pixel determination is processed in S1 to S4. Whether the input pixel is a color pixel or a monochrome pixel is determined for each pixel.

色空間変換処理 S1では、色空間変換処理を行う。すなわち、NTSC−RG
Bに正規化されたデータを式(1)に従って、輝度信号
Yと色度信号I、Qに変換する。
In color space conversion processing S1, color space conversion processing is performed. That is, NTSC-RG
The data normalized to B is converted into a luminance signal Y and chromaticity signals I and Q according to equation (1).

距離計算 S2とS6では、IとQから彩度情報を作るために、距離
計算部で を計算する。これは、対象の色がIQ色度図上で原点から
どれだけ離れているかを示すものである。この値が大き
ければ彩度が高く、カラー画素である確率が高いといえ
る。
Distance calculation In S2 and S6, in order to create saturation information from I and Q, the distance calculation unit Is calculated. This indicates how far the target color is from the origin on the IQ chromaticity diagram. If this value is large, it can be said that the saturation is high and the probability of being a color pixel is high.

彩度比較部 S3では注目画素の彩度をしきい値と比較する。第10図
(A)に示すように注目画素Cが文字や下地(白色に限
る)の一部分であるならば彩度が低く、 の条件を満たすためにS4に進み、黒画素の個数BPIXを1
だけ増加させる。そしてまたS2に戻り次の画素を読み込
んで同様に処理を行う。
The saturation comparison unit S3 compares the saturation of the target pixel with a threshold. As shown in FIG. 10 (A), if the target pixel C is a part of a character or a base (limited to white), the saturation is low, In order to satisfy the condition, the process proceeds to S4, and the number of black pixels BPIX is set to 1
Just increase. Then, the process returns to S2 to read the next pixel and perform the same processing.

また、第10図(B)のように注目画素がカラー画素と
思われる位置にある場合、彩度が高く の条件を満たさずS5に進む。
When the target pixel is located at a position considered to be a color pixel as shown in FIG. The process proceeds to S5 without satisfying the condition of.

画素補正処理 S5〜S11は画素補正処理部である。これは、Flow3彩度
比較部でカラー画素と判定されたとしても、センサの色
ずれによって生じた黒文字のにじみのために誤ってカラ
ー画素と判定してしまう可能性があるために、この誤判
定を補正するために設けられたものである。以下画素補
正部について説明する。
Pixel correction processing S5 to S11 are pixel correction processing units. This is because even if the Flow3 saturation comparison unit determines that a pixel is a color pixel, it may be erroneously determined to be a color pixel due to bleeding of a black character caused by a color shift of the sensor. Is provided to correct the error. Hereinafter, the pixel correction unit will be described.

S5では、第5図の注目画素Cの周囲8画素S1〜S8を1
画素ずつ入力する。S6で、色空間変換によりRGB→YIQ変
換を行う(S1と同様)。
In S5, the eight peripheral pixels S 1 to S 8 of the pixel of interest C of FIG. 5 1
Input for each pixel. In S6, RGB → YIQ conversion is performed by color space conversion (similar to S1).

S7で彩度情報 を計算する(S2と同様)。S8では周囲画素の彩度 と輝度Yをしきい値と比較する。例えば、周囲画素S1
文字部であるならば、彩度が低く輝度も低いので かつY<γの条件を満たす。その結果注目画素Cは画素
判定処理でカラー画素と判定されたが、実際はセンサの
色ずれによるものであり、本来は黒画素であると判断
し、S9に進み、黒画素の個数BPIXを1だけ増加させる。
周囲画素S6の場合は かつY<γの条件を満たさないためにS6は黒画素ではな
いと判断しFlow10に進む。S10はすべての周囲8画素を
入力し終ったかのチエツクを行うものである。このよう
にして、周囲8画素に黒画素が含まれるかをS5〜S10の
処理を注目画素の周囲の8画素S1〜S9まで繰り返すこと
により調べる。周囲8画素に1個でも黒画素が含まれる
ならば注目画素Cは黒画素としてS9に進む。また周囲8
画素に黒画素が1つも含まれていなければ、注目画素C
は色ずれによるカラー画素ではなく、本当のカラー画素
としてS11に進み、カラー画素の個数CPIXを1だけ増加
させる。
S7 saturation information Is calculated (similar to S2). S8: Saturation of surrounding pixels And the luminance Y are compared with a threshold value. For example, if the surrounding pixel S 1 is a character portion, the saturation brightness is low low In addition, the condition of Y <γ is satisfied. As a result, the pixel of interest C was determined to be a color pixel in the pixel determination process. However, it is actually due to a color shift of the sensor, and it is determined that the pixel of interest is originally a black pixel. increase.
For surrounding pixel S 6 And proceeds to determining that S 6 is not a black pixel in order not satisfy the condition of Y <γ Flow10. In step S10, a check is made to determine whether all the surrounding eight pixels have been input. In this way, it is checked whether the surrounding eight pixels include a black pixel by repeating the processing of S5 to S10 up to the eight pixels S1 to S9 around the target pixel. If at least one black pixel is included in the eight surrounding pixels, the target pixel C is determined as a black pixel and the process proceeds to S9. Around 8
If the pixel does not include any black pixels, the target pixel C
Goes to S11 not as a color pixel due to color misregistration but as a true color pixel, and the number CPIX of color pixels is increased by one.

〈カラー白黒原稿判別〉 以上に述べた画素判別(S1〜S11)を原稿のすべての
画素に対して施し、カラー画素CPIXと白黒画素BPIXの割
合を求める。S13でCPIX>δの条件を満たした場合、対
象とする原稿はカラー原稿であると判別し、満たさない
場合は、白黒原稿領域であると判別する。
<Color / Monochrome Document Discrimination> The above-described pixel discrimination (S1 to S11) is performed on all the pixels of the document, and the ratio between the color pixels CPIX and the monochrome pixels BPIX is obtained. If the condition of CPIX> δ is satisfied in S13, the target document is determined to be a color document, and if not, it is determined to be a monochrome document area.

以上は例えばコンピユータのソフトウエアによって処
理を行う場合のフローチヤートであったが、以下に上述
の処理を行う回路構成について第1図を用いて説明す
る。
The above is, for example, the flowchart in the case where the processing is performed by the software of the computer. The circuit configuration for performing the above processing will be described below with reference to FIG.

101のCCDによって構成されるスキヤナに原稿を置き、
スキヤンするとNTSCの規格に正規化されたRGBのデータ
が出力される。102のYIQ変換部では101から出力されたR
GBのデータを明度(輝度)信号Yと色度信号IとQに変
換する。103の画素判別部では入力した1画素が白黒画
素(彩度が小さい)かカラー画素かの判別を行う。104
は原稿判別部であり、1画素毎の判別結果を集計して、
全画素数に対するカラー画素数の割合を求め、割合に応
じて原稿がカラーであるか、白黒であるかの105原稿判
別信号を出力する。106は画像処理部、107は画像表示を
行うデイスプレイ、108は画像伝送を行うフアクシミリ
送信部、109は画像を記録媒体上に再生するプリンタ、1
10は中間彩度画素カウント部、111はCPUである。画像処
理部106は、原稿判別信号105に応じて白黒原稿とカラー
原稿に対して夫々異なる処理を行う。
Place the manuscript on the scanner composed of 101 CCDs,
When the scan is performed, RGB data normalized to the NTSC standard is output. R output from 101 in the YIQ converter of 102
The GB data is converted into a lightness (luminance) signal Y and chromaticity signals I and Q. The pixel discriminating unit 103 discriminates whether the inputted one pixel is a monochrome pixel (saturation is low) or a color pixel. 104
Is a document discriminating unit, which totals the discrimination results for each pixel,
The ratio of the number of color pixels to the total number of pixels is obtained, and a 105 document discrimination signal indicating whether the document is color or black and white is output according to the ratio. 106 is an image processing unit, 107 is a display for displaying images, 108 is a facsimile transmission unit for transmitting images, 109 is a printer that reproduces images on a recording medium, 1
Reference numeral 10 denotes an intermediate saturation pixel counting unit, and 111 denotes a CPU. The image processing unit 106 performs different processes on a black-and-white document and a color document according to the document discrimination signal 105.

例えばフアクシミリ送信部108に送る画像信号につい
ては、カラー原稿の場合はR、G、B信号それぞれの保
存できるような圧縮符号化を行い、白黒原稿の場合は、
濃度(輝度)信号に変換して通常のMH、MR、MMR等の圧
縮符号化を行う。
For example, for an image signal to be sent to the facsimile transmission unit 108, in the case of a color original, compression encoding is performed so that each of the R, G, and B signals can be stored.
The image is converted into a density (luminance) signal and subjected to normal compression coding such as MH, MR, and MMR.

また、プリンタ109へ送る画像信号については、カラ
ー原稿の場合は、R、G、B信号に対して対数変換、UC
R、マスキング等の所定の処理を施してY、M、C、K
の面順次信号となるように画像処理し、白黒原稿の場合
は、K(黒)信号のみ生成して黒単色プリントを行うよ
うにする。
For the image signal sent to the printer 109, in the case of a color original, logarithmic conversion is performed on the R, G, and B signals,
R, M, C, K
In the case of a black-and-white original, only a K (black) signal is generated to perform black monochrome printing.

なお、プリンタの種類は、レーザービームプリンタや
インクジエツトプリンタ、熱転写プリンタ、ドツトプリ
ンタ等カラー印字が可能なものであればよい。
The type of printer may be a laser beam printer, an ink jet printer, a thermal transfer printer, a dot printer, or any other printer capable of performing color printing.

第2図はYIQ変換部を表す図で、式(1)を計算して
いる。201、202、203はそれぞれ、R、G、Bの入力信
号である。204〜212は式(1)の係数をセツトするレジ
スタ、213〜221は入力データと係数を乗算する乗算器、
222、223、225、228は加算器、226と229は減算器であ
る。そして、演算の結果は224にY、227にI、230にQ
が出力される。
FIG. 2 is a diagram showing a YIQ conversion unit, and calculates equation (1). 201, 202, and 203 are R, G, and B input signals, respectively. 204 to 212 are registers for setting the coefficient of equation (1), 213 to 221 are multipliers for multiplying the input data by the coefficient,
222, 223, 225 and 228 are adders, and 226 and 229 are subtractors. The result of the operation is Y at 224, I at 227, and Q at 230.
Is output.

たとえば、Yの計算をする場合には、レジスタ204に
0.3、レジスタ207に0.59、レジスタ210に0.11がセツト
されていて、Rデータ201とレジスタ204の内容を213に
乗算器で乗算する。同様にGデータとレジスタ207の内
容を乗算器216、Bデータとレジスタ210の内容を乗算器
219で乗算する。そして、3個の乗算結果が加算器222と
223で加えられ、最終的にYが得られる。同様に、Iと
Qを計算することができる。
For example, when calculating Y, register 204
0.3, 0.59 is set in the register 207, and 0.11 is set in the register 210. The R data 201 and the contents of the register 204 are multiplied by 213 by a multiplier. Similarly, a multiplier 216 uses the G data and the contents of the register 207, and a multiplier uses the G data and the contents of the register 210.
Multiply by 219. Then, the three multiplication results are added to the adder 222.
At 223, Y is finally obtained. Similarly, I and Q can be calculated.

第3図は画素判別部を示す図である。301にY、302に
I、303にQのデータが入力される。Iは乗算器310で自
乗される。またQは乗算器311で自乗される。I2とQ2
加算器312で加算される。つぎに の計算であるが、これはテーブルの参照によって行う。
たとえばROM313の入力が2の場合、ROMの2番アドレス
がアクセスされ、データ1.414が出力される。さらにROM
313の出力した が比較器305、306に入力される。レジスタ308にはしき
い値βが、レジスタ309にはしきい値αがセツトされ
る。そして、比較器305で、しきい値βと が比較され、 のとき1を出力、それ以外は0を出力する。また、比較
器306では、しきい値αと が比較され、 の時1を出力、それ以外は0を出力する。この比較器30
6の出力結果を第1次判定結果と呼ぶ。
FIG. 3 is a diagram showing a pixel determination unit. Y data is input to 301, I data is input to 302, and Q data is input to 303. I is squared by the multiplier 310. Q is squared by the multiplier 311. I 2 and Q 2 are added in adder 312. Next Is calculated by referring to a table.
For example, when the input of the ROM 313 is 2, the second address of the ROM is accessed, and data 1.414 is output. Further ROM
313 output Are input to the comparators 305 and 306. The threshold value β is set in the register 308, and the threshold value α is set in the register 309. Then, the threshold value β and the Are compared, In this case, 1 is output, and otherwise, 0 is output. In the comparator 306, the threshold α and Are compared, At the time of 1, 1 is output, and otherwise, 0 is output. This comparator 30
The output result of No. 6 is referred to as a primary determination result.

次に、明度(輝度)信号であるが、レジスタ307に
は、しきい値γがセツトされており、比較器304でYと
γの比較を行う。Y<γの時に1を出力、それ以外は0
を出力する。比較器304、305の出力はアンドゲート314
で論理積がとられる。すなわち、明度(輝度)が低く、
かつ彩度も低い場合に、アンドゲート314は1を出力
し、それ以外は0を出力する。このアンドゲート314の
出力結果を第2次判定結果と呼ぶ。アンドゲート314の
出力はフリツプフロツプ(以下FF)318と315のラインメ
モリに入力される。またラインメモリ315の出力はライ
ンメモリ316とFF312の入力になる。したがって、FF321
には1ライン遅延した画素が、FF324には2ライン遅延
した画素が入力されることになる。FF318〜326は画素ク
ロツクに同期してアンドゲート314の出力結果を保持す
る。よって、ある時点において、注目画素の第2次判定
結果がFF322に保持されているとすると、FF318、319、3
20、321、323、324、325、326には周囲8画素の第2次
判定結果が保持されていることになる。これら8画素の
第2次判定結果はオアゲート329、330、331、332で、論
理和がとられる。周囲8画素に第2次判別結果1がの画
素が一つでもあればオアゲート332の出力は1になる。
すなわち、注目画素の周りに8画素に一つでも黒画素が
あれば332は1を出力することになる。このオアゲート3
22の出力を画素補正結果と呼ぶ。また、比較器306の出
力(第1次判定結果)はラインメモリ317に入り、1ラ
イン遅延されてFF327、FF328と流れて行く。すなわち、
FF328とFF322はそれぞれ同一画素の第一判別結果と第2
次判別結果が保持されることになる。
Next, for the lightness (luminance) signal, a threshold value γ is set in the register 307, and the comparator 304 compares Y with γ. Outputs 1 when Y <γ, 0 otherwise
Is output. The outputs of comparators 304 and 305 are AND gate 314
Is ANDed. That is, lightness (brightness) is low,
When the saturation is low, the AND gate 314 outputs 1, and otherwise outputs 0. The output result of the AND gate 314 is referred to as a secondary determination result. The output of the AND gate 314 is input to the line memories of flip-flops (FF) 318 and 315. The output of the line memory 315 becomes the input of the line memory 316 and the FF 312. Therefore, FF321
, A pixel delayed by one line is input to FF324. The FFs 318 to 326 hold the output result of the AND gate 314 in synchronization with the pixel clock. Therefore, assuming that the secondary determination result of the target pixel is held in FF322 at a certain point in time, FF318, 319, 3
20, 321, 323, 324, 325, and 326 hold the secondary determination results of the surrounding eight pixels. The secondary determination results of these eight pixels are ORed by OR gates 329, 330, 331, and 332. The output of the OR gate 332 becomes 1 if there is at least one pixel having the second discrimination result 1 among the eight surrounding pixels.
That is, if there is at least one black pixel out of eight pixels around the target pixel, the 332 outputs 1. This or gate 3
The output of 22 is called a pixel correction result. Also, the output of the comparator 306 (the primary determination result) enters the line memory 317 and is delayed by one line and flows to FF327 and FF328. That is,
FF328 and FF322 are the first determination result of the same pixel and the second determination result, respectively.
The next determination result is held.

最後に、画素補正結果と第1次判定結果のNORをNORゲ
ートで判断する。カラー画素と判定された場合には、カ
ラー画素判定信号334が1になり、白黒と判定された場
合には0になる。
Finally, the NOR of the pixel correction result and the primary determination result is determined by a NOR gate. When it is determined that the pixel is a color pixel, the color pixel determination signal 334 becomes 1, and when it is determined that the pixel is monochrome, it becomes 0.

第4図は原稿判別部を示す図である。 FIG. 4 is a diagram showing a document discriminating section.

406はアツプカウントであり、入力として403に初期カ
ウントデータDAT、402に画素クロツク、401にカラー画
素判定信号。406のカウンタは画素クロツクに同期し
て、初期カウントデータからカウントアツプを行うが、
カウントアツプがイネーブルな期間、カラー画素判定信
号が1の間だけで、結果としてカラー画素判定信号がカ
ウントされることになる。
Reference numeral 406 denotes an up-count, and as inputs, initial count data DAT 403, pixel clock 402, and a color pixel determination signal 401. The counter 406 counts up from the initial count data in synchronization with the pixel clock,
During the period in which the count-up is enabled, the color pixel determination signal is counted only when the color pixel determination signal is 1 as a result.

また第1図の110中間彩度画素カウント部では中間彩
度の入力画素の数をカウントする。すなわち、第11図に
おいて、彩度 かつ彩度 の画素が入力された場合にカウントする。原稿判別部10
4のカラー画素数としきい値δを比較する。CPU111は、
カラー画素数>δならばカラー原稿と判断し、カラー画
素数≦δならば白黒原稿と判断するのである。ここで、
しきい値δの設定であるが、CPU111は中間彩度画素カウ
ント部のカウント数に応じて変化させる。すなわち、中
間彩度の画素が所定値βより多ければ、しきい値δを大
きくして、白黒原稿と判断する傾向に、また中間彩度の
画素が多くなければ、しきい値δを小さくしてカラー原
稿と判断する傾向にδを設定し、DAT403にセツトする。
このように有彩色と無彩色の中間に有する中間彩度の画
素数に応じて、原稿の白黒/カラーの判定の判定基準を
変更することにより、所望の判定結果が得られる。
In addition, the 110 intermediate-saturation pixel counting unit in FIG. 1 counts the number of input pixels of intermediate saturation. That is, in FIG. 11, the saturation And saturation Is counted when the pixel of (1) is input. Document discriminator 10
4 and the threshold value δ is compared. CPU 111
If the number of color pixels> δ, it is determined that the document is a color document, and if the number of color pixels ≦ δ, it is determined that the document is a monochrome document. here,
Although the threshold value δ is set, the CPU 111 changes the threshold value in accordance with the count number of the intermediate chroma pixel count unit. That is, if the number of pixels with intermediate saturation is larger than the predetermined value β, the threshold value δ is increased, and the threshold tends to be determined as a black and white original. If the number of pixels with intermediate saturation is not large, the threshold value δ is decreased. Is set to tend to be judged as a color original, and set in DAT403.
As described above, a desired determination result can be obtained by changing the criterion for determining whether a document is black and white or color in accordance with the number of pixels having an intermediate saturation between the chromatic color and the achromatic color.

以上の処理により原稿がカラーか白黒かを判別するこ
とができる。
With the above processing, it is possible to determine whether the original is color or monochrome.

〔第2の実施例〕 第5図は第2実施例を説明するための図である。第1
実施例では式(1)の計算を実現するために、第2図の
構成を用いていたが、第2の実施例では第5図の構成で
式(1)の計算を近似する。式(1)の係数を2のべき
乗分の1を加える形で近似すると式2のようになる。例
えば式1の係数0.3は0.25+0.0625に近似する。そうす
ることにより、入力データを2ビツトシフトしたものと
4ビツトシフトしたものを加えることにより0.3*Rの
計算を簡易的に行うことができる。
Second Embodiment FIG. 5 is a diagram for explaining a second embodiment. First
In the embodiment, the configuration of FIG. 2 is used to realize the calculation of Expression (1). However, in the second embodiment, the calculation of Expression (1) is approximated by the configuration of FIG. Equation 2 is approximated by adding the coefficient of equation (1) to a power of two. For example, the coefficient 0.3 in Equation 1 approximates 0.25 + 0.0625. By doing so, the calculation of 0.3 * R can be easily performed by adding the data obtained by shifting the input data by 2 bits and the data shifted by 4 bits.

次に第4図の説明をする。501、502、503にはそれぞ
れ、R、G、Bの入力データがセツトされる504〜513、
519、520はビツトシフト部で入力データのビツトをシフ
トする回路である。514、515、516、517、518、521、52
3、527は加算器、524、525、526は減算器である。最終
的に計算されたデータは528にYが、529にI、530には
Qが出力される。
Next, FIG. 4 will be described. R, G, B input data are set in 501, 502, and 503, respectively.
Numerals 519 and 520 denote circuits for shifting bits of input data by a bit shift unit. 514, 515, 516, 517, 518, 521, 52
3, 527 is an adder, and 524, 525, 526 are subtractors. In the finally calculated data, Y is output to 528, I is output to 529, and Q is output to 530.

次にデータの流れを説明する。計算方法はY、I、Q
とも同様の計算をするのでここではYを例にして説明
し、IとQは省略する。式2の の項の計算として、504で2ビツトシフト、507で4ビツ
トシフトを行い、その結果を加算器517で加算する。ま
の項の計算として、入力されたGのデータを509で1ビ
ツトシフト、510で4ビツトシフトを行い、その結果と
加算器517の出力を加算器522で加算する。加算器522の
出力は、式2のYの計算において、RとGの項の加算の
結果になる。つぎに、Bの入力データ503を3ビツトシ
フトしたものを加算器523に入力する。結果的に加算器5
23の出力528は式2のYになる。
Next, the data flow will be described. The calculation method is Y, I, Q
Since the same calculation is performed, Y is described here as an example, and I and Q are omitted. Equation 2 As the calculation of the term, a two-bit shift is performed at 504 and a four-bit shift is performed at 507, and the result is added by an adder 517. Also As the calculation of the term, the input G data is shifted by 1 bit at 509 and shifted by 4 bits at 510, and the result and the output of the adder 517 are added by the adder 522. The output of the adder 522 is the result of the addition of the R and G terms in the calculation of Y in Equation 2. Next, the input data 503 of B is shifted by 3 bits and input to the adder 523. Consequently adder 5
The output 528 of 23 becomes Y in Equation 2.

以上のように本発明の実施例によれば、入力カラー信
号の各成分信号を明度信号と色度信号に分離する手段
と、色度信号から彩度信号を作る手段と、彩度信号をし
きい値αと比較する手段と、彩度信号をしきい値βと比
較する手段と、明度信号をしきい値γと比較する手段
と、中間彩度を持つ入力信号の数をカウントする手段
と、注目画素の彩度信号としきい値を比較した結果、彩
度信号<αならば白黒画素数を1増やす手段と、注目画
素の彩度信号としきい値を比較した結果、彩度信号≧α
ならば周囲の画素に対して、彩度信号としきい値βを比
較した結果、彩度信号<βかつ明度信号としきい値γを
比較した結果、明度信号<γの判定を行い、周囲画素中
にこの条件を満たす画素が含まれていたならば、白黒画
素数を1増やし、含まれていなければカラー画素数を1
増やす手段と、中間彩度を持つ入力信号の総数に応じて
しきい値δを変化させる手段と、カラー画素数をしきい
値δと比較する手段と、カラー画素数をしきい値δを比
較した結果、カラー画素数>δならば、カラー原稿と判
断する手段とを設けることにより、スキヤナの精度が良
くない場合や、原稿の下地に薄い色がついている場合、
また、彩度の低い写真原稿なども、誤判定せず原稿を判
別することができる。その結果、原稿の種類に応じた処
理を行うことができ、印刷品位の向上、通信コストの低
減を図ることができるという効果がある。
As described above, according to the embodiment of the present invention, means for separating each component signal of an input color signal into a brightness signal and a chromaticity signal, means for generating a saturation signal from the chromaticity signal, and Means for comparing the threshold value α with the threshold value β, means for comparing the lightness signal with the threshold value γ, and means for counting the number of input signals having intermediate saturation As a result of comparing the saturation signal of the target pixel with the threshold value, if the saturation signal is smaller than α, the means for increasing the number of black and white pixels by one is compared with the saturation signal of the target pixel and the threshold value.
Then, for the surrounding pixels, as a result of comparing the saturation signal with the threshold β, as a result of comparing the saturation signal <β and the brightness signal with the threshold γ, the brightness signal <γ is determined. If the pixel that satisfies this condition is included, the number of black and white pixels is increased by 1; otherwise, the number of color pixels is increased by 1.
Means for increasing, means for changing the threshold δ according to the total number of input signals having intermediate saturation, means for comparing the number of color pixels with the threshold δ, and comparison of the number of color pixels with the threshold δ As a result, if the number of color pixels> δ, by providing a means for judging a color original, if the accuracy of the scanner is not good, or if the base of the original has a light color,
In addition, it is possible to determine a document such as a photo document with low saturation without erroneous determination. As a result, it is possible to perform a process according to the type of the original, thereby improving print quality and reducing communication costs.

なお、画像入力手段はスキヤナに限らず、ホストコン
ピユータ、スチルビデオカメラ、ビデオカメラ、などの
インターフエースであってもよい。
The image input means is not limited to the scanner, but may be an interface such as a host computer, a still video camera, or a video camera.

また、参照する周辺画素数も8画素に限らない。ま
た、OR処理ではなく多数決処理を行ってもよい。
Further, the number of peripheral pixels to be referred to is not limited to eight. Also, a majority decision process may be performed instead of the OR process.

また(Y、I、Q)に分離するほか、(L、a
)、(L、u、v)、(Y、u、v)等に分
離して判定を行ってもよい。
In addition, in addition to separating into (Y, I, Q), (L * , a * ,
b * ), (L * , u * , v * ), (Y, u, v) and the like may be separately determined.

〔発明の効果〕〔The invention's effect〕

以上説明したように本発明は、入力カラー画像信号に
含まれる中間彩度の画素数に応じた値が所定値より大き
い際には、対象画像の白黒/カラーの判別において白黒
と判別されやすくすべく判別基準を制御し、入力カラー
画像信号に含まれる中間彩度の画素数に応じた値が所定
値未満の際には、前記判別においてカラーと判別されや
すくすべく判別基準を制御する構成を有する。従って、
本発明によれば、例えば黒文字の画像の下地に薄い色が
ついている場合、下地を示す中間彩度の画素数が多くな
り、その結果、画像が白黒と判定されやすくなる。それ
ゆえ、該画像を誤まってカラーと判別する可能性を低減
し白黒と判別することができる。また、例ばカラーと判
別したい彩度の低い写真画像の場合、下地のように中間
彩度に彩度値が集中することなく彩度値がばらつくので
中間彩度の画素数が少なくなりカラーと判別しやすくす
ることができる。
As described above, according to the present invention, when the value according to the number of pixels of the intermediate saturation included in the input color image signal is larger than a predetermined value, the target image is easily determined to be monochrome in the monochrome / color determination. In the case where the value according to the number of pixels of the intermediate saturation included in the input color image signal is less than a predetermined value, the discrimination criterion is controlled so that the discrimination is easily performed in the discrimination. Have. Therefore,
According to the present invention, for example, when the background of a black character image has a light color, the number of pixels of intermediate saturation indicating the background increases, and as a result, the image is easily determined to be black and white. Therefore, the possibility that the image is erroneously determined to be color can be reduced, and the image can be determined to be black and white. Also, for example, in the case of a low-saturation photographic image to be distinguished from color, the saturation value varies without concentrating the saturation value on the intermediate saturation like the background, so the number of pixels of the intermediate saturation decreases and the color It can be easily distinguished.

【図面の簡単な説明】[Brief description of the drawings]

第1図は本発明の第1実施例のカラー白黒原稿自動判別
装置を示すブロツク図。 第2図はYIQ変換部の構成図。 第3図は画素判別部の構成図、 第4図は原稿判別部の構成図。 第5図は第2実施例のYIQ変換部の構成図。 第6図は白黒原稿を読み込んだ時のIとQの分布を表す
図。 第7図はカラー原稿読み込んだ時のIとQの分布を表す
図。 第8図は色ずれの様子を表す図。 第9図はカラー白黒原稿判別の全体フローを示す図。 第10図は画素補正処理を説明する図。 第11図は中彩度原稿の分布を示す図。 101……スキヤナ 102……YIQ変換部 103……画素判別部 104……原稿判別部 105……原稿判別信号
FIG. 1 is a block diagram showing a color / monochrome original automatic discrimination device according to a first embodiment of the present invention. FIG. 2 is a configuration diagram of a YIQ conversion unit. FIG. 3 is a configuration diagram of a pixel determination unit, and FIG. 4 is a configuration diagram of a document determination unit. FIG. 5 is a configuration diagram of a YIQ conversion unit according to a second embodiment. FIG. 6 is a diagram showing the distribution of I and Q when a monochrome document is read. FIG. 7 is a diagram showing the distribution of I and Q when a color original is read. FIG. 8 is a diagram showing a state of color misregistration. FIG. 9 is a diagram showing an overall flow of color / monochrome document discrimination. FIG. 10 is a view for explaining pixel correction processing. FIG. 11 is a diagram showing the distribution of a medium-saturation original. 101: Scanner 102: YIQ conversion unit 103: Pixel discrimination unit 104: Document discrimination unit 105: Document discrimination signal

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】入力カラー画像信号の有彩・無彩を判定す
る判定手段と、 前記判定手段による判定結果と対象画像が白黒であるか
カラーであるかを判別するための判別基準に基づき入力
カラー画像信号によって表される前記対象画像の白黒/
カラーを判別する判別手段と、 前記入力カラー画像信号に含まれる中間彩度の画素数に
応じた値が所定値より大きい際には、前記判別手段にお
いて白黒と判別されやすくすべく前記判別基準を制御
し、前記入力カラー画像信号に含まれる中間彩度の画素
数に応じた値が所定値未満の際には、前記判別手段にお
いてカラーと判別されやすくすべく前記判別基準を制御
する制御手段とを有することを特徴とするカラー画像処
理装置。
A determination unit for determining whether the input color image signal is chromatic or achromatic; an input based on a determination result by the determination unit and a determination criterion for determining whether a target image is monochrome or color; Black and white of the target image represented by the color image signal /
Determining means for determining a color, and when a value corresponding to the number of pixels of intermediate saturation included in the input color image signal is larger than a predetermined value, the determination criterion is set so that the determining means makes it easy to determine black and white. Control means for controlling, when a value corresponding to the number of pixels of intermediate saturation included in the input color image signal is less than a predetermined value, controlling the discrimination criterion so that the discrimination means can easily discriminate the color. A color image processing apparatus comprising:
JP2206610A 1990-03-19 1990-08-03 Color image processing equipment Expired - Fee Related JP3039675B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2206610A JP3039675B2 (en) 1990-08-03 1990-08-03 Color image processing equipment
EP91302326A EP0448330B1 (en) 1990-03-19 1991-03-18 Method and apparatus for processing image
DE69121439T DE69121439T2 (en) 1990-03-19 1991-03-18 Image processing method and apparatus
US08/292,049 US5786906A (en) 1990-03-19 1994-08-18 Method and apparatus for processing image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2206610A JP3039675B2 (en) 1990-08-03 1990-08-03 Color image processing equipment

Publications (2)

Publication Number Publication Date
JPH0490676A JPH0490676A (en) 1992-03-24
JP3039675B2 true JP3039675B2 (en) 2000-05-08

Family

ID=16526236

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2206610A Expired - Fee Related JP3039675B2 (en) 1990-03-19 1990-08-03 Color image processing equipment

Country Status (1)

Country Link
JP (1) JP3039675B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001126075A (en) 1999-08-17 2001-05-11 Fuji Photo Film Co Ltd Method and device for picture processing, and recording medium
JP4497684B2 (en) * 2000-09-11 2010-07-07 キヤノン株式会社 Image processing apparatus and method
JP4958626B2 (en) * 2006-07-04 2012-06-20 シャープ株式会社 Image processing method, image processing apparatus, image forming apparatus, computer program, and recording medium
JP5077413B2 (en) * 2010-09-30 2012-11-21 ブラザー工業株式会社 Image processing apparatus, image processing method, image reading apparatus, and image processing program
JP5522024B2 (en) 2010-12-27 2014-06-18 ブラザー工業株式会社 Image processing apparatus, image processing method, and image processing program

Also Published As

Publication number Publication date
JPH0490676A (en) 1992-03-24

Similar Documents

Publication Publication Date Title
EP0448330B1 (en) Method and apparatus for processing image
JP3399486B2 (en) Color image processing apparatus and method
EP0647060B1 (en) Method and apparatus for image-dependent color shifting
US7903872B2 (en) Image-processing apparatus and method, computer program, and storage medium
JPH04336876A (en) Color picture recognizing device
JP3576808B2 (en) Image processing device
JP2610365B2 (en) Document color type identification device
JPH0722330B2 (en) Image region identification method for image processing apparatus
JP3560776B2 (en) Color type discriminator
JP3302041B2 (en) Image processing device
JP3039675B2 (en) Color image processing equipment
US6178010B1 (en) Image processing device
JP3039674B2 (en) Color image processing equipment
JP3334047B2 (en) IMAGE PROCESSING APPARATUS, IMAGE READING APPARATUS AND IMAGE FORMING APPARATUS EQUIPPED WITH THE SAME, IMAGE PROCESSING METHOD, AND COMPUTER-READABLE STORAGE MEDIUM CONTAINING IMAGE PROCESSING PROCEDURE
JP3082931B2 (en) Color image processing method
JP3224172B2 (en) Color image processing equipment
JP3082932B2 (en) Color image processing equipment
JP3227152B2 (en) Color image processing apparatus and color image processing method
JPH03270382A (en) Image processing method
JP3767210B2 (en) Document type determination device and image processing device
JP3150137B2 (en) Image processing method
JP3064896B2 (en) Image processing device
JP2000172850A (en) Device and method for processing picture
JP2000357237A (en) Image processor, image reading device and image forming device mounted with the processor, image processing method, and computer-readable storage medium stored with image processing procedure
JPH1042151A (en) Image processing unit and its method

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees