JPH0477951B2 - - Google Patents

Info

Publication number
JPH0477951B2
JPH0477951B2 JP60150024A JP15002485A JPH0477951B2 JP H0477951 B2 JPH0477951 B2 JP H0477951B2 JP 60150024 A JP60150024 A JP 60150024A JP 15002485 A JP15002485 A JP 15002485A JP H0477951 B2 JPH0477951 B2 JP H0477951B2
Authority
JP
Japan
Prior art keywords
image
circuit
binarization
level
window
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 - Lifetime
Application number
JP60150024A
Other languages
Japanese (ja)
Other versions
JPS6211984A (en
Inventor
Michiaki Myagawa
Koichi Ooki
Hiroyuki Horii
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP60150024A priority Critical patent/JPS6211984A/en
Priority to DE19863623294 priority patent/DE3623294A1/en
Publication of JPS6211984A publication Critical patent/JPS6211984A/en
Priority to US07/186,698 priority patent/US4885784A/en
Publication of JPH0477951B2 publication Critical patent/JPH0477951B2/ja
Granted legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、移動する対象物の静止画像を取り
出し、これを画像処理して対象物の形状や欠陥等
を検査し、その良否判別や仕分けを行なうパター
ン検査・判別走査のための2値化方式に関する。
[Detailed Description of the Invention] [Industrial Application Field] This invention extracts a still image of a moving object, performs image processing to inspect the shape and defects of the object, and determines whether it is good or bad and sorts it. This invention relates to a binarization method for pattern inspection/discrimination scanning.

〔従来の技術〕[Conventional technology]

第7図はこの種のパターン検査・判別装置の従
来例を示す構成図、第8図はその動作を説明する
ためのタイミングチヤートである。なお、第7図
において、1は対象物、2はコンベア、3はテレ
ビカメラの如き撮像装置、4は照明装置、5は例
えば発光素子および受光素子からなる位置セン
サ、6は増幅器7、2値化回路8、演算判定部9
およびタイミング制御回路10等からなる画像処
理装置である。演算判定部9はさらに画像メモリ
91、特微抽出回路92、演算処理回路93、位
置検出・補正回路94および設定器95等より構
成される。
FIG. 7 is a block diagram showing a conventional example of this type of pattern inspection/discrimination apparatus, and FIG. 8 is a timing chart for explaining its operation. In FIG. 7, 1 is an object, 2 is a conveyor, 3 is an imaging device such as a television camera, 4 is an illumination device, 5 is a position sensor consisting of a light emitting element and a light receiving element, and 6 is an amplifier 7, a binary value. conversion circuit 8, arithmetic determination section 9
This is an image processing device including a timing control circuit 10 and the like. The calculation/judgment section 9 further includes an image memory 91, a feature extraction circuit 92, an arithmetic processing circuit 93, a position detection/correction circuit 94, a setting device 95, and the like.

以下、従来装置の動作について第7,8図を参
照して説明する。
The operation of the conventional device will be described below with reference to FIGS. 7 and 8.

対象物1はベルトコンベア2により搬送され、
これがテレビカメラ3の視野内所定位置に到達す
ると、このことが位置センサ5によつて検知され
る。位置センサ出力は検査開始用信号として用い
られ、例えば第8図ロの如く示される。いま、テ
レビカメラ3がシヤツタ内蔵形のものであり、こ
のシヤツタがテレビカメラ3の垂直帰線消去期間
(垂直ブランキング期間)VBLKと同期をとつて駆
動されるものとすると、この場合シヤツタは第8
図ハの如く1回だけ“開”状態となる。なお、垂
直ブランキング期間は第8図イの如く示される。
こうしてシヤツタが開くと、テレビカメラ3によ
り対象物1の光学像が画像信号(ビデオ信号)に
変換されて抽出される。つまり、シヤツタ開直後
の1フイールド(1V;画像のこと)のカメラ出
力が有効となり、これが画像信号として画像処理
装置6に取り込まれる。この画像取り込みのタイ
ミングおよび期間が第8図にニとして示されてい
る。こうして取り込まれた画像信号は増幅器7に
て増幅され、2値化回路8にて2値化される。2
値化された画像信号は画像メモリ91に格納さ
れ、特徴抽出回路92はこのメモリ91から対象
物の各種特微量を抽出する。演算処理回路93は
各特微量を設定器95にて予め設定された設定値
と比較、判別することにより、対象物の良否判別
や仕分け(選別)を行ない、その結果を表示装置
等に出力する。この判定・演算のタイミングおよ
び期間は第8図にホとして示されている。なお、
第7図の位置検出・補正回路94は対象物の基準
点からの位置ずれ量を検出し、これを補正するた
めに設けられる。
The object 1 is conveyed by a belt conveyor 2,
When this reaches a predetermined position within the field of view of the television camera 3, this is detected by the position sensor 5. The position sensor output is used as a test start signal, as shown in FIG. 8B, for example. Now, suppose that the television camera 3 has a built-in shutter and that this shutter is driven in synchronization with the vertical blanking period (vertical blanking period) V BLK of the television camera 3. In this case, the shutter is 8th
As shown in Figure C, it is in the "open" state only once. Incidentally, the vertical blanking period is shown as in FIG. 8A.
When the shutter is opened in this manner, the optical image of the object 1 is converted into an image signal (video signal) and extracted by the television camera 3. In other words, the camera output of one field (1V; image) immediately after the shutter is opened is valid, and this is taken into the image processing device 6 as an image signal. The timing and duration of this image capture is shown as D in FIG. The image signal captured in this way is amplified by an amplifier 7 and binarized by a binarization circuit 8. 2
The digitized image signal is stored in an image memory 91, and a feature extraction circuit 92 extracts various characteristic quantities of the object from this memory 91. The arithmetic processing circuit 93 compares and discriminates each characteristic amount with a set value preset by the setting device 95, thereby determining whether the object is good or bad and sorting (sorting) the object, and outputs the results to a display device or the like. . The timing and period of this determination/calculation are shown as E in FIG. In addition,
A position detection/correction circuit 94 shown in FIG. 7 is provided to detect the amount of positional deviation of the object from the reference point and correct it.

以上はシヤツタ付きテレビカメラの場合である
が、シヤツタを持たないテレビカメラを用いると
きは、シヤツタのかわりにストロボを用意し、こ
のストロボをシヤツタ“開”と同じタイミングで
1回だけ点弧することにより、上記と同様に検
査、判別を行なうことができる。
The above is for a TV camera with a shutter, but when using a TV camera without a shutter, prepare a strobe instead of the shutter, and fire this strobe only once at the same timing as the shutter "opens". Accordingly, inspection and discrimination can be performed in the same manner as above.

このようにシヤツタ、ストロボは連続的に移動
する画像を静止画像化するものであり、これによ
り画像ボケのない鮮明な画像を取り出し、高精度
の検査、判別を保証するようにしている。
In this way, shutters and strobes convert continuously moving images into still images, thereby extracting clear images without image blurring and ensuring highly accurate inspection and discrimination.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

ところで、このような装置における2値化回路
のしきい値は、予め設定された固定レベルで行な
われるのが普通であるが、これは回路構成および
処理が容易となり、処理時間も短くて済むからで
ある。しかしながら、照明装置(第7図の符号4
参照)の明るさが時間的に変動したり、または対
象物自体の反射率が固体によつて変動したりする
と、当然のことながらカメラからの画像信号も変
動する。これを固定レベルで2値化しようとする
と、対象物画像は大幅に歪んだものとなり、その
結果、対象物は正常品であるにもかゝわらず、不
良品と見なしてしまうという大きな問題点を有し
ている。
By the way, the threshold value of the binarization circuit in such devices is usually set at a fixed level set in advance, but this is because the circuit configuration and processing are easier and the processing time is shorter. It is. However, the lighting device (reference number 4 in Fig. 7)
If the brightness of the object (reference) changes over time, or if the reflectance of the object itself changes depending on the solid state, the image signal from the camera will naturally change as well. If you try to binarize this at a fixed level, the object image will be significantly distorted, and as a result, the big problem is that the object will be considered a defective product even though it is normal. have.

なお、1つの画像情報がある場合に、例えばそ
のビデオ信号を所定ビツト数のデイジタル量に変
換してその濃淡情報を画素単位メモリに記憶さ
せ、これを再続出して所要の情報処理を行なうこ
とにより最適レベルを決定する方法もある。しか
しながら、この方法では回路構成が膨大のものと
なるばかりでなく、しきい値決定のための処理時
間が長くなるという問題がある。
Note that when there is one piece of image information, for example, the video signal is converted into a digital quantity of a predetermined number of bits, the grayscale information is stored in a pixel-by-pixel memory, and this information is continuously outputted to perform the required information processing. There is also a method of determining the optimal level. However, this method has the problem that not only the circuit configuration becomes enormous, but also the processing time for determining the threshold value becomes long.

したがつて、この発明は処理時間が短くしかも
経済的で、かつ照明装置の明るさ変動や対象物の
種類等によつて誤判定することのない、安定かつ
高精度な2値化方式を提供することを目的とす
る。
Therefore, the present invention provides a stable and highly accurate binarization method that is economical in that it takes a short processing time, and that does not cause erroneous judgments due to variations in brightness of a lighting device or the type of object. The purpose is to

〔問題点を解決するための手段〕[Means for solving problems]

移動する対象物を静止画像化して撮像する2次
元撮像手段と、該撮像画像の所定位置に少なくと
も1つの所定大きさのウインドウを発生させるウ
インドウ発生手段と、該ウインドウを介して取り
出される領域の濃淡レベルを検出し該濃淡レベル
に応じて2値化レベルを決定する2値化レベル決
定手段とを設ける。
two-dimensional imaging means for capturing a still image of a moving object; window generation means for generating at least one window of a predetermined size at a predetermined position of the captured image; and shading of an area extracted through the window. A binarization level determining means for detecting the level and determining a binarization level according to the gray level is provided.

〔作用〕[Effect]

上記2次元撮像手段により所定時刻を基準にし
て相前後する少なくとも2つの静止画像をとり出
し、時間的に静止画像について上記ウインドウ発
生手段によりその所定位置にウインドウを発生さ
せ、上記2値化レベル決定手段によりウインドウ
領域内の濃淡レベルを調べてこの濃淡レベルから
最適2値化レベルを決定し、この2値化レベルに
よつて時間的に後の静止画像の2値化を行なうこ
とにより、簡単かつ安価な構成で、しかも無駄時
間なく最適2値化レベルを決定し得るようにす
る。
The two-dimensional imaging means takes out at least two still images that follow each other based on a predetermined time, and the window generation means generates a window at a predetermined position of the still image temporally, and the binarization level is determined. By checking the shading level within the window area using a means, determining the optimum binarization level from this shading level, and binarizing the temporally later still image using this binarization level, it is possible to easily and To determine an optimum binarization level with an inexpensive configuration and without wasting time.

〔実施例〕〔Example〕

第1図はこの発明の実施例を示す構成図であ
る。同図において、11はローパスフイルタ
(LPF)、12はピークホールド回路(PH回路)、
13はアナログ/デイジタル(A/D)変換回
路、14は演算回路、15は比較レベル選択回
路、16はデイジタル/アナログ(D/A)変換
回路、17は2値出力制御回路、18はPHレベ
ル判別回路、19は標準値出力回路、21はウイ
ンドウ発生回路、22は走査点座標発生回路、2
3はウインドウ設定値記憶回路、24はPHリセ
ツト回路、25はリセツトタイミング回路、26
は有効画面制御回路、27はカメラ駆動同期回路
であり、その他は第7図と同様である。
FIG. 1 is a block diagram showing an embodiment of the present invention. In the same figure, 11 is a low pass filter (LPF), 12 is a peak hold circuit (PH circuit),
13 is an analog/digital (A/D) conversion circuit, 14 is an arithmetic circuit, 15 is a comparison level selection circuit, 16 is a digital/analog (D/A) conversion circuit, 17 is a binary output control circuit, and 18 is a PH level. 19 is a standard value output circuit; 21 is a window generation circuit; 22 is a scanning point coordinate generation circuit;
3 is a window setting value storage circuit, 24 is a PH reset circuit, 25 is a reset timing circuit, 26
27 is an effective screen control circuit, 27 is a camera drive synchronization circuit, and the other parts are the same as in FIG.

したがつて、対象物1は第7図の場合と同様
に、ベルトコンベア2によつてテレビカメラ3の
視野内に来るように搬送される。こゝで用いられ
るテレビカメラ3としては、例えば第2図の如く
撮像素子31、映像処理および撮像素子駆動回路
32、レンズ33、回転円板34、モータ35、
回転制御回路36およびケース37等からなるも
のが用いられる。これは、レンズ33と撮像素子
31との間に、円周上の所定位置に開口スリツト
をもつ回転円板34を配置し、この回転円板34
をモータ35にて回転させることにより、一種の
フオーカルプレーン式のシヤツタ効果をもたせる
ようにしたものである。回転制御回路36は、こ
の円板による露光動作が常にテレビカメラの垂直
ブランキング期間VBLK毎に連動して行なわれる
ようモータの回転制御を行なう。
Therefore, as in the case of FIG. 7, the object 1 is conveyed by the belt conveyor 2 so as to come within the field of view of the television camera 3. The television camera 3 used here includes, for example, as shown in FIG. 2, an image sensor 31, an image processing and image sensor drive circuit 32, a lens 33, a rotating disk 34, a motor 35,
A rotation control circuit 36, a case 37, etc. are used. A rotating disk 34 having an aperture slit at a predetermined position on the circumference is arranged between the lens 33 and the image sensor 31, and this rotating disk 34
By rotating the lens with a motor 35, a kind of focal plane type shutter effect is produced. The rotation control circuit 36 controls the rotation of the motor so that the exposure operation by this disk is always performed in conjunction with every vertical blanking period V BLK of the television camera.

上記はシヤツタ機能をもつものであるが、こう
するかわりに第2A図の如くストロボを用いるこ
とができる。なお、第2A図はストロボ方式の例
を示す概要図である。すなわち、ストロボ41、
ストロボ点弧回路42およびストロボ点弧制御回
路43からなり、制御回路43にVBLK信号と位
置センサ(第1図の符号5参照)出力を導入する
ことにより、位置センサ出力が得られた後の信号
VBLKにより、ストロボ41を点弧回路42を介
して点弧するものである。
Although the above device has a shutter function, a strobe light can be used instead as shown in FIG. 2A. Note that FIG. 2A is a schematic diagram showing an example of the strobe method. That is, strobe 41,
It consists of a strobe firing circuit 42 and a strobe firing control circuit 43, and by introducing the V BLK signal and the position sensor (see reference numeral 5 in Fig. 1) output into the control circuit 43, the signal
The strobe 41 is ignited via the ignition circuit 42 by V BLK .

したがつて、シヤツタ付テレビカメラの場合
は、例えば第2図の如く構成するとともに第1図
に示される如き照明装置4を用いることにより、
またストロボ方式の場合は例えば第2A図の如く
構成することにより、それぞれ複数の画像信号を
得ることができる。
Therefore, in the case of a television camera with a shutter, for example, by constructing it as shown in FIG. 2 and using the illumination device 4 as shown in FIG.
In the case of a strobe type, for example, a plurality of image signals can be obtained by configuring as shown in FIG. 2A.

このようにして得られるテレビカメラ3からの
画像信号は画像処理装置のアナログ増幅器7に与
えられ、こゝで適宜なレベルに増幅される。増幅
器7からの信号は、2値化回路8およびローパス
フイルタ11に入力される。LPF11はテレビ
カメラ3の画像信号からノイズや1〜数画素程度
の小さな画像信号(周波数が高い)をカツトし、
中間周波数以下の画像信号のみを抽出する。これ
は、ノイズや対象物による局部的な偽画像信号
(例えば、ハレーシヨン等により生起する。)にも
とづく誤動作を回避するために設けられる。この
LPF11の出力はピークホールド回路(PH回
路)12に導かれ、所定のタイミングで画像信号
のピーク値をホールドする。PH回路12は、そ
の動作タイミングがホールド用ウインドウ発生回
路21からの出力によつて制御される。つまり、
ウインドウ領域内だけPH回路12が動作し、そ
のホールド値はPHリセツト回路24およびPH
リセツトタイミング回路25により、所定のタイ
ミングで消去される。ウインドウ発生回路21
は、予め設定した画面内の所定位置に所定大きさ
の2次元領域をウインドウとして発生するもの
で、各走査線毎にウインドウ信号を発生すること
によりウインドウ領域を形成する。
The image signal from the television camera 3 obtained in this manner is applied to an analog amplifier 7 of the image processing device, where it is amplified to an appropriate level. The signal from amplifier 7 is input to binarization circuit 8 and low-pass filter 11. The LPF 11 cuts noise and small image signals (high frequency) of one to several pixels from the image signal of the television camera 3.
Only image signals below the intermediate frequency are extracted. This is provided in order to avoid malfunctions based on noise or local false image signals caused by objects (eg, caused by halation, etc.). this
The output of the LPF 11 is led to a peak hold circuit (PH circuit) 12, which holds the peak value of the image signal at a predetermined timing. The operation timing of the PH circuit 12 is controlled by the output from the hold window generation circuit 21. In other words,
The PH circuit 12 operates only within the window area, and its hold value is determined by the PH reset circuit 24 and the PH
The reset timing circuit 25 erases the data at a predetermined timing. Window generation circuit 21
The method generates a two-dimensional area of a predetermined size as a window at a predetermined position in a preset screen, and the window area is formed by generating a window signal for each scanning line.

走査点座標発生回路22は、テレビカメラ3か
らの水平走査線の数を計数することによつて現走
査時点のy座標を知る一方、高周波(例えば、
6MHz)の基準クロツクを計数することによつて
現水平走査線上におけるx座標を知り、これによ
り走査時点のx、y座標信号を各走査毎に出力す
る。したがつて、ウインドウ領域情報を設定値記
憶回路23に予め設定、記憶しておけば、これと
走査点座標発生回路22からのx、y座標位置情
報とをつき合わせることにより、ウインドウ発生
回路31を介して所定のウインドウ領域を設定す
ることができる。
The scanning point coordinate generation circuit 22 knows the y-coordinate at the current scanning point by counting the number of horizontal scanning lines from the television camera 3, and also calculates the y-coordinate at the current scanning point by counting the number of horizontal scanning lines from the television camera 3.
By counting the reference clock (6MHz), the x coordinate on the current horizontal scanning line is known, and based on this, the x and y coordinate signals at the time of scanning are output for each scanning. Therefore, if the window area information is set and stored in the setting value storage circuit 23 in advance, by comparing this with the x, y coordinate position information from the scanning point coordinate generation circuit 22, the window generation circuit 31 A predetermined window area can be set via .

こゝで、ウインドウ発生およびピークホールド
機能について、もう少し具体的に説明する。第3
図は対象物の移動による画面上の相対的位置変化
を示す参照図、第4図は主としてピークホールド
動作を説明するためのタイムチヤートである。
Here, the window generation and peak hold functions will be explained in more detail. Third
The figure is a reference diagram showing relative position changes on the screen due to movement of the object, and FIG. 4 is a time chart mainly for explaining the peak hold operation.

シヤツタは垂直ブランキング期間VBLK毎に露
光動作を行ない、この期間以外は遮光動作を行な
うので、期間VBLKの開始時刻としてti-2,ti-1,ti
を考えると、各時刻における対象物とウインドウ
との関係は例えば第3図イ,ロおよびハの如く示
される。こゝに、1は対象物、Wはウインドウ、
Pはテレビカメラの視野(画面)、Vi-2,Vi-1
よびViは各時点の対象物画像をそれぞれ示してい
る。
Since the shutter performs an exposure operation every vertical blanking period V BLK and performs a light shielding operation outside this period, the start time of the period V BLK is t i-2 , t i-1 , t i
Considering this, the relationship between the object and the window at each time is shown, for example, as shown in FIG. 3, A, B, and C. Here, 1 is the object, W is the window,
P represents the field of view (screen) of the television camera, and V i-2 , V i-1 and V i represent the object images at each time point, respectively.

いま、上記の如き各時刻が第4図イの如く示さ
れるものとすると、位置センサ出力はこの場合は
同図ロの如く、時刻tiの直前で得られることにな
る。制御回路26は、位置センサ出力が得られた
直後のVBLK信号により、同図ホの如き2値化出
力有効画面信号を生成する。一方、テレビカメラ
3からの画像信号は増幅器7およびLPF11を
介してPH回路12に与えられるが、このときウ
インドウ発生回路21がそのウインドウ信号を有
効画面信号の発生期間以外では全て出力するよう
にしておくことにより、ピークホールド動作は同
図ハのハイ(H)レベルの期間毎に行なわれる。
このため、PH回路12は、テレビカメラ3から
の低周波信号ピーク値をリセツト信号が与えられ
る迄ホールドする。PH回路用リセツト信号は同
図ニの如く有効画面信号が形成されたVBLK信号
以外のVBLK信号毎に出力されて、PH回路12の
リセツトを行なう。したがつて、第3図または第
4図の如き場合には、時刻ti-2では対象物がウイ
ンドウの位置に達していないためPH回路12の
出力は実質的に零となるのに対し、時刻ti-1では
ウインドウ位置に対象物が到達しているので、
PH回路12は対象物の濃淡情報についてLPF回
路11の出力のうちウインドウ領域内に相当する
出力のピーク値を同図ヘの如くVHとしてホール
ドすることになる。なお、この値VHはti+1時点で
出力されるリセツト信号によつてリセツトされ
る。またti+1時刻にも対象物画像があるときは、
そのピーク値が同図ヘのVH′の如くホールドされ
る。
Now, assuming that the above-mentioned times are shown as shown in FIG. 4A, the position sensor output will be obtained immediately before time t i , as shown in FIG. 4B. The control circuit 26 generates a binarized output effective screen signal as shown in FIG . On the other hand, the image signal from the television camera 3 is given to the PH circuit 12 via the amplifier 7 and the LPF 11, but at this time, the window generation circuit 21 outputs all the window signals except during the generation period of the effective screen signal. As a result, the peak hold operation is performed every high (H) level period shown in FIG.
Therefore, the PH circuit 12 holds the peak value of the low frequency signal from the television camera 3 until a reset signal is applied. The PH circuit reset signal is output for each V BLK signal other than the V BLK signal for which an effective screen signal is formed, as shown in FIG. 2, to reset the PH circuit 12. Therefore, in the case shown in FIG. 3 or 4, the output of the PH circuit 12 becomes substantially zero because the object has not reached the window position at time t i-2 ; At time t i-1 , the object has reached the window position, so
The PH circuit 12 holds the peak value of the output corresponding to the window area among the outputs of the LPF circuit 11 regarding the density information of the object as VH as shown in the figure. Note that this value V H is reset by a reset signal output at time t i +1 . Also, if there is an object image at time t i+1 ,
The peak value is held as V H ' in the same figure.

つまり、位置センサ出力が得られる直前(こゝ
ではti-1)の画像情報から、所定領域のピーク値
を知ることができるので、これをもとにして適正
な2値化レベルを決めてやれば、センサ出力が得
られた直後(こゝではti)の画像情報を、決定さ
れた2値化レベルで2値化することが可能とな
り、こうして取り出される2値化画像にもとづい
て検査、判別をすることにより、2値化のための
処理時間を短縮し、検査または判別の精度を向上
させるものである。
In other words, the peak value of a predetermined area can be known from the image information just before the position sensor output is obtained (t i-1 in this case), so the appropriate binarization level can be determined based on this. If this is done, it will be possible to binarize the image information immediately after the sensor output is obtained (t i in this case) at the determined binarization level, and then perform inspection based on the binarized image thus extracted. , the processing time for binarization is shortened and the accuracy of inspection or discrimination is improved.

次に、こうして得られたピーク値から2値化レ
ベルを決定する手法について説明する。
Next, a method of determining the binarization level from the peak value obtained in this way will be explained.

まず、標準となる対象物を標準位置で撮像し、
適正な2値画像となるように2値化しきい値を調
整して、適切な2値化しきい値LSとこれに対応す
るPH回路12のピークホールド値VHSとを求め、
これらを演算回路14内に基準値として記憶して
おく。次いで、検査すべき対象物についてこれと
同様の操作を行ない、判定直前画像Vi-1のウイン
ドウ領域内の濃淡情報であるピークホールド値
VHXを求める。こうすれば、ピークホールド値の
相対的な関係から、検査対象物の2値化しきい値
候補LXを、 LX=VHX/VHS×LS として差しつかえないので、演算回路14にて上
式の演算を行なうことにより、適正な2値化しき
い値を求めることができる。このとき、ピークホ
ールド値VHXそのものについても、これが例え
0.5VHS〜1.5VHSの範囲内にあるか否かを調べて、
その適正さを判断するようにしている。この判断
を行なうのがPHレベル判別回路18であり、
VHXが上記の範囲内(Y)ならば、比較レベル選
択回路15によつて演算回路14の出力LXが選
択され、これがD/A変換回路16を介して2値
化回路8にそのしきい値として与えられる。一
方、VHXが上記の範囲外(N)ならば、選択回路
15は標準値出力回路19からの出力を選択する
ように動作する。なお、標準値出力回路19は、
通常はLSを標準値として出力する。つまり、この
ようにするのは、VHXが異常なときは演算にて求
めた2値化しきい値を採用するのは危険であり、
標準値VHSを採用する方が安全であると考えられ
るからである。
First, image the standard object at the standard position,
Adjust the binarization threshold so that an appropriate binary image is obtained, find the appropriate binarization threshold L S and the corresponding peak hold value V HS of the PH circuit 12,
These are stored in the arithmetic circuit 14 as reference values. Next, the same operation is performed on the object to be inspected, and the peak hold value, which is the grayscale information in the window area of the image immediately before judgment V i-1, is obtained.
Find V HX . In this way, from the relative relationship of the peak hold values, the binarization threshold candidate L X of the object to be inspected can be set as L X = V H An appropriate binarization threshold value can be determined by performing the calculation in the above equation. At this time, this also applies to the peak hold value V HX itself.
Check whether it is within the range of 0.5V HS ~ 1.5V HS ,
We are trying to judge its appropriateness. The PH level discrimination circuit 18 makes this judgment.
If V HX is within the above range (Y), the comparison level selection circuit 15 selects the output L given as a threshold. On the other hand, if V HX is outside the above range (N), the selection circuit 15 operates to select the output from the standard value output circuit 19. Note that the standard value output circuit 19 is
Normally, L S is output as the standard value. In other words, the reason for doing this is that when V HX is abnormal, it is dangerous to use the binarization threshold calculated by calculation.
This is because it is considered safer to adopt the standard value VHS .

こうして決定された2値化レベル信号は、D/
A変換回路16を介して2値化回路8の一方の入
力となる。2値化回路8の他方には、i時点の画
像信号が入力され、この画像信号がD/A変換回
路16からの2値化レベルによつて2値化される
ことになる。このとき、制御回路26は前述の如
き有効画面信号を生成し、これを2値出力制御回
路17へ与えるので、回路17では2値化回路出
力のうち検査、判別に有効な2値画像情報のみを
出力するように制御を行なう。演算制御部9はこ
うして得られる2値画像情報によつて所定の画像
処理を実行し、対象物の検査、判別を行なう。
The binary level signal determined in this way is
It becomes one input of the binarization circuit 8 via the A conversion circuit 16. The image signal at time i is input to the other side of the binarization circuit 8, and this image signal is binarized using the binarization level from the D/A conversion circuit 16. At this time, the control circuit 26 generates the above-mentioned effective screen signal and supplies it to the binary output control circuit 17, so that the circuit 17 only uses the binary image information effective for inspection and discrimination out of the output from the binary conversion circuit. Control is performed to output . The arithmetic control unit 9 executes predetermined image processing using the binary image information obtained in this way, and inspects and discriminates the object.

以上では主としてシヤツタ付テレビカメラを用
いた場合の動作について説明したが、これはスト
ロボ方式の場合も同様であり、その場合のタイム
チヤートが第5図に示されている。第4図と異な
るのは、ストロボ点孤のタイミングを第5図トの
如く行なう点、および各部の動作が位置センサ出
力を基準にして1画面分後にずれている点である
が、いずれも基本的な差異ではないので詳しい説
明は省略する。たゞ、1画面分の時間ずれは一定
値となるので、これを考慮して位置センサの設定
位置をその分だけずらせることが必要である。
The above has mainly explained the operation when a television camera with a shutter is used, but the same applies to the strobe type, and the time chart in that case is shown in FIG. The difference from Fig. 4 is that the strobe firing timing is as shown in Fig. 5 (g), and the operation of each part is shifted one screen later based on the position sensor output, but both are basic. Since this is not a fundamental difference, a detailed explanation will be omitted. However, since the time shift of one screen is a constant value, it is necessary to take this into consideration and shift the set position of the position sensor by that amount.

また、以上では2値化回路を1チヤネルとし、
これに1つのウインドウを設定するようにした
が、対象物の濃淡に対処すべく2値化回路を複数
チヤネルとし、これに対応して複数のウインドウ
を設け、各々の対応をとつて2値化しきい値を個
別に制御することも可能である。勿論1つの2値
化回路に対して複数のウインドウを設定すること
もできる。なお、第6図はウインドウを2個設定
する例を示すもので、W1,W2がウインドウであ
る。さらに、ウインドウ内の画像信号について、
そのピーク値を用いるようにしたが、濃淡情報の
平均値を用いるようにしてもよいものである。ま
た、ウインドウの形状は長方形に限らず任意の形
状とすることができる。
In addition, in the above, the binarization circuit is assumed to be one channel,
One window was set for this, but in order to deal with the shading of the object, the binarization circuit was made to have multiple channels, correspondingly multiple windows were set up, and each was binarized. It is also possible to control the threshold values individually. Of course, a plurality of windows can be set for one binarization circuit. Note that FIG. 6 shows an example in which two windows are set, and W 1 and W 2 are the windows. Furthermore, regarding the image signal within the window,
Although the peak value is used, the average value of the gradation information may also be used. Further, the shape of the window is not limited to a rectangle, but can be any shape.

〔発明の効果〕〔Effect of the invention〕

この発明によれば、時間的に相前後する2つの
画像信号を取り出し、時間的に前の画像信号から
2値化レベルを決定して時間的に後の画像信号の
2値化を行なうようにしたので、対象物の反射率
が個々に変化するような場合にも、これに追従し
て2値化しきい値が選択されるので、常に安定で
高精度の判定が可能であり、これは照明装置の照
度変化についても同様である。また、移動する対
象物について、これを静止画像化するようにして
いるので、画像ボケのない鮮明な画像が得られる
結果、検査または判別の精度が向上するものであ
る。さらに、この発明では高速のA/D変換回
路、記憶回路および膨大な処理回路等を必要とし
ないので、簡単かつ安価にこの種装置を提供する
ことが可能である。また、この発明は判定すべき
画像情報の直前の情報を利用するものであつて、
従来はこれを無駄なものとして見過していたもの
を用いるものであるため、処理時間は実質的に増
加せず、したがつて従来と同等の高速性が保証さ
れるものである。また、2値化しきい値を決定す
るに当たり、画像の濃淡値に一定の制限を設ける
ようにしたので、予想外の対象物等による誤動作
を回避することができる。
According to this invention, two temporally adjacent image signals are extracted, a binarization level is determined from the temporally previous image signal, and the temporally subsequent image signal is binarized. Therefore, even if the reflectance of the object changes individually, the binarization threshold is selected according to this change, so stable and highly accurate judgment is always possible. The same applies to changes in the illuminance of the device. Furthermore, since a moving object is converted into a still image, a clear image without image blurring can be obtained, which improves the accuracy of inspection or discrimination. Furthermore, since the present invention does not require a high-speed A/D conversion circuit, a memory circuit, a huge amount of processing circuits, etc., it is possible to provide this type of device easily and inexpensively. Further, the present invention utilizes information immediately preceding image information to be determined, and
Since this method uses something that has conventionally been overlooked as a waste, the processing time does not substantially increase, and therefore high-speed performance equivalent to that of the conventional method is guaranteed. Further, in determining the binarization threshold, a certain limit is set on the grayscale value of the image, so it is possible to avoid malfunctions due to unexpected objects or the like.

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

第1図はこの発明の実施例を示す構成図、第2
図はシヤツタ付テレビカメラの具体例を示す構成
図、第2A図はストロボ方式を示す概要図、第3
図は対象物の移動による画面上の相対的位置変化
を示す参照図、第4図は第1図の主としてピーク
ホールド動作を説明するためのタイムチヤート、
第5図はストロボ方式による動作を説明するため
のタイムチヤート、第6図は2個のウインドウを
設定した例を示す参照図、第7図は検査・判別装
置の従来例を示す構成図、第8図は第7図の動作
を説明するためのタイムチヤートである。 符号説明、1……対象物、2……コンベア、3
……テレビカメラ、4……照明装置、5……位置
センサ、6……画像処理装置、7……増幅器、8
……2値化回路、9……演算判定部、10……タ
イミング制御回路、11……ローパスフイルタ
(LPF)、12……ピークホールド回路(PH回
路)、13……A/D変換回路、14……演算回
路、15……比較レベル選択回路、16……D/
A変換回路、17……2値出力制御回路、18…
…PHレベル判別回路、19……標準値出力回
路、21……ウインドウ発生回路、22……走査
点座標発生回路、23……ウインドウ設定値記憶
回路、24……PHリセツト回路、25……リセ
ツトタイミング回路、26……有効画面制御回
路、27……カメラ駆動同期回路、31……撮像
素子、32……映像処理および駆動回路、33…
…レンズ、34……回転円板、35……モータ、
36……回転制御回路、37……ケース、41…
…ストロボ、42……ストロボ点孤回路、43…
…ストロボ点孤制御回路、91……メモリ、92
……特徴抽出回路、93……演算処理装置、94
……位置検出・補正回路、95……設定回路、P
……テレビカメラ視野、W,W1,W2……ウイン
ドウ。
Fig. 1 is a configuration diagram showing an embodiment of this invention;
Figure 2A is a configuration diagram showing a specific example of a television camera with shutter, Figure 2A is a schematic diagram showing a strobe system, Figure 3
The figure is a reference diagram showing the relative position change on the screen due to the movement of the object, Figure 4 is a time chart mainly for explaining the peak hold operation of Figure 1,
FIG. 5 is a time chart for explaining the operation using the strobe method, FIG. 6 is a reference diagram showing an example of setting two windows, FIG. 7 is a configuration diagram showing a conventional example of an inspection/discrimination device, and FIG. FIG. 8 is a time chart for explaining the operation of FIG. 7. Code explanation, 1...Object, 2...Conveyor, 3
...TV camera, 4...Lighting device, 5...Position sensor, 6...Image processing device, 7...Amplifier, 8
... Binarization circuit, 9 ... Calculation determination unit, 10 ... Timing control circuit, 11 ... Low pass filter (LPF), 12 ... Peak hold circuit (PH circuit), 13 ... A/D conversion circuit, 14...Arithmetic circuit, 15...Comparison level selection circuit, 16...D/
A conversion circuit, 17... Binary output control circuit, 18...
...PH level discrimination circuit, 19...Standard value output circuit, 21...Window generation circuit, 22...Scanning point coordinate generation circuit, 23...Window setting value storage circuit, 24...PH reset circuit, 25...Reset Timing circuit, 26... Effective screen control circuit, 27... Camera drive synchronization circuit, 31... Imaging device, 32... Video processing and drive circuit, 33...
... Lens, 34 ... Rotating disk, 35 ... Motor,
36... Rotation control circuit, 37... Case, 41...
...Strobe, 42...Strobe firing circuit, 43...
...Strobe firing control circuit, 91...Memory, 92
... Feature extraction circuit, 93 ... Arithmetic processing unit, 94
...Position detection/correction circuit, 95...Setting circuit, P
... TV camera field of view, W, W 1 , W 2 ... window.

Claims (1)

【特許請求の範囲】 1 移動する対象物を撮像する2次元画像装置を
含み該対象物の静止画像を取り出す画像取出手段
と、該画像の所定位置に少なくとも1つの所定形
状ウインドウを発生させるウインドウ発生手段
と、少なくとも該ウインドウ領域内画像の濃淡レ
ベルを検出する検出部を含み該濃淡レベルに応じ
て2値化レベルを決定する2値化レベル決定手段
とを備え、1つの対象物について、前記画像取出
手段により所定時刻を基準として相前後する少な
くとも2つの静止画像を取り出し、時間的に前の
画像について前記ウインドウ発生手段によりその
所定位置にウインドウを発生させ、前記2値化レ
ベル決定手段によりウインドウ領域の濃淡レベル
から2値化レベルを決定し、該決定された2値化
レベルをもつて時間的に後の画像を2値化するこ
とを特徴とする画像2値化方式。 2 特許請求の範囲第1項に記載の画像2値化方
式において、前記2値化レベルを決定するための
画像信号は前記画像取出手段からの出力にローパ
スフイルタをかけて取り出すことを特徴とする画
像2値化方式。 3 特許請求の範囲第1項または第2項に記載の
画像2値化方式において、前記検出部にて検出さ
れる画像の濃淡レベルが所定の範囲を越えたとき
は別途設けられた標準値を2値化レベルとして採
用することを特徴とする画像2値化方式。
[Scope of Claims] 1. Image extracting means that includes a two-dimensional imaging device that images a moving object and extracts a still image of the object, and a window generator that generates at least one window with a predetermined shape at a predetermined position of the image. and binarization level determining means that includes at least a detection unit that detects the gray level of the image within the window area and determines a binarization level according to the gray level, The extraction means extracts at least two consecutive still images with a predetermined time as a reference, the window generation means generates a window at a predetermined position of the temporally previous image, and the binarization level determination means generates a window area. An image binarization method characterized in that a binarization level is determined from the gray level of the image, and a temporally subsequent image is binarized using the determined binarization level. 2. In the image binarization method according to claim 1, the image signal for determining the binarization level is extracted by applying a low-pass filter to the output from the image extraction means. Image binarization method. 3. In the image binarization method according to claim 1 or 2, when the gray level of the image detected by the detection unit exceeds a predetermined range, a separately provided standard value is set. An image binarization method characterized by employing a binarization level.
JP60150024A 1985-07-10 1985-07-10 Picture binary coding system Granted JPS6211984A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP60150024A JPS6211984A (en) 1985-07-10 1985-07-10 Picture binary coding system
DE19863623294 DE3623294A1 (en) 1985-07-10 1986-07-10 SYSTEM FOR BINARY CODING AN IMAGE
US07/186,698 US4885784A (en) 1985-07-10 1988-04-22 System for binary encoding a picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60150024A JPS6211984A (en) 1985-07-10 1985-07-10 Picture binary coding system

Publications (2)

Publication Number Publication Date
JPS6211984A JPS6211984A (en) 1987-01-20
JPH0477951B2 true JPH0477951B2 (en) 1992-12-09

Family

ID=15487824

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60150024A Granted JPS6211984A (en) 1985-07-10 1985-07-10 Picture binary coding system

Country Status (1)

Country Link
JP (1) JPS6211984A (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2696878B2 (en) * 1988-02-12 1998-01-14 オムロン株式会社 Substrate inspection method and apparatus
JPH04161915A (en) * 1990-10-25 1992-06-05 Nippon Koden Corp Video microscope for observing organism
US5377282A (en) * 1991-09-19 1994-12-27 International Business Machines Corporation Optical inspection system utilizing dynamic analog-to-digital thresholding

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5981772A (en) * 1983-08-29 1984-05-11 Hitachi Ltd Position detector

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5981772A (en) * 1983-08-29 1984-05-11 Hitachi Ltd Position detector

Also Published As

Publication number Publication date
JPS6211984A (en) 1987-01-20

Similar Documents

Publication Publication Date Title
US5305391A (en) Method of and apparatus for inspecting bottle or the like
KR20000071087A (en) Outdoor range finder
US4486777A (en) Defect detecting apparatus and method
US4885784A (en) System for binary encoding a picture
JPH0477951B2 (en)
JPS6290800A (en) Automatic vehicle number reading system
JP2000101924A (en) Defect detection correction device in image input device
JPH057363A (en) Picture monitoring device
JP2001307017A (en) Character plate recognizing device
JPH056713B2 (en)
JPH0224543A (en) Visual inspection method of bottle
JPS5816837B2 (en) pattern detection device
JP2962290B2 (en) Automatic monitoring device in tunnel
JPH0236896B2 (en) JIKUTAISHOBUTSUTAINOKETSUKANKENSASOCHI
JPH10253332A (en) Method and apparatus for inspecting defect in cyclic pattern
JPH11132957A (en) Method and apparatus for detection of surface defect
KR100290946B1 (en) Method and apparatus for detecting motion using variations in lighting and motion
JP2634064B2 (en) Binarization device
JPH09245269A (en) Object detection system
JPS63186379A (en) Fetching system for binary picture
JPH0618438A (en) Inspection unit
JP2836535B2 (en) Panel display state recognition device
JPH09210922A (en) Surface condition inspection device
JPH0618439A (en) Inspection unit
JPH0844852A (en) Image processor