JPH11312245A - Colored foreign material detector and its method - Google Patents
Colored foreign material detector and its methodInfo
- Publication number
- JPH11312245A JPH11312245A JP10118887A JP11888798A JPH11312245A JP H11312245 A JPH11312245 A JP H11312245A JP 10118887 A JP10118887 A JP 10118887A JP 11888798 A JP11888798 A JP 11888798A JP H11312245 A JPH11312245 A JP H11312245A
- Authority
- JP
- Japan
- Prior art keywords
- rgb
- predetermined
- value
- foreign matter
- evaluation value
- 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
- 238000000034 method Methods 0.000 title claims description 13
- 238000011156 evaluation Methods 0.000 claims description 67
- 238000001514 detection method Methods 0.000 claims description 48
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 238000012360 testing method Methods 0.000 claims description 6
- 230000002238 attenuated effect Effects 0.000 claims description 2
- 238000007689 inspection Methods 0.000 description 16
- 238000012545 processing Methods 0.000 description 11
- 230000007423 decrease Effects 0.000 description 8
- 239000003086 colorant Substances 0.000 description 7
- 239000000126 substance Substances 0.000 description 5
- 239000003795 chemical substances by application Substances 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000003595 spectral effect Effects 0.000 description 3
- 230000007613 environmental effect Effects 0.000 description 2
- 230000007257 malfunction Effects 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000004040 coloring Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- NJPPVKZQTLUDBO-UHFFFAOYSA-N novaluron Chemical compound C1=C(Cl)C(OC(F)(F)C(OC(F)(F)F)F)=CC=C1NC(=O)NC(=O)C1=C(F)C=CC=C1F NJPPVKZQTLUDBO-UHFFFAOYSA-N 0.000 description 1
- 230000010355 oscillation Effects 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 229920006395 saturated elastomer Polymers 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、被検査物を撮影し
て得られるアナログRGB画像信号に基づいて、前記被
検査物から前記被検査物の基調色とは異なる色の着色異
物を検出する着色異物検出装置及び方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention detects a colored foreign substance having a color different from the base color of the inspection object from the inspection object based on an analog RGB image signal obtained by photographing the inspection object. The present invention relates to a colored foreign matter detection device and method.
【0002】[0002]
【従来の技術】従来、白色等の無彩色を含む単色または
略単色の被検査物の中から前記被検査物の基調色とは異
なる色の着色異物を検出する場合に、前記被検査物を調
整対象としてカラーバランス調整、所謂ホワイトバラン
ス調整を施したCCDカメラ等のカラービデオカメラで
前記被検査物を撮影すると、前記被検査物は白色に撮影
され、前記被検査物の基調色とは異なる色の着色異物は
必ず有彩色として識別されることから、前記カラービデ
オカメラから出力されるアナログ画像信号に基づいて、
例えば、色差信号の出力レベル等から、当該有彩色部分
を撮影画面内から抽出して前記着色異物の検出を行って
いた。2. Description of the Related Art Conventionally, when detecting a colored foreign substance having a color different from the base color of the test object from a test object of a single color or an almost single color including an achromatic color such as white, the test object is detected. When the object to be inspected is photographed with a color video camera such as a CCD camera that has been subjected to color balance adjustment, a so-called white balance adjustment, as an adjustment target, the object to be inspected is photographed in white, and is different from the base color of the object to be inspected. Since colored foreign matter is always identified as a chromatic color, based on an analog image signal output from the color video camera,
For example, the chromatic portion is extracted from the shooting screen based on the output level of the color difference signal and the like, and the colored foreign matter is detected.
【0003】[0003]
【発明が解決しようとする課題】しかしながら、前記被
検査物を順次交換しながら検査する場合、或いは、連続
的に移動する前記被検査物を定点で検査する場合、前記
カラービデオカメラのホワイトバランス調整が不完全で
あったり、前記被検査物の色が完全に白色や単色でなく
その彩度や色相が微妙に変動することによって、相対的
に前記ホワイトバランスが狂う場合があり、かかる場合
に、例えば、照明等によって生じる前記被検査物表面の
陰影部分が前記有彩色部分と認識されて誤動作し、ま
た、前記照明等の環境条件の変化によって当該誤動作が
より顕著に現れるという問題があった。また、かかる陰
影部分を検出しないように検出精度を犠牲にして検出感
度を落としたり、或いは、前記カラービデオカメラの前
記ホワイトバランス調整を頻繁に、例えば被検査物が変
化する毎に、行わなければならないという問題があっ
た。However, when the inspection is performed while sequentially replacing the inspection object, or when the continuously moving inspection object is inspected at a fixed point, the white balance adjustment of the color video camera is performed. Is incomplete, or the color of the test object is not completely white or monochromatic, but its saturation and hue fluctuate slightly, so that the white balance may be relatively deviated. For example, there is a problem that a shadow portion on the surface of the inspection object caused by lighting or the like is recognized as the chromatic portion and malfunctions, and the malfunction also becomes more prominent due to a change in environmental conditions such as the lighting. Further, it is necessary to reduce the detection sensitivity at the expense of the detection accuracy so as not to detect such a shadow portion, or to perform the white balance adjustment of the color video camera frequently, for example, every time the inspected object changes. There was a problem that did not become.
【0004】本発明は、上記実情に鑑みてなされたもの
で、その目的は、カラービデオカメラ側での継続的なカ
ラーバランス調整が不要で、且つ、着色異物を高精度に
検出可能な着色異物検出装置及び方法を提供することに
ある。The present invention has been made in view of the above circumstances, and has as its object to eliminate the need for continuous color balance adjustment on the color video camera side and to detect colored foreign matter with high accuracy. It is to provide a detection device and a method.
【0005】[0005]
【課題を解決するための手段】この目的を達成するため
の本発明に係る着色異物検出装置の第一の特徴構成は、
特許請求の範囲の欄の請求項1に記載した如く、被検査
物を撮影して得られるアナログRGB画像信号をディジ
タルRGB画像信号に変換するA/D変換器と、一画面
の所定領域内における前記ディジタルRGB画像信号の
所定の評価値をRGB各信号毎に算出し、RGB各信号
間でその算出した評価値が所定誤差範囲内で一致するよ
うに、前記A/D変換器の入力レベルまたはリファレン
スレベルをRGB各別に調整するRGBバランス調整手
段と、前記ディジタルRGB画像信号に基づいて前記被
検査物の撮影画像から前記被検査物の基調色とは異なる
色の着色異物を検出する着色異物検出手段とを備えてな
る点にある。A first feature of a colored foreign matter detecting apparatus according to the present invention for achieving this object is as follows.
An A / D converter for converting an analog RGB image signal obtained by photographing an object to be inspected into a digital RGB image signal, as described in claim 1 of the claims section, A predetermined evaluation value of the digital RGB image signal is calculated for each of the RGB signals, and the input level of the A / D converter or the input level of the A / D converter is adjusted so that the calculated evaluation value matches between the RGB signals within a predetermined error range. RGB balance adjusting means for adjusting a reference level for each of RGB, and colored foreign matter detection for detecting colored foreign matter of a color different from a base color of the object to be inspected from a photographed image of the object to be inspected based on the digital RGB image signal. Means.
【0006】同第二の特徴構成は、特許請求の範囲の欄
の請求項2に記載した通り、前記第一の特徴構成に加え
て、前記着色異物検出手段が、前記ディジタルRGB画
像信号に基づいて各画素毎の彩度を逐次算出して所定の
基準値以上の彩度の高彩度画素を抽出する高彩度画素検
出手段と、前記高彩度画素が所定の密集度或いは大きさ
以上で集合してなる高彩度画素領域を検出する高彩度画
素領域検出手段からなる点にある。ここで、彩度とは、
色表示の三要素の色相、明度、彩度の彩度を意味し、彩
度が低いとスペクトル色に無彩色が混合され、彩度が低
い程その度合いが高くなる。尚、RGB3原色で合成さ
れるスペクトル色は、現実の太陽光のスペクトル色(波
長約380nm〜約780nm)とその一部の補色が含
まれる。[0006] In the second feature configuration, as described in claim 2 of the claims, in addition to the first feature configuration, the colored foreign matter detecting means is configured to detect the color foreign matter based on the digital RGB image signal. High-saturation pixel detecting means for sequentially calculating the saturation of each pixel to extract high-saturation pixels having a saturation equal to or higher than a predetermined reference value, and high-saturation in which the high-saturation pixels are aggregated with a predetermined density or a size or more. The point is that it comprises high-saturation pixel area detection means for detecting a pixel area. Here, the saturation is
It means the saturation of the three elements of color display, hue, lightness, and saturation. If the saturation is low, the achromatic color is mixed with the spectrum color, and the lower the saturation, the higher the degree. The spectral colors synthesized with the three primary colors of RGB include the spectral colors of actual sunlight (wavelength: about 380 nm to about 780 nm) and some complementary colors thereof.
【0007】同第三の特徴構成は、特許請求の範囲の欄
の請求項3に記載した通り、前記第第二の特徴構成に加
えて、前記高彩度画素検出手段が、前記ディジタルRG
B画像信号のRGB各信号レベルの最大値から最小値を
各画素毎に差し引いた値を前記各画素毎の彩度として算
出する点にある。The third characteristic configuration is the same as the third characteristic configuration, in addition to the second characteristic configuration, wherein the high-saturation pixel detecting means includes the digital RG.
The point is that a value obtained by subtracting the minimum value from the maximum value of each of the RGB signal levels of the B image signal for each pixel is calculated as the saturation for each pixel.
【0008】同第四の特徴構成は、特許請求の範囲の欄
の請求項4に記載した通り、前記第一、第二または第三
の特徴構成に加えて、前記RGBバランス調整手段が、
所定の基準評価値より所定量以上低い評価値のRGB成
分に対して、対応する前記入力レベルを所定量増幅させ
るか、或いは、対応する前記リファレンスレベルを所定
量低下させ、前記所定の基準評価値より所定量以上高い
評価値のRGB成分に対して、対応する前記入力レベル
を所定量減衰させるか、或いは、対応する前記リファレ
ンスレベルを所定量上昇させて、前記評価値をRGB各
信号間で所定誤差範囲内で一致させる点にある。[0008] The fourth characteristic configuration is that, in addition to the first, second or third characteristic configuration, the RGB balance adjusting means includes:
For an RGB component having an evaluation value lower than a predetermined reference evaluation value by a predetermined amount or more, the corresponding input level is amplified by a predetermined amount or the corresponding reference level is lowered by a predetermined amount, and the predetermined reference evaluation value is reduced. For an RGB component having an evaluation value higher than a predetermined amount, the corresponding input level is attenuated by a predetermined amount, or the corresponding reference level is increased by a predetermined amount, and the evaluation value is predetermined between the RGB signals. The point is to match within the error range.
【0009】同第五の特徴構成は、特許請求の範囲の欄
の請求項5に記載した通り、前記第四の特徴構成に加え
て、前記所定の基準評価値は前記RGBバランス調整手
段が算出したRGB各成分の評価値内の所定の一成分の
評価値である点にある。The fifth characteristic configuration is, as described in claim 5 of the claims, in addition to the fourth characteristic configuration, the predetermined reference evaluation value is calculated by the RGB balance adjusting means. That is, it is the evaluation value of a predetermined one of the evaluation values of the RGB components.
【0010】同第六の特徴構成は、特許請求の範囲の欄
の請求項6に記載した通り、前記第一、第二、第三また
は第四の特徴構成に加えて、前記評価値が前記所定領域
内での1フレームまたは1フィールド分の前記ディジタ
ルRGB画像信号の信号レベルの平均値、中央値、或い
は、最頻出値である点にある。[0010] In the sixth feature configuration, as described in claim 6 of the claims, in addition to the first, second, third, or fourth feature configuration, the evaluation value is the same as that of the first, second, third, or fourth feature configuration. The point is that the signal level of the digital RGB image signal for one frame or one field in a predetermined area is an average value, a median value, or a most frequent value.
【0011】この目的を達成するための本発明に係る着
色異物検出方法の特徴構成は、特許請求の範囲の欄の請
求項7に記載した如く、被検査物を撮影して得られるア
ナログRGB画像信号を各別にA/D変換器でディジタ
ルRGB画像信号に変換するA/D変換工程と、一画面
の所定領域内における前記ディジタルRGB画像信号の
所定の評価値をRGB各信号毎に算出する評価値算出工
程と、RGB各信号間でその算出した評価値が所定誤差
範囲内で一致するように、前記A/D変換器の入力レベ
ルまたはリファレンスレベルをRGB各別に調整するR
GBバランス調整工程とを連続的に実行し、前記A/D
変換工程、前記評価値算出工程、及び、前記RGBバラ
ンス調整工程とを実行して得られる前記ディジタルRG
B画像信号に基づいて、前記被検査物の撮影画像から前
記被検査物の基調色とは異なる色の着色異物を検出する
着色異物検出工程を実行する点にある。[0011] To achieve this object, a characteristic feature of the method for detecting a colored foreign matter according to the present invention is that an analog RGB image obtained by photographing an object to be inspected is described in claim 7 of the claims. An A / D conversion step of separately converting the signals into digital RGB image signals by an A / D converter, and an evaluation of calculating a predetermined evaluation value of the digital RGB image signals in a predetermined area of one screen for each of the RGB signals R and R, which adjust the input level or reference level of the A / D converter for each of the RGB signals so that the calculated evaluation values of the RGB signals match within a predetermined error range.
The GB balance adjustment step is continuously executed, and the A / D
The digital RG obtained by executing the converting step, the evaluation value calculating step, and the RGB balance adjusting step.
The present invention is characterized in that a colored foreign matter detection step of detecting a colored foreign matter having a color different from the base color of the object to be inspected from the photographed image of the object to be inspected based on the B image signal.
【0012】以下に作用並びに効果を説明する。前記本
発明に係る着色異物検出装置の第一の特徴構成によれ
ば、被検査物を撮影して前記アナログRGB画像信号を
出力するカラービデオカメラ側において、そのカラービ
デオカメラ自体の調整不良、または、前記被検査物の基
調色の変動等により、RGB各成分間のカラーバランス
調整、所謂ホワイトバランスが狂っても、前記RGBバ
ランス調整手段が、前記アナログRGB画像信号の前記
バランス調整のズレを前記所定の評価値の不一致として
検出し、当該不一致を解消すべく、前記A/D変換器へ
の入力レベル、つまり前記アナログRGB画像信号の入
力ゲイン、或いは、前記A/D変換器のリファレンスレ
ベルをRGB各別に調整することで、前記A/D変換器
で変換された前記ディジタルRGB画像信号が常に一定
のカラーバランスで維持されるため、前記被検査物の基
調色が変動しても、その変動後の前記ディジタルRGB
画像信号で再生される前記被検査物の基調色は、前記変
動によっては変化せずに無彩色或いは略無彩色に維持さ
れる。これにより、前記着色異物検出手段は、前記被検
査物の基調色が何色かにかかわらず、前記被検査物の基
調色とは異なる色の着色異物を単純に有彩色部分として
識別することができるのである。従って、前記被検査物
自身の着色状態によって、自らを着色異物として誤検出
することなく、真の着色異物を確実に検出することがで
きるのである。また、前記入力ゲインを上げることは、
前記リファレンスレベルを下げることと相対的に等価
で、同じディジタル出力値を得ることができる。但し、
むやみに前記リファレンスレベルを下げることは、当該
A/D変換処理時のノイズマージンを下げることになる
ことに留意する必要はある。このように、自動的にカラ
ーバランス調整を行うことにより、前記カラービデオカ
メラ側での当該バランス調整は少なくとも始動前に1回
行えばその後の調整は不要となり、メンテナンスに係る
作業コストの大幅な削減が可能となるのである。また、
本装置側においても特別な調整用の回路を設ける必要が
なくなるため、その分製造コストの削減が可能となる。
ここで、前記評価値は前記の所定領域内での平均的な色
調(色相、彩度、明度)を定量的に評価するための指標
値であり、RGB3原色の各成分毎に分解して評価す
る。従って、かかる評価値を導入することで、前記カラ
ーバランス調整が簡便且つ高速に処理することができる
のである。また、前記評価値の算出を一画面の所定領域
内に制限することで、その所定領域を前記被検査物が確
実に撮影される領域とすることで、前記被検査物以外の
例えば背景等が前記バランス調整のための被写体となる
のを防止できるのである。従って、撮影画面全体で必ず
前記被検査物を撮影する場合は、前記所定領域は撮影画
面全体であっても構わない。The operation and effect will be described below. According to the first characteristic configuration of the colored foreign matter detection device according to the present invention, on the side of the color video camera which shoots the inspection object and outputs the analog RGB image signal, the color video camera itself has poor adjustment, or Even if the color balance adjustment between the RGB components, that is, the so-called white balance is deviated due to a change in the base color of the object to be inspected, the RGB balance adjusting means adjusts the deviation of the balance adjustment of the analog RGB image signal. The input level to the A / D converter, that is, the input gain of the analog RGB image signal, or the reference level of the A / D converter is detected in order to detect the mismatch of the predetermined evaluation value and eliminate the mismatch. By adjusting each of RGB, the digital RGB image signal converted by the A / D converter always has a fixed color variation. To be maintained in the scan, the even base color of the object to be inspected is changed, the digital RGB after the variation
The base color of the inspection object reproduced by the image signal is maintained in an achromatic color or an approximately achromatic color without being changed by the fluctuation. With this, the colored foreign matter detection unit can simply identify a colored foreign matter having a color different from the base color of the inspection object as a chromatic portion regardless of the base color of the inspection object. You can. Therefore, a true colored foreign matter can be reliably detected without erroneously detecting itself as a colored foreign matter, depending on the coloring state of the inspection object itself. Also, increasing the input gain is
The same digital output value can be obtained relatively equivalent to lowering the reference level. However,
It should be noted that lowering the reference level unnecessarily lowers the noise margin during the A / D conversion processing. As described above, by automatically performing the color balance adjustment, the balance adjustment on the color video camera side needs to be performed at least once before the start, so that the subsequent adjustment is unnecessary, and the work cost for maintenance is greatly reduced. It becomes possible. Also,
Since there is no need to provide a special adjustment circuit on the apparatus side, the manufacturing cost can be reduced accordingly.
Here, the evaluation value is an index value for quantitatively evaluating an average color tone (hue, saturation, lightness) in the predetermined area, and is decomposed for each component of the RGB primary colors. I do. Therefore, by introducing such an evaluation value, the color balance adjustment can be performed easily and at high speed. In addition, by limiting the calculation of the evaluation value to a predetermined area on one screen, the predetermined area is set as an area where the object is reliably photographed, so that, for example, a background other than the object to be inspected can be used. This prevents the subject from being used for the balance adjustment. Therefore, when the object to be inspected is always photographed on the entire photographing screen, the predetermined area may be the whole photographing screen.
【0013】尚、本特徴構成と前記本発明に係る着色異
物検出方法の特徴構成とは、技術的思想において本質的
に同一であるので、両特徴構成は同様の作用効果を奏す
るものである。Incidentally, the characteristic configuration and the characteristic configuration of the method for detecting a colored foreign matter according to the present invention are essentially the same in the technical idea, so that both characteristic configurations have the same operation and effect.
【0014】同第二の特徴構成によれば、前記被検査物
にその基調色と僅かに色相或いは彩度が異なる色むらが
あっても、当該色むら箇所は前記ディジタルRGB画像
信号で再生された場合に低彩度箇所となるため、前記高
彩度画素検出手段が前記着色異物を構成する有彩色の画
素を所定の基準値以上の彩度の高彩度画素として抽出す
ることにより、前記色むら箇所が着色異物として誤検出
されるのを回避できるとともに、前記高彩度画素領域検
出手段が前記高彩度画素の単体で独立して存在するもの
や、微小な集合を除去することにより、前記アナログR
GB画像信号や前記ディジタルRGB画像信号に重畳し
た雑音成分によって発生する虞のある前記高彩度画素を
効果的に除去でき、真の着色異物だけを高精度に検出す
ることができるのである。また、前記高彩度画素検出手
段は、高彩度部分を画素単位で検出するので、前記ディ
ジタルRGB画像信号をシリアルデータのまま直接処理
することができ、更に、前記高彩度画素領域検出手段が
逐次検出される前記高彩度画素が所定の密集度或いは大
きさ以上で集合しているかを、前記高彩度画素の検出頻
度或いは連続性を判定することで前記高彩度画素領域を
検出することができるため、リアルタイム処理にも適応
できるのである。According to the second characteristic configuration, even if the inspection object has color unevenness slightly different in hue or saturation from its base color, the color unevenness portion is reproduced by the digital RGB image signal. In this case, the high-saturation pixel detection unit extracts a chromatic pixel constituting the colored foreign matter as a high-saturation pixel having a saturation equal to or higher than a predetermined reference value. In addition to avoiding erroneous detection as a colored foreign substance, the high chroma pixel area detecting means removes the high chroma pixels that exist independently as a single unit or a minute set, thereby achieving the analog R
The high-saturation pixels, which may be caused by noise components superimposed on the GB image signal or the digital RGB image signal, can be effectively removed, and only true colored foreign substances can be detected with high accuracy. Further, since the high-saturation pixel detection means detects a high-saturation portion in pixel units, the digital RGB image signal can be directly processed as serial data, and further, the high-saturation pixel area detection means is sequentially detected. The high-saturation pixel area can be detected by judging the detection frequency or continuity of the high-saturation pixels to determine whether the high-saturation pixels are aggregated with a predetermined density or size or more. It is.
【0015】同第三の特徴構成によれば、前記ディジタ
ルRGB画像信号のRGB各成分の階調値の最大値から
同最小値を引いた差分値が一定の色は、無彩色の混合度
合いが同じである同じ彩度の色と定義することで、撮影
画面内の有彩色部分として識別可能な前記着色異物をそ
の色相にかかわらず定量的に検出できるため、雑音除去
のための閾値処理等が非常に簡単に行うことができるの
である。また、前記差分値は、ディジタル演算の観点か
ら見れば、大小比較と引き算という最も簡単な演算処理
だけで前記着色異物の検出ができるのである。この結
果、前記着色異物検出手段が極めて簡単な回路構成で実
現できるとともに、その演算処理時間も高速化できるた
め、使用する演算素子として過度に高速で高価なものを
使用する必要が無く、製造コストの低減も図れるのであ
る。According to the third characteristic configuration, a color having a constant difference value obtained by subtracting the minimum value from the maximum value of the gradation values of the RGB components of the digital RGB image signal has a constant achromatic color mixing degree. By defining the same color with the same saturation, the colored foreign matter identifiable as a chromatic portion in the shooting screen can be quantitatively detected regardless of its hue. It can be done very easily. Further, from the viewpoint of digital calculation, the color difference can be detected by only the simplest calculation processing of magnitude comparison and subtraction. As a result, the colored foreign matter detecting means can be realized with a very simple circuit configuration, and the processing time thereof can be increased. Therefore, it is not necessary to use an excessively high speed and expensive one as an arithmetic element to be used, and the manufacturing cost is reduced. Can also be reduced.
【0016】次に、本特徴構成で採用した前記差分値に
よる彩度の算出方法が、彩度を適切に表す根拠について
説明する。前記ディジタルRGB画像信号は前記A/D
変換器がNビットの分解能の場合はRGB各信号毎に2
のN乗の階調を表現でき、例えば8ビットの分解能のA
/D変換器を使用すれば、前記ディジタルRGB画像信
号のRGB各信号レベルは0から255の256階調と
なる。ここで、前記ディジタルRGB画像信号がRGB
各成分を夫々0〜255の範囲で合成して再生する色
は、図3に示すように、RGB各成分の階調値r,g,
bを3次元直交座標系の座標値(r,g,b)とする3
次元空間内の点として表現できる。また、かかる再生色
は、各座標値が0から255の範囲の立方体内に入り、
原点(0,0,0)が黒、(255,255,255)
の座標点が白を表し、(255,0,0),(0,25
5,0),(0,0,255),(255,255,0),
(255,0,255),(0,255,255)の各座
標点で表される前記立方体の頂点は、夫々、赤、緑、
青、黄、マゼンタ、シアンの各スペクトル色を表す。ま
た、赤、黄、緑、シアン、青、マゼンタ、赤の順番で前
記各頂点を結ぶ線分L上の色は、RGB各成分の階調値
の少なくとも一つが0と255を含み、無彩色を含まな
い最も高彩度な色を表している。これを図示すれば、図
4に示すように、前記立方体を黒と白の両頂点を結ぶ無
彩色軸Xの軸方向から見た前記6頂点からなる6角形と
なり、各辺は前記6頂点を結ぶ最高彩度の前記線分Lと
なる。また、その6角形の中心が無彩色で、外周へ行く
ほど色の鮮やかさ増して、彩度が高くなる。さて、前記
座標値(R,G,B)のRGB各成分の最大値が低下す
ると彩度及び明度が低下して黒に近づく。この時、階調
比を一定に保持すれば色相は一定に保たれ、そうでなけ
れば色相も同時に変化することになる。一方、前記座標
値(R,G,B)のRGB各成分の最小値が最大値一定
のまま増大すると、白みがかった色となり彩度が低下す
る。従って、最低値が同じであれば、最大値が低いほど
彩度が低下し、また、最大値が同じであれば最小値が高
いほど彩度が低下するので、最大値から最小値を引いた
差分値が大きい程、彩度が高いことを意味する。前記差
分値の最大値は255で、前記6角形の外周辺上、つま
り前記線分L上の色を表し、同最小値は0で、全ての階
調値r,g,bが夫々相等しい前記無彩色軸X上の点を
表している。ここで、前記差分値が一定の点の集合を等
彩度面と定義すると、前記差分値の最大値と最小値を除
き、その等彩度面は6面で構成され、各面は夫々に前記
無彩色軸Xと平行で、前記無彩色軸Xの軸方向から見る
と図4に示す前記6角形と相似な6角形となる。Next, a description will be given of the basis for the method of calculating the saturation based on the difference value employed in the present characteristic configuration to appropriately represent the saturation. The digital RGB image signal is output from the A / D
If the converter has an N-bit resolution, 2 for each RGB signal
Can be expressed by the Nth power of A. For example, A with 8-bit resolution
If a / D converter is used, the RGB signal levels of the digital RGB image signal are 256 tones from 0 to 255. Here, the digital RGB image signal is RGB
As shown in FIG. 3, the color to be reproduced by synthesizing each component in the range of 0 to 255 is the gradation value r, g,
Let b be the coordinate value (r, g, b) of the three-dimensional rectangular coordinate system 3
It can be represented as a point in dimensional space. Also, such a reproduced color enters a cube whose coordinate values are in the range of 0 to 255,
The origin (0,0,0) is black, (255, 255, 255)
Represents white, and (255, 0, 0), (0, 25)
5,0), (0,0,255), (255,255,0),
The vertices of the cube represented by the coordinates (255, 0, 255) and (0, 255, 255) are red, green,
Represents the spectral colors of blue, yellow, magenta, and cyan. The color on the line segment L connecting the vertices in the order of red, yellow, green, cyan, blue, magenta, and red is such that at least one of the gradation values of each of the RGB components includes 0 and 255. Represents the most saturated color not including. If this is illustrated, as shown in FIG. 4, the cube becomes a hexagon consisting of the six vertices viewed from the axial direction of the achromatic axis X connecting both the vertices of black and white, and each side has the six vertices. This is the line segment L having the highest saturation connected. In addition, the center of the hexagon is achromatic, and the color becomes more vivid as it goes to the outer periphery, and the saturation becomes higher. When the maximum value of each of the RGB components of the coordinate values (R, G, B) decreases, the saturation and brightness decrease, and the color approaches black. At this time, if the gradation ratio is kept constant, the hue is kept constant; otherwise, the hue changes simultaneously. On the other hand, if the minimum value of each of the RGB components of the coordinate values (R, G, B) increases while the maximum value remains constant, the color becomes whitish and the saturation decreases. Therefore, if the minimum value is the same, the saturation decreases as the maximum value decreases, and if the maximum value is the same, the saturation decreases as the minimum value increases, so the minimum value is subtracted from the maximum value. The larger the difference value, the higher the saturation. The maximum value of the difference value is 255, which represents the color on the outer periphery of the hexagon, that is, the color on the line segment L. The minimum value is 0, and all the gradation values r, g, and b are equal to each other. A point on the achromatic axis X is shown. Here, if a set of points having a constant difference value is defined as an isochromatic surface, the isochromatic surface is composed of six surfaces except for the maximum value and the minimum value of the differential value, and each surface is individually A hexagon parallel to the achromatic axis X and similar to the hexagon shown in FIG. 4 when viewed from the axial direction of the achromatic axis X.
【0017】同第四の特徴構成によれば、前記RGB各
成分の各評価値の夫々が前記所定の基準評価値に収束し
ながら所定の誤差範囲内で一致し、前記RGBバランス
調整手段として確実に機能し、上記第一乃至第三の特徴
構成の作用効果を確実に発揮することができるのであ
る。更に、前記入力レベルまたは前記リファレンスレベ
ルの調整量を一定の刻み量づつ変化させるフィードバッ
ク制御とすることで、前記被検査物の色調が極端に頻繁
に変化しない限りは、数回の調整回数で適正なバランス
調整に復帰することができ、そうすることで、撮影画面
が不要に発振するのを回避できるととともに、前記各評
価値の評価が前記所定の基準評価値との単純な大小比較
だけで済むため、同じ効果をディジタル信号処理で行お
うとすると必要となる乗算或いは除算処理が不要とな
り、回路構成を簡単化できるのである。According to the fourth characteristic configuration, each evaluation value of each of the RGB components coincides within a predetermined error range while converging to the predetermined reference evaluation value, so that the RGB balance adjusting means can be reliably used. Therefore, the functions and effects of the first to third features can be surely exhibited. Further, by performing feedback control in which the input level or the reference level adjustment amount is changed by a constant step amount, as long as the color tone of the inspection object does not change extremely frequently, a proper number of adjustments may be made several times. Can be returned to a proper balance adjustment, so that the shooting screen can be prevented from oscillating unnecessarily, and the evaluation of each evaluation value can be performed only by a simple magnitude comparison with the predetermined reference evaluation value. Therefore, if the same effect is to be achieved by digital signal processing, the necessary multiplication or division processing becomes unnecessary, and the circuit configuration can be simplified.
【0018】同第五の特徴構成によれば、前記RGB各
成分の一成分については前記入力レベルまたは前記リフ
ァレンスレベルの調整が不要となるので、回路構成が簡
単化できるのである。According to the fifth characteristic configuration, it is unnecessary to adjust the input level or the reference level for one of the RGB components, so that the circuit configuration can be simplified.
【0019】同第六の特徴構成によれば、前記所定領域
内での平均的な色調を定量的に評価できるとともに、前
記評価値を極めて簡単な演算処理で算出することができ
るのである。尚、前記バランス調整に係る被写体の色調
の前記所定領域内でのバラツキが大きくなく、そのバラ
ツキがランダムであれば、平均値、中央値、最頻出値の
相互間で大きく差異が発生することはなく、前記評価値
として何れを採用してもRGB各成分に同じものを使用
する限り、バランス調整程度に対して同等の評価が可能
となるのである。According to the sixth characteristic configuration, the average color tone in the predetermined area can be quantitatively evaluated, and the evaluation value can be calculated by an extremely simple calculation process. Note that if the variation in the color tone of the subject related to the balance adjustment within the predetermined area is not large and the variation is random, a large difference may occur between the average value, the median value, and the most frequently occurring value. Regardless of which evaluation value is used, the same evaluation can be performed for the degree of balance adjustment as long as the same component is used for each of the RGB components.
【0020】[0020]
【発明の実施の形態】以下に本発明に係る着色異物検出
装置の一実施の形態を図面に基づいて説明する。図1に
示すように,本発明による着色異物検出装置は、被検査
物をカラービデオカメラで撮影して、前記カラービデオ
カメラから出力されるアナログRGB画像信号AR ,A
G ,AB を各別に連続的に入力して、各別且つ1画素毎
に8ビット幅のディジタルRGB画像信号DR ,DG ,
DB に逐次変換するA/D変換工程を実行する三つのA
/D変換器1と、前記ディジタルRGB画像信号DR ,
D G ,DB が所定のカラーバランスを維持するように、
前記A/D変換器1の夫々のリファレンスレベルRR ,
RG ,RB を調整するRGBバランス調整手段2と、前
記ディジタルRGB画像信号DR ,DG ,DB に基づい
て前記被検査物の撮影画像から前記被検査物の基調色と
は異なる色の着色異物を検出する着色異物検出工程を実
行する着色異物検出手段3とから構成されている。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A colored foreign matter detection according to the present invention will be described below.
An embodiment of the apparatus will be described with reference to the drawings. In FIG.
As shown, the colored foreign matter detection device according to the present invention
Shoot an object with a color video camera
Analog RGB image signal A output from the cameraR , A
G , AB Are input continuously for each pixel and for each pixel
To an 8-bit digital RGB image signal DR , DG ,
DB A to execute the A / D conversion step of sequentially converting
/ D converter 1 and the digital RGB image signal DR ,
D G , DB To maintain the required color balance,
Each reference level R of the A / D converter 1R ,
RG , RB RGB balance adjusting means 2 for adjusting the
Digital RGB image signal DR , DG , DB Based on
From the photographed image of the object to be inspected,
Implements a colored foreign matter detection process to detect colored foreign matter of different colors.
And a colored foreign matter detecting means 3 to be executed.
【0021】更に、前記RGBバランス調整手段2は、
三つの平均値算出手段4と三つのリファレンスレベル調
整手段5から構成されている。前記各平均値算出手段4
は、前記ディジタルRGB画像信号DR ,DG ,DBを
RGB各別に逐次入力して、1フィールド分の撮影画像
の内の上下左右の外周から所定画素分を除いた中央部分
のRGB各信号の階調値(0〜255)を選択的に加算
して前記中央部分の平均階調(8ビット幅)を算出し、
1フィールド毎に前記平均階調をその1フィールドにお
ける前記ディジタルRGB画像信号DR,DG ,DB の
評価値ER ,EG ,EB として各別に出力して、評価値
算出工程を実行する。ここで、周辺部分を前記平均階調
算出の対象から除外したのは、前記被検査物を専ら画面
中央で観察撮影し、その周辺部に前記被検査物とは異な
る色の背景等が同時に撮影される場合を考慮したもので
ある。Further, the RGB balance adjusting means 2 comprises:
It comprises three average value calculation means 4 and three reference level adjustment means 5. The average value calculation means 4
The digital RGB image signals D R , D G , and D B are sequentially inputted for each of RGB, and RGB signals at a central portion of a photographed image for one field, which are obtained by removing predetermined pixels from the upper, lower, left, and right outer peripheries. The average gradation value (8-bit width) of the central portion is calculated by selectively adding the gradation values (0 to 255) of
The average gradation is output for each field as the evaluation values E R , E G , and E B of the digital RGB image signals D R , D G , and D B in the one field, and an evaluation value calculation step is performed. I do. Here, the peripheral part was excluded from the target of the average gradation calculation because the object to be inspected was observed and photographed exclusively at the center of the screen, and a background of a color different from that of the object to be inspected was simultaneously photographed in the peripheral part. This is the case in which
【0022】前記各リファレンスレベル調整手段5は、
前記評価値ER ,EG ,EB を各別に入力し、更に、8
ビット幅の基準評価値E0 、例えば階調値160を参照
レベルとして入力し、前記評価値ER ,EG ,EB と前
記基準評価値E0 を各別に大小比較し、前記評価値E
R ,EG ,EB の方が大きい場合は、対応する前記リフ
ァレンスレベルRR ,RG ,RB を所定刻み値分だけ増
加させ、前記評価値ER,EG ,EB の方が小さい場合
は、逆に低下させ、RGBバランス調整工程を実行す
る。ここで、前記刻み値は微小な固定値であっても、前
記評価値ER ,EG,EB と前記基準評価値E0 の差分
に比例する値で、数回の調整で前記評価値E R ,EG ,
EB と前記基準評価値E0 が一致する値としても構わな
い。前記リファレンスレベルRR ,RG ,RB を増減さ
せると、それに反比例して前記階調値が増減し、前記評
価値ER ,EG ,EB が前記基準評価値E0 に収斂する
ようにフィードバック制御される。従って、前記リファ
レンスレベルRR ,RG ,RBの調整は1フィールド周
期で行われ、1フィールド乃至数フィールドの時間遅延
で前記ディジタルRGB画像信号DR ,DG ,DB のバ
ランス調整が行われることになる。尚、前記リファレン
スレベルRR ,RG ,RB の初期値はアナログRGB画
像信号AR ,AG ,AB の最大振幅とペデスタルレベル
との間の電圧差714mVが最大階調値255となるよ
うに予め設定されている。Each of the reference level adjusting means 5 includes:
The evaluation value ER , EG , EB Is entered separately, and 8
Bit width reference evaluation value E0 See, for example, tone value 160
Input as a level and the evaluation value ER , EG , EB And before
Standard evaluation value E0 Are compared with each other, and the evaluation value E
R , EG , EB Is larger than the corresponding riff
Reference level RR , RG , RB Is increased by the specified increment.
The evaluation value ER, EG , EB Is smaller
On the contrary, execute the RGB balance adjustment step.
You. Here, even if the step value is a minute fixed value,
Evaluation value ER , EG, EB And the reference evaluation value E0 Difference
Is a value proportional to the evaluation value E after several adjustments. R , EG ,
EB And the reference evaluation value E0 May be a value that matches
No. The reference level RR , RG , RB Increase or decrease
The tone value increases or decreases in inverse proportion to the
Value ER , EG , EB Is the reference evaluation value E0 Converge on
Feedback control. Therefore, the reference
Lens level RR , RG , RBAdjustment is one field lap
Time delay of one to several fields
And the digital RGB image signal DR , DG , DB No ba
Lance adjustment will be performed. The reference
Level RR , RG , RB The initial value of
Image signal AR , AG , AB Maximum amplitude and pedestal level
Is the maximum gradation value 255.
It is set in advance as follows.
【0023】前記各平均値算出手段4及び前記各リファ
レンスレベル調整手段5は、具体的には、前記各リファ
レンスレベルRR ,RG ,RB を出力するアナログ回路
部分を除き、マイクロコンピュータ(図示せず)によっ
て構成されている。また、このマイクロコンピュータは
前記着色異物検出手段3のタイミング制御等も行ってい
る。Each of the average value calculating means 4 and each of the reference level adjusting means 5 is, specifically, a microcomputer (see FIG. 1) except for an analog circuit portion for outputting each of the reference levels R R , R G , and R B. (Not shown). The microcomputer also controls the timing of the colored foreign matter detecting means 3 and the like.
【0024】以上の構成により、前記被検査物の基調色
の変動や照明等の環境条件の変動が数フィールド分に相
当する時間内で急激に発生しない限り、前記ディジタル
RGB画像信号DR ,DG ,DB は常時、実質的にカラ
ーバランス調整がなされた状態に維持されることにな
る。この結果、前記被検査物は、画像処理上、常時無彩
色として取り扱え、前記被検査物の基調色とは異なる色
の着色異物は単に有彩色として検出すればよいことにな
り、前記着色異物検出手段3は、以下に説明するよう
に、簡単な回路構成で実現できるのである。With the above arrangement, the digital RGB image signals D R , D unless the fluctuation of the basic color of the object to be inspected or the fluctuation of environmental conditions such as illumination occur rapidly within a time corresponding to several fields. G, D B is always becomes substantially the color balance adjustment is maintained in the state they were made. As a result, the object to be inspected can always be treated as an achromatic color in image processing, and a colored foreign substance having a color different from the base color of the inspected object may be simply detected as a chromatic color. Means 3 can be realized with a simple circuit configuration as described below.
【0025】前記着色異物検出手段3は、前記ディジタ
ルRGB画像信号DR ,DG ,DBに基づいて各画素毎
の彩度を逐次算出して所定の基準値C0 以上の彩度の高
彩度画素を抽出する高彩度画素検出手段6と、前記高彩
度画素が所定の密集度以上で集合してなる高彩度画素領
域を検出する高彩度画素領域検出手段7から構成されて
おり、具体的にはゲートアレイや、FPGA(フィール
ド・プログラマブル・ゲート・アレイ)等のランダムロ
ジックでハードウェア構成されている。The colored foreign matter detecting means 3 sequentially calculates the saturation of each pixel based on the digital RGB image signals D R , D G , and D B and obtains a high saturation of a saturation equal to or higher than a predetermined reference value C 0. It comprises high-saturation pixel detection means 6 for extracting pixels, and high-saturation pixel area detection means 7 for detecting a high-saturation pixel area in which the high-saturation pixels are aggregated at a predetermined density or higher. , FPGA (field programmable gate array) or other random logic.
【0026】前記高彩度画素検出手段6は、図2に示す
ように、8ビット幅の各画素毎のRGB各入力値DR ,
DG ,DB から最大値DMAX と最小値DMIN を選び出し
て夫々出力する最大値最小値検出部6aと、前記最大値
DMAX から前記最小値DMINを減算し、その減算値をそ
の画素の彩度Cとして減算回路部6bと、前記彩度Cと
前記基準値C0 を大小比較して2値化された高彩度画素
検出信号Pを出力する大小比較器6cとから構成されて
いる。即ち、前記高彩度画素検出信号Pは、前記彩度C
が前記基準値C0 より大きい場合にその画素が高彩度画
素と判断して「1」を出力する。更に、図2に示すよう
に、前記最大値最小値検出部6aは三つの2入力の大小
比較器6dで構成されている。As shown in FIG. 2, the high-saturation pixel detection means 6 outputs RGB input values D R ,
D G, subtracts the maximum value-minimum value detection unit 6a for each output picked the maximum value D MAX and the minimum value D MIN from D B, the minimum value D MIN from the maximum value D MAX, the the subtraction value is composed of a subtraction circuit unit 6b as the chroma C of the pixel, the magnitude comparator 6c for outputting a high saturation pixel detection signal P to the reference value C 0 and the chroma C is binarized by size comparison . That is, the high-saturation pixel detection signal P is calculated based on the saturation C
Is larger than the reference value C 0 , the pixel is determined to be a high-saturation pixel and “1” is output. Further, as shown in FIG. 2, the maximum value / minimum value detection section 6a is composed of three 2-input magnitude comparators 6d.
【0027】前記高彩度画素領域検出手段7は画素毎に
生成された前記高彩度画素検出信号Pのシリアルデータ
を逐次入力し、所定データ長毎にその中に含まれている
「1」を計数し、所定数以上あれば、高彩度画素が所定
の密集度以上で集合しており、それが検出すべき前記着
色異物の一部の画素であると判定して、着色異物検出信
号Pを出力する。The high-saturation pixel area detection means 7 sequentially inputs serial data of the high-saturation pixel detection signal P generated for each pixel, and counts "1" contained therein for each predetermined data length. If the number is equal to or more than the predetermined number, the high-saturation pixels are gathered at a predetermined density or higher, and it is determined that the pixels are a part of the colored foreign matter to be detected, and the colored foreign matter detection signal P is output.
【0028】この着色異物検出信号Pが出力されると、
この信号に基づいて、当該着色異物の前記撮影画面上で
の位置特定処理、警報発生、或いは、前記被検査物を処
理停止等の関連する後処理を行うのである。When the colored foreign matter detection signal P is output,
Based on this signal, related post-processing such as a process for specifying the position of the colored foreign matter on the photographing screen, generating an alarm, or stopping the processing of the inspection object is performed.
【0029】以下に別実施形態を説明する。 〈1〉前記ディジタルRGB画像信号DR ,DG ,DB
相互間のバランス調整のために、前記リファレンスレベ
ルRR ,RG ,RB の調整を行う代わりに、前記アナロ
グRGB画像信号AR ,AG ,AB の前記A/D変換器
1への入力ゲインを調整するようにするのも好ましい。
この場合は、前記リファレンスレベルRR,RG ,RB
の調整とは逆に、前記リファレンスレベルRR ,RG ,
RB を所定の刻み値だけ下げる場合には、対応するアナ
ログRGB画像信号AR ,AG ,A B の入力ゲインを所
定量増幅し、前記リファレンスレベルRR ,RG ,RB
を所定の刻み値だけ上げる場合には、前記入力ゲインを
所定量減衰させればよい。但し、前記評価値ER ,E
G ,EB と前記基準評価値E0 の差分に相当する分を一
気に調整しようとすると発振する虞があるため、前記リ
ファレンスレベルRR ,RG ,RB と同様に調整量を分
割して行うのが好ましい。Another embodiment will be described below. <1> The digital RGB image signal DR , DG , DB
The reference level is adjusted to balance each other.
Le RR , RG , RB Instead of adjusting the analog
RGB image signal AR , AG , AB Said A / D converter
It is also preferable to adjust the input gain to unity.
In this case, the reference level RR, RG , RB
The adjustment of the reference level RR , RG ,
RB If you want to reduce the
Log RGB image signal AR , AG , A B Input gain
Quantitatively amplify the reference level RR , RG , RB
When the input gain is increased by a predetermined step value,
What is necessary is just to attenuate by a predetermined amount. However, the evaluation value ER , E
G , EB And the reference evaluation value E0 The amount equivalent to the difference of
Because there is a risk of oscillation if you try to adjust it,
Reference level RR , RG , RB Adjustment amount
It is preferable to carry out by dividing.
【0030】〈2〉上記実施の形態では、前記基準評価
値E0 は階調値160の固定値であったが、他の階調値
であってもよく、また、各フィールド毎に変化しても構
わない。例えば、前記基準評価値E0 として、前記評価
値ER ,EG ,EB の何れか一つを使用しても構わな
い。例えば、前記評価値EG を前記基準評価値E0 とし
た場合は、前記リファレンスレベルRR ,RG ,RB の
調整は前記リファレンスレベルRG を固定して、他の2
つのリファレンスレベルRR ,RB について行うように
するのも好ましい実施の形態である。このようにするこ
とで、前記リファレンスレベル調整或いは前記入力ゲイ
ンの調整が、RGB各成分の一成分につき省略でき、回
路構成の簡略化が図れるのである。<2> In the above embodiment, the reference evaluation value E 0 is a fixed value of the gradation value 160, but may be another gradation value. It does not matter. For example, as the reference evaluation value E 0, the evaluation value E R, E G, may be used any one of E B. For example, if the evaluation value E G was the reference evaluation value E 0 is the reference level R R, R G, the adjustment of R B by fixing the reference level R G, other 2
One of the reference level R R, it is also preferred embodiment to be performed on R B. By doing so, the reference level adjustment or the input gain adjustment can be omitted for each of the RGB components, and the circuit configuration can be simplified.
【0031】〈3〉前記RGBバランス調整手段2は、
前記平均値算出手段4を備えて、前記ディジタルRGB
画像信号DR ,DG ,DB の前記所定領域の平均階調を
算出して前記評価値ER ,EG ,EB としていたが、前
記平均階調を算出する代わりに、前記所定領域内での階
調値の分布の中央値或いは最頻出値を前記評価値として
も構わない。<3> The RGB balance adjusting means 2
The digital RGB
Although the average gradation of the predetermined area of the image signals D R , D G , and D B is calculated and used as the evaluation values E R , E G , and E B , the predetermined area is calculated instead of calculating the average gradation. The median value or the most frequent value of the distribution of the gradation values within may be used as the evaluation value.
【0032】〈4〉前記高彩度画素領域検出手段7は画
素毎に生成された前記高彩度画素検出信号Pのシリアル
データを逐次入力し、「1」が所定データ長連続して発
生するのを検出することで、その連続データが前記着色
異物の一走査線上に現れる高彩度画素であると判断し
て、着色異物検出信号Pを出力するようにしても構わな
い。<4> The high-saturation pixel area detection means 7 sequentially inputs serial data of the high-saturation pixel detection signal P generated for each pixel, and detects that "1" is continuously generated for a predetermined data length. Thus, the continuous data may be determined to be a high-saturation pixel appearing on one scanning line of the colored foreign matter, and the colored foreign matter detection signal P may be output.
【0033】〈5〉前記RGBバランス調整手段2は1
フィールド毎に毎回、前記バランス調整を行っていた
が、処理範囲を1フィールドから1フレームにして、1
フレーム毎に行うようにしても構わない。また、必ずし
も、フィールド毎、或いは、フレーム毎に前記バランス
調整処理を行わずに、適当に当該処理を行わないフィー
ルド或いはフレームを設けても構わない。また、複数台
のカラービデオカメラからの複数組のアナログRGB画
像信号A R ,AG ,AB を一台の前記着色異物検出装置
で時分割処理するように構成するのも好ましい。この場
合は、1フィールド或いは1フレーム毎の前記バランス
調整処理をそのカメラ台数分のフィールド或いはフレー
ムの周期で巡回処理するのも好ましい。かかる構成によ
れば、前記被処理物を他方向から撮影する構成にも対応
できるのである。<5> The RGB balance adjusting means 2
The balance adjustment was performed every field
Changes the processing range from one field to one frame,
It may be performed for each frame. Also, be sure
Also, for each field or frame, the balance
Fees that do not perform the appropriate processing without performing the adjustment processing
A frame or a frame may be provided. Also, multiple units
Sets of analog RGB images from a color video camera
Image signal A R , AG , AB The one colored foreign matter detection device
It is also preferable to perform a time division process. This place
In this case, the balance for each field or frame
Perform the adjustment process in the field or frame for the number of cameras.
It is also preferable to perform the cyclic processing at a cycle of the system. With this configuration
If the object to be processed is photographed from another direction
You can.
【0034】〈6〉前記A/D変換工程、前記評価値算
出工程、前記RGBバランス調整工程、前記着色異物検
出工程の各工程は、本発明に係る着色異物検出装置以外
の構成により、例えば、前記各工程を独立の装置で実行
しても構わない。或いは、前記工程の一部、例えば、前
記A/D変換工程、前記評価値算出工程、及び、前記R
GBバランス調整工程を前記カラービデオカメラ側で実
行して、前記カラービデオカメラは前記ディジタルRG
B画像信号DR ,DG ,DB を出力するという実施の形
態であっても構わない。<6> Each of the A / D conversion step, the evaluation value calculation step, the RGB balance adjustment step, and the colored foreign matter detection step is performed by a configuration other than the colored foreign matter detection device according to the present invention. Each of the above steps may be executed by an independent device. Alternatively, a part of the steps, for example, the A / D conversion step, the evaluation value calculating step, and the R
The color video camera performs a GB balance adjustment step on the color video camera side.
An embodiment that outputs the B image signals D R , D G , and D B may be used.
【0035】[0035]
【発明の効果】以上説明したように、本発明によれば、
カラービデオカメラ側での継続的なカラーバランス調整
が不要で、且つ、被検査物の基調色とは異なる色の着色
異物を高精度に、且つ、簡単な回路構成で検出可能な着
色異物検出装置を提供することができた。As described above, according to the present invention,
A colored foreign matter detection device that does not require continuous color balance adjustment on the color video camera side and can detect colored foreign matter of a color different from the base color of the inspection object with high accuracy and a simple circuit configuration Could be provided.
【図1】本発明に係る着色異物検出装置の一実施の形態
を示すブロック構成図FIG. 1 is a block diagram showing an embodiment of a colored foreign matter detection device according to the present invention.
【図2】本発明に係る着色異物検出装置の一実施の形態
の示す要部ブロック構成図、FIG. 2 is a main block diagram showing an embodiment of a colored foreign matter detection device according to the present invention;
【図3】ディジタルRGB画像信号によるカラー表示を
説明する説明図FIG. 3 is an explanatory diagram for explaining color display using digital RGB image signals.
【図4】ディジタルRGB画像信号によるカラー表示の
内の彩度について説明する説明図FIG. 4 is an explanatory diagram for explaining saturation in color display using digital RGB image signals.
1 A/D変換器 2 RGBバランス調整手段 3 着色異物検出手段 4 平均値算出手段 5 リファレンスレベル調整手段 6 高彩度画素検出手段 6a 最大値最小値検出部 6b 減算回路部 6c 大小比較器(1ビット出力) 6d 大小比較器(8ビット出力) 7 高彩度画素領域検出手段 AR ,AG ,AB アナログRGB画像信号 DR ,DG ,DB ディジタルRGB画像信号 RR ,RG ,RB リファレンスレベル ER ,EG ,EB 評価値 E0 基準評価値 P 高彩度画素検出信号 C 彩度 C0 基準値 DMAX 最大値 DMIN 最小値Reference Signs List 1 A / D converter 2 RGB balance adjusting means 3 Colored foreign matter detecting means 4 Average value calculating means 5 Reference level adjusting means 6 High chroma pixel detecting means 6a Maximum / minimum value detecting unit 6b Subtraction circuit unit 6c Large / small comparator (1-bit output) 6d Large / Small comparator (8-bit output) 7 High-saturation pixel area detection means A R , A G , A B analog RGB image signal D R , D G , D B digital RGB image signal R R , R G , R B reference level E R , E G , E B evaluation value E 0 reference evaluation value P High chroma pixel detection signal C Saturation C 0 reference value D MAX maximum value D MIN minimum value
Claims (7)
GB画像信号をディジタルRGB画像信号に変換するA
/D変換器と、 一画面の所定領域内における前記ディジタルRGB画像
信号の所定の評価値をRGB各信号毎に算出し、RGB
各信号間でその算出した評価値が所定誤差範囲内で一致
するように、前記A/D変換器の入力レベルまたはリフ
ァレンスレベルをRGB各別に調整するRGBバランス
調整手段と、 前記ディジタルRGB画像信号に基づいて前記被検査物
の撮影画像から前記被検査物の基調色とは異なる色の着
色異物を検出する着色異物検出手段とを備えてなる着色
異物検出装置。1. An analog R obtained by photographing an object to be inspected.
A for converting a GB image signal into a digital RGB image signal
A / D converter, and a predetermined evaluation value of the digital RGB image signal in a predetermined area of one screen is calculated for each of the RGB signals.
RGB balance adjusting means for adjusting the input level or reference level of the A / D converter for each of RGB so that the calculated evaluation value matches within a predetermined error range between the signals, and A colored foreign matter detecting device for detecting a colored foreign matter having a color different from a base color of the inspected object from the photographed image of the inspected object based on the detected image.
ルRGB画像信号に基づいて各画素毎の彩度を逐次算出
して所定の基準値以上の彩度の高彩度画素を抽出する高
彩度画素検出手段と、前記高彩度画素が所定の密集度或
いは大きさ以上で集合してなる高彩度画素領域を検出す
る高彩度画素領域検出手段とからなる請求項1記載の着
色異物検出装置。2. A high-saturation pixel detection means for sequentially calculating the saturation of each pixel based on the digital RGB image signal and extracting a high-saturation pixel having a saturation equal to or higher than a predetermined reference value. 2. The colored foreign matter detection device according to claim 1, further comprising a high-saturation pixel area detecting means for detecting a high-saturation pixel area in which the high-saturation pixels are aggregated with a predetermined density or a size or more.
タルRGB画像信号のRGB各信号レベルの最大値から
最小値を各画素毎に差し引いた値を前記各画素毎の彩度
として算出することを特徴とする請求項2記載の着色異
物検出装置。3. The high-saturation pixel detection means calculates, as the saturation of each pixel, a value obtained by subtracting a minimum value from a maximum value of each of RGB signal levels of the digital RGB image signal for each pixel. The colored foreign matter detection device according to claim 2, wherein
基準評価値より所定量以上低い評価値のRGB成分に対
して、対応する前記入力レベルを所定量増幅させるか、
或いは、対応する前記リファレンスレベルを所定量低下
させ、前記所定の基準評価値より所定量以上高い評価値
のRGB成分に対して、対応する前記入力レベルを所定
量減衰させるか、或いは、対応する前記リファレンスレ
ベルを所定量上昇させて、前記評価値をRGB各信号間
で所定誤差範囲内で一致させることを特徴とする請求項
1、2または3記載の着色異物検出装置。4. The method according to claim 1, wherein the RGB balance adjusting means amplifies the corresponding input level by a predetermined amount with respect to an RGB component having an evaluation value lower than a predetermined reference evaluation value by a predetermined amount or more.
Alternatively, the corresponding reference level is lowered by a predetermined amount, and for the RGB component having an evaluation value higher than the predetermined reference evaluation value by a predetermined amount or more, the corresponding input level is attenuated by a predetermined amount, or 4. The colored foreign matter detection device according to claim 1, wherein the reference level is increased by a predetermined amount, and the evaluation values are made to match within a predetermined error range between the RGB signals.
ンス調整手段が算出したRGB各成分の評価値内の所定
の一成分の評価値である請求項4記載の着色異物検出装
置。5. The colored foreign matter detection device according to claim 4, wherein the predetermined reference evaluation value is an evaluation value of a predetermined one of the evaluation values of each of the RGB components calculated by the RGB balance adjusting means.
ームまたは1フィールド分の前記ディジタルRGB画像
信号の信号レベルの平均値、中央値、或いは、最頻出値
である請求項1、2、3、4または5記載の着色異物検
出装置。6. The method according to claim 1, wherein the evaluation value is an average value, a median value, or a most frequent value of signal levels of the digital RGB image signal for one frame or one field in the predetermined area. 6. The colored foreign matter detection device according to 3, 4, or 5.
GB画像信号を各別にA/D変換器でディジタルRGB
画像信号に変換するA/D変換工程と、 一画面の所定領域内における前記ディジタルRGB画像
信号の所定の評価値をRGB各信号毎に算出する評価値
算出工程と、 RGB各信号間でその算出した評価値が所定誤差範囲内
で一致するように、前記A/D変換器の入力レベルまた
はリファレンスレベルをRGB各別に調整するRGBバ
ランス調整工程とを連続的に実行し、 前記A/D変換工程、前記評価値算出工程、及び、前記
RGBバランス調整工程とを実行して得られる前記ディ
ジタルRGB画像信号に基づいて、前記被検査物の撮影
画像から前記被検査物の基調色とは異なる色の着色異物
を検出する着色異物検出工程を実行することを特徴とす
る着色異物検出方法。7. An analog R obtained by photographing an object to be inspected.
A / D converter converts each of RGB image signals to digital RGB
An A / D conversion step of converting the image signal into an image signal; an evaluation value calculation step of calculating a predetermined evaluation value of the digital RGB image signal in a predetermined area of one screen for each of the RGB signals; And an RGB balance adjusting step of adjusting an input level or a reference level of the A / D converter for each of RGB so that the evaluated values match within a predetermined error range. Based on the digital RGB image signal obtained by performing the evaluation value calculating step and the RGB balance adjusting step, a color different from the base color of the test object from the photographed image of the test object. A colored foreign matter detection method, comprising performing a colored foreign matter detection step of detecting a colored foreign matter.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP10118887A JPH11312245A (en) | 1998-04-28 | 1998-04-28 | Colored foreign material detector and its method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP10118887A JPH11312245A (en) | 1998-04-28 | 1998-04-28 | Colored foreign material detector and its method |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH11312245A true JPH11312245A (en) | 1999-11-09 |
Family
ID=14747611
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP10118887A Pending JPH11312245A (en) | 1998-04-28 | 1998-04-28 | Colored foreign material detector and its method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH11312245A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010278516A (en) * | 2009-05-26 | 2010-12-09 | Fuji Xerox Co Ltd | Image processor and image processing program |
JP2013058969A (en) * | 2011-09-09 | 2013-03-28 | Toshiba Alpine Automotive Technology Corp | Image processing apparatus |
CN115601317A (en) * | 2022-10-08 | 2023-01-13 | 江阴嘉欧新材料有限公司(Cn) | System for be used for PETG panel quality appraisal |
-
1998
- 1998-04-28 JP JP10118887A patent/JPH11312245A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010278516A (en) * | 2009-05-26 | 2010-12-09 | Fuji Xerox Co Ltd | Image processor and image processing program |
JP2013058969A (en) * | 2011-09-09 | 2013-03-28 | Toshiba Alpine Automotive Technology Corp | Image processing apparatus |
CN115601317A (en) * | 2022-10-08 | 2023-01-13 | 江阴嘉欧新材料有限公司(Cn) | System for be used for PETG panel quality appraisal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100278642B1 (en) | Color image processing apparatus and method | |
US7656437B2 (en) | Image processing apparatus, image processing method, and computer program | |
US6618502B1 (en) | Color image processing method and apparatus | |
JP3943167B2 (en) | Color conversion method | |
US7492411B2 (en) | Method of and apparatus for processing a video image | |
US20110157584A1 (en) | Method of calibrating a light source | |
TWI843820B (en) | Method of color inspection by using monochrome imaging with multiple wavelengths of light | |
JPH11312245A (en) | Colored foreign material detector and its method | |
JP2003304556A (en) | Video signal processing apparatus and video signal processing method | |
US20070158535A1 (en) | Color imaging using monochrome imagers | |
KR100645856B1 (en) | Signal processing method and image acquisition device | |
JP2584195B2 (en) | Automatic evaluation device for round colored fruits | |
KR100207985B1 (en) | White balance controlling system using cie color system | |
US5293543A (en) | Apparatus for color imager defect determination | |
AU761621B2 (en) | Color enhancement method | |
CN113724342B (en) | A calculation method for theoretical grayscale value of pixel response of color image sensor | |
CN101292542A (en) | Improved chroma filter for white balance statistics | |
JPH09210789A (en) | Nonuniformity of color inspection system | |
JP4003037B2 (en) | White balance adjustment device, white balance adjustment program, white balance adjustment method, and digital camera | |
EP1492356A2 (en) | Method for color detection in video images | |
JP2007198831A (en) | Image data processing method and processing program | |
JPH09218095A (en) | Inspection device of color variation | |
JP2541749B2 (en) | Color to be reproduced Method and device for analyzing color blemishes in original image | |
JP4017612B2 (en) | Inspection method | |
JP3135731B2 (en) | Pattern recognition method and apparatus |