JPS6322241B2 - - Google Patents

Info

Publication number
JPS6322241B2
JPS6322241B2 JP9383881A JP9383881A JPS6322241B2 JP S6322241 B2 JPS6322241 B2 JP S6322241B2 JP 9383881 A JP9383881 A JP 9383881A JP 9383881 A JP9383881 A JP 9383881A JP S6322241 B2 JPS6322241 B2 JP S6322241B2
Authority
JP
Japan
Prior art keywords
signal
video signal
section
value
slit
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
Application number
JP9383881A
Other languages
Japanese (ja)
Other versions
JPS57208404A (en
Inventor
Yasuo Nakagawa
Hiroshi Makihira
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP9383881A priority Critical patent/JPS57208404A/en
Publication of JPS57208404A publication Critical patent/JPS57208404A/en
Publication of JPS6322241B2 publication Critical patent/JPS6322241B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • G01B11/25Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Description

【発明の詳細な説明】 本発明は、凸状の対象物の形状を光切断像から
正確に検出する形状検出装置に関するものであ
る。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a shape detection device that accurately detects the shape of a convex object from an optically sectioned image.

光切断法による形状の自動測定、自動検査にお
いては、光学系により得られる光切断像をTVカ
メラ等の撮像器により検出し、検出された2次元
濃淡画像から光切断線を抽出することにより、入
力データを圧縮し、その後の処理を容易にする必
要がある。
In automatic shape measurement and inspection using the optical section method, the optical section image obtained by the optical system is detected by an imager such as a TV camera, and the optical section line is extracted from the detected two-dimensional gray image. Input data needs to be compressed to facilitate further processing.

第1図に例示する光切断法において、スリツト
投光器1からスリツト状の光束を被測定物2に投
光し、これを像検出器3により検出し、その検出
される2次元濃淡画像から光切断線を抽出する従
来技術としては、検出画像の縦方向の各走査線に
ついて最も明るい点を抽出することにより光切断
線を求める方法がある。第2図はこれを説明する
ための図であり、第2図aは光切断像すなわち2
次元濃淡画像を明るい部分を黒く表現している。
第2図bは、同図aの任意の縦方向の一本の走査
線iの映像信号を示している。この映像信号の明
るさVが最も明るい点の縦座標Ziを検出し、これ
を走査線iの出力値とする。これを縦方向の全走
査線について実施することにより第2図cの光切
断線、すなわち波形データを得ることができる。
In the light cutting method illustrated in FIG. 1, a slit-shaped light beam is projected from a slit projector 1 onto an object to be measured 2, which is detected by an image detector 3, and the light is cut from the detected two-dimensional grayscale image. As a conventional technique for extracting lines, there is a method of obtaining a light cutting line by extracting the brightest point for each vertical scanning line of a detected image. Fig. 2 is a diagram for explaining this, and Fig. 2a is a light section image, that is, 2
The bright parts of the dimensional gradation image are expressed as black.
FIG. 2b shows the video signal of one arbitrary vertical scanning line i in FIG. 2a. The ordinate Zi of the point where the brightness V of this video signal is the brightest is detected, and this is taken as the output value of the scanning line i. By performing this for all scanning lines in the vertical direction, the optical section line shown in FIG. 2c, that is, the waveform data can be obtained.

このような従来技術は、第1図に例示したよう
なy軸方向に形状がほぼ一定な対象の形状を検出
するのには有効であるが、y軸方向の形状変化が
大きい対象物の形状を検出する場合、すなわち直
接スリツト光が当たつていない部分で異常反射に
より明るい部分を生じてしまう場合、その部分の
最も明るい点を光切断線と誤まつて検出してしま
うことがある。
Such conventional technology is effective for detecting the shape of an object whose shape is almost constant in the y-axis direction, as illustrated in FIG. When detecting a bright spot due to abnormal reflection in a part that is not directly hit by the slit light, the brightest point in that part may be mistakenly detected as a light cutting line.

第3図はその一例として被測定物がプリント配
線基板上に搭載された電気部品のはんだ付部であ
り、その形状を検出するための光切断法の構成を
示している。第3図において、スリツト投光器は
ランプ4、コンデンサレンズ5、スリツト6、投
光レンズ7で構成され、像検出器は結像レンズ
8、撮像器9で構成されている。スリツト状の光
は上方からレンズ7より被測定物であるはんだ付
部10に投光され、これを斜め横から検出する。
第4図は被測定物周辺の拡大図であるが、上方か
ら投光されたスリツト光は、はんだ付部10上に
スリツト輝線11を形成する。ところではんだ付
表面の点12ではその部分の面の傾き角の関係か
らレンズ8へ、レンズ7からの光が正反射して入
つてくる。レンズ7からの光の大半はスリツト輝
線11に集光しているが一部は散乱しており、そ
のため点12は明るく観察されることになる。第
5図aはその光切断像を例示したものであるが、
このような場合、従来方式により光切断線を抽出
すると、第5図bのように異常な光切断線を得る
こととなる。
As an example, FIG. 3 shows a configuration of an optical cutting method for detecting the shape of a soldered part of an electrical component mounted on a printed wiring board as the object to be measured. In FIG. 3, the slit projector is composed of a lamp 4, a condenser lens 5, a slit 6, and a projecting lens 7, and the image detector is composed of an imaging lens 8 and an image pickup device 9. The slit-shaped light is projected onto the soldering part 10, which is the object to be measured, from above through the lens 7, and is detected diagonally from the side.
FIG. 4 is an enlarged view of the periphery of the object to be measured, and the slit light projected from above forms a slit bright line 11 on the soldering part 10. By the way, at the point 12 on the soldering surface, the light from the lens 7 is specularly reflected and enters the lens 8 due to the angle of inclination of the surface at that part. Most of the light from the lens 7 is focused on the slit bright line 11, but some of it is scattered, so that the point 12 is observed brightly. Figure 5a shows an example of the optical section image.
In such a case, if the optical section line is extracted using the conventional method, an abnormal optical section line will be obtained as shown in FIG. 5b.

なお、従来技術として、ここでは最も単純な最
も明るい位置を抽出する方式についてその問題点
を示したが、これは他の方式すなわち像検出の各
走査において映像信号Vをあらかじめ設定した値
V1,V2(V1>V2)と比較し、一走査における映
像信号Vの最大値VmaxがV2より小の時Z=0、
V1とV2の間の時V=VmaxとなるZ位置をZと
し、V1より大きい時、一つの走査において最初
にV=V1となるZ位置をZ1、最後にV=V1とな
るZ位置をZ2とし、Z=(Z1+Z2)/2とするこ
とにより光切断線Z(x)を抽出する特願昭54―
146427の方式においても同じ問題点を有してい
る。
As a conventional technique, here we have shown the problems with the simplest method of extracting the brightest position, but this is different from other methods, that is, when the video signal V is set to a preset value in each scan of image detection.
Compared with V 1 and V 2 (V 1 > V 2 ), when the maximum value Vmax of the video signal V in one scan is smaller than V 2 , Z=0,
Z is the Z position where V=Vmax when it is between V 1 and V 2 , Z is the Z position where V=V 1 first in one scan when it is greater than V 1, and Z is the Z position where V=V 1 is the last when V is greater than V 1 . A patent application filed in 1973 to extract the optical cutting line Z(x) by setting the Z position at Z2 and setting Z=( Z1 + Z2 )/2.
The 146427 method also has the same problem.

本発明の目的は、上記した従来技術の欠点をな
くし、凸状の対象物に対して光学的外乱を含む光
切断像から正しい光切断線を抽出して凸状の対象
物に対してその形状を正確に検出できるようにし
た形状検出装置を提供するにある。
An object of the present invention is to eliminate the above-mentioned drawbacks of the prior art, and to extract the correct light section line from a light section image including optical disturbance for a convex object, and to obtain the shape of the convex object. An object of the present invention is to provide a shape detection device capable of accurately detecting a shape.

従来技術の問題点として例示した異常反射は被
測定物面で生じる。従つてその異常反射部はスリ
ツト輝線より下に存在する。このことを利用し、
本発明では選択的に光切断線を抽出する。すなわ
ち、像検出器からの縦方向、上から下に走査した
時の各映像信号Vを、あらかじめ設定した値V1
と比較し、最初にV≧V1である区間についての
み光切断線を抽出し、それ以後V≧V1である区
間が発生しても光切断線を抽出しないことを特徴
とする。即ち本発明は、スリツト状の光の帯を、
凸状の対象物に対して真上から投光するスリツト
投光器と、上記スリツト状の光の帯に対して斜め
方向から上記凸状の対象物上のスリツト輝線像を
二次元的に撮像する撮像装置と、該撮像装置から
得られる二次元画像を入力し、上記凸状の対象物
の横方向の同じ座標を示す一次元画像について上
記凸状の対象物の最も高い上側から調べていつ
て、スリツト輝線像に相当する映像信号レベルV
が所定の設定値V2より大きな部分が最初に発生
し終わつた区間Aを検出してその区間A信号を出
力し、上記映像信号レベルVが所定の設定値V2
に到達しない場合には、区間信号を出力しない検
出区間設定手段と、該検出区間設定手段より区間
信号が検出された区間について、上記映像信号レ
ベルVが、上記設定値V2より低く設定された設
定値V3に到達した場合には、その映像信号のピ
ークを示す高さ座標値Z信号として光切断線を抽
出し、設定値V3に到達しない場合には光切断線
なしの信号を抽出する最大値位置検出手段と、上
記検出区間設定手段より区間信号が検出された区
間について、上記映像信号レベルVが、飽和レベ
ルより僅か低く設定された設定値V1に到達した
場合には、上記映像信号が最初に上記設定値V1
となつた座標値Z1と最後に上記上記設定値V1
なつた座標値Z2との中心位置を示す高さ座標値Z
信号として光切断線を抽出する中心位置検出手段
と、上記映像信号レベルVが上記設定値V1を越
えるか否かによつて上記最大値位置検出手段の出
力信号と上記中心位置検出手段の出力信号とを選
択して出力する選択手段とを備え、上記検出区間
設定手段、最大値位置検出手段、中心位置検出手
段、及び選択手段により上記撮像装置から得られ
る二次元画像に基いて上記凸状の対象物の横方向
について処理し、光切断線により凸状の対象物の
形状を検出することを特徴とする形状検出装置で
ある。
Abnormal reflection, which is exemplified as a problem with the prior art, occurs on the surface of the object to be measured. Therefore, the abnormal reflection part exists below the slit emission line. Taking advantage of this,
In the present invention, optical cutting lines are selectively extracted. That is, each video signal V when scanning vertically from the image detector from top to bottom is set to a preset value V 1
In comparison with , the optical section line is first extracted only for the section where V≧V 1 , and even if a section where V≧V 1 occurs thereafter, no optical section line is extracted. That is, the present invention provides a slit-shaped light band,
A slit projector that projects light onto a convex object from directly above, and an imaging system that two-dimensionally images a slit bright line image on the convex object from an oblique direction with respect to the slit-shaped light band. A device and a two-dimensional image obtained from the imaging device are input, and the one-dimensional image showing the same horizontal coordinates of the convex object is examined from the highest side of the convex object, and the slit is Video signal level V corresponding to the bright line image
detects the section A in which a portion where the value is greater than a predetermined set value V 2 has finished occurring for the first time, outputs the section A signal, and sets the video signal level V to a predetermined set value V 2
If the detection interval setting means does not output the interval signal, the video signal level V is set lower than the set value V 2 for the interval in which the interval signal is detected by the detection interval setting means. When the set value V 3 is reached, the optical section line is extracted as a height coordinate value Z signal indicating the peak of the video signal, and when the set value V 3 is not reached, a signal without the optical section line is extracted. When the video signal level V reaches the set value V 1 set slightly lower than the saturation level for the section in which the section signal is detected by the maximum value position detecting means and the detection section setting means, the above-mentioned The video signal is initially set to the above setting value V 1
Height coordinate value Z indicating the center position between the coordinate value Z 1 that became , and the coordinate value Z 2 that finally became the above set value V 1
A center position detecting means for extracting an optical cutting line as a signal, and an output signal of the maximum value position detecting means and an output of the center position detecting means depending on whether the video signal level V exceeds the set value V1 . and a selection means for selecting and outputting a signal, the detection section setting means, the maximum value position detection means, the center position detection means, and the selection means determine the convex shape based on the two-dimensional image obtained from the imaging device. This is a shape detection device characterized in that it processes the object in the lateral direction and detects the shape of the convex object using a light section line.

第6図に本発明の一実施例の全体構成を示す。
これはスリツト投光器1と像検出器3で構成され
る光切断法形状検出部と、これで検出された映像
信号を入力し光切断線信号を出力する光切断線抽
出回路13からなる。13で抽出された光切断線
信号は、形状測定のために表示装置に出力したり
自動検査のために信号処理回路に出力したりす
る。
FIG. 6 shows the overall configuration of an embodiment of the present invention.
This consists of a light cutting method shape detection section consisting of a slit projector 1 and an image detector 3, and a light cutting line extraction circuit 13 which inputs the detected video signal and outputs a light cutting line signal. The optical cutting line signal extracted in step 13 is output to a display device for shape measurement or to a signal processing circuit for automatic inspection.

第7図は、第6図の光切断線抽出回路13の一
実施例の基本構成を示す。光切断線抽出回路13
は、映像信号V、設定値V1,V2,V3(V1>V2
V3)、及び像検出器3の各走査のトリガー信号水
平同期信号Hdを入力とし、最大値位置検出回路
14、中心位置検出回路15、検出区間設定回路
16、選択回路17で構成される。ここで像検出
器3の撮像方式としては、第8図aのように通常
のTVカメラにおけるように水平方向走査を画面
上から下に繰返していくものと、同図bのように
TVカメラを90゜回転したように垂直方向走査を画
面左から右に繰返してゆくものが考えられるが、
ここではまず第8図bの方式における実施例につ
いて説明する。
FIG. 7 shows the basic configuration of an embodiment of the optical cutting line extraction circuit 13 of FIG. Optical cutting line extraction circuit 13
is the video signal V, the set values V 1 , V 2 , V 3 (V 1 > V 2
V 3 ), and a trigger signal horizontal synchronization signal Hd for each scan of the image detector 3, and is composed of a maximum value position detection circuit 14, a center position detection circuit 15, a detection interval setting circuit 16, and a selection circuit 17. Here, the imaging method of the image detector 3 is one in which horizontal scanning is repeated from the top to the bottom of the screen as in a normal TV camera, as shown in Fig. 8a, and one in which horizontal scanning is repeated from the top to the bottom of the screen, as shown in Fig. 8b.
One idea is to repeat vertical scanning from left to right on the screen, like a TV camera rotated 90 degrees.
First, an embodiment using the method shown in FIG. 8b will be described.

次に光切断線抽出回路13の機能であるが、内
容的には回路14,15,17で実現されるピー
ク位置検出法と、回路16で実現する検出区間設
定処理からなる。前者は特願昭54―146427の内容
に相当する。すなわち第9図aのように映像信号
の最大値Vmaxが区間〔V1,V3〕に入つている
場合、最大値位置検出回路14によりそのZ位置
Zを求める。また第9図bのようにVmaxがV1
より大きい時、中心位置検出回路15により最初
にV≧V1となつたZ位置Z1、最後にV≧V1とな
つたZ位置Z2を求め、さらにZ=(Z1+Z2)/2
としてその中心位置を求める。そして1つの走査
中に中心位置検出回路15内でVがV1以上にな
つた場合は、選択回路17は中心位置検出回路1
5の出力を、VがV1以上にならなかつた場合は
選択回路17は最大値位置検出回路14の出力を
光切断線の値として出力する。またVが1つの走
査中にV3以上になる事がなかつた場合選択回路
17はゼロを出力する。検出区間設定は、上記Z
の検出を第10図a,bのようにV≧V2となる
最初の山の終りまでのAについてのみ行なう。但
し第10図cのようにV≧V2となることがない
場合区間Aは全域とする。これにより第5図aの
ような入力映像信号は第11図のような光切断線
に変換される。
Next, the function of the optical cutting line extraction circuit 13 consists of a peak position detection method implemented by circuits 14, 15, and 17, and a detection interval setting process implemented by circuit 16. The former corresponds to the content of patent application No. 146427-1972. That is, when the maximum value Vmax of the video signal falls within the interval [V 1 , V 3 ] as shown in FIG. 9a, the maximum value position detection circuit 14 determines its Z position Z. Also, as shown in Figure 9b, Vmax is V 1
When it is larger, the center position detection circuit 15 first determines the Z position Z 1 where V≧V 1 and finally the Z position Z 2 where V ≧ V 1 , and further calculates Z = (Z 1 + Z 2 )/ 2
Find its center position as . If V becomes V1 or more in the center position detection circuit 15 during one scan, the selection circuit 17 selects the center position detection circuit 1.
If V does not exceed V1 , the selection circuit 17 outputs the output of the maximum value position detection circuit 14 as the value of the optical cutting line. Further, if V does not exceed V3 during one scan, the selection circuit 17 outputs zero. The detection interval setting is as above
Detection is performed only for A up to the end of the first mountain where V≧V 2 as shown in FIGS. 10a and 10b. However, as shown in FIG. 10c, if V≧V 2 does not hold, section A is the entire area. As a result, an input video signal as shown in FIG. 5a is converted into an optical section line as shown in FIG. 11.

第7図の実施例をより詳細に記したものが第1
2図である。第12図を使用して動作内容をより
具体的に説明する。
The first example is a more detailed version of the embodiment shown in FIG.
This is Figure 2. The details of the operation will be explained in more detail using FIG. 12.

最大位置検出回路14は、ピークホールド1
8、コンパレータ19、ワンシヨツト20、アン
ド21、レジスタ22、コンパレータ24、フリ
ツプフロツプ25で構成される。
The maximum position detection circuit 14 has a peak hold 1
8, a comparator 19, a one-shot 20, an AND 21, a register 22, a comparator 24, and a flip-flop 25.

中心位置検出回路15は、コンパレータ26、
フリツプフロツプ27、ワンシヨツト28,3
1、アンド29,32、Z1レジスタ30、Z2レジ
スタ33、加算器34、フリツプフロツプ38で
構成される。
The center position detection circuit 15 includes a comparator 26,
Flip flop 27, one shot 28, 3
1, AND29, 32, Z1 register 30, Z2 register 33, adder 34, and flip-flop 38.

検出区間設定回路16は、コンパレータ35、
フリツプフロツプ36で構成される。
The detection interval setting circuit 16 includes a comparator 35,
It consists of a flip-flop 36.

また各瞬間でのZ座標を知るためのカウンタ2
3及び選択回路37を有している。
There is also a counter 2 to know the Z coordinate at each moment.
3 and a selection circuit 37.

最大位置検出回路14では、映像信号Vはピー
クホールド18に入り、1つの走査中におけるあ
る瞬間までのVのピーク値をホールドする。コン
パレータ19は、このホールドされたピーク値と
その瞬間のVとを比較し、Vがホールドされたピ
ーク値以上となつた時、ワンシヨツト20に
“1”(ON)を出力する。一方Vは、コンパレー
タ24においてV3と比較され、V≧V3の時コン
パレータ24は“1”を出力する。さらに検出区
間設定回路16では、コンパレータ35がVと
V2を比較し、V<V2の時“1”を出力する。そ
してフリツプフロツプ36はトリガー信号Hdで
リセツトされ、Vが≧V2からV<V2へ最初に移
行した時、“1”から“0”(OFF)に出力が変
化する。アンド21はワンシヨツト20とコンパ
レータ24とフリツプフロツプ36の出力のアン
ドをとるため、区間A(第10図a)で、かつV
≧V3で、かつピークである瞬間に“1”を出力
することになる。これをレジスタ22のロード信
号として使用し、トリガー信号Hdでリセツトさ
れるカウンタ23のその瞬間の値をレジスタ22
に記憶する。これにより一走査終了時にレジスタ
22はV≧V2に最初になつた区間における極大
値のZ座標Zをホールドしている。
In the maximum position detection circuit 14, the video signal V enters a peak hold 18, and the peak value of V up to a certain moment during one scan is held. Comparator 19 compares this held peak value with V at that moment, and outputs "1" (ON) to one shot 20 when V is equal to or greater than the held peak value. On the other hand, V is compared with V 3 in the comparator 24, and when V≧V 3 , the comparator 24 outputs “1”. Furthermore, in the detection interval setting circuit 16, the comparator 35
Compares V 2 and outputs "1" when V<V 2 . The flip-flop 36 is reset by the trigger signal Hd, and the output changes from "1" to "0" (OFF) when V first shifts from ≧V 2 to V<V 2 . The AND 21 takes the AND of the outputs of the one shot 20, the comparator 24, and the flip-flop 36, so that in the interval A (Fig. 10a) and V
≧V 3 and “1” is output at the moment of peak. This is used as a load signal for the register 22, and the instantaneous value of the counter 23, which is reset by the trigger signal Hd, is sent to the register 22.
to be memorized. As a result, at the end of one scan, the register 22 holds the Z coordinate Z of the maximum value in the section where V≧V 2 for the first time.

中心位置検出回路15では、映像信号VはV1
とコンパレータ26で比較され、その出力はフリ
ツプフロツプ27のセツト側に入力される。従つ
てワンシヨツト28は、1つの走査において最初
にV≧V1となる瞬間を検出する。これとフリツ
プフロツプ36より区間A(第10図b)を示す
信号とのアンドをアンド29でとり、その出力を
レジスタ30のロード信号として使用する事によ
り、Z1レジスタ30には区間AでV≧V1に最初
になつたZ位置Z1がホールドされる。一方ワンシ
ヨツト31はV≧V1でなくなる瞬間を検出して
おり、これと区間Aとのアンドをアンド32でと
り、その出力をレジスタ33のロード信号として
使用することにより、Z2レジスタ33には区間A
で最後にV≧V1でなくなるZ位置Z2がホールド
される。加算器34はZ1レジスタ30とZ2レジス
タ33のホールド値よりZ=(Z1+Z2)/2の演
算を行なう。
In the center position detection circuit 15, the video signal V is V 1
A comparator 26 compares the output of the flip-flop 27 with the set side of the flip-flop 27. Therefore, the one shot 28 detects the first moment in one scan when V≧V 1 . By ANDing this with the signal indicating interval A (FIG. 10b) from the flip-flop 36 and using the output as the load signal for the register 30, the Z1 register 30 receives V≧ in interval A. The Z position Z 1 that first becomes V 1 is held. On the other hand, the one shot 31 detects the moment when V≧V 1 is no longer satisfied, and by ANDing this with the interval A and using the output as the load signal for the register 33, the Z 2 register 33 is loaded. Section A
Finally, the Z position Z 2 where V≧V 1 does not hold is held. The adder 34 performs the calculation Z=(Z 1 +Z 2 )/2 from the hold values of the Z 1 register 30 and the Z 2 register 33.

フリツプフロツプ25はHdをリセツト信号と
し、コンパレータ24の出力をセツト信号として
おり、V≧V3なるケースが1つの走査中に存在
したかどうかの検出に使用される。フリツプフロ
ツプ38はHdをリセツト信号とし、アンド29
の出力をセツト信号としており、第10図bのケ
ースが発生したかどうかの検出にしようされる。
従つて選択回路37では、これらを条件信号と
し、フリツプフロツプ38がセツトされている時
は加算器34の出力値を、フリツプフロツプ38
がリセツトのままでありフリツプフロツプ25が
セツトされている時はレジスタ22のホールド値
を、その他の場合ゼロを出力する。
The flip-flop 25 uses Hd as a reset signal and the output of the comparator 24 as a set signal, and is used to detect whether a case of V≧V 3 exists during one scan. Flip-flop 38 uses Hd as a reset signal, and AND29
The output of 1 is used as a set signal, and is used to detect whether the case shown in FIG. 10b has occurred.
Therefore, the selection circuit 37 uses these as condition signals, and when the flip-flop 38 is set, the output value of the adder 34 is used as the condition signal.
When remains reset and flip-flop 25 is set, it outputs the hold value of register 22, and otherwise outputs zero.

次に他の一実施例として第8図aの撮像方式の
一実施例を示す。ここでは高さ方向、z軸の検出
区間を(Za,Zb)に限ることとする(第8図a
参照)。光切断線抽出回路13の一実施例を第1
3図に示す。入力信号は第8図aに示すように水
平走査される映像信号V、各水平走査の起点を示
すHd、各水平走査における水平方向、x軸方向
のサンプリング間隔に対応するClockであり、レ
ベルV1,V2,V3及びz軸検出区間Za,Zbはデジ
スイツチで与えるものとする。光切断線抽出回路
13は、これらデジスイツチ39,40,41,
46,47、コンパレータ42,43,44,4
5,Z座標発生回路48、X座標発生回路49、
A/Dコンバータ50、ゲート51、データセレ
クタ52、リードライト制御回路53,54,5
5,56、Zm1,Zm2,Vmaxの値を記憶するラ
ンダム・アクセス・メモリ57,58,59、
Zm書込み済みフラグ記憶用ランダム・アクセス
メモリ60及び第1ピーク検出済みフラグ記憶用
ランダム・アクセスメモリ61、加算器62で構
成される。
Next, as another example, an example of the imaging method shown in FIG. 8a will be shown. Here, the detection section in the height direction and the z-axis is limited to (Za, Zb) (Fig. 8 a)
reference). A first embodiment of the optical cutting line extraction circuit 13 is described below.
Shown in Figure 3. As shown in Figure 8a, the input signals are a horizontally scanned video signal V, Hd indicating the starting point of each horizontal scan, a clock corresponding to the sampling interval in the horizontal direction and the x-axis direction in each horizontal scan, and a level V. 1 , V 2 , V 3 and the z-axis detection sections Za and Zb shall be provided by a digital switch. The optical cutting line extraction circuit 13 includes these digital switches 39, 40, 41,
46, 47, comparator 42, 43, 44, 4
5, Z coordinate generation circuit 48, X coordinate generation circuit 49,
A/D converter 50, gate 51, data selector 52, read/write control circuit 53, 54, 5
5, 56, random access memory 57, 58, 59 for storing the values of Zm 1 , Zm 2 , Vmax;
It is composed of a random access memory 60 for storing the Zm written flag, a random access memory 61 for storing the first peak detected flag, and an adder 62.

