JPH056713B2 - - Google Patents
Info
- Publication number
- JPH056713B2 JPH056713B2 JP60150025A JP15002585A JPH056713B2 JP H056713 B2 JPH056713 B2 JP H056713B2 JP 60150025 A JP60150025 A JP 60150025A JP 15002585 A JP15002585 A JP 15002585A JP H056713 B2 JPH056713 B2 JP H056713B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- binarization
- circuit
- 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
Links
Landscapes
- Image Input (AREA)
- Closed-Circuit Television Systems (AREA)
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. The present invention relates to a binarization method for a pattern inspection/discrimination device.
第5図はこの種のパターン検査・判別装置の従
来例を示す構成図、第6図はその動作を説明する
ためのタイミングチヤートである。なお、第5図
において、1は対象物、2はコンベア、3はテレ
ビカメラの如き撮像装置、4は照明装置、5は例
えば発光素子および受光素子からなる位置セン
サ、6は増幅器7、2値化回路8、演算判定部9
およびタイミング制御回路10等からなる画像処
理装置である。演算判定部9はさらに画像メモリ
91、特徴抽出回路92、演算処理回路93、位
置検出・補正回路94および設定器95等より構
成される。
FIG. 5 is a block diagram showing a conventional example of this type of pattern inspection/discrimination apparatus, and FIG. 6 is a timing chart for explaining its operation. In FIG. 5, 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, for example, a light emitting element and a light receiving element, 6 is an amplifier 7, and 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, a calculation processing circuit 93, a position detection/correction circuit 94, a setting device 95, and the like.
以下、従来装置の動作について第5,6図を参
照して説明する。 The operation of the conventional device will be described below with reference to FIGS. 5 and 6.
対象物1はベルトコンベア2により搬送され、
これがテレビカメラ3の視野内所定位置に到達す
ると、このことが位置センサ5によつて検知され
る。位置センサ出力は検査開始用信号として用い
られ、例えば第6図ロの如く示される。いま、テ
レビカメラ3がシヤツタ内蔵形のものであり、こ
のシヤツタがテレビカメラ3の垂直帰線消去期間
(垂直ブランキング期間)VBLKと同期をとつて駆
動されるものとすると、この場合シヤツタは第6
図ハの如く1回だけ“開”状態となる。なお、垂
直ブランキング期間は第6図イの如く示される。
こうしてシヤツタが開くと、テレビカメラ3によ
り対象物1の光学像が画像信号(ビデオ信号)に
変換されて抽出される。つまり、シヤツタ開直後
の1フイールド(1V;画面のこと)のカメラ出
力が有効となり、これが画像信号として画像処理
装置6に取り込まれる。この画像取り込みのタイ
ミングおよび期間が第6図にニとして示されてい
る。こうして取り込まれた画像信号は増幅器7に
て増幅され、2値化回路8にて2値化される。2
値化された画像信号は画像メモリ91に格納さ
れ、特徴抽出回路92はこのメモリ91から対象
物の各種特徴量を抽出する。演算処理回路93は
各特徴量を設定器95にて予め設定された設定値
と比較、判別することにより、対象物の良否判別
や仕分け(選別)を行ない、その結果を表示装置
等に出力する。この判定・演算のタイミングおよ
び期間は第6図にホとして示されている。なお、
第5図の位置検出・補正回路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. 6B, 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 6th
As shown in Figure C, it is in the "open" state only once. Note that the vertical blanking period is shown as in FIG. 6A.
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; screen) 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 feature quantities of the object from this memory 91. The arithmetic processing circuit 93 compares and discriminates each feature value 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. 5 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.
ところで、このような装置における2値化回路
のしきい値は、予め設定された固定レベルで行な
われるのが普通であるが、これは回路構成および
処理が容易となり、処理時間も短くて済むからで
ある。しかしながら、照明装置(第5図の符号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 numeral 4 in Fig. 5)
If the brightness of the object (see ) changes over time, or if the reflectance of the object itself changes depending on the individual, 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 amount of a predetermined number of bits, the gray level information is stored in a memory in units of pixels, and this is read out again to perform the necessary 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
移動する対象物を撮像する2次元撮像手段を含
み該対象物の静止画像を取り出す画像取出手段
と、対象物の撮像視野内基準位置に対する位置ま
たは回転ずれ量を検出し該ずれ量にもとづいて位
置の正規化を行なう位置補正手段と、正規化され
た対象物画像の所定位置に少なくとも1つの所定
形状ウインドウを発生させるウインドウ発生手段
と、少なくともこのウインドウ領域内画像の濃淡
レベルを検出する検出部を含みこれに応じて2値
化レベルを決定する2値化レベル決定手段とを設
ける。
an image extracting means that includes a two-dimensional imaging means for capturing an image of a moving object and extracting a still image of the object; and an image extraction means that detects the position or rotational deviation amount of the object with respect to a reference position within the imaging field of view and positions based on the deviation amount a position correction means for normalizing the object image; a window generation means for generating at least one predetermined shape window at a predetermined position of the normalized object image; and a detection section for detecting at least the gray level of the image within the window area. and a binarization level determining means for determining the binarization level accordingly.
上記画像取出手段により所定時刻を基準にして
相前後する少なくとも2つの静止画像を取り出
し、時間的に前の画像について上記位置補正手段
により対象物画像の位置補正をして上記ウインド
ウ発生手段によりその所定位置にウインドウを発
生させ、上記2値化レベル決定手段によりウイン
ドウ領域内画像の濃淡レベルから最適2値化レベ
ルを決定し、この決定された2値化レベルをもつ
て時間的に後の画像を2値化することになり、簡
単かつ安価な構成で、しかも無駄時間なく最適2
値化レベルを決定し得るようにする。
The image extracting means extracts at least two consecutive still images based on a predetermined time, the position correcting means corrects the position of the object image for the temporally previous image, and the window generating means corrects the position of the object image. A window is generated at the position, the binarization level determining means determines the optimum binarization level from the gray level of the image within the window area, and the temporally later image is created using the determined binarization level. It is a simple and inexpensive configuration, and the optimal 2
Make it possible to determine the valorization level.
第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は座標補正回路、28
は固定2値化回路、29は位置ずれ検出回路であ
り、その他は第5図と同様である。
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 coordinate correction circuit, and 28 is an effective screen control circuit.
29 is a fixed binarization circuit, 29 is a positional deviation detection circuit, and the other parts are the same as in FIG.
したがつて、対象物1は第5図の場合と同様
に、ベルトコンベア2によつてテレビカメラ3の
視野内に来るように搬送される。こゝで用いられ
るテレビカメラ3として例えばシヤツタ付きのも
のを想定し、このシヤツタをテレビカメラ3の垂
直ブランキング期間(VBLK)毎に露光動作を行
ない、この期間以外は遮光動作を行なうように
し、テレビカメラ3は通常と同様なラスタ走査を
行なうものとすると、例えば直流点弧によるタン
グステンランプよりなる照明装置4から適切な照
度が与えられているので、カメラ視野内に対象物
が存在すれば、シヤツタ付テレビカメラ3からは
垂直走査毎(すなわち、毎Vごと)に対象物画像
が取り出されることになる。勿論、対象物が搬送
されて来なければコンベア上の画像情報は実質的
に無意情報とされる。なお、シヤツタ付テレビカ
メラのかわりにストロボを用い、その点弧を上記
VBLK信号と同期させて行なうことにより、上記
と全く同様にして静止化画像を得ることができる
のは云う迄もない。 Therefore, as in the case of FIG. 5, the object 1 is conveyed by the belt conveyor 2 so as to come within the field of view of the television camera 3. Assuming that the television camera 3 used here is equipped with a shutter, for example, the shutter is configured to perform an exposure operation every vertical blanking period (V BLK ) of the television camera 3, and to perform a light shielding operation except for this period. Assuming that the television camera 3 performs raster scanning in the same way as normal, it is provided with appropriate illuminance from the illumination device 4, which consists of, for example, a tungsten lamp lit by direct current, so that if an object is present within the camera field of view, , an object image is taken out from the shutter-equipped television camera 3 every vertical scan (that is, every V). Of course, unless the object is conveyed, the image information on the conveyor is essentially meaningless information. In addition, a strobe is used instead of a television camera with a shutter, and its ignition is as described above.
It goes without saying that by synchronizing with the V BLK signal, a still image can be obtained in exactly the same manner as above.
このようにして得られるテレビカメラ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. By the way, it is necessary for this window to prevent the relative position of the object image from changing even if the position of the object image shifts within the camera field of view.
第2図は対象物の位置ずれ補正方法を説明する
ための参照図である。 FIG. 2 is a reference diagram for explaining a method for correcting positional deviation of an object.
第1図の走査点座標発生回路22は、テレビカ
メラ3の現走査点のx座標およびY座標を発生す
るもので、水平走査線の数を計数することによつ
て現走査時点のy座標を知る一方、高周波(例え
ば、6MHz)の基準クロツクを計数することによ
つて現水平走査線上におけるx座標を知り、これ
により走査時点のy,x座標信号を各走査毎に出
力する。一方、位置ずれ検出回路29は、テレビ
カメラ3を介して取り出される画像から、対象物
(画像)1の先端y座標yiおよび左端x座標xiを
テレビのラスタ走査と同期してリアルタイムで抽
出するとゝもに、これを標準対象物画像について
上記と同様の手段により予め求めておいた標準の
y,x座標yS,xSと比較し、その位置ずれ量Δy,
Δxを次式の如く求める。 The scanning point coordinate generation circuit 22 in FIG. 1 generates the x and y coordinates of the current scanning point of the television camera 3, and calculates the y coordinate at the current scanning point by counting the number of horizontal scanning lines. On the other hand, the x coordinate on the current horizontal scanning line is known by counting a high frequency (for example, 6 MHz) reference clock, and from this, the y and x coordinate signals at the scanning time are output for each scanning. On the other hand, the positional deviation detection circuit 29 extracts the tip y coordinate y i and the left edge x coordinate x i of the object (image) 1 from the image taken out via the television camera 3 in real time in synchronization with the raster scanning of the television. Then, this is compared with the standard y, x coordinates y S , x S obtained in advance by the same means as above for the standard object image, and the positional deviation amount Δy,
Find Δx using the following formula.
Δy=yS−yi
Δx=xS−xi
このために、まず標準対象物を用いてウインド
ウと対象物画像との相対的位置関係、および対象
物1のカメラ視野画面F上の位置を予め調べてお
く。つまり、第2図イに示されるようなウインド
ウの基準点座標PWS(xd,yd)と、対象物1の基準
点座標PS(xS,yS)とを予め求めて記憶しておく。
次いで、検査対象物について第2図ロの如き対象
物の基準点座標Pi(xi,yi)を求め、このPS(xs,
ys)とPi(xi,yi)との差分から、x軸方向のずれ
量Δxおよびy軸方向のずれ量Δyを求めるもので
ある。そして、このずれ量を基準点座標PWSにつ
いて補正することにより、画面F上における対象
物位置がどのように変化しても、常に対象物の所
定位置にウインドウを発生させるようにする。な
お、対象物1の画面F上の位置(xs,xi,ys,yi)
は、例えばテレビカメラ3からの撮像信号を固定
2値化回路28により固定の2値化しきい値レベ
ルで2値化し、この2値化画像のx,y軸への各
投影積分値によつて求めることができる。 Δy=y S −y i Δx=x S −x iFor this purpose, first use a standard object to determine the relative positional relationship between the window and the object image, and the position of object 1 on the camera field of view screen F. Check it out in advance. In other words, the reference point coordinates P WS (x d , y d ) of the window and the reference point coordinates P S (x s , y s ) of the object 1 as shown in Fig. 2 A are determined and memorized in advance. I'll keep it.
Next, the reference point coordinates P i (x i , y i ) of the object to be inspected as shown in FIG .
The deviation amount Δx in the x-axis direction and the deviation amount Δy in the y-axis direction are determined from the difference between P i (x i , y s ) and P i (x i , y i ). Then, by correcting this shift amount with respect to the reference point coordinate PWS , a window is always generated at a predetermined position of the object no matter how the object position on the screen F changes. Furthermore, the position of the object 1 on the screen F (x s , x i , y s , y i )
For example, the imaging signal from the television camera 3 is binarized at a fixed binarization threshold level by the fixed binarization circuit 28, and the projection integral value of this binarized image on the x and y axes is You can ask for it.
以上のことは、第1図では次のように行なわれ
る。 The above is performed as follows in FIG.
まず、標準対象物を用いて設定したウインドウ
の発生座標を設定回路23に予め記憶させてお
く。走査点座標発生回路22は現走査時点のx,
y座標信号を出力し、位置ずれ検出回路29は上
述の如き位置ずれ量Δx,Δyを出力するので、座
標補正回路27は走査点座標発生回路22および
位置ずれ検出回路29からの各出力を加算または
減算することにより、ずれ補正がなされた正規化
座標データを出力する。ウインドウ発生回路21
は、座標補正回路27からの出力データと設定値
記憶回路23からのデータとの一致をとつてウイ
ンドウ情報を発生する。そして、このウインドウ
が開いたときだけピークホールド回路(PH回
路)12が有効に動作し、その間のローパスフイ
ルタ(LPF)回路11の出力をホールドする。
すなわち、対象物が撮像視野内でどのように動い
ても、常に対象物の予め決められた位置の濃淡情
報を得ることができる。 First, the generation coordinates of a window set using a standard object are stored in the setting circuit 23 in advance. The scanning point coordinate generation circuit 22 generates x at the current scanning time,
Since the positional deviation detection circuit 29 outputs the y-coordinate signal and outputs the positional deviation amounts Δx and Δy as described above, the coordinate correction circuit 27 adds each output from the scanning point coordinate generation circuit 22 and the positional deviation detection circuit 29. Or, by subtraction, normalized coordinate data that has been corrected for deviation is output. Window generation circuit 21
generates window information by matching the output data from the coordinate correction circuit 27 and the data from the set value storage circuit 23. Then, only when this window opens, the peak hold circuit (PH circuit) 12 effectively operates and holds the output of the low pass filter (LPF) circuit 11 during that time.
That is, no matter how the object moves within the imaging field of view, it is possible to always obtain grayscale information at a predetermined position of the object.
こゝで、ウインドウ発生およびピークホールド
機能について具体的に説明する。第3図は対象物
の移動による画面上の相対的位置関係を示す参照
図、第4図は第1図における主としてピークホー
ルド動作を説明するためのタイムチヤートであ
る。 Here, window generation and peak hold functions will be specifically explained. FIG. 3 is a reference diagram showing the relative positional relationship on the screen due to the movement of objects, and FIG. 4 is a time chart mainly for explaining the peak hold operation in FIG.
シヤツタは垂直ブランキング期間VBLK毎に露
光動作を行ない、この期間以外は遮光動作を行な
うので、期間VBLKの開始時刻としてti-2,ti-1,ti
を考えると、各時刻における対象物の画面上の位
置関係は例えば第3図イ,ロおよびハの如く示さ
れる。こゝで、1は対象物、Wはウインドウ、F
はテレビカメラの視野(画面)、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 positional relationship of objects on the screen 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, and F
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の出力は
同図ヘのPH′の如くなるのに対し、時刻ti-1では
ウインドウ位置に対象物が到達しているので、
PH回路12は対象物の濃淡情報ではLPF回路1
1の出力のうちウインドウ領域内に相当する出力
のピーク値を同図ヘの如くVHとしてホールドす
ることになる。なお、この値VHはti+1時点で出力
されるリセツト信号によつてリセツトされる。ま
た、ti+1時刻にも対象物画像があるときは、その
ピーク値が同図ヘのPH″の如くホールドされる。 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. As shown in figure 2, the PH circuit reset signal is output for each V BLK signal other than the V BLK signal on which the valid screen signal is formed, and is output to the PH circuit 12.
Perform a reset. Therefore, in the case of FIG. 3 or FIG. 4, the window setting is not sufficient at time t i-2 , so the output of the PH circuit 12 becomes PH' in the same figure. At time t i-1 , the object has reached the window position, so
The PH circuit 12 is used as the LPF circuit 1 for grayscale information of the object.
The peak value of the output corresponding to the window area among the outputs of 1 is held as V H as shown in the same figure. Note that this value V H is reset by a reset signal output at time t i +1 . Furthermore, if there is an object image at time t i+1 , its peak value is held as shown in PH'' in the 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 to obtain an appropriate binary image, and set the appropriate binarization threshold L S to correspond to this.
Find the peak hold value VHS of the PH circuit 12,
These are stored in the arithmetic circuit 14 as a reference. Note that the detection of the relative position between the object and the window as described above is also performed at this point. Next, a similar operation is performed on the object to be inspected to obtain a peak hold value V HX , which is grayscale information within the window area of the image immediately before determination V i-1 . 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へ与えるので、回路27では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 effective screen signal as described above and supplies it to the binary output control circuit 17, so that the circuit 27 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.
以上では、位置補正としてx,y2軸の平行ず
れ補正について説明したが、回転(姿勢)ずれの
場合も、回転量検出回路と回転による座標変換回
路とを設けることにより、上記と同様に行なうこ
とができる。また、以上では2値化回路を1チヤ
ネルとし、これに1つのウインドウを設定するよ
うにしたが、対象物の濃淡に対処すべく2値化回
路を複数チヤネルとし、これに対応して複数のウ
インドウを設け、各々の対応をとつて2値化しき
い値を個別に制御することも可能である。勿論1
つの2値化回路に対して複数のウインドウを設定
することもできる。さらに、ウインドウ内の画像
信号について、そのピーク値を用いるようにした
が、濃淡情報の平均値を用いるようにしてもよ
い。また、ウインドウの形状は長方形に限らず任
意の形状とすることができる。 In the above, we have explained the correction of parallel deviation of the two axes of x and y as position correction, but in the case of rotation (posture) deviation, it can be performed in the same way as above by providing a rotation amount detection circuit and a coordinate conversion circuit by rotation. I can do it. In addition, in the above, the binarization circuit has one channel and one window is set for it, but in order to cope with the shading of the object, the binarization circuit is made to have multiple channels, and correspondingly, multiple channels are set. It is also possible to provide windows and individually control the binarization threshold by taking correspondence with each window. Of course 1
It is also possible to set multiple windows for one binarization circuit. Further, although the peak value of the image signal within the window is used, the average value of the gradation information may be used. Further, the shape of the window is not limited to a rectangle, but can be any shape.
この発明によれば、時間的に相前後する2つの
画像信号を取り出し、時間的に前の画像信号から
2値化レベルを決定して時間的に後の画像信号の
2値化を行なうようにしたので、対象物の反射率
が個々に異なる場合にも、これに応じた2値化し
きい値が選択されるので、常に安定で高精度の判
定が可能となる利点がもたらされる。なお、この
点は照明装置の照度変化に対しても同様である。
また、対象物の位置や姿勢が変化しても、そのず
れ量を検出して正規化を行ない、これにもとづい
て2値化レベルを決定するようにしたので、精度
の高い2値化レベルを得ることができる。さら
に、移動する対象物について、これを静止画像化
するようにしているので、画像ボケのない鮮明な
画像が得られる結果、検査または判別の精度が向
上するものである。しかも、ハードウエアとして
高速のA/D変換回路、記憶回路および膨大な処
理回路を必要としないので、この種の装置を簡単
かつ安価にすることが可能である。また、この発
明は判定の対象となる画像情報の直前の画像情報
を利用して2値化レベルを決定するもので、従来
はこれを無駄なものとして見過していたものを用
いるものであるため、処理時間は実質的に増加せ
ず、したがつて従来と同等の高速性が保証される
ものである。また、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 objects differs from one another, the binarization threshold value is selected accordingly, providing the advantage that stable and highly accurate determination is possible at all times. Note that this point also applies to changes in illuminance of the lighting device.
In addition, even if the position or orientation of the object changes, the amount of deviation is detected and normalized, and the binarization level is determined based on this, so a highly accurate binarization level can be achieved. Obtainable. Furthermore, since a moving object is converted into a still image, a clear image without image blurring can be obtained, and as a result, the accuracy of inspection or discrimination can be improved. Furthermore, since a high-speed A/D conversion circuit, a memory circuit, and an enormous processing circuit are not required as hardware, this type of device can be made simple and inexpensive. Furthermore, this invention determines the binarization level by using the image information immediately preceding the image information to be determined, which has conventionally been overlooked as waste. Therefore, the processing time does not substantially increase, and therefore high speed equivalent to the conventional method is guaranteed. Further, in determining the binarization threshold, a certain limit is set on the grayscale value of the image, so that malfunctions due to unexpected objects or the like can be avoided.
第1図はこの発明の実施例を示す構成図、第2
図は対象物の位置ずれ補正方法を説明するための
参照図、第3図は対象物の移動による画面上の相
対的位置変化を示す参照図、第4図は第1図にお
ける主としてピークホールド動作を説明するため
のタイムチヤート、第5図は対象物の検査・判別
装置の従来例を示す構成図、第6図は第5図の動
作を説明するためのタイムチヤートである。
符号説明、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……座標補正回路、28……固定2値化
回路、29……位置ずれ検出回路、91……メモ
リ、93……演算処理装置、94……位置検出・
補正回路、95……設定回路、F……テレビカメ
ラ視野、W……ウインドウ。
Fig. 1 is a configuration diagram showing an embodiment of this invention;
The figure is a reference diagram for explaining the method of correcting the positional deviation of the target object, Figure 3 is a reference diagram showing the relative position change on the screen due to the movement of the target object, and Figure 4 is mainly the peak hold operation in Figure 1. FIG. 5 is a block diagram showing a conventional example of an object inspection/discrimination device, and FIG. 6 is a time chart for explaining the operation of FIG. 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... Coordinate correction circuit, 28... Fixed binarization circuit, 29... Position shift detection circuit, 91... Memory, 93... Arithmetic processing unit, 94... Position detection/
Correction circuit, 95...Setting circuit, F...TV camera field of view, W...Window.
Claims (1)
含み該対象物の静止画像を取り出す画像取出手段
と、該対象物の撮像視野内基準位置に対する位置
または回転ずれ量を検出し該ずれ量にもとづいて
位置の正規化を行なう位置補正手段と、該正規化
された対象物画像の所定位置に少なくとも1つの
所定形状ウインドを発生させるウインドウ発生手
段と、少なくとも該ウインドウ領域内画像の濃淡
レベルを検出する検出部を含み該濃淡レベルに応
じて2値化レベルを決定する2値化レベル決定手
段とを備え、前記画像取出手段により所定時刻を
基準にして相前後する少なくとも2つの静止画像
を取り出し、時間的に前の画像について前記位置
補正手段により対象物画像の位置補正をして前記
ウインドウ発生手段によりその所定位置にウイン
ドウを発生させ、前記2値化レベル決定手段によ
りウインドウ領域内画像の濃淡レベルから2値化
レベルを決定し、該決定された2値化レベルをも
つて時間的に後の画像を2値化することを特徴と
する画像2値化方式。 2 特許請求の範囲第1項に記載の画像2値化方
式において、前記2値化レベルを決定するための
画像信号は前記画像取出手段からの出力にローパ
スフイルタをかけて取り出すことを特徴とする画
像2値化方式。 3 特許請求の範囲第1項または第2項に記載の
画像2値化方式において、前記検出部にて検出さ
れる画像の濃淡レベルが所定の範囲を越えたとき
は別途設けられた標準値を2値化レベルとして採
用することを特徴とする画像2値化方式。[Claims] 1. Image extraction means that includes a two-dimensional imaging means that images a moving object and takes out a still image of the object, and detects the position or rotational deviation amount of the object with respect to a reference position within the imaging field of view. position correction means for normalizing the position based on the amount of deviation; window generation means for generating at least one predetermined shape window at a predetermined position of the normalized object image; and at least an image within the window area. binarization level determining means for determining a binarization level according to the gray level, the image retrieval means including a detection unit for detecting a gray level of at least two successive images based on a predetermined time. A still image is extracted, the position correction means corrects the position of the object image for the temporally previous image, the window generation means generates a window at the predetermined position, and the binarization level determination means adjusts the window area. An image binarization method characterized in that a binarization level is determined from the gray level of an inner image, and a temporally later 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.
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP60150025A JPS6211985A (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 |
|---|---|---|---|
| JP60150025A JPS6211985A (en) | 1985-07-10 | 1985-07-10 | Picture binary coding system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6211985A JPS6211985A (en) | 1987-01-20 |
| JPH056713B2 true JPH056713B2 (en) | 1993-01-27 |
Family
ID=15487848
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP60150025A Granted JPS6211985A (en) | 1985-07-10 | 1985-07-10 | Picture binary coding system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS6211985A (en) |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6027185B2 (en) * | 1983-08-29 | 1985-06-27 | 株式会社日立製作所 | position detection device |
-
1985
- 1985-07-10 JP JP60150025A patent/JPS6211985A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6211985A (en) | 1987-01-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5835614A (en) | Image processing apparatus | |
| KR20000071087A (en) | Outdoor range finder | |
| US4885784A (en) | System for binary encoding a picture | |
| JPH08145906A (en) | Defect inspection method and device for inspected surface | |
| JP2000193601A (en) | Surface defect inspection equipment | |
| JPH07101048A (en) | Printing inspection method and device | |
| JPH0514891A (en) | Image monitoring device | |
| JP3216439B2 (en) | Internal inspection equipment for circular containers | |
| JPH0477951B2 (en) | ||
| JPH0711414B2 (en) | Glass bottle uneven thickness inspection method | |
| JPH057363A (en) | Picture monitoring device | |
| JPH0769276B2 (en) | Container inner surface inspection device | |
| JP2001307017A (en) | Character plate recognition device | |
| JP4303351B2 (en) | Image processing device | |
| JP2841961B2 (en) | Visual recognition device | |
| JP2692853B2 (en) | Image blur detector | |
| JPS6211985A (en) | Picture binary coding system | |
| JP2503613B2 (en) | Abnormality monitoring device | |
| JPH067171B2 (en) | Moving object detection method | |
| JPH0514898A (en) | Image monitor device | |
| JPH0797410B2 (en) | Image processing method | |
| JPH0830727A (en) | Binarizing method for character image | |
| JPH11132957A (en) | Surface defect detection method and apparatus | |
| JPH0926313A (en) | Object recognition method in electronic component mounting board appearance inspection device | |
| JP2971793B2 (en) | Position detection device |