Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0719290B2 - Appearance inspection device - Google Patents
[go: Go Back, main page]

JPH0719290B2 - Appearance inspection device - Google Patents

Appearance inspection device

Info

Publication number
JPH0719290B2
JPH0719290B2 JP63220701A JP22070188A JPH0719290B2 JP H0719290 B2 JPH0719290 B2 JP H0719290B2 JP 63220701 A JP63220701 A JP 63220701A JP 22070188 A JP22070188 A JP 22070188A JP H0719290 B2 JPH0719290 B2 JP H0719290B2
Authority
JP
Japan
Prior art keywords
image
correction
measurement
area
target portion
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
JP63220701A
Other languages
Japanese (ja)
Other versions
JPH0268677A (en
Inventor
豊 石坂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP63220701A priority Critical patent/JPH0719290B2/en
Publication of JPH0268677A publication Critical patent/JPH0268677A/en
Publication of JPH0719290B2 publication Critical patent/JPH0719290B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention 【産業上の利用分野】[Industrial applications]

この発明は、撮像された物体の画像に基づいてその物体
に属する一以上の対象部分の形状の合否を判定する外観
検査装置に関する。
The present invention relates to a visual inspection apparatus that determines whether or not the shapes of one or more target portions belonging to an object are acceptable based on a captured image of the object.

【従来の技術】[Prior art]

従来、対象物を撮像しその画像に基づいて対象物の形状
検査をするのに、次のような方法が用いられた。たとえ
ば、第7図は撮像視野における対象物の画像を示し、同
図において対象物の画像30が円形であるとする。31,32
はいずれも計測用の領域で、対象物画像30の形状の合否
を判定するためのものである。つまり、領域31は対象物
画像30より所定程度だけ大きい円環状であり、領域32は
対象物画像30より所定程度だけ小さい円形である。領域
31,32における対象物画像30の面積を計測することによ
って、対象物の形状の合否を判定する。すなわち、いず
れかの面積値が所定値以上であれば、不合格とされ、い
ずれの面積値も所定値未満であれば、合格とされる。 ところで、正確な形状判定のためには、対象物画像30の
位置を、領域31,32の位置に正しく対応させる、つまり
同心に位置させなければならない。なお、第7図におい
ては、対象物画像30は基準位置にある、つまり領域31,3
2と同心に位置している。しかし、一般には対象物画像3
0の位置は領域31,32と同心にはならなず、若干ずれるの
が普通である。したがって、そのときには、次に述べる
ように対象物画像30の基準位置からの偏位を求め、これ
に応じて領域31,32の位置を補正する、という対策を講
じることになる。 第8図は対象物画像30の位置ずれ、つまり基準位置から
の偏位を求めるための説明図で、同図において、方形の
領域33,34を対象物画像30の右側端箇所,上側端箇所を
含むように固定して設ける。この領域33,34における対
象物画像30に基づいて、その右側端箇所,上側端箇所の
位置X1,Y1を求める。この位置の求め方は周知のよう
に、対象物画像30の、X軸,Y軸への各射影による。こう
して、この各箇所の、X軸,Y軸方向の基準位置Xo,Yo
(第7図参照)からの偏位Xd(=X1−Xo),Yd(=Y1−Y
o)を求める。次に、この偏位Xd,Ydに応じて領域31,32
を位置補正し、対象物画像30と同心にする。
Conventionally, the following method has been used to image an object and inspect the shape of the object based on the image. For example, FIG. 7 shows an image of an object in the imaging field of view, and in the figure it is assumed that the image 30 of the object is circular. 31,32
Are all areas for measurement, and are for determining whether or not the shape of the object image 30 is acceptable. That is, the region 31 is a ring shape that is larger than the target image 30 by a predetermined amount, and the region 32 is a circle that is smaller than the target image 30 by a predetermined amount. region
By measuring the area of the object image 30 at 31, 32, the pass / fail of the shape of the object is determined. That is, if any one of the area values is equal to or larger than the predetermined value, it is determined to be rejected, and if any of the area values is less than the predetermined value, it is determined to be pass. By the way, in order to accurately determine the shape, the position of the object image 30 must be correctly associated with the positions of the regions 31 and 32, that is, concentric. Incidentally, in FIG. 7, the object image 30 is at the reference position, that is, the areas 31, 3
It is located concentrically with 2. However, in general, the object image 3
The position of 0 does not become concentric with the areas 31 and 32, and is usually slightly shifted. Therefore, at that time, as described below, a measure is taken to find the deviation of the object image 30 from the reference position and correct the positions of the regions 31 and 32 accordingly. FIG. 8 is an explanatory diagram for obtaining the positional deviation of the object image 30, that is, the deviation from the reference position. In FIG. 8, the rectangular regions 33 and 34 are located at the right end portion and the upper end portion of the object image 30. It is fixed so as to include. Based on the object image 30 in the regions 33 and 34, the positions X1 and Y1 of the right end portion and the upper end portion thereof are obtained. As is well known, how to obtain this position is based on the projection of the object image 30 on the X axis and the Y axis. Thus, the reference positions Xo and Yo in the X-axis and Y-axis directions at these points are set.
Deviations from (see Fig. 7) Xd (= X1-Xo), Yd (= Y1-Y)
o) Next, according to this deviation Xd, Yd, the regions 31, 32
Is corrected to be concentric with the object image 30.