映像信号Vは、Z座標発生回路48により区間
(Za,Zb)の間だけゲート51を通つてA/Dコ
ンバータ50でデイジタル信号に変換される。コ
ンパレータ44は映像信号とデジスイツチ39内
のV3を比較し、V≧V3を検出する。コンパレー
タ43は同様にV≧V1を検出する。コンパレー
タ42は同様にV<V2を検出する。一方x座標
はClockをカウントする事によりX座標発生回路
49で発生され、これはランダムアクセスメモリ
57,58,59,60,61のアドレスとして
参照される。従つてコンパレータ45で映像信号
Vとメモリ59に記憶されたVmaxと比較され、
V>Vmaxの場合には、メモリ59にVmaxとし
てVが更新され、メモリ59の内容Vmaxは、そ
の時のx座標におけるVmaxとなる。なお、各メ
モリは光切断線抽出に先立ち、クリアされる。ま
た、メモリ60,61は、第10図の検出区間A
を設定するもので、x座標毎に、Z方向について
の一次元の画像の明るさが第10図a,bのよう
にV≧V2となる区間が2個所以上存在する場合
2番目以降を無視するため、一旦V≧V2となつ
たVがV<V2となつたら第1ピーク検出済みフ
ラグを記憶させ、以後当該x座標についての光切
断線の抽出を止める。
The video signal V is converted by the Z coordinate generation circuit 48 into a digital signal by the A/D converter 50 through the gate 51 only during the interval (Za, Zb). The comparator 44 compares the video signal with V 3 in the digital switch 39 and detects V≧V 3 . Comparator 43 similarly detects V≧V 1 . Comparator 42 similarly detects V<V 2 . On the other hand, the x coordinate is generated by the x coordinate generating circuit 49 by counting clocks, and this is referred to as the address of the random access memories 57, 58, 59, 60, and 61. Therefore, the comparator 45 compares the video signal V with Vmax stored in the memory 59,
If V>Vmax, V is updated as Vmax in the memory 59, and the content Vmax of the memory 59 becomes Vmax at the x-coordinate at that time. Note that each memory is cleared prior to extracting the optical cutting line. The memories 60 and 61 also store the detection section A in FIG.
This sets In order to ignore it, once V≧V 2 becomes V<V 2 , the first peak detected flag is stored, and extraction of the optical section line for the x-coordinate is thereafter stopped.

