JP3456096B2 - Shape inspection method - Google Patents
Shape inspection methodInfo
- Publication number
- JP3456096B2 JP3456096B2 JP19594996A JP19594996A JP3456096B2 JP 3456096 B2 JP3456096 B2 JP 3456096B2 JP 19594996 A JP19594996 A JP 19594996A JP 19594996 A JP19594996 A JP 19594996A JP 3456096 B2 JP3456096 B2 JP 3456096B2
- Authority
- JP
- Japan
- Prior art keywords
- contour line
- shape
- image
- points
- inspection
- 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 - Fee Related
Links
- 238000007689 inspection Methods 0.000 title claims description 100
- 238000000034 method Methods 0.000 title claims description 18
- 230000002950 deficient Effects 0.000 description 8
- 230000007547 defect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000002372 labelling Methods 0.000 description 3
- 230000001186 cumulative effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005286 illumination Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 239000000428 dust Substances 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
Landscapes
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
- Image Processing (AREA)
Description
【0001】[0001]
【発明の属する技術分野】本発明は画像入力手段を用い
た形状検査方法に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a shape inspection method using image input means.
【0002】[0002]
【従来の技術】画像入力手段を用いた形状検査方法とし
ては、パターンマッチングによる形状検査が一般的であ
る。この場合、予め登録しておいた基準画像と被検査物
の画像とを比較して良否を判定する。2. Description of the Related Art As a shape inspection method using an image input means, a shape inspection by pattern matching is generally used. In this case, the reference image registered in advance and the image of the inspection object are compared to determine pass / fail.
【0003】[0003]
【発明が解決しようとする課題】この場合、基準画像を
予め登録しておかなくてはならない上に、パターンマッ
チングはその良否の判定段階に至るまでに時間がかか
る。本発明はこのような点に鑑み為されたものであり、
その目的とするところは被検査物の形状が既知であれば
基準画像の登録を必要とすることなく良否を判定するこ
とができる形状検査方法を提供するにある。In this case, the reference image must be registered in advance, and it takes time for the pattern matching to reach the quality judgment stage. The present invention has been made in view of these points,
It is an object of the invention to provide a shape inspection method capable of determining pass / fail without having to register a reference image if the shape of the inspection object is known.
【0004】[0004]
【課題を解決するための手段】しかして本発明の請求項
1記載の発明は、形状が既知である被検査物の形状検査
方法であって、画像入力手段によって得た被検査物の画
像から輪郭線を抽出し、該輪郭線上の複数ポイントの座
標を求めて該座標から既知形状を表すとともに輪郭線に
合致すべき式を導き、該式に所定のオフセット値を加え
ることで既知形状と相似で且つ輪郭線と大きさの異なる
検査基準線を求めて、この検査基準線と輪郭線との隙間
の面積を基に被検査物の形状の良否を判定することに特
徴を有している。The invention according to claim 1 of the present invention is a shape inspection method for an object to be inspected whose shape is already known. The contour line is extracted, the coordinates of a plurality of points on the contour line are obtained, a known shape is expressed from the coordinates, and an equation that should match the contour line is derived, and a predetermined offset value is added to the equation.
In this way, an inspection reference line similar to the known shape and different in size from the contour line is obtained, and the quality of the shape of the inspection object is determined based on the area of the gap between the inspection reference line and the contour line. It has features.
【0005】また請求項2に記載の発明は、形状が既知
である被検査物の形状検査方法であって、画像入力手段
によって得た被検査物の画像から輪郭線を抽出し、該輪
郭線上の複数ポイントの座標を求めて該座標から既知形
状を表すとともに輪郭線に合致すべき式を導き、該式に
所定のオフセット値を加えることで既知形状と相似で且
つ輪郭線と大きさがわずかに異なる検査基準線を求め
て、この検査基準線上の画像の濃淡を基に被検査物の形
状の良否を判定することに特徴を有している。According to a second aspect of the present invention, there is provided a shape inspection method of an object whose shape is already known, wherein a contour line is extracted from an image of the object to be inspected obtained by the image input means, and the contour line is extracted. The coordinates of a plurality of points are obtained, the known shape is expressed from the coordinates, and the formula that should match the contour line is derived .
By adding a predetermined offset value, an inspection reference line that is similar to the known shape and slightly different in size from the contour line is obtained, and the quality of the shape of the inspection object is judged based on the shade of the image on this inspection reference line. It is characterized by
【0006】また請求項3に記載の発明は、形状が既知
である被検査物の形状検査方法であって、画像入力手段
によって得た被検査物の画像から輪郭線を抽出し、該輪
郭線上の複数ポイントの座標を求めて該座標から既知形
状を表すとともに輪郭線に合致すべき式を導き、該式に
所定のオフセット値を加えることで既知形状と相似で且
つ輪郭線と大きさの異なる検査基準線を求めて、この検
査基準線の複数点から輪郭線に向けてエッジ検索を行っ
て各点から輪郭線までの距離を夫々求め、該距離を基に
被検査物の形状の良否を判定することに特徴を有してい
る。According to a third aspect of the present invention, there is provided a shape inspection method for an object whose shape is known, wherein a contour line is extracted from an image of the object to be inspected obtained by the image input means, and the contour line is extracted. The coordinates of a plurality of points are obtained, the known shape is expressed from the coordinates, and the formula that should match the contour line is derived .
By adding a predetermined offset value, an inspection reference line that is similar to the known shape and has a different size from the contour line is obtained, and an edge search is performed from multiple points of this inspection reference line toward the contour line to obtain the contour from each point. The feature is that each distance to the line is obtained and whether the shape of the inspection object is good or bad is determined based on the distance.
【0007】[0007]
【0008】上記の各発明において、既知形状が矩形で
ある場合は、得られた画像に対して上下から2点ずつ、
左右から2点ずつの総計8点のエッジ検索を行って輪郭
線上の8ポイントの座標を求め、既知形状を表すととも
に輪郭線に合致すべき式として、上記8ポイントの座標
から4つの辺の直線方程式とこれら直線が交わる4点の
座標を求めるとよく、また既知形状が真円である場合
は、得られた画像に対して3点のエッジ検索を行って輪
郭線上の3ポイントの座標を求め、既知形状を表すとと
もに輪郭線に合致すべき式として、上記3ポイントの座
標を通る仮想円の式を求めるとよい。In each of the above inventions, when the known shape is a rectangle, two points from the top and bottom of the obtained image,
A total of 8 points are searched from the left and right to find the coordinates of 8 points on the contour line, and the equations that represent the known shape and should match the contour line are straight lines of 4 sides from the coordinates of the 8 points. It is advisable to find the coordinates of the four points where the equation and these straight lines intersect, and if the known shape is a perfect circle, search the edges of the obtained image to find the coordinates of the three points on the contour line. As a formula that represents a known shape and that should match the contour line, a formula of a virtual circle that passes through the coordinates of the three points may be obtained.
【0009】被検査物を複数画像に分割し、各画像に対
して輪郭線を抽出するようにしてもよい。いずれにして
も、本発明においては、形状や大きさが既知であること
を利用してパターンマッチングを行うことなく形状の良
否を判定することができる。The inspection object may be divided into a plurality of images, and the contour line may be extracted from each image. In any case, in the present invention, it is possible to determine the quality of the shape without performing pattern matching by utilizing the fact that the shape and size are known.
【0010】[0010]
【発明の実施の形態】まず被検査物1が4つのコーナー
部がいずれも直角となっている矩形であることがわかっ
ている場合について説明すると、図2に示すように、C
CDカメラのような撮像手段10によって照明11で照
らされた被検査物1の撮像を行う。図3(a)は得られた
画像を示しており、図中21は検査領域、22は被検査
物像である。BEST MODE FOR CARRYING OUT THE INVENTION First, a case where it is known that the object 1 to be inspected is a rectangle in which all four corners are at right angles will be described. As shown in FIG.
An image of the inspection object 1 illuminated by the illumination 11 is captured by the image capturing means 10 such as a CD camera. FIG. 3A shows the obtained image. In the figure, 21 is the inspection region and 22 is the image of the inspection object.
【0011】こうして得られた画像に対して、まずは図
3(b)に示すように検査領域21の上辺部2点と下辺部
2点とから上下方向中央に向かって被検査物像22のエ
ッジを検索する。この時、4点のエッジを検索できなか
った場合は、上記各2点の間隔乃至左右位置を変えて検
索を行う。検索走査は濃度の変化率に相当する微分絶対
値をしきい値処理したエッジ画像を利用し、検索ライン
上を走査してエッジフラグを見つけ、その微分値が所定
の値を越えていればそのアドレスをポイントとする。With respect to the image thus obtained, first, as shown in FIG. 3B, the edges of the image 22 of the object to be inspected from the upper two points and the lower two points of the inspection region 21 toward the center in the vertical direction. To search. At this time, if the four edges cannot be searched, the search is performed by changing the interval between the two points or the left and right positions. The search scan uses an edge image thresholded with a differential absolute value corresponding to the density change rate, scans the search line to find an edge flag, and if the differential value exceeds a predetermined value, The address is the point.
【0012】こうして被検査物像22の輪郭線の上辺の
2ポイントa,bと下辺の2ポイントc,dを検索した
ならば、次にこれら4ポイントの座標をもとに図3(c)
に示すように検査領域21の左右辺における検索開始点
を決定し、左右の各辺2点から左右方向中央に向けて被
検査物像22のエッジを検索して、被検査物像22の輪
郭線の左辺の2ポイントe,fと右片の2ポイントg,
hの座標を求める。In this way, if the upper two points a and b and the lower two points c and d of the contour line of the inspection object image 22 are searched, then, based on the coordinates of these four points, FIG.
The search start points on the left and right sides of the inspection area 21 are determined, and the edges of the inspection object image 22 are searched from the two points on each of the left and right sides toward the center in the left-right direction, and the outline of the inspection object image 22 is determined. 2 points e and f on the left side of the line and 2 points g on the right side,
Find the coordinates of h.
【0013】このようにして一辺について2ポイントの
総計8ポイントの座標を求めたならば、被検査物像22
の輪郭線の各辺の直線方程式を上記ポイントの座標から
求め、更に4つの直線方程式より各直線の交点、つまり
4つのコーナーの座標を求める。既知形状を表すととも
に輪郭線に合致すべき式を導くわけである。次いで、該
式を元に、図3(d)に示すように、既知形状と相似で且
つ輪郭線と大きさの異なる検査基準線Sを設定する。図
示例のものでは矩形であることがわかっていることか
ら、4つの直線方程式に夫々所定の値のオフセットを加
えることで、上記の4つの直線方程式で表される線と平
行な線で構成される矩形の検査基準線Sを設定するわけ
である。In this way, if the coordinates of 2 points on one side, that is, 8 points in total, are obtained, the image of the object to be inspected 22
The linear equation of each side of the contour line is obtained from the coordinates of the above points, and further the intersections of the straight lines, that is, the coordinates of the four corners are obtained from the four linear equations. An equation that represents a known shape and that conforms to the contour line is derived. Next, based on this equation, as shown in FIG. 3D, an inspection reference line S that is similar to the known shape and different in size from the contour line is set. Since it is known that the example shown in the figure has a rectangular shape, by adding an offset of a predetermined value to each of the four linear equations, a line parallel to the line represented by the above four linear equations is formed. The rectangular inspection reference line S is set.
【0014】こうして検査基準線Sを設定すれば、検査
基準線Sと被検査物像22の輪郭線との間の隙間の面積
を求める。この時、輪郭線が正確な矩形を描いておれ
ば、こうして求めた値は、検査基準線Sの既知の大きさ
と上記オフセットの値とから演算される面積の値に一致
するが、正確な矩形でなければ異なった値になることか
ら、被検査物1の良否を面積値より判定することができ
る。なお、図3(d)に示すものでは検査基準線Sを輪郭
線の外側にとっているが、輪郭線の内側にとってもよ
い。この場合は輪郭線の内側で且つ検査基準線Sの外側
となる部分の面積を求める。By thus setting the inspection reference line S, the area of the gap between the inspection reference line S and the contour line of the image 22 of the object to be inspected is obtained. At this time, if the contour line draws an accurate rectangle, the value thus obtained matches the area value calculated from the known size of the inspection reference line S and the offset value, but the accurate rectangle Otherwise, the values will be different, so that the quality of the inspection object 1 can be determined from the area value. Although the inspection reference line S is located outside the contour line in FIG. 3D, it may be located inside the contour line. In this case, the area of the portion inside the contour line and outside the inspection reference line S is obtained.
【0015】検査基準線Sの設定に際して、オフセット
の値を小さくとった時には、すなわち、検査基準線Sの
設定のための上記オフセットの値が被検査物1の良品範
囲となるようにした場合には、図4に示すように、検査
基準線S上の画素の濃淡を判別することで良否を判別す
ることができる。検査基準線S上に輪郭線の凹凸による
画素の濃淡があれば、良品範囲外の凹凸が被検査物1に
あるということになるからである。もちろん、検査基準
線Sを輪郭線の外側に設定して凸不良を、輪郭線の内側
に設定して凹不良を検出する。もっともノイズによる像
の濃淡の影響を排除するために、図4(b)に示すよう
に、複数画素の平均濃度を1画素乃至数画素シフトさせ
たアドレス毎に求め、隣接する部分の平均濃度の差の累
積値がしきい値を越えたならば欠陥ありと判定するのが
好ましい。When the offset value is set small when setting the inspection reference line S, that is, when the offset value for setting the inspection reference line S is set within the non-defective range of the inspection object 1. As shown in FIG. 4, the quality can be determined by determining the density of the pixel on the inspection reference line S. This is because if there is shading of pixels due to the unevenness of the contour line on the inspection reference line S, it means that the inspected object 1 has unevenness outside the non-defective range. Of course, the inspection reference line S is set outside the contour line to detect a convex defect, and inside the contour line to detect a concave defect. However, in order to eliminate the effect of image density due to noise, as shown in FIG. 4B, the average density of a plurality of pixels is obtained for each address that is shifted by one pixel or several pixels, and the average density of adjacent portions is calculated. It is preferable to determine that there is a defect if the cumulative value of the differences exceeds the threshold value.
【0016】図5に示すように、輪郭線が矩形となって
いない時には、前記4本の直線方程式で表される4本の
直線が2つずつの平行な線ではないことから、対となる
2本の線のうちの一方の他方に対する傾きの度合いから
良否を判定することができる。また各辺の長さも既知で
あるならば、4つのコーナーの座標間の直線距離、つま
り各辺の長さを求めて、該長さが予め設定した限度値を
越えるか否かで良否を判定してもよい。As shown in FIG. 5, when the contour lines are not rectangular, the four straight lines represented by the four straight line equations are not two parallel lines, and thus form a pair. The quality can be determined from the degree of inclination of one of the two lines with respect to the other. If the length of each side is also known, the straight line distance between the coordinates of the four corners, that is, the length of each side is obtained, and it is judged whether the length exceeds a preset limit value. You may.
【0017】次に被検査物1が真円である場合について
の例を示す。この場合も図6に示すようにCCDカメラ
のような撮像手段10によって照明11で照らされた被
検査物1の撮像を行う。図7(a)に得られた画像を示
す。図中21は検査領域、22は被検査物像である。こ
うして得られた画像に対して、3点のエッジ検索を行っ
て輪郭線上の3ポイントの座標を求める。図示例におい
ては、まず検査領域21の上下辺における左右方向の中
点から上下方向中央に向かって被検査物像22のエッジ
を検索し、図7(b)に示すように2点a,bのエッジの
座標を求める。この場合の検索走査も、濃度の変化率に
相当する微分絶対値をしきい値処理したエッジ画像を利
用すればよい。Next, an example in which the inspection object 1 is a perfect circle will be shown. Also in this case, as shown in FIG. 6, the image of the inspection object 1 illuminated by the illumination 11 is taken by the image pickup means 10 such as a CCD camera. The image obtained is shown in FIG. In the figure, reference numeral 21 is an inspection area, and 22 is an image of the inspection object. With respect to the image thus obtained, an edge search for three points is performed to obtain coordinates of three points on the contour line. In the illustrated example, first, the edge of the object image 22 to be inspected is searched from the midpoint in the horizontal direction on the upper and lower sides of the inspection area 21 toward the center in the vertical direction, and as shown in FIG. Find the coordinates of the edge of. The search scan in this case may also use the edge image obtained by thresholding the differential absolute value corresponding to the rate of change in density.
【0018】次に上記2ポイントa,bの中点を計算し
て、検査領域21の左右片から中点上に存在するエッジ
の検索を行って図7(c)に示す2ポイントc,dの座標
を得る。こうして得た4ポイントa,b,c,dのうち
の3ポイントの座標を基に被検査物1の画像の真円であ
るはずの輪郭線の中心座標と半径rとを求める。既知形
状を表すとともに輪郭線に合致すべき式を求めるわけで
ある。Next, the midpoints of the two points a and b are calculated, the edges existing on the midpoint are searched from the left and right sides of the inspection area 21, and the two points c and d shown in FIG. Get the coordinates of. Based on the coordinates of 3 points of the 4 points a, b, c and d thus obtained, the center coordinates and the radius r of the contour line which should be a perfect circle of the image of the inspection object 1 are obtained. An expression that represents a known shape and that matches the contour line is obtained.
【0019】次いで、該式を元に既知形状と相似で且つ
輪郭線と大きさの異なる検査基準線Sを設定する。ここ
では既知形状が真円であることから、図7(d)に示すよ
うに、中心座標が同一で半径値rにオフセット値を加え
た真円を検査基準線Sとする。こうして検査基準線Sを
設定すれば、検査基準線Sと被検査物像22の輪郭線と
の間の隙間の面積を求める。この時、輪郭線が正確な真
円を描いておれば、こうして求めた値は、検査基準線S
の既知の大きさと上記オフセットの値とから演算される
面積の値に一致するが、正確な真円でなければ異なった
値になることから、被検査物1の良否を面積値より判定
することができる。ここでも図7に示すものでは検査基
準線Sを輪郭線の外側にとっているが、輪郭線の内側に
とってもよい。Then, an inspection reference line S which is similar to the known shape and different in size from the contour line is set based on the equation. Here, since the known shape is a perfect circle, as shown in FIG. 7D, the perfect circle having the same center coordinates and an offset value added to the radius value r is used as the inspection reference line S. By setting the inspection reference line S in this manner, the area of the gap between the inspection reference line S and the contour line of the inspection object image 22 is obtained. At this time, if the contour line draws an accurate perfect circle, the value thus obtained is the inspection reference line S.
The value of the area that is calculated from the known size of the above and the value of the offset is different, but if it is not an exact circle, the value will be different. You can Here again, the inspection reference line S is located outside the contour line in the case shown in FIG. 7, but it may be located inside the contour line.
【0020】検査基準線Sの設定に際して、オフセット
の値を小さくとった時には、すなわち、検査基準線Sの
設定のための上記オフセットの値が被検査物1の良品範
囲となるようにした場合には、図8に示すように、検査
基準線S上の画素の濃淡を判別することで良否を判別す
ることができる。検査基準線S上に輪郭線の凹凸による
画素の濃淡があれば、良品範囲外の凹凸が被検査物1に
あるということになるからである。もちろん、検査基準
線Sを輪郭線の外側に設定して凸不良を、輪郭線の内側
に設定して凹不良を検出する。ノイズによる像の濃淡の
影響を排除するために、図8(b)に示すように、複数画
素の平均濃度を1画素乃至数画素シフトさせたアドレス
毎に求め、隣接する部分の平均濃度の差の累積値がしき
い値を越えたならば欠陥ありと判定するのが好ましいの
は前述の場合と同じである。When the offset value is set small when setting the inspection reference line S, that is, when the offset value for setting the inspection reference line S is set within the non-defective range of the inspection object 1. As shown in FIG. 8, the quality can be determined by determining the shading of the pixel on the inspection reference line S. This is because if there is shading of pixels due to the unevenness of the contour line on the inspection reference line S, it means that the inspected object 1 has unevenness outside the non-defective range. Of course, the inspection reference line S is set outside the contour line to detect a convex defect, and inside the contour line to detect a concave defect. In order to eliminate the effect of noise on the image density, as shown in FIG. 8B, the average density of a plurality of pixels is calculated for each address that is shifted by one pixel or several pixels, and the difference in the average density of adjacent portions is calculated. It is the same as the above-mentioned case that it is preferable to judge that there is a defect if the cumulative value of exceeds the threshold value.
【0021】被検査物1の半径の値Rも既知であるなら
ば、被検査物像22から求めた中心点を中心とする既知
半径Rの真円を検査基準線Sとするとよい。被検査物像
22から求めた半径rが既知半径Rから良品の範囲内に
あれば、つまり良品の範囲がR±dであれば、R−d<
r<R+dの時に良品と判定するのである。半径rと中
心座標とを求めるための前記3ポイントが図9に示すよ
うに変形点を含んでおれば、半径rの値が本来の半径R
とは異なった値となるからである。If the radius value R of the object to be inspected 1 is also known, it is advisable to set the inspection reference line S to a perfect circle having a known radius R centered on the center point obtained from the image 22 to be inspected. If the radius r obtained from the inspection object image 22 is within the range of good products from the known radius R, that is, if the range of good products is R ± d, R−d <
When r <R + d, it is determined as a non-defective product. If the three points for obtaining the radius r and the center coordinates include the deformation points as shown in FIG. 9, the value of the radius r is the original radius R.
This is because the value is different from.
【0022】もっとも、上記3ポイントが変形点を含ん
でいても、求めた半径rの値が良品範囲に入ることもあ
るために、図10に示すように、半径rにオフセット値
を加えた半径の検査基準円S上に等間隔で複数点、図示
例では8点のエッジ検索開始点を設けて、夫々の点から
円の中心へ向かって微分値によるエッジ検索を行い、被
検査物像22の輪郭線までの各距離を求めるとともにこ
れらの8箇所の各距離と検査基準円Sの半径のオフセッ
ト値との差の総和DFを求めて該総和DFの値としきい
値との比較で良品判定を行うものとする。各距離をd
1,d2…d8とすれば、However, even if the above-mentioned 3 points include the deformation points, the calculated value of the radius r may fall within the non-defective range. Therefore, as shown in FIG. 10, a radius obtained by adding an offset value to the radius r. A plurality of points, eight edge search start points in the illustrated example, are provided on the inspection reference circle S at equal intervals, and edge search is performed by differential values from each point toward the center of the circle, and the object image 22 The respective distances to the contour line are obtained, and the total sum DF of the differences between the respective distances at these eight locations and the offset value of the radius of the inspection reference circle S is calculated, and the non-defective product is judged by comparing the value of the total sum DF with a threshold Shall be performed. D for each distance
1, d2 ... d8,
【0023】[0023]
【式1】 [Formula 1]
【0024】を求めて、該総和DFを変形度を示す値と
して用いるわけである。被検査物1が環状のものである
場合には外周側輪郭線と内周側輪郭線とについて上記の
ような良品判定を夫々行えばよい。被検査物1が大きく
且つ検査に要求される分解能が高い場合など、図11に
示すように、一つの被検査物1について複数の撮像手段
で撮像して、被検査物1の異なる部分を示す複数の被検
査物像22,22を生成し、各被検査物像22について
夫々検査基準線Sを設定して上述のような形状検査を行
うとよい。Then, the sum DF is used as a value indicating the degree of deformation. When the inspection object 1 is an annular one, the above-described non-defective product determination may be performed on the outer peripheral side contour line and the inner peripheral side contour line, respectively. When the inspection object 1 is large and the resolution required for inspection is high, as shown in FIG. 11, one inspection object 1 is imaged by a plurality of image pickup means to show different parts of the inspection object 1. It is preferable to generate a plurality of inspected object images 22 and 22 and set an inspection reference line S for each inspected object image 22 to perform the shape inspection as described above.
【0025】図1は図11に示したものと図12に示し
たものと図10に示したものをこの順で行って良否の判
定を行った場合のフローチャートを示している。図1に
おけるエッジ検索にあたってのノイズ成分の除去は次の
ようにして行っている。すなわち、図12に示すよう
に、被検査物像22に濃度の異なる部分があったり、被
検査物像22の外側に汚れやごみによるノイズ像27が
ある場合、エッジ検索ライン上の画素の濃度分布を求め
て頻度が最大である濃度値(通常は背景の濃度)を基準
の濃度L0とし、この基準の濃度L0に予め定めたオフ
セットを加えたしきい値Lでもって二値化処理すること
で黒画素のラベリングを行う。たとえば基準の濃度値が
200、オフセットが30であれば、二値化のしきい値
Lを170として、被検査物像22における濃度の異な
る部分を吸収する。FIG. 1 shows a flow chart when the pass / fail judgment is performed by performing the steps shown in FIG. 11, FIG. 12 and FIG. 10 in this order. The noise component removal in the edge search in FIG. 1 is performed as follows. That is, as shown in FIG. 12, when there is a portion with different density in the inspection object image 22 or there is a noise image 27 due to dirt or dust on the outside of the inspection object image 22, the density of pixels on the edge search line. The density value having the maximum frequency (usually the background density) is obtained as the distribution, and the reference density L0 is set, and the binarization processing is performed with the threshold value L obtained by adding a predetermined offset to the reference density L0. To label black pixels. For example, if the reference density value is 200 and the offset is 30, the threshold L for binarization is set to 170 and the portions of the inspection object image 22 having different densities are absorbed.
【0026】得られたラベリング結果LLが図12(a)
に示すように一つであれば、エッジ検索ラインの外側か
ら内部に向かって白から黒に変わる座標を第一次エッジ
として検出する。エッジの検出点の精度を更に向上させ
るには、第一次エッジの近傍で局所的に微分絶対値を求
め、微分絶対値のしきい値処理を行って濃度変化の境界
線を示すエッジ画像を用いて第2次エッジとして求める
とよい。The obtained labeling result LL is shown in FIG.
If there is one as shown in (1), the coordinates at which the color changes from white to black from the outside to the inside of the edge search line are detected as the primary edge. To further improve the accuracy of the edge detection point, locally obtain the differential absolute value in the vicinity of the primary edge, and perform threshold processing of the differential absolute value to obtain an edge image showing the boundary line of the density change. It may be used to obtain the secondary edge.
【0027】得られたラベリング結果LLが図12(b)
に示すようにノイズ像27のために2つあるような時に
は、幅の大きいラベリング結果LLを採用することで、
ノイズ像27を除去することができる。The obtained labeling result LL is shown in FIG. 12 (b).
When there are two due to the noise image 27 as shown in, by adopting the labeling result LL having a large width,
The noise image 27 can be removed.
【0028】[0028]
【発明の効果】以上のように本発明においては、画像入
力手段によって得た被検査物の画像から輪郭線を抽出
し、該輪郭線上の複数ポイントの座標を求めて該座標か
ら既知形状を表すとともに輪郭線に合致すべき式を導
き、該式に所定のオフセット値を加えることで既知形状
と相似で且つ輪郭線と大きさの異なる検査基準線を求め
て、この検査基準線と輪郭線との隙間の面積を基に被検
査物の形状の良否を判定したり、上記式に所定のオフセ
ット値を加えることで既知形状と相似で且つ輪郭線と大
きさがわずかに異なる検査基準線を求めて、この検査基
準線上の画像の濃淡を基に被検査物の形状の良否を判定
したり、上記式に所定のオフセット値を加えることで既
知形状と相似で且つ輪郭線と大きさの異なる検査基準線
を求めて、この検査基準線の複数点から輪郭線に向けて
エッジ検索を行って各点から輪郭線までの距離を夫々求
め、該距離を基に被検査物の形状の良否するものである
ことから、パターンマッチング処理を必要とせず、また
基準画像を予め取り込んでおく必要もなく、良否の判定
を精度よく且つ迅速に行うことができるものである。As described above, in the present invention, the contour line is extracted from the image of the object to be inspected obtained by the image input means, the coordinates of a plurality of points on the contour line are obtained, and the known shape is represented from the coordinates. A formula to be matched with the contour line is derived, and a predetermined offset value is added to the formula to obtain an inspection reference line that is similar to the known shape and has a size different from that of the contour line. or to determine the acceptability of the shape of the object to be inspected area of the gap based on, given by the formula offsets
By adding a dot value, an inspection reference line similar to the known shape and slightly different in size from the contour line is obtained, and the quality of the shape of the inspection object is judged based on the contrast of the image on the inspection reference line. Alternatively, by adding a predetermined offset value to the above equation , an inspection reference line similar to the known shape and different in size from the contour line is obtained, and the inspection reference line is directed to the contour line from a plurality of points. calculated respectively the distances from each point performs edge search to contour Te, the distance from <br/> it is to acceptability of the shape of the object to be inspected based on, without requiring a pattern matching process, also It is not necessary to capture the reference image in advance, and the quality can be determined accurately and quickly.
【0029】そして、既知形状が矩形である場合は、得
られた画像に対して上下から2点ずつ、左右から2点ず
つの総計8点のエッジ検索を行って輪郭線上の8ポイン
トの座標を求め、これら8ポイントの座標から4つの辺
の直線方程式とこれら直線が交わる4点の座標を求める
と既知形状を表すとともに輪郭線に合致すべき式を簡便
に求めることができる。また既知形状が真円である場合
は、得られた画像に対して3点のエッジ検索を行って輪
郭線上の3ポイントの座標を求め、上記3ポイントの座
標を通る仮想円の式を既知形状を表すとともに輪郭線に
合致すべき式とすると、やはり輪郭線に合致すべき式を
簡便に求めることができる。When the known shape is a rectangle, a total of 8 points are searched for the obtained image, two points each from the upper and lower sides and two points from the left and right sides, and the coordinates of the eight points on the contour line are determined. If the straight line equation of four sides and the coordinates of the four points where these straight lines intersect are obtained from the coordinates of these eight points, it is possible to easily obtain an equation that represents the known shape and that should match the contour line. When the known shape is a perfect circle, the edge of the obtained image is searched for three points to obtain the coordinates of three points on the contour line, and the formula of the virtual circle passing through the coordinates of the three points is calculated as the known shape. , And a formula that should match the contour line, the formula that also matches the contour line can be easily obtained.
【0030】被検査物を複数画像に分割し、各画像に対
して輪郭線を抽出する時には、被検査物の大きさや要求
精度に対して満足する結果を得ることができる。When the inspection object is divided into a plurality of images and the contour line is extracted from each image, a result satisfying the size of the inspection object and the required accuracy can be obtained.
【図1】本発明における動作のフローチャートである。FIG. 1 is a flowchart of the operation of the present invention.
【図2】実施の形態の一例を示す斜視図である。FIG. 2 is a perspective view showing an example of an embodiment.
【図3】同上の動作を示すもので、(a)〜(d)は説明図で
ある。FIG. 3 shows the same operation as above, and (a) to (d) are explanatory views.
【図4】他の動作を示すもので、(a)(b)は説明図であ
る。FIG. 4 shows another operation, and FIGS. 4 (a) and 4 (b) are explanatory diagrams.
【図5】他の動作の説明図である。FIG. 5 is an explanatory diagram of another operation.
【図6】別の形態の一例を示す斜視図である。FIG. 6 is a perspective view showing an example of another mode.
【図7】同上の動作を示すもので、(a)〜(d)は説明図で
ある。FIG. 7 shows the same operation as above, and (a) to (d) are explanatory views.
【図8】他の動作を示すもので、(a)(b)は説明図であ
る。FIG. 8 illustrates another operation, and FIGS. 8A and 8B are explanatory diagrams.
【図9】別の動作の説明図である。FIG. 9 is an explanatory diagram of another operation.
【図10】更に他の動作の説明図である。FIG. 10 is an explanatory diagram of still another operation.
【図11】異なる動作の説明図である。FIG. 11 is an explanatory diagram of a different operation.
【図12】ノイズの除去動作を示すもので、(a)(b)は説
明図である。FIG. 12 shows a noise removing operation, and FIGS. 12 (a) and 12 (b) are explanatory views.
1 被検査物 22 被検査物像 S 検査基準線 1 Inspected 22 Inspection object image S inspection reference line
Claims (6)
法であって、画像入力手段によって得た被検査物の画像
から輪郭線を抽出し、該輪郭線上の複数ポイントの座標
を求めて該座標から既知形状を表すとともに輪郭線に合
致すべき式を導き、該式に所定のオフセット値を加える
ことで既知形状と相似で且つ輪郭線と大きさの異なる検
査基準線を求めて、この検査基準線と輪郭線との隙間の
面積を基に被検査物の形状の良否を判定することを特徴
とする形状検査方法。1. A method of inspecting an object whose shape is known, wherein a contour line is extracted from an image of the object to be inspected obtained by an image inputting means, and coordinates of a plurality of points on the contour line are obtained. From the coordinates, derive a formula that should represent the known shape and match the contour line, and add a predetermined offset value to the formula.
Therefore, an inspection reference line similar to the known shape and different in size from the contour line is obtained, and the quality of the shape of the inspection object is determined based on the area of the gap between the inspection reference line and the contour line. Shape inspection method.
法であって、画像入力手段によって得た被検査物の画像
から輪郭線を抽出し、該輪郭線上の複数ポイントの座標
を求めて該座標から既知形状を表すとともに輪郭線に合
致すべき式を導き、該式に所定のオフセット値を加える
ことで既知形状と相似で且つ輪郭線と大きさがわずかに
異なる検査基準線を求めて、この検査基準線上の画像の
濃淡を基に被検査物の形状の良否を判定することを特徴
とする形状検査方法。2. A method of inspecting an object whose shape is known, wherein a contour line is extracted from an image of the object to be inspected obtained by the image inputting means, and coordinates of a plurality of points on the contour line are obtained. From the coordinates, derive a formula that should represent the known shape and match the contour line, and add a predetermined offset value to the formula.
It is characterized in that an inspection reference line which is similar to the known shape and whose size is slightly different from the contour line is obtained, and whether the shape of the inspection object is good or bad is determined based on the contrast of the image on the inspection reference line. Shape inspection method.
法であって、画像入力手段によって得た被検査物の画像
から輪郭線を抽出し、該輪郭線上の複数ポイントの座標
を求めて該座標から既知形状を表すとともに輪郭線に合
致すべき式を導き、該式に所定のオフセット値を加える
ことで既知形状と相似で且つ輪郭線と大きさの異なる検
査基準線を求めて、この検査基準線の複数点から輪郭線
に向けてエッジ検索を行って各点から輪郭線までの距離
を夫々求め、該距離を基に被検査物の形状の良否を判定
することを特徴とする形状検査方法。3. A method of inspecting a shape of an object whose shape is known, wherein a contour line is extracted from an image of the object to be inspected obtained by the image inputting means, and coordinates of a plurality of points on the contour line are obtained. From the coordinates, derive a formula that should represent the known shape and match the contour line, and add a predetermined offset value to the formula.
Thus, an inspection reference line similar to the known shape and different in size from the contour line is obtained, and an edge search is performed from a plurality of points on the inspection reference line toward the contour line to determine the distance from each point to the contour line. A shape inspecting method, which is characterized in that the quality of a shape of an object to be inspected is determined based on the obtained distance.
像に対して上下から2点ずつ、左右から2点ずつの総計
8点のエッジ検索を行って輪郭線上の8ポイントの座標
を求め、既知形状を表すとともに輪郭線に合致すべき式
として、上記8ポイントの座標から4つの辺の直線方程
式とこれら直線が交わる4点の座標を求めることを特徴
とする請求項1〜3のいずれかの項に記載の形状検査方
法。4. The image obtained when the known shape is a rectangle.
2 points from the top and 2 points from the top and bottom of the image
8 point edge search is performed and 8 point coordinates on the contour line
To obtain the known shape and match the contour line
As a straight line of four sides from the coordinates of the above 8 points
Characterized by finding the coordinates of the four points where these straight lines intersect with the formula
The shape inspection method according to any one of claims 1 to 3 .
像に対して3点のエッジ検索を行って輪郭線上の3ポイ
ントの座標を求め、既知形状を表すとともに輪郭線に合
致すべき式として、上記3ポイントの座標を通る仮想円
の式を求めることを特徴とする請求項1〜3のいずれか
の項に記載の形状検査方法。5. The image obtained when the known shape is a perfect circle.
The image is searched for 3 points and 3 points on the contour line are searched.
The coordinates of the object are obtained, the known shape is displayed, and the contour is
As a formula to be met, a virtual circle that passes through the coordinates of the above 3 points
4. The method according to claim 1, wherein the equation is calculated.
The shape inspection method described in the section .
対して輪郭線を抽出することを特徴とする請求項1〜5
のいずれかの項に記載の形状検査方法。6. An inspection object is divided into a plurality of images, and each image is divided into a plurality of images.
6. A contour line is extracted for the contour line.
The shape inspection method according to any one of 1 .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP19594996A JP3456096B2 (en) | 1996-07-25 | 1996-07-25 | Shape inspection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP19594996A JP3456096B2 (en) | 1996-07-25 | 1996-07-25 | Shape inspection method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH1038543A JPH1038543A (en) | 1998-02-13 |
JP3456096B2 true JP3456096B2 (en) | 2003-10-14 |
Family
ID=16349664
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP19594996A Expired - Fee Related JP3456096B2 (en) | 1996-07-25 | 1996-07-25 | Shape inspection method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3456096B2 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3757755B2 (en) * | 2000-05-22 | 2006-03-22 | スズキ株式会社 | Defect detection method and defect detection device for protrusions of articles formed with protrusions having the same shape at a predetermined pitch along an arc |
JP5307407B2 (en) * | 2008-01-11 | 2013-10-02 | オリンパス株式会社 | Endoscope apparatus and program |
JP5186314B2 (en) * | 2008-05-26 | 2013-04-17 | オリンパス株式会社 | Endoscope apparatus and program |
US8184909B2 (en) | 2008-06-25 | 2012-05-22 | United Technologies Corporation | Method for comparing sectioned geometric data representations for selected objects |
US8526705B2 (en) | 2009-06-10 | 2013-09-03 | Apple Inc. | Driven scanning alignment for complex shapes |
US8903144B2 (en) | 2010-12-01 | 2014-12-02 | Olympus Corporation | Endoscope apparatus and method of measuring object |
CN110595385B (en) * | 2019-09-30 | 2024-05-03 | 黄山职业技术学院 | Method and device for quickly selecting standard indocalamus leaves |
-
1996
- 1996-07-25 JP JP19594996A patent/JP3456096B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH1038543A (en) | 1998-02-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6535621B1 (en) | Defect integrated processing apparatus and method thereof | |
JP4230880B2 (en) | Defect inspection method | |
JP3456096B2 (en) | Shape inspection method | |
JPH03140847A (en) | Method for detecting shape of flaw part | |
JP3598878B2 (en) | Defect inspection method and defect inspection device | |
JP4293653B2 (en) | Appearance inspection method | |
JPS63236989A (en) | Foreign matter detector | |
JP2002008029A (en) | Image inspection device | |
JPH03175343A (en) | Method for extracting flaw by inspection appearance | |
JP3044951B2 (en) | Circular container inner surface inspection device | |
JP3330014B2 (en) | Appearance inspection method | |
JP2710685B2 (en) | Defect detection method by visual inspection | |
JP3580088B2 (en) | Appearance inspection method | |
JPH11351842A (en) | Wheel shape measuring device | |
JPH09161056A (en) | Circular container inner surface inspection method | |
JP2686053B2 (en) | Defect inspection method by visual inspection | |
JP2000321038A (en) | Method for detecting fault of pattern | |
JPH10208066A (en) | Method for extracting edge line of check object and appearance check method using this method | |
JP2005265828A (en) | Flaw detection method and apparatus | |
JP3823379B2 (en) | Image processing method | |
JP3177945B2 (en) | Surface defect inspection equipment | |
JPH08313580A (en) | Method and device for inspecting printed pattern | |
JPH0772909B2 (en) | Welding condition judgment method by visual inspection | |
JPH0319990B2 (en) | ||
JPH11271232A (en) | Method and device for detecting defect in wiring on printed board |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20030630 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20070801 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080801 Year of fee payment: 5 |
|
LAPS | Cancellation because of no payment of annual fees |