【発明が解決しようとする課題】[Problems to be Solved by the Invention]

以上説明したような従来の技術では、以下に述べるよう
な場合に不都合を生じる。いま、物体に属するある部
分、たとえば穴が形状検査の対象であるとき、この穴に
対し従来例における領域33,34に相当する補正用の領域
を設けるようにしても、物体の比較的わずかな位置変化
で、補正用領域は対象である穴から外れてしまい、偏位
に基づく計測用領域の位置補正ができなくなる。言いか
えれば、対象部分の大きさに比べて物体の位置変化(移
動の程度)が大きいときには、従来方法による対象部分
の外観検査は不可能となる。 さらに一般的には、撮像視野内で物体が基準位置より多
少移動したり、物体寸法が基準より多少変化したり、ま
た対象部分が複数のときのこれら相互の位置関係に基準
より多少変化があったりすると、対象部分の形状の正し
い合否判定ができない。しかも、以上のような物体の基
準位置や基準寸法からの変化は決して特殊なことではな
く、むしろ普通に起こり得るものである。 この発明の課題は、従来の技術がもつ以上の問題点を解
消し、物体位置や物体寸法に変化が多少あっても、また
対象部分が複数のときのこれら相互の位置関係に変化が
多少あっても、対象部分の形状の正確な合否判定ができ
る外観検査装置を提供することにある。
The conventional technique described above causes inconveniences in the following cases. Now, when a portion belonging to the object, such as a hole, is the object of shape inspection, even if a correction area corresponding to the areas 33 and 34 in the conventional example is provided for this hole, a relatively small amount of the object Due to the position change, the correction area is displaced from the target hole, and the position of the measurement area based on the displacement cannot be corrected. In other words, when the position change (the degree of movement) of the object is large compared to the size of the target portion, visual inspection of the target portion by the conventional method becomes impossible. More generally, the object moves slightly from the reference position within the imaging field of view, the object size changes slightly from the reference position, and the mutual positional relationship when there are multiple target parts changes slightly from the reference. If so, the correct pass / fail judgment of the shape of the target portion cannot be made. Moreover, the change from the reference position or the reference size of the object as described above is not a special matter, but rather can occur normally. The problem to be solved by the present invention is to solve the above problems of the conventional technique, and even if there are some changes in the object position and the object size, there are some changes in the mutual positional relationship when there are a plurality of target parts. However, it is still another object of the present invention to provide an appearance inspection device capable of accurately determining whether the shape of a target portion is acceptable or not.

【課題を解決するための手段】[Means for Solving the Problems]