リードライト制御回路54,55,56は、そ
れぞれ映像信号Vと設定値V1,V3及びメモリ5
9にZaの方から順次更新されて記憶される最大
映像信号Vmaxとの比較結果に応じ、以下のよう
に動作する。
The read/write control circuits 54, 55, and 56 respectively control the video signal V, the set values V1 , V3, and the memory 5.
According to the comparison result with the maximum video signal Vmax which is sequentially updated and stored starting from Za in 9, the following operation is performed.

1 映像信号<Vmaxであれば54,55,56
共動作しない。
1 If video signal < Vmax, 54, 55, 56
Does not work together.

2 映像信号>Vmaxであり、かつ映像信号<
V1であり、かつ61で第1ピーク検出済みで
なければ、54,55,56が動作し、その時
のz座標を57,58に、その時の映像信号の
値を59にそれぞれ書込む。
2 Video signal > Vmax, and video signal <
If V 1 and the first peak has not been detected at 61, 54, 55, and 56 operate, and write the z coordinate at that time to 57, 58, and the value of the video signal at that time to 59, respectively.

3 映像信号=Vmaxであり、かつ61で第1ピ
ーク検出済みでなければ、54のみが動作しそ
の時のz座標を58に書込む。
3. If the video signal=Vmax and the first peak has not been detected in 61, only 54 operates and writes the z coordinate at that time in 58.

