JP3082931B2 - Color image processing method - Google Patents

Color image processing method

Info

Publication number
JP3082931B2
JP3082931B2 JP02206549A JP20654990A JP3082931B2 JP 3082931 B2 JP3082931 B2 JP 3082931B2 JP 02206549 A JP02206549 A JP 02206549A JP 20654990 A JP20654990 A JP 20654990A JP 3082931 B2 JP3082931 B2 JP 3082931B2
Authority
JP
Japan
Prior art keywords
pixel
color
pixels
document
determined
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
JP02206549A
Other languages
Japanese (ja)
Other versions
JPH0490673A (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 JP02206549A priority Critical patent/JP3082931B2/en
Priority to DE69121439T priority patent/DE69121439T2/en
Priority to EP91302326A priority patent/EP0448330B1/en
Publication of JPH0490673A publication Critical patent/JPH0490673A/en
Priority to US08/292,049 priority patent/US5786906A/en
Application granted granted Critical
Publication of JP3082931B2 publication Critical patent/JP3082931B2/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

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は例えばカラー複写機、カラースキヤナ、カラ
ーフアクシミリなど、カラー画像処理装置、特に、カラ
ー白黒判別を行う機能を有するカラー画像処理装置に関
するものである。
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, chromatic / achromatic is determined using a 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 color pixel exists, 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. If a monochrome document is erroneously determined as a color document, the following problem occurs.

カラー複写機の場合には、カラーのインク(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 the spectral characteristics of the ink. In addition, in the case of a color facsimile, in addition to the above-described disadvantage that the print quality is poor, there is also a disadvantage that transmission of three primary colors takes a long time to transmit and increases communication cost even though the original is a black-and-white document. .

本発明は上記課題に鑑みてなされたものであり、コン
ピュータによって処理を行う画像処理方法であって、画
像のカラー/白黒の判定処理を精度よく、かつ処理の負
荷を軽減して行うことができるカラー画像処理方法を提
供することを目的とする。
The present invention has been made in view of the above problems, and is an image processing method that performs processing by a computer, and can perform color / monochrome determination processing of an image with high accuracy and with a reduced processing load. It is an object to provide a color image processing method.

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

上記目的を達成するために本発明は、コンピュータに
よって処理を行う画像処理方法であって、画像に応じた
画像情報中の注目画素が有彩であるか無彩であるかを前
記コンピュータに判定させる第1の判定工程と、前記注
目画素の周辺画素を参照して、該周辺画素に明度、色度
がいずれも一定レベル以下である第1の画素が含まれる
か否かを前記コンピュータに判定させる第2の判定工程
と、前記第2の判定工程により前記注目画素の周辺画素
に第1の画素が含まれると判定された場合に、該注目画
素に対する前記第1の判定工程による判定結果を前記コ
ンピュータに補正させる補正工程と、前記第1の判定工
程により注目画素が無彩と判定された場合には、前記第
2の判定工程による該注目画素の周辺画素の参照を、該
周辺画素中の全ての画素に対して行わないように前記コ
ンピュータを制御する制御工程とを有することを特徴と
する。
In order to achieve the above object, the present invention is an image processing method for performing processing by a computer, wherein the computer determines whether a pixel of interest in image information according to an image is chromatic or achromatic. A first determination step, and referring to peripheral pixels of the target pixel, cause the computer to determine whether or not the peripheral pixels include a first pixel whose brightness and chromaticity are both equal to or lower than a certain level. A second determination step, and when it is determined in the second determination step that the first pixel is included in the peripheral pixels of the pixel of interest, the determination result of the first determination step for the pixel of interest is When the target pixel is determined to be achromatic in the correction step of causing the computer to correct and the first determination step, the reference of the peripheral pixel of the target pixel in the second determination step is referred to as the peripheral pixel in the peripheral pixel. All of Characterized by a control step of controlling the computer so as not against the elements.

〔実施例〕 (本発明の原理) 原稿をカラースキヤナから読み取り、そのデータをNT
SCのRGBに変換し、さらに明度データYと色度データI
とQに変換する。そして、IQをグラフにプロツトしたも
のが第6図と、第7図である。
[Embodiment] (Principle of the present invention) An original 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.

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

S5では、第3図の注目画素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. 3 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は黒画素ではな
いと判断しS10に進む。S10はすべての周囲8画素を入力
し終ったかのチエツクを行うものである。このようにし
て、周囲8画素に黒画素が含まれるかをS5〜S10の処理
を注目画素の周囲の8画素S1〜S8まで繰り返すことによ
り調べる。周囲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 target pixel 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 a black pixel. Just increase. For surrounding pixel S 6 And S 6 in order not satisfy the condition of Y <gamma proceeds to S10 is judged not to be a black pixel. 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 or not the surrounding eight pixels include a black pixel by repeating the processing of S5 to S10 up to the eight pixels S1 to S8 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. If no black pixel is included in the surrounding eight pixels, the target pixel C is not a color pixel due to color misregistration but proceeds to S11 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.

以上は、例えばコンピユータのソフトウエアによって
処理を行う場合のフローチヤートであったが、以下に上
述の処理を行う回路構成について説明する。第1図を用
いて101のCCDによって構成されるスキヤナに原稿を置
き、スキヤンするとNTSCの規格に正規化されたRGBのデ
ータが出力される。102のYIQ変換部では101から出力さ
れたRGBのデータを明度(輝度)信号Yと色度信号Iと
Qに変換する。103の画素判別部では入力した1画素が
白黒画素(彩度が小さい)かカラー画素かの判別を行
う。104は原稿判別部であり、1画素毎の判別結果を集
計して、全画素数に対するカラー画素数の割合を求め、
割合に応じて原稿がカラーであるか、白黒であるかの10
5原稿判別信号を出力する。106は画像処理部、107は画
像表示を行うデイスプレイ、108は画像伝送を行うフア
クシミリ送信部、109は画像を記録媒体上に再生するプ
リンタである。画像処理部106は、原稿判別信号105に応
じて白黒原稿とカラー原稿に対して夫々異なる処理を行
う。
The above is a flowchart in the case where the processing is performed by, for example, computer software. The circuit configuration for performing the above processing will be described below. Referring to FIG. 1, an original is placed on a scanner constituted by 101 CCDs, and when scanned, RGB data normalized to the NTSC standard is output. The YIQ converter 102 converts the RGB data output from 101 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. Reference numeral 104 denotes a document discriminating unit, which counts the discrimination results for each pixel, obtains the ratio of the number of color pixels to the number of all pixels,
Depending on the ratio, whether the original is color or black and white
5 Output the document discrimination signal. 106, an image processing unit; 107, a display for displaying images; 108, a facsimile transmission unit for transmitting images; and 109, a printer for reproducing images on a recording medium. 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, the image signal to be sent to the facsimile transmission unit 108 is compressed and encoded so that each of R, G, and B signals can be stored in the case of a color original, and is converted into a density (luminance) signal in the case of a black and white original. Compression coding such as normal MH, MR, MMR, etc.

また、プリンタ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, and black monochrome printing is performed.

なお、プリンタの種類は、レーザービームプリンタや
インクジエツトプリンタ、熱転写プリンタ、ドツトプリ
ンタ等カラー印字が可能なものであればよい。
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の内容を乗算器21
9で乗算する。そして、3個の乗算結果が加算器222と22
3で加えられ、最終的に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 a 213 multiplier. Similarly, a multiplier 216 uses the G data and the contents of the register 207, and a multiplier 21 uses the B data and the contents of the register 210.
Multiply by 9. Then, the three multiplication results are added to the adders 222 and 22.
3 and finally Y is obtained. Similarly, I and Q
Can be calculated.

第3図は画素判別部を示す図である。 FIG. 3 is a diagram showing a pixel determination unit.

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判定結果と呼ぶ。
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 6 is referred to as a first 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を出力することになる。このオアゲート322の
出力を画素補正結果と呼ぶ。
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, the brightness (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 OR results of the secondary determination results of these eight pixels are obtained by OR gates 329, 330, 331, and 332. The output of the OR gate 332 becomes 1 if there is at least one pixel whose secondary determination result is 1 among the 8 surrounding pixels. That is, if there is at least one black pixel in eight pixels around the target pixel, the 332 outputs 1. The output of the OR gate 322 is called a pixel correction result.

また比較器306の出力(第1次判定結果)はラインメ
モリ317に入り、1ライン遅延されて、FF327、FF328と
流れて行く。すなわち、FF328とFF322はそれぞれ同一画
素の第1次判別結果と第2次判別結果が保持されること
になる。
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, the FF328 and FF322 hold the primary determination result and the secondary determination result of the same pixel, respectively.

最後に、画素補正結果と第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にカラー画
素判定信号、出力として407のキヤリービツトがある。4
06のカウンタは画素クロツクに同期して、初期カウント
データからカウントアツプを行うが、カウントアツプが
イネーブルな期間は、カラー画素判定信号が1の間だけ
で、結果としてカラー画素判定信号がカウントされるこ
とになる。たとえば、406が10ビツトのカウンタで、原
稿判別しきい値δが255のときはDATに769をセツトして
おく。すると、カラーと判別された画素が255になった
ときにキヤリービツト407が1になり、原稿中のカラー
画素が255以上になったので、対象としている原稿はカ
ラー原稿であるという信号(原稿判別信号105)が1に
なる。
Reference numeral 406 denotes an up counter, which has as input an initial count data DAT 403, a pixel clock 402, a color pixel judgment signal 401, and a carry bit 407 as output. Four
The counter 06 performs count-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 during 1 and the color pixel determination signal is counted as a result. Will be. For example, when 406 is a 10-bit counter and the document discrimination threshold δ is 255, DAT is set to 769. Then, when the number of pixels determined to be color becomes 255, the carry bit 407 becomes 1, and the number of color pixels in the document becomes 255 or more. Therefore, a signal indicating that the target document is a color document (document determination signal 105) becomes 1.

以上の処理により原稿がカラーか白黒かを判別するこ
とができる。
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.

本発明の上記実施例によれば、スキヤナから送られて
くる色分解データ(RGB)を色度データと明度データに
分離する手段、色度データから彩度データを作る手段、
明度データとしきい値を比較して明度データが大きけれ
ば明画素、小さければ暗画素と判別する手段、彩度デー
タとしきい値を比較して彩度データが大きければ色画
素、小さければ白黒画素と判別する手段、入力画素が白
黒画素と判定されたとき、白黒画素数を1個増やす手
段、入力画素が色画素と判定されたとき、判定の補正を
する手段、判定の補正をする手段は、入力画素の周囲に
暗画素で、しかも白画素の画素が存在すれば、白黒画素
数を1個増やし、存在しなければ、色画素数を1個増や
す手段、以上の処理を原稿の全画素に対して行い、色画
素数としきい値を比較して色画素数が大きければカラー
原稿、小さければ白黒原稿と判別する手段とを設けるこ
とにより、カラー原稿と白黒原稿を判別するようにした
ものである。
According to the above embodiment of the present invention, means for separating the color separation data (RGB) sent from the scanner into chromaticity data and lightness data, means for generating saturation data from chromaticity data,
A method of comparing brightness data with a threshold value to determine a bright pixel if brightness data is large, a means of determining a dark pixel if brightness data is small, a color pixel if saturation data is large by comparing saturation data with a threshold, and a monochrome pixel if brightness data is small. Means for determining, means for increasing the number of black and white pixels by one when the input pixel is determined to be a black and white pixel, means for correcting the determination when the input pixel is determined to be a color pixel, means for correcting the determination, If there are dark pixels and white pixels around the input pixels, the number of black and white pixels is increased by one, and if not, means for increasing the number of color pixels by one. By comparing the number of color pixels with a threshold value, a means for discriminating a color document from a color document if the number of color pixels is large, and a means for discriminating a black and white document if the number of color pixels is small is provided so as to discriminate between a color document and a black and white document. is there.

但し、入力画素と周囲画素では、彩度データとしきい
値を比較する際のしきい値を変えなければならない。
However, the threshold value for comparing the saturation data with the threshold value must be changed between the input pixel and the surrounding pixels.

即ち、入力カラー信号の各成分信号を明度信号と色度
信号に分離する手段、色度信号から彩度信号を作る手
段、彩度信号をしきい値αと比較する手段、彩度信号を
しきい値βと比較する手段、明度信号をしきい値γと比
較する手段、注目画素の彩度信号としきい値を比較した
結果、彩度信号<αならば白黒画素数を1増やす手段、
注目画素の彩度信号としきい値を比較した結果、彩度信
号≧αならば周囲の画素に対して、彩度信号としきい値
βを比較した結果、彩度信号<βかつ明度信号としきい
値γを比較した結果、明度信号<γの判定を行い、周囲
画素中にこの条件を満たす画素が含まれていたならば、
白黒画素数を1増やし、含まれていなければカラー画素
数を1増やす手段、カラー画素数をしきい値δと比較す
る手段、カラー画素数をしきい値δを比較した結果、カ
ラー画素数>δならば、カラー原稿と判断する手段を設
けることにより、スキヤナの精度が良くない場合や、原
稿の下地に薄い色がついている場合にも、誤判定をせず
原稿を判別することができる。その結果、原稿の種類に
応じた処理を行うことができ、印刷品位の向上、通信コ
ストの低減を図ることができるという結果がある。
That is, means for separating each component signal of the input color signal into a lightness signal and a chromaticity signal, means for generating a saturation signal from the chromaticity signal, means for comparing the saturation signal with a threshold value α, Means for comparing with a threshold value β, means for comparing a lightness signal with a threshold value γ, means for increasing the number of black-and-white pixels by 1 if the saturation signal is smaller than α,
As a result of comparing the saturation signal of the pixel of interest with the threshold value, if the saturation signal is equal to or greater than α, the result of comparing the saturation signal with the threshold value β of the surrounding pixels indicates that the saturation signal is less than β and the threshold value is the brightness signal. As a result of comparing the value γ, it is determined that the brightness signal is smaller than γ, and if a pixel satisfying this condition is included in the surrounding pixels,
Means for increasing the number of black and white pixels by 1 and increasing the number of color pixels by 1 if not included, means for comparing the number of color pixels with a threshold value δ, and comparing the number of color pixels with the threshold value δ, the number of color pixels> If δ, by providing a means for determining that a document is a color document, the document can be determined without erroneous determination even when the accuracy of the scanner is not good or when the background of the document has a light color. 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, and 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. Further, a majority decision process may be performed instead of the OR process.

また、(Y、I、Q)に分離するほか、(L
、b)、(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)
The determination may be performed separately.

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

以上説明したように本発明によれば、画像に応じた画
像情報中の注目画素が有彩であるか無彩かを判定し、そ
の判定結果を補正するために行う注目画素の周辺画素の
参照を、注目画素が無彩と判定された場合に、該周辺画
素中の全ての画素に対して行わないように制御する処理
をコンピュータにさせることにより、画像に応じた画像
情報中の注目画素が有彩であるか無彩であるかの判定を
精度よく、かつ処理の負荷を軽減して行うことができ
る。
As described above, according to the present invention, it is determined whether a target pixel in image information according to an image is chromatic or achromatic, and reference to peripheral pixels of the target pixel is performed to correct the determination result. When the target pixel is determined to be achromatic, the computer performs a process of controlling not to perform the process on all the pixels in the peripheral pixels, so that the target pixel in the image information corresponding to the image is The determination as to whether the image is chromatic or achromatic can be made with high accuracy and with a reduced processing load.

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

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

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) H04N 1/46 - 1/62 H04N 1/40 - 1/409 ──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int.Cl. 7 , DB name) H04N 1/46-1/62 H04N 1/40-1/409

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】コンピュータによって処理を行う画像処理
方法であって、 画像に応じた画像情報中の注目画素が有彩であるか無彩
であるかを前記コンピュータに判定させる第1の判定工
程と、 前記注目画素の周辺画素を参照して、該周辺画素に明
度、色度がいずれも一定レベル以下である第1の画素が
含まれるか否かを前記コンピュータに判定させる第2の
判定工程と、 前記第2の判定工程により前記注目画素の周辺画素に第
1の画素が含まれると判定された場合に、該注目画素に
対する前記第1の判定工程による判定結果を前記コンピ
ュータに補正させる補正工程と、 前記第1の判定工程により注目画素が無彩と判定された
場合には、前記第2の判定工程による該注目画素の周辺
画素の参照を、該周辺画素中の全ての画素に対して行わ
ないように前記コンピュータを制御する制御工程とを有
することを特徴とするカラー画像処理方法。
1. An image processing method for performing processing by a computer, comprising: a first determination step for causing the computer to determine whether a target pixel in image information corresponding to an image is chromatic or achromatic. A second determination step of causing the computer to determine whether or not the peripheral pixel includes a first pixel whose brightness and chromaticity are all equal to or lower than a certain level with reference to a peripheral pixel of the target pixel; A correcting step of causing the computer to correct the result of the first determining step on the pixel of interest when it is determined in the second determining step that the first pixel is included in the peripheral pixels of the pixel of interest; When the target pixel is determined to be achromatic by the first determination step, the reference of the peripheral pixel of the target pixel by the second determination step is performed for all the pixels in the peripheral pixel. Not performed And a control step of controlling the computer as described above.
JP02206549A 1990-03-19 1990-08-03 Color image processing method Expired - Fee Related JP3082931B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP02206549A JP3082931B2 (en) 1990-08-03 1990-08-03 Color image processing method
DE69121439T DE69121439T2 (en) 1990-03-19 1991-03-18 Image processing method and apparatus
EP91302326A EP0448330B1 (en) 1990-03-19 1991-03-18 Method and apparatus for processing image
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
JP02206549A JP3082931B2 (en) 1990-08-03 1990-08-03 Color image processing method

Publications (2)

Publication Number Publication Date
JPH0490673A JPH0490673A (en) 1992-03-24
JP3082931B2 true JP3082931B2 (en) 2000-09-04

Family

ID=16525228

Family Applications (1)

Application Number Title Priority Date Filing Date
JP02206549A Expired - Fee Related JP3082931B2 (en) 1990-03-19 1990-08-03 Color image processing method

Country Status (1)

Country Link
JP (1) JP3082931B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007274287A (en) * 2006-03-31 2007-10-18 Toshiba Corp Image input device, image forming apparatus and image processing method

Also Published As

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

Similar Documents

Publication Publication Date Title
US5786906A (en) Method and apparatus for processing image
JP3399486B2 (en) Color image processing apparatus and method
EP0648040B1 (en) Image-dependent exposure enhancement
JP3003261B2 (en) Color image recognition device
KR960005016B1 (en) Printing color control method and circuit in cvp
US5434683A (en) Color image editing apparatus
US7903872B2 (en) Image-processing apparatus and method, computer program, and storage medium
EP0766453B1 (en) Color image processing apparatus
US5282026A (en) Device for judging the type of color of a document
US7411707B2 (en) Image processing apparatus and method thereof
JPH1127542A (en) Color-type discriminating device
JP3039675B2 (en) Color image processing equipment
JP3709636B2 (en) Image processing apparatus and image processing method
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
JP3618776B2 (en) Image processing apparatus and method
JP3082932B2 (en) Color image processing equipment
JP3224172B2 (en) Color image processing equipment
JP3245600B2 (en) Image processing device
JP2002077647A (en) Image processor
JP3227152B2 (en) Color image processing apparatus and color image processing method
JPH03270382A (en) Image processing method
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
JP2000172850A (en) Device and method for processing picture

Legal Events

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