この課題を解決するために、本発明は、 撮像された物体の画像に基づいてその物体に属する複数
の対象部分の形状の合否を判定する装置において、前記
各対象部分のそれぞれの形状に応じた複数の計測領域を
発生させる計測領域発生手段と、前記物体の全体の画像
を包含する固定の補正領域と、前記各対象部分およびこ
れと所定の位置関係にある前記物体の所定関係箇所の画
像を含むように前記固定補正領域内を移動可能な複数の
補正領域とを発生させる補正領域発生手段と、前記固定
補正領域内の物体の全体画像について重心検出を行うこ
とにより前記物体の基準位置からの偏位置を求め、この
第1の偏位置に応じて前記複数の移動可能補正領域それ
ぞれの発生位置を補正し、ついで、複数の移動可能補正
領域のそれぞれに含まれる画像について端点検出を行う
ことにより前記物体の所定関係箇所の基準位置からの偏
位置をそれぞれ求め、この第2の偏位置に応じて前記複
数の計測領域の発生位置を補正する位置補正手段と、前
記各計測領域における前記対象部分の画像の特徴量を求
める特徴量計測手段とを備えてなり、前記位置補正手段
により得られる前記第1,第2の偏位置に基づいて前記複
数の計測領域の発生位置をそれぞれ補正したのち、前記
特徴量計測手段から出力される結果に基づいて前記各対
象部分の形状の合否を判定するようにしたことを特徴と
する。
In order to solve this problem, the present invention relates to an apparatus for determining the pass / fail of the shapes of a plurality of target portions belonging to an object based on an imaged image of the object. A measurement area generating means for generating a plurality of measurement areas, a fixed correction area including the entire image of the object, an image of each target portion and a predetermined relationship portion of the object having a predetermined positional relationship with the target portion are displayed. A correction area generation unit that generates a plurality of correction areas that can move in the fixed correction area so as to include a center of gravity detection for the entire image of the object in the fixed correction area The eccentric position is obtained, the generation positions of the plurality of movable correction areas are corrected according to the first eccentric position, and then the images included in each of the plurality of movable correction areas are corrected. Then, the end point detection is performed to obtain a deviation position of the predetermined relational part of the object from the reference position, and position correction means for correcting the generation positions of the plurality of measurement regions according to the second deviation position, And a feature amount measuring unit that obtains a feature amount of the image of the target portion in each measurement region, and the generation of the plurality of measurement regions based on the first and second offset positions obtained by the position correction unit. After correcting the respective positions, it is characterized in that the pass / fail of the shape of each target portion is determined based on the result output from the feature amount measuring means.

【作用】[Action]

計測領域発生手段によって、対象部分の画像に対応して
計測領域が発生し、また補正領域発生手段によって、物
体を含む固定補正領域と、各対象部分的およびこれと所
定の位置関係にある物体の所定関係箇所を含む各移動可
能補正領域とが発生する。そして、位置補正手段によっ
て、固定補正領域に含まれる物体の所定箇所の基準位置
からの偏位に応じて各移動可能補正領域の位置が補正さ
れ、かつこの各移動可能補正領域に含まれる所定関係箇
所の基準位置からの偏位に応じて各計測領域の位置が補
正される。次に、特徴量計測手段によって、計測領域に
おける対象部分の画像の特徴量が求められ、この特徴量
値に基づき対象部分の形状の合否が判定される。
The measurement area generation means generates a measurement area corresponding to the image of the target portion, and the correction area generation means generates a fixed correction area including the object, each target partial and an object in a predetermined positional relationship with the fixed correction area. Each movable correction area including a predetermined related portion is generated. Then, the position correction means corrects the position of each movable correction area according to the deviation of the predetermined position of the object included in the fixed correction area from the reference position, and the predetermined relationship included in each movable correction area. The position of each measurement region is corrected according to the deviation of the location from the reference position. Next, the feature amount measuring means obtains the feature amount of the image of the target portion in the measurement region, and based on this feature amount value, the pass / fail of the shape of the target portion is determined.

【実施例】【Example】