4 映像信号≧V1で、かつ61で第1ピーク検
出済みでなければ、54と56が動作し、その
時のz座標を58へ書込むと共に、データセレ
クタ52を介しV1を59に書込む。
4 If the video signal ≧ V 1 and the first peak has not been detected in 61, 54 and 56 operate, write the z coordinate at that time to 58, and write V 1 to 59 via the data selector 52. .

5 61で第1ピーク検出済みであれば54,5
5,56共動作しない。
5 54,5 if the first peak has been detected at 61
5 and 56 do not work together.

これら動作中に60,53,61は以下のよう
に動作しメモリ61に第1ピーク検出済みフラグ
を記憶してゆく。すなわちメモリ60は、区間
(Za,Zb)についてリードライト制御回路55で
Zmlの書き込み命令がでると、そのX座標に対応
するメモリ内容にフラグ1を入れる。従つてメモ
リ60の内容は各X座標についてZm1が最初に検
出されるまで“0”であり、検出後は“1”とな
り以後“1”が保存される。リードライト制御回
路53はメモリ60の内容とコンパレータ42の
内容のアンドをとる。従つてZm1が1回検出され
て以後映像信号<V2が成立した時“1”となる。
従つてメモリ60の内容はZm1が1回検出されて
以後映像信号<V2が最初に成立して以後“1”
が記憶される。すなわち第1ピーク検出後、映像
信号<V2が成立すれば、フラグ“1”がセツト
され、そのx座標では第1ピーク検出済みである
ことを記憶したことになる。
During these operations, 60, 53, and 61 operate as follows and store the first peak detected flag in the memory 61. In other words, the memory 60 uses the read/write control circuit 55 for the section (Za, Zb).
When a Zml write command is issued, a flag 1 is set in the memory contents corresponding to the X coordinate. Therefore, the contents of the memory 60 are "0" for each X coordinate until Zm 1 is detected for the first time, become "1" after detection, and "1" is stored thereafter. The read/write control circuit 53 ANDs the contents of the memory 60 and the comparator 42 . Therefore, when Zm 1 is detected once and thereafter the video signal <V 2 is established, it becomes "1".
Therefore, the contents of the memory 60 are "1" after Zm 1 is detected once and the video signal < V 2 is established for the first time.
is memorized. That is, if the video signal <V 2 is satisfied after the first peak is detected, the flag "1" is set, and it is remembered that the first peak has been detected at that x coordinate.

以上の動作をZ座標のZaからZbまで実行する
とメモリ57,58には、x座標に対応して次の
Z座標データが書き込まれる。
When the above operation is executed from Z coordinate Za to Zb, the next Z coordinate data corresponding to the x coordinate is written into the memories 57 and 58.

1 Za〜Zb間でV≧V1とならなかつたx座標で
は、V≧V3となるZ座標区間内でピーク値を
示すZ座標がメモリ57及び58に書き込まれ
る。なお、第10図aに示すようにV≧V2
なる場合には、最初の区間Aのみ検出区間とす
る。
For the x-coordinates where V≧V 1 does not hold between 1 Za and Zb, the Z-coordinates that indicate the peak value within the Z-coordinate interval where V≧V 3 are written in the memories 57 and 58. Note that when V≧V 2 as shown in FIG. 10a, only the first section A is set as the detection section.

2 第10図bに示すようにZa〜Zb間でV≧V1
となつた場合には、V≧V1区間の始端Z1がメ
モリ57に、終端Z2がメモリ58に書き込まれ
る。なお、第10図bに示すようにV≧V2
なる場合には、最初の区間Aのみ検出区間とす
る。従つてZ=Zbにおける処理が終了した後、
48の指令によりゲート51が閉じ、x座標を
インクリメントしつつ54,55に58,57
からのリード指令を発すると、62へは58,
57のメモリ内容が出力され、それらの平均値
を62が出力し、62から抽出された光切断線
がZ座標列データとして出力される。
2 As shown in Figure 10b, V≧V 1 between Za and Zb
If V≧V 1 , the start end Z 1 of the section is written into the memory 57 and the end end Z 2 is written into the memory 58. Note that when V≧V 2 as shown in FIG. 10b, only the first section A is set as the detection section. Therefore, after the processing at Z=Zb is completed,
The gate 51 is closed by the command 48, and the x coordinate is incremented to 54, 55, 58, 57.
When a read command is issued from 58 to 62,
The memory contents of 57 are output, 62 outputs their average value, and the optical section line extracted from 62 is output as Z coordinate string data.