本発明に係る外観検査装置の実施例について以下に図面
を参照しながら説明する。ところで、この実施例の要点
は、物体に属する検査対象部分の画像に対応する計測領
域を、対象部分の位置の変化に応じて位置補正するため
に、補正領域を対象部分に対応して設けるのではなく、
対象部分と所定の位置関係にある物体の所定関係箇所に
対応して設けることにある。 この実施例の構成について、そのブロック図である第1
図を参照しながら説明する。同図において、1は撮像用
のTVカメラ、2はTVカメラ1の映像信号をディジタル化
するA/Dコンバータ、3はA/Dコンバータ2の出力を所定
しきい値に基づいて2値化する2値化回路、4は2値化
回路3の出力データを格納する画像メモリである。 5は計測領域発生回路で、対象部分の形状を計測するた
めに対象部分に対応して計測領域を発生させる。6は補
正領域発生回路で、詳しくは後述するように、物体の所
定箇所の位置の変化を計測するために所定箇所に対応し
て2種類の補正領域を発生させる。7は位置補正回路
で、先程の補正領域に基づいて得られた対象箇所の位置
の変化に応じて計測領域の位置を補正する。 8は面積計測回路で、計測領域における対象部分の面積
を計測する。9は判定回路で、面積計測回路8の出力で
ある面積値に基づいて対象部分の形状の合否を判定す
る。 次に、この実施例の動作について、フローチャートであ
る第4図を主に、各々撮像視野を示す第2図,第3図を
補助的にそれぞれ参照しながら説明する。第4図におい
て、ステップS1で、領域W1を発生させ、ステップS2で、
撮像視野における計測時の物体画像の重心である点Gの
座標X1,Y1を求める。ステップS3,S4で、それぞれ領域W
2,W3を発生させる。ステップS5で、物体画像の上側端で
ある点P2のY座標Y2を求める。ステップS6で、同じく物
体画像の右側端である点P3のX座標X3を求める。 さて、以上の内容について第2図,第3図を参照しなが
ら補足的に説明する。第2図はこの実施例において物体
画像10が基準位置にあるときの撮像視野の説明図、第3
図はこの物体画像10が偏位しているときの撮像視野の説
明図である。11は一つの対象部分の画像、12は別の対象
部分の画像である。W6,W7はそれぞれ対象部分画像11に
対応する計測領域で、従来例における領域31,32に相当
する(第7図参照)。同様に、W8,W9はそれぞれ対象部
分画像12に対応する計測領域である。 点Gは物体画像10の重心で、発明における所定箇所であ
る。点P2は物体画像10の上側端で、発明における所定関
係箇所の一つである。また、点P3は物体画像10の右側端
で、発明における所定関係箇所の別の一つである。 W1は、重心Gに対応して設けられ物体画像10を余裕をも
って含む固定の補正領域、W2は、点P2に対応して設けら
れ物体画像10の上側端部を余裕をもって含む移動可能な
補正領域、W3は、点P3に対応して設けられ物体画像10の
右側端部を余裕をもって含む別の移動可能な補正領域で
ある。さて、第2図において、重心G,点P2,点P3の基準
位置での各座標を、(Xs1,Ys1),(Xs1,Ys2),(Xs3,
Ys1)とする。 計測領域W6,W7の位置補正は、点P2のX,Y各座標の基準位
置からの偏位に応じて、また同様に、計測領域W8,W9の
位置補正は、点P3のX,Y各座標の基準位置からの偏位に
応じてなされる。なお、この場合、点P2のX座標は重心
Gのそれで代用され、点P3のY座標は重心Gのそれで代
用される。 第3図において、物体画像10が、第2図で示した基準位
置にあるときより相似的に若干拡大され、かつ偏位して
いる。このときの重心G,点P2,点P3の各座標が、(X1,Y
1),(X1,Y2),(X3,Y1)である。 第4図に戻り、ステップS7とステップS8とで、点P2の、
X方向の基準位置からの偏位(X1−Xs1),Y方向の基準
位置からの偏位(Y2−Ys2)と、点P3の、X方向の偏位
(X3−Xs3),Y方向の偏位(Y1−Ys1)とが求められる。
なお、重心G,点P2,点P3の基準位置での各座標は、それ
を求めるためのステップが第4図では省略されている
が、あらかじめ求められているものとする。 ステップS9で、計測領域W6,W7を位置補正回路7(第1
図参照)により、点P2のX,Y各方向の基準位置からの偏
位(X1−Xs1),(Y2−Ys2)に対応させて位置補正す
る。同様に、ステップS10で、計測領域W8,W9を位置補正
回路7によって、点P3のX,Y各方向の基準位置からの偏
位(X3−Xs3),(Y1−Ys1)に対応させて位置補正す
る。 ステップS11,S12,S13,S14で、それぞれ計測領域W6につ
いて面積計測値A6、計測領域W7について面積計測値A7、
計測領域W8について面積計測値A8、計測領域W9について
面積計測値A9がそれぞれ求められる。なお、この各面積
計測は第1図の面積計測回路8によってなされる。 以下は各面積計測値に基づく判定処理で、ステップS15
〜S18において対象部分画像11の形状の合否が、ステッ
プS19〜S22において対象部分画像12の形状の合否が、そ
れぞれ判定される。なお、この判定処理は第1図の判定
回路9によってなされ、またaは面積計測値に対して定
められる所定の許容値である。 さて次に、別の物体に属する対象部分についての形状判
定に関して以下に図面を参照しながら説明する。第5図
は別の物体が基準位置にあるときの撮像視野の説明図、
第6図はこの別の物体が偏位しているときの撮像視野の
説明図である。20はこの別の物体の画像、21,22,23,24
はそれぞれ対象部分の画像で、物体の縦,横各側端近傍
にあけられた穴に対応する。なお、各穴は概略的に第2
図,第3図におけるのと同じである。 この場合、計測領域は、対象部分画像21,22,23,24に対
応して設けられたW6,W7;W8,W9;W10,W11;W12,W13であ
る。所定箇所は、物体画像20の重心Gであり、所定関係
箇所は、上側端P2,右側端P3,下側端P4,左側端P5であ
る。また、固定補正領域は、重心Gに対応して設けられ
る領域W1であり、移動可能補正領域は、上側端P2,右側
端P3,下側端P4,左側端P5に対応して設けられる領域W2,W
3,W4,W5である。 計測領域W6,W7;W8,W9の位置補正は第2図,第3図にお
けるのと同じである。また、計測領域W10,W11;W12,W13
の位置補正はそれぞれ、点P4;P5のX,Y各座標の基準位置
からの偏位に応じてなされる。なお、この場合、点P4の
X座標は重心Gのそれで代用され、点P5のY座標は重心
Gのそれで代用されることになる。 したがって、対象部分画像21,22,23,24の形状の合否判
定は、先程の各位置補正された計測領域に基づいて第4
図のフローチャートのステップS15〜S22に準じておこな
われることになる。 また、以上の実施例の説明では、特徴量として面積値を
示しているが、他の特徴量、例えば周囲長等を用いても
良いことは勿論である。 以上の説明から明らかなように、第2図,第3図や、第
5図,第6図における物体に属する各対象部分の形状の
合否は、対象部分が物体の所定関係箇所との位置関係を
維持する限り、物体の位置や物体寸法に基準よりの変化
が多少あっても、正確に判定される。また、対象部分が
複数個、たとえば2個または4個あるときに、これら対
象部分相互間の位置関係に、基準より多少変化があって
も、各対象部分の形状が正確に検査される。 ところで、以上は、装置を対象部分の形状に関する外観
検査装置として説明した。しかし一般的に、この発明装
置は、対象部分が欠けや傷のときには、その外観に基づ
く欠陥検査装置となり、なまた対象部分が文字や未知物
体のときには、その形状に基づく対象認識装置となる。
An embodiment of a visual inspection apparatus according to the present invention will be described below with reference to the drawings. By the way, the point of this embodiment is to provide a correction region corresponding to the target portion in order to correct the position of the measurement region corresponding to the image of the inspection target portion belonging to the object in accordance with the change in the position of the target portion. not,
It is provided corresponding to a predetermined relation part of the object having a predetermined positional relationship with the target portion. FIG. 1 is a block diagram of a configuration of this embodiment.
Description will be given with reference to the drawings. In the figure, 1 is a TV camera for imaging, 2 is an A / D converter for digitizing the video signal of the TV camera 1, and 3 is binarization of the output of the A / D converter 2 based on a predetermined threshold value. The binarization circuits 4 and 4 are image memories for storing the output data of the binarization circuit 3. Reference numeral 5 denotes a measurement area generation circuit, which generates a measurement area corresponding to the target portion in order to measure the shape of the target portion. Reference numeral 6 denotes a correction area generation circuit, which generates two types of correction areas corresponding to a predetermined location in order to measure a change in the position of the predetermined location of the object, as will be described later in detail. A position correction circuit 7 corrects the position of the measurement region according to the change in the position of the target portion obtained based on the correction region described above. An area measuring circuit 8 measures the area of the target portion in the measurement area. A determination circuit 9 determines whether or not the shape of the target portion is acceptable based on the area value output from the area measurement circuit 8. Next, the operation of this embodiment will be described mainly with reference to the flowchart of FIG. 4 and supplementarily referring to FIGS. In FIG. 4, in step S1, a region W1 is generated, and in step S2,
The coordinates X1, Y1 of the point G, which is the center of gravity of the object image at the time of measurement in the imaging visual field, are obtained. In steps S3 and S4, the area W
Generates 2, W3. In step S5, the Y coordinate Y2 of the point P2, which is the upper end of the object image, is obtained. In step S6, the X coordinate X3 of the point P3, which is also the right end of the object image, is obtained. Now, the above contents will be supplementarily described with reference to FIG. 2 and FIG. FIG. 2 is an explanatory view of an imaging visual field when the object image 10 is at the reference position in this embodiment, and FIG.
The figure is an explanatory view of the imaging field of view when the object image 10 is deviated. 11 is an image of one target portion, and 12 is an image of another target portion. W6 and W7 are measurement areas corresponding to the target partial image 11, and correspond to areas 31 and 32 in the conventional example (see FIG. 7). Similarly, W8 and W9 are measurement regions corresponding to the target partial image 12, respectively. A point G is the center of gravity of the object image 10 and is a predetermined position in the invention. The point P2 is the upper end of the object image 10 and is one of the predetermined related places in the invention. Further, the point P3 is the right end of the object image 10 and is another one of the predetermined related parts in the invention. W1 is a fixed correction area provided corresponding to the center of gravity G and including the object image 10 with a margin, and W2 is a movable correction area provided corresponding to the point P2 and including an upper end portion of the object image 10 with a margin. , W3 is another movable correction area provided corresponding to the point P3 and including the right end portion of the object image 10 with a margin. Now, in FIG. 2, the coordinates of the center of gravity G, the point P2, and the point P3 at the reference position are (Xs1, Ys1), (Xs1, Ys2), (Xs3,
Ys1). The position correction of the measurement regions W6, W7 is performed according to the deviation of the X, Y coordinates of the point P2 from the reference position, and similarly, the position correction of the measurement regions W8, W9 is performed for the X, Y points of the point P3. It is done according to the deviation of the coordinates from the reference position. In this case, the X coordinate of the point P2 is substituted by that of the center of gravity G, and the Y coordinate of the point P3 is substituted by that of the center of gravity G. In FIG. 3, the object image 10 is slightly enlarged and deviated in a similar manner to that at the reference position shown in FIG. At this time, the coordinates of the center of gravity G, point P2, and point P3 are (X1, Y
1), (X1, Y2), and (X3, Y1). Returning to FIG. 4, at step S7 and step S8, at point P2,
Deviation from the reference position in the X direction (X1-Xs1), deviation from the reference position in the Y direction (Y2-Ys2), and deviation of the point P3 in the X direction (X3-Xs3), Y direction deviation Rank (Y1-Ys1) is required.
It should be noted that the coordinates of the center of gravity G, the point P2, and the point P3 at the reference position are obtained in advance, although the step for obtaining them is omitted in FIG. In step S9, the measurement areas W6 and W7 are set to the position correction circuit 7 (first
The position is corrected in accordance with the deviations (X1-Xs1) and (Y2-Ys2) of the point P2 from the reference position in the X and Y directions. Similarly, in step S10, the measurement areas W8 and W9 are positioned by the position correction circuit 7 in correspondence with the deviations (X3-Xs3) and (Y1-Ys1) of the point P3 from the reference positions in the X and Y directions. to correct. In steps S11, S12, S13, S14, the area measurement value A6 for the measurement region W6, the area measurement value A7 for the measurement region W7,
The area measurement value A8 is obtained for the measurement region W8, and the area measurement value A9 is obtained for the measurement region W9. Note that each area measurement is performed by the area measurement circuit 8 in FIG. The following is the determination process based on each area measurement value, and step S15
The pass / fail of the shape of the target partial image 11 is determined in steps S18 to S18, and the pass / fail of the shape of the target partial image 12 is determined in steps S19 to S22. Note that this determination processing is performed by the determination circuit 9 in FIG. 1, and a is a predetermined allowable value set for the area measurement value. Next, the shape determination of the target portion belonging to another object will be described below with reference to the drawings. FIG. 5 is an explanatory view of an imaging visual field when another object is at the reference position,
FIG. 6 is an explanatory diagram of the imaging visual field when the other object is deviated. 20 is an image of this other object, 21,22,23,24
Is an image of the target part, and corresponds to the holes formed near the side edges of the object. Each hole is roughly second
This is the same as in FIGS. In this case, the measurement area is W6, W7; W8, W9; W10, W11; W12, W13 provided corresponding to the target partial images 21, 22, 23, 24. The predetermined position is the center of gravity G of the object image 20, and the predetermined related positions are the upper end P2, the right end P3, the lower end P4, and the left end P5. The fixed correction region is a region W1 provided corresponding to the center of gravity G, and the movable correction region is a region W2 provided corresponding to the upper end P2, the right end P3, the lower end P4, and the left end P5. , W
They are 3, W4, W5. The position correction of the measurement areas W6, W7; W8, W9 is the same as that in FIGS. Also, the measurement area W10, W11; W12, W13
Is corrected in accordance with the deviation of the X and Y coordinates of the points P4; P5 from the reference position. In this case, the X coordinate of the point P4 is substituted with that of the center of gravity G, and the Y coordinate of the point P5 is substituted with that of the center of gravity G. Therefore, the pass / fail judgment of the shapes of the target partial images 21, 22, 23, and 24 is made based on the position-corrected measurement regions described above.
It will be performed according to steps S15 to S22 of the flowchart in the figure. Further, in the above description of the embodiments, the area value is shown as the characteristic amount, but it goes without saying that another characteristic amount, for example, a perimeter or the like may be used. As is apparent from the above description, the pass / fail of the shape of each target portion belonging to the object in FIGS. 2 and 3 and FIGS. 5 and 6 is determined by the positional relationship between the target portion and the predetermined relationship part of the object. As long as the above condition is maintained, even if there is a slight change from the reference in the position of the object or the size of the object, it is accurately determined. Further, when there are a plurality of target portions, for example, two or four, the shapes of the respective target portions are accurately inspected even if the positional relationship between these target portions changes slightly from the reference. By the way, the above has described the apparatus as an appearance inspection apparatus for the shape of the target portion. However, in general, the device of the present invention serves as a defect inspection device based on the appearance of the target portion when the target portion is defective or scratched, and serves as a target recognition device based on the shape of the target portion when the target portion is a character or an unknown object.

【発明の効果】【The invention's effect】

この発明によれば、従来の技術に比べ次のようなすぐれ
た効果がある。 (1)物体位置や物体寸法に基準より多少変化があって
も、対象部分の形状が正確に検査される。 (2)対象部分が複数個あるときに、これら対象部分相
互間の位置関係に、基準より多少変化があっても、各対
象部分の形状が正確に検査される。
The present invention has the following excellent effects as compared with the conventional technology. (1) Even if the object position or the object size is slightly changed from the reference, the shape of the target portion is accurately inspected. (2) When there are a plurality of target portions, the shape of each target portion can be accurately inspected even if the positional relationship between the target portions changes slightly from the reference.

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

第1図は本発明に係る実施例の構成を示すブロック図、 第2図はこの実施例において一物体が基準位置にあると
きの撮像視野の説明図、 第3図はこの一物体が偏位しているときの撮像視野の説
明図、 第4図はこの実施例の動作を示すフローチャート、 第5図は別の物体が基準位置にあるときの撮像視野の説
明図、 第6図はこの別の物体が偏位しているときの撮像視野の
説明図、 第7図は従来例において対象物が基準位置にあるときの
撮像視野の説明図、 第8図はこの対象物が偏位しているときの偏位の求め方
の説明図である。 符号説明 1:TVカメラ、2:A/Dコンバータ、3:2値化回路、4:画像メ
モリ、5:計測領域発生回路、6:補正領域発生回路、7:位
置補正回路、8:面積計測回路、9:判定回路。
FIG. 1 is a block diagram showing a configuration of an embodiment according to the present invention, FIG. 2 is an explanatory view of an imaging visual field when one object is at a reference position in this embodiment, and FIG. 4 is a flow chart showing the operation of this embodiment, FIG. 5 is an explanatory view of the imaging field of view when another object is at the reference position, and FIG. 7 is an explanatory view of an imaging visual field when the object is displaced, FIG. 7 is an explanatory view of an imaging visual field when the object is at the reference position in the conventional example, and FIG. It is an explanatory view of how to obtain the deviation when there is. Code Description 1: TV camera, 2: A / D converter, 3: Binarization circuit, 4: Image memory, 5: Measurement area generation circuit, 6: Correction area generation circuit, 7: Position correction circuit, 8: Area measurement Circuit, 9: Judgment circuit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】撮像された物体の画像に基づいてその物体
に属する複数の対象部分の形状の合否を判定する装置に
おいて、 前記各対象部分のそれぞれの形状に応じた複数の計測領
域を発生させる計測領域発生手段と、 前記物体の全体の画像を包含する固定の補正領域と、前
記各対象部分およびこれと所定の位置関係にある前記物
体の所定関係箇所の画像を含むように前記固定補正領域
内を移動可能な複数の補正領域とを発生させる補正領域
発生手段と、 前記固定補正領域内の物体の全体画像について重心検出
を行うことにより前記物体の基準位置からの偏位置を求
め、この第1の偏位量に応じて前記複数の移動可能補正
領域それぞれの発生位置を補正し、ついで、複数の移動
可能補正領域のそれぞれに含まれる画像ついて端点検出
を行うことにより前記物体の所定関係箇所の基準位置か
らの偏位量をそれぞれ求め、この第2の偏位量に応じて
前記複数の計測領域の発生位置を補正する位置補正手段
と、 前記各計測領域における前記対象部分の画像の特徴量を
求める特徴量計測手段とを備え、 前記位置補正手段により得られる前記第1,第2の偏位量
に基づいて前記複数の計測領域の発生位置をそれぞれ補
正したのち、前記特徴量計測手段から出力される結果に
基づいて前記各対象部分の形状の合否を判定するように
したことを特徴とする外観検査装置。
1. An apparatus for determining whether a shape of a plurality of target portions belonging to the object is acceptable based on an image of an imaged object, wherein a plurality of measurement regions corresponding to the respective shapes of the respective target portions are generated. Measurement area generating means, a fixed correction area including the entire image of the object, the fixed correction area so as to include an image of each target portion and a predetermined relational portion of the object in a predetermined positional relationship with the target portion. A correction area generating means for generating a plurality of correction areas movable in the inside, and a center of gravity detection for the entire image of the object in the fixed correction area to obtain an offset position from the reference position of the object, Correcting the generation position of each of the plurality of movable correction areas according to the deviation amount of 1, and then detecting the end point of the image included in each of the plurality of movable correction areas. From each of the measurement regions, a position correction unit that obtains the displacement amount from the reference position of the predetermined relational location of the object and corrects the generation positions of the plurality of measurement regions according to the second displacement amount. And a feature amount measuring unit that obtains a feature amount of the image of the target portion, and corrects the generation positions of the plurality of measurement regions based on the first and second displacement amounts obtained by the position correcting unit. After that, the appearance inspection apparatus is characterized in that whether or not the shape of each of the target portions is acceptable is determined based on the result output from the feature amount measuring means.
JP63220701A 1988-09-03 1988-09-03 Appearance inspection device Expired - Lifetime JPH0719290B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63220701A JPH0719290B2 (en) 1988-09-03 1988-09-03 Appearance inspection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63220701A JPH0719290B2 (en) 1988-09-03 1988-09-03 Appearance inspection device

Publications (2)

Publication Number Publication Date
JPH0268677A JPH0268677A (en) 1990-03-08
JPH0719290B2 true JPH0719290B2 (en) 1995-03-06

Family

ID=16755139

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63220701A Expired - Lifetime JPH0719290B2 (en) 1988-09-03 1988-09-03 Appearance inspection device

Country Status (1)

Country Link
JP (1) JPH0719290B2 (en)

Also Published As

Publication number Publication date
JPH0268677A (en) 1990-03-08

Similar Documents

Publication Publication Date Title
CA2889886A1 (en) System and method of adaptive color correction for pill recognition in digital images
JPH077446B2 (en) Part recognition method
JPH08292014A (en) Measuring method of pattern position and device thereof
JPH1117400A (en) Packaging part/inspecting device
JPH0719290B2 (en) Appearance inspection device
KR910004781B1 (en) Image processing method
JPH1091788A (en) Device for positioning pattern and method therefor
JPH0719291B2 (en) Appearance inspection device
JP2000180138A (en) Calibration plate and calibration device for visual sensor using the same
JPH02230381A (en) Work inspecting device
JPH038505B2 (en)
JP2942343B2 (en) Inspection equipment for printed wiring boards
JPH05281151A (en) Wafer pattern inspection device
JP4130848B2 (en) Pixel inspection method and pixel inspection apparatus
JPH0524669B2 (en)
JPH03158710A (en) Image data generating device
JPH01318169A (en) Corner correcting device
JPH04269606A (en) Part detecting apparatus
JPH076774B2 (en) Three-dimensional shape measuring device by optical cutting method
JPS61239147A (en) Split inspecting method by image processing
JPH0198076A (en) Pattern detecting device
JPH0520458A (en) Corner position detection method
JPS5942904B2 (en) Pattern defect detection method
JP2963773B2 (en) Pattern matching device
JPH0738224B2 (en) Model determination device