なお、以上の実施例では像検出器については触
れなかつたが、これはTVカメラ、2次元固体撮
像素子、1次元固体撮像素子と光学的走査方式の
組合せ、光電子増倍管等受光器と光学的走査方式
の組合せのいずれであつても良い。
Although the image detector was not mentioned in the above embodiments, it can be used for TV cameras, two-dimensional solid-state image sensors, combinations of one-dimensional solid-state image sensors and optical scanning methods, photomultiplier tubes, etc., and optical receivers. Any combination of target scanning methods may be used.

以上の実施例ではV1>V2>V3としたが、V2
V3であつても良い。
In the above embodiment, V 1 > V 2 > V 3 , but V 2 =
V 3 is also fine.

以上の実施例ではV≧V1ではV1を閾値とする
中心位置検出、V3≦V<V1では極大位置検出と
したが、これは単にV≧V3で中心位置検出、あ
るいはV≧V3で極大位置検出だけであつても良
い。これらの場合実施例に示した光切断抽出回路
の構成は、その一部だけを使用する単純なものと
なる。
In the above embodiments, when V≧V 1 , the center position is detected using V 1 as the threshold, and when V 3 ≦V<V 1 , the maximum position is detected. V 3 may only detect the maximum position. In these cases, the configuration of the optical cutting/extracting circuit shown in the embodiment becomes simple, using only a part of it.

第13図の実施例においては、Za,Zbをデジ
スイツチでセツトし、固定値として使用している
が、これを可変値とし、各x座標に応じてZ1,Z2
を変化させる方式であつても良い。
In the embodiment shown in FIG. 13, Za and Zb are set with a digital switch and used as fixed values, but they are made variable values and Z 1 and Z 2 are set according to each x coordinate.
It may also be a method of changing.

第12図の実施例においては、Za,Zbを特に
与えていないが、第13図におけると同様にZa,
Zbを適用しても良い。
In the embodiment shown in FIG. 12, Za and Zb are not particularly given, but as in FIG.
Zb may also be applied.

本発明により、形状変化の大きい対象物の光切
断線を、対象物からの異常反射に影響されること
なく抽出することができる。特に、はんだ付部の
ように光沢をもつた物体の形状検出に、この点で
特に有効である。
According to the present invention, it is possible to extract a light section line of an object whose shape changes significantly without being affected by abnormal reflection from the object. This is particularly effective in detecting the shape of shiny objects such as soldered parts.

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

第1図は光切断法の説明図、第2図は光切断線
抽出法の従来技術の説明図、第3図は光切断法に
よるプリント板はんだ付部検出法の説明図、第4
図は異常反射の状態を説明する図、第5図は異常
反射による従来技術の誤動作の一例を説明する
図、第6図は本発明の一実施例の全体構成図、第
7図は本発明の光切断線抽出回路の一実施例の機
能ブロツク図、第8図は像検出器の画像走査の2
種類を例示する図、第9図は最大位置検出及び中
心位置検出の機能を説明する図、第10図は本発
明の最初に発生する明るい部分のみから最大位置
あるいは中心位置の検出を行なう機能を説明する
図、第11図は本発明の方式による正常動作の一
例を説明する図、第12図は本発明の一実施例の
詳細な構成図、第13図は本発明の他の一実施例
の詳細な構成図である。 1…スリツト投光器、2…像検出器、13…光
切断線抽出回路。
Fig. 1 is an explanatory diagram of the optical cutting method, Fig. 2 is an explanatory diagram of the conventional technique of the optical cutting line extraction method, Fig. 3 is an explanatory diagram of the printed board soldered part detection method using the optical cutting method, and Fig. 4
Figure 5 is a diagram explaining the state of abnormal reflection, Figure 5 is a diagram explaining an example of a malfunction of the prior art due to abnormal reflection, Figure 6 is an overall configuration diagram of an embodiment of the present invention, and Figure 7 is a diagram of the present invention. FIG. 8 is a functional block diagram of an embodiment of the optical cutting line extraction circuit.
Figure 9 is a diagram illustrating the functions of maximum position detection and center position detection, and Figure 10 is a diagram illustrating the function of detecting the maximum position or center position only from the bright area that occurs at the beginning of the present invention. FIG. 11 is a diagram illustrating an example of normal operation according to the method of the present invention, FIG. 12 is a detailed configuration diagram of an embodiment of the present invention, and FIG. 13 is another embodiment of the present invention. FIG. 1... Slit projector, 2... Image detector, 13... Light cutting line extraction circuit.

Claims (1)

【特許請求の範囲】[Claims] 1 スリツト状の光の帯を、凸状の対象物に対し
て真上から投光するスリツト投光器と、上記スリ
ツト状の光の帯に対して斜め方向から上記凸状の
対象物上のスリツト輝線像を二次元的に撮像する
撮像装置と、該撮像装置から得られる二次元画像
を入力し、上記凸状の対象物の横方向の同じ座標
を示す一次画像について上記凸状の対象物の最も
高い上側から調べていつて、スリツト輝線像に相
当する映像信号レベルVが所定の設定値V2より
大きな部分が最初に発生し終わつた区間Aを検出
してその区間A信号を出力し、上記映像信号レベ
ルVが所定の設定値V2に到達しない場合には、
区間信号を出力しない検出区間設定手段と、該検
出区間設定手段より区間信号が検出された区間に
ついて、上記映像信号レベルVが、上記設定値
V2より低く設定された設定値V3に到達した場合
には、その映像信号のピークを示す高さ座標値Z
信号として光切断線を抽出し、設定値V3に到達
しない場合には光切断線なしの信号を抽出する最
大値位置検出手段と、上記検出区間設定手段より
区間信号が検出された区間について、上記映像信
号レベルVが、飽和レベルより僅か低く設定され
た設定値V1に到達した場合には、上記映像信号
が最初に上記設定値V1となつた座標値Z1と最後
に上記上記設定値V1となつた座標値Z2との中心
位置を示す高さ座標値Z信号として光切断線を抽
出する中心位置検出手段と、上記映像信号レベル
Vが上記設定値V1を越えるか否かによつて上記
最大値位置検出手段の出力信号と上記中心位置検
出手段の出力信号とを選択して出力する選択手段
とを備え、上記検出区間設定手段、最大値位置検
出手段、中心位置検出手段、及び選択手段により
上記撮像装置から得られる二次元画像に基いて上
記凸状の対象物の横方向について処理し、光切断
線により凸状の対象物の形状を検出することを特
徴とする形状検出装置。
1. A slit projector that projects a slit-shaped band of light onto a convex object from directly above, and a slit bright line that projects a slit-shaped band of light onto the convex object from an oblique direction with respect to the slit-shaped band of light. An imaging device that captures an image two-dimensionally, and a two-dimensional image obtained from the imaging device are input, and the most of the convex object is determined for a primary image showing the same horizontal coordinates of the convex object. The search is performed starting from the highest side, and the section A in which the video signal level V corresponding to the slit bright line image is higher than the predetermined set value V2 is detected for the first time, and the section A signal is output. If the signal level V does not reach the predetermined set value V2 ,
The video signal level V is set to the set value for the detection interval setting means in which no interval signal is output and the interval in which the interval signal is detected by the detection interval setting means.
When the set value V3 , which is set lower than V2 , is reached, the height coordinate value Z indicating the peak of the video signal is
maximum value position detection means for extracting a light cutting line as a signal and extracting a signal without a light cutting line if the set value V 3 is not reached; and for the section in which the section signal is detected by the detection section setting means; When the video signal level V reaches the set value V 1 that is set slightly lower than the saturation level, the video signal first reaches the coordinate value Z 1 at the set value V 1 and finally reaches the above setting. a center position detecting means for extracting an optical cutting line as a height coordinate value Z signal indicating the center position between the coordinate value Z2 which has become the value V1 , and whether or not the video signal level V exceeds the set value V1 . a selection means for selecting and outputting the output signal of the maximum value position detection means and the output signal of the center position detection means; and the selection means process the convex object in the lateral direction based on the two-dimensional image obtained from the imaging device, and detect the shape of the convex object using a light section line. Shape detection device.
JP9383881A 1981-06-19 1981-06-19 Configuration detecting method Granted JPS57208404A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9383881A JPS57208404A (en) 1981-06-19 1981-06-19 Configuration detecting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9383881A JPS57208404A (en) 1981-06-19 1981-06-19 Configuration detecting method

Publications (2)

Publication Number Publication Date
JPS57208404A JPS57208404A (en) 1982-12-21
JPS6322241B2 true JPS6322241B2 (en) 1988-05-11

Family

ID=14093526

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9383881A Granted JPS57208404A (en) 1981-06-19 1981-06-19 Configuration detecting method

Country Status (1)

Country Link
JP (1) JPS57208404A (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60256004A (en) * 1984-06-01 1985-12-17 Matsushita Electric Works Ltd Testing device of soldered condition of chip part
JPS61120006A (en) * 1984-11-16 1986-06-07 Nippon Tsushin Gijutsu Kk Signal detecting method of measuring head
JPS61130808A (en) * 1984-11-30 1986-06-18 Hitachi Ltd Light intercepting line detector
MY137246A (en) 2002-04-30 2009-01-30 Jfe Steel Corp Method and instrument for measuring bead cutting shape of electric welded tube
JP7306867B2 (en) * 2019-04-26 2023-07-11 株式会社キーエンス Optical displacement meter
JP7375458B2 (en) * 2019-10-23 2023-11-08 オムロン株式会社 Appearance inspection equipment and defect inspection method

Also Published As

Publication number Publication date
JPS57208404A (en) 1982-12-21

Similar Documents

Publication Publication Date Title
US4343553A (en) Shape testing apparatus
US5319459A (en) Method and apparatus for checking defect on display screen
US4989082A (en) Image processing system for comparing a test article with a master article to determine that an object is correctly located on the test article
KR100361244B1 (en) Image processing device and method, medium on which program for image processing is stored, and inspecting device
JPH06103165B2 (en) How to measure the height of circuit elements on a board
US7024041B2 (en) Pattern inspection apparatus and method
KR20000071087A (en) Outdoor range finder
US20030117516A1 (en) Monitoring system apparatus and processing method
JPH0810132B2 (en) Target pattern rotation angle detection method
JPS6322241B2 (en)
US4984075A (en) Contour detecting apparatus
JP3263570B2 (en) Automatic focusing device
JPH023121B2 (en)
JPH11112966A (en) Moving object detector, moving object detection method and computer-readable storage medium thereof
JP3283866B2 (en) Circuit pattern defect inspection method and apparatus
JPH05296724A (en) Parts recognition method
JPS624851B2 (en)
JPH0477951B2 (en)
JPH0926313A (en) Object recognition method in visual inspection apparatus for electronic-component mounting board
JPS63186379A (en) Fetching system for binary picture
JPS61126407A (en) Tracking device for moving body using dither method
JPS6312311B2 (en)
JPH0844852A (en) Image processor
JPH01113603A (en) Position detecting apparatus
JPS637321B2 (en)