JPH1123241A - Object tilt angle measuring method and apparatus, and storage medium - Google Patents
Object tilt angle measuring method and apparatus, and storage mediumInfo
- Publication number
- JPH1123241A JPH1123241A JP9180884A JP18088497A JPH1123241A JP H1123241 A JPH1123241 A JP H1123241A JP 9180884 A JP9180884 A JP 9180884A JP 18088497 A JP18088497 A JP 18088497A JP H1123241 A JPH1123241 A JP H1123241A
- Authority
- JP
- Japan
- Prior art keywords
- inclination angle
- binary image
- area
- relationship
- measuring
- 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.)
- Granted
Links
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
(57)【要約】
【課題】画像処理により微小傾斜角をより高精度に測定
する。
【解決手段】物体の2値画像の外接長方形の面積Sと該
物体の2値画像の面積S0と該物体の所望の姿勢に対す
る該傾斜角θとの関係を予め求めておき、該物体の2値
画像について面積S及びS0を測定し、該関係に基づい
て該傾斜角θを求める。この関係は、実質的に式S0=
{XY−(X2 +Y2 )cosθsinθ}/{cos
4 θ(1−tan2 θ)2 }又はこれを近似した式S0
=XY−(X2 +Y2 )(sin2θ)/2で表され、
ここに、X及びYは長方形の隣り合う2辺の長さであ
る。傾斜角θの正負は、物体の2値画像の4角の点の座
標に基づいて、又は、外接長方形の端部の一方の角側所
定領域と他方の角側所定領域とに存在する物体2値画像
の画素数の差に基づいて判定する。
(57) [Summary] [Object] To measure a minute inclination angle with higher accuracy by image processing. A relationship between an area S of a circumscribed rectangle of a binary image of an object, an area S0 of a binary image of the object, and the inclination angle θ with respect to a desired posture of the object is obtained in advance, and the relationship between the area S2 of the object and the inclination angle θ is determined. The areas S and S0 are measured for the value image, and the inclination angle θ is determined based on the relationship. This relationship is substantially defined by the equation S0 =
{XY- (X 2 + Y 2 ) cos θ sin θ} / {cos
4 θ (1-tan 2 θ) 2 } or an expression S0 approximating this
= XY− (X 2 + Y 2 ) (sin 2θ) / 2,
Here, X and Y are the lengths of two adjacent sides of the rectangle. The sign of the inclination angle θ is determined based on the coordinates of the four corners of the binary image of the object, or the object 2 existing in one of the predetermined corner-side areas and the other predetermined corner-side area of the end of the circumscribed rectangle. The determination is made based on the difference in the number of pixels of the value image.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、物体の2値画像を
処理して物体傾斜角を計測する方法及び装置並びにこの
方法を実施するためのプログラムが記憶された記憶媒体
に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for measuring a tilt angle of an object by processing a binary image of the object and a storage medium storing a program for executing the method.
【0002】[0002]
【従来の技術】図6は、従来の半導体チップ姿勢調整装
置の概略構成を示す。この装置は、半導体チップ10を
ロボットで搬送する途中において、その姿勢を調整する
ものである。ハンド11及び回転駆動装置12は搬送ロ
ボットの一部であり、半導体チップ10は、ハンド11
の下端に吸着され、ハンド11の回転角が回転駆動装置
12で調整可能になっている。半導体チップ10は、撮
像装置13で撮像され、その画像のビデオ信号VSが撮
像装置13から出力される。画像入力回路14は、ビデ
オ信号VSに含まれている同期信号に基づいてアドレス
を生成し、ビデオ信号VSに含まれている輝度信号を2
値化して、画像メモリ15のこのアドレスへ書き込む。
画像メモリ15に格納された半導体チップ10の2値画
像が画像処理装置16で処理されて、半導体チップ10
の傾斜角θが測定される。回転角制御回路17は、1回
の操作で傾斜角θを0にするため、回転駆動装置12を
介しハンド11を−θだけ回転させる。2. Description of the Related Art FIG. 6 shows a schematic configuration of a conventional semiconductor chip attitude adjusting device. This device adjusts the attitude of the semiconductor chip 10 while it is being transported by a robot. The hand 11 and the rotary drive device 12 are a part of a transfer robot, and the semiconductor chip 10
The rotation angle of the hand 11 can be adjusted by the rotation driving device 12. The semiconductor chip 10 is imaged by the imaging device 13, and a video signal VS of the image is output from the imaging device 13. The image input circuit 14 generates an address based on the synchronization signal included in the video signal VS, and converts the luminance signal included in the video signal VS into two.
It is converted into a value and written to this address of the image memory 15.
The binary image of the semiconductor chip 10 stored in the image memory 15 is processed by the image processing device 16 and the semiconductor chip 10
Is measured. The rotation angle control circuit 17 rotates the hand 11 through the rotation driving device 12 by −θ in order to set the inclination angle θ to 0 in one operation.
【0003】画像処理装置16は、図7(A)に示す如
く、画像メモリ15内の2値画像10Gに対しラスター
スキャンし、2値画像10Gの角の点P1及びP2の座
標(X1,Y1)及び(X2,Y2)を検出する。傾斜
角θは、 θ=tan-1{(Y2−Y1)/(X1−X2)} ・・・(1) で算出される。As shown in FIG. 7A, an image processing device 16 raster-scans a binary image 10G in an image memory 15 and performs coordinate (X1, Y1) coordinates of corner points P1 and P2 of the binary image 10G. ) And (X2, Y2). The inclination angle θ is calculated as follows: θ = tan −1 {(Y2−Y1) / (X1−X2)} (1)
【0004】[0004]
【発明が解決しようとする課題】ところが、傾斜角θが
小さい場合には、画像入力回路14での2値化における
量子化誤差により、図7(B)に示す如く、点P1の候
補が走査線SL1上に複数画素存在し、測定精度が低く
なる。また、ノイズで画素値が反転して‘1’になって
いるものが点P1又は点P2の候補になる場合もあり、
測定精度がさらに低くなる。However, when the inclination angle θ is small, the candidate for the point P1 is scanned as shown in FIG. 7B due to a quantization error in the binarization in the image input circuit 14. Since a plurality of pixels exist on the line SL1, the measurement accuracy is reduced. In addition, a pixel value inverted to “1” due to noise may be a candidate for the point P1 or the point P2,
Measurement accuracy is further reduced.
【0005】このような問題は、サーキットボード上に
搭載されている電子部品の傾き欠陥を画像処理により検
出するパターン検査装置や任意の物体の微小傾斜角を画
像処理により測定する装置においても生ずる。本発明の
目的は、このような問題点に鑑み、画像処理により微小
傾斜角をより高精度に測定可能な物体傾斜角計測方法及
び装置並びに記憶媒体を提供することにある。[0005] Such a problem also occurs in a pattern inspection apparatus for detecting an inclination defect of an electronic component mounted on a circuit board by image processing or an apparatus for measuring a minute inclination angle of an arbitrary object by image processing. An object of the present invention is to provide an object inclination angle measuring method and apparatus and a storage medium capable of measuring a minute inclination angle with higher accuracy by image processing in view of such a problem.
【0006】[0006]
【課題を解決するための手段及びその作用効果】請求項
1では、物体の2値画像を処理して該物体の所望の姿勢
に対する傾斜角θを測定する物体傾斜角計測方法におい
て、該物体の2値画像の外接長方形の面積Sと該物体の
2値画像の面積S0と該傾斜角θとの関係を予め求めて
おき、該物体の2値画像について該面積S及び該面積S
0を測定し、該関係に基づいて該傾斜角θを求める。According to a first aspect of the present invention, there is provided an object inclination angle measuring method for processing a binary image of an object to measure an inclination angle θ of the object with respect to a desired posture. The relationship between the area S of the circumscribed rectangle of the binary image, the area S0 of the binary image of the object, and the inclination angle θ is determined in advance, and the area S and the area S of the binary image of the object are determined.
0, and the inclination angle θ is determined based on the relationship.
【0007】この物体傾斜角計測方法によれば、上記面
積S0及びSに基づいて物体の傾斜角θを測定している
ので、2値化の量子化誤差及びノイズによる画素値反転
の影響が小さくなり、2値画像に対し2角の点を結んだ
直線の傾きを直接測定する場合よりも高い精度で傾斜角
θを測定することができるという効果を奏する。請求項
2の物体傾斜角計測方法では、請求項1において、上記
物体の2値画像は長方形であり、上記関係は実質的に式
S0=XY−(X2+Y2)(sin2θ)/2で表さ
れ、ここに、X及びYは長方形の隣り合う2辺の長さで
ある。According to the object tilt angle measuring method, since the tilt angle θ of the object is measured based on the areas S0 and S, the influence of the pixel value inversion due to the quantization error of binarization and noise is small. This has the effect that the inclination angle θ can be measured with higher accuracy than when directly measuring the inclination of a straight line connecting two corner points with respect to the binary image. In the object tilt angle measuring method according to the second aspect, in the first aspect, the binary image of the object is a rectangle, and the relation is substantially expressed by the equation S0 = XY− (X 2 + Y 2 ) (sin 2θ) / 2. Where X and Y are the lengths of two adjacent sides of the rectangle.
【0008】実質的にとは、この式を変形した式を用い
る場合を含む意味である(以下同様)。この物体傾斜角
計測方法によれば、計算が簡単になり容易迅速に傾斜角
θを測定することができるという効果を奏する。請求項
3の物体傾斜角計測方法では、請求項2において、実質
的に、面積比XY/S0が所定値より小さい場合には上
記関係の式に基づき該面積比XY/S0が所定値以上の
場合には式tanθ=(Y2−Y1)/(X1−X2)
に基づいて、傾斜角θを算出する。The term “substantially” has a meaning including the case where an equation obtained by modifying this equation is used (the same applies hereinafter). According to this object inclination angle measuring method, there is an effect that the calculation can be simplified and the inclination angle θ can be easily and quickly measured. According to a third aspect of the present invention, in the second aspect, when the area ratio XY / S0 is substantially smaller than the predetermined value, the area ratio XY / S0 is equal to or larger than the predetermined value based on the above equation. In this case, the expression tan θ = (Y2-Y1) / (X1-X2)
Is calculated based on the inclination angle θ.
【0009】この物体傾斜角計測方法によれば、さらに
計算が簡単になるという効果を奏する。請求項4の物体
傾斜角計測方法では、請求項1において、上記物体の2
値画像は長方形であり、上記関係は実質的に式S0=
{XY−(X2+Y2)cosθsinθ}/{cos4
θ(1−tan2θ)2}で表され、ここに、X及びYは
長方形の隣り合う2辺の長さである。According to the method for measuring the tilt angle of an object, there is an effect that the calculation is further simplified. According to a fourth aspect of the present invention, there is provided a method for measuring an inclination angle of an object, comprising:
The value image is a rectangle, and the above relationship is substantially equivalent to the equation S0 =
{XY- (X 2 + Y 2 ) cos θ sin θ} / {cos 4
θ (1−tan 2 θ) 2 }, where X and Y are the lengths of two adjacent sides of the rectangle.
【0010】この物体傾斜角計測方法によれば、請求項
2及び3の場合よりも正確に傾斜角θを求めることがで
きるという効果を奏する。請求項5では、請求項2乃至
4のいずれか1つにおいて、上記物体の2値画像の2角
以上の点の座標に基づいて、上記傾斜角θの正負を判定
する。この物体傾斜角計測方法によれば、傾斜角θの正
負を容易に判定することができるという効果を奏する。According to this method of measuring the tilt angle of the object, it is possible to obtain the tilt angle θ more accurately than in the case of the second and third aspects. According to a fifth aspect, in any one of the second to fourth aspects, the sign of the inclination angle θ is determined based on the coordinates of two or more points of the binary image of the object. According to this object inclination angle measuring method, it is possible to easily determine whether the inclination angle θ is positive or negative.
【0011】請求項6の物体傾斜角計測方法では、請求
項2乃至4のいずれか1つにおいて、上記外接長方形の
端部所定領域に上記物体の2値画像の画素が存在するか
否かに基づいて上記傾斜角θの正負を判定する。この物
体傾斜角計測方法によれば、物体画素を計数して上記面
積S0を求める際に並行して傾斜角正負判定処理を行う
ことができるという効果を奏する。According to a sixth aspect of the present invention, in the method of any one of the second to fourth aspects, it is determined whether or not a pixel of the binary image of the object exists in a predetermined area at an end of the circumscribed rectangle. Whether the inclination angle θ is positive or negative is determined based on the inclination angle θ. According to the object tilt angle measuring method, an effect is obtained that the tilt angle positive / negative determination process can be performed in parallel with the calculation of the object pixels to obtain the area S0.
【0012】請求項7の物体傾斜角計測方法では、請求
項2において、上記外接長方形の端部の一方の角側所定
領域と他方の角側所定領域とに存在する上記物体の2値
画像の画素数の差に基づいて上記傾斜角θの正負を判定
する。この物体傾斜角計測方法によれば、ノイズによる
画素値反転の影響が殆ど無くなり、傾斜角が微小であっ
ても判定結果が請求項6の場合よりも正確になるという
効果を奏する。According to a seventh aspect of the present invention, in the object inclination measuring method according to the second aspect, a binary image of the object existing in one of the predetermined corner-side areas and the other predetermined corner-side area of the end of the circumscribed rectangle is provided. The sign of the inclination angle θ is determined based on the difference in the number of pixels. According to this method of measuring the object inclination angle, the effect of the pixel value inversion due to noise is almost eliminated, and even if the inclination angle is minute, the determination result is more accurate than in the case of claim 6.
【0013】請求項8の記憶媒体では、請求項1乃至7
のいずれか1つに記載の関係に基づいて上記傾斜角θを
求めるプログラムが記憶されている。請求項9では、物
体の2値画像を処理して該物体の所望の姿勢に対する傾
斜角θを測定する物体傾斜角計測装置において、該物体
の2値画像の面積S0及び該物体の2値画像の外接長方
形の面積Sを測定し、該面積S0と該面積Sと該傾斜角
θとの関係に基づいて該傾斜角θを求める。[0013] In the storage medium of claim 8, claims 1 to 7 are provided.
A program for obtaining the inclination angle θ based on the relationship described in any one of the above is stored. 10. An object inclination angle measuring apparatus for processing a binary image of an object to measure an inclination angle θ of the object with respect to a desired posture, wherein an area S0 of the binary image of the object and a binary image of the object Is measured, and the inclination angle θ is determined based on the relationship between the area S0, the area S, and the inclination angle θ.
【0014】[0014]
【発明の実施の形態】以下、図面に基づいて本発明の実
施形態を説明する。 [第1実施形態]図1は、本発明の第1実施形態の傾斜
角測定手順を示す。図1の処理は、画像処理装置、例え
ば図6の画像処理装置16で実行される。この画像処理
装置は、例えばコンピュータを備えている。以下の括弧
内の数値は、図1中のステップ識別番号である。Embodiments of the present invention will be described below with reference to the drawings. [First Embodiment] FIG. 1 shows an inclination angle measuring procedure according to a first embodiment of the present invention. The process of FIG. 1 is executed by an image processing device, for example, the image processing device 16 of FIG. This image processing apparatus includes, for example, a computer. The numerical values in parentheses below are the step identification numbers in FIG.
【0015】(20)図2(A)に示す如く、画像メモ
リ15内のフレーム画像に対しラスタースキャンして2
値画像10Gの4角の点P1〜P4の座標(X1,Y
1)〜(X4,Y4)を検出する。点P1〜P4は、ラ
スタースキャンしたときの‘0’から‘1’及び‘1’
から‘0’の変化点のX座標及びY座標の極値に対応し
ている。2値画像10Gの微分画像からこれらの座標を
検出してもよい。(20) As shown in FIG. 2A, the frame image in the image memory 15 is raster-
The coordinates (X1, Y) of the four corner points P1 to P4 of the value image 10G
1) to (X4, Y4) are detected. Points P1 to P4 are from “0” to “1” and “1” when raster scanning is performed.
Corresponding to the extreme values of the X coordinate and the Y coordinate of the point of change from “0” to “0”. These coordinates may be detected from a differential image of the binary image 10G.
【0016】(21)図2(B)に示す2値画像10G
の外接長方形Q1Q2Q3Q4の辺の長さX及びYを測
定する。この外接長方形は、点P1を通りX軸に平行な
直線と、点P2を通りY軸に平行な直線と点P3を通り
X軸に平行な直線と、点P4を通りY軸に平行な直線と
で囲まれる長方形として求められる。辺の長さX及びY
を測定できればよいので、外接長方形Q1Q2Q3Q4
自体は求めなくてもよい。傾斜角θが正の場合には、図
2(A)から明らかなように、 X=X4−X2、Y=Y3−Y1 ・・・(2) として求められる。傾斜角θが負の場合には、 X=X1−X3、Y=Y4−Y2 ・・・(3) として求められる。式(2)及び(3)と関係して、次
のDX及びDY、 DX=(X4−X2)−(X1−X3) ・・・(4) DY=(Y3−Y1)−(Y4−Y2) ・・・(5) を定義すると、傾斜角θが正のときには、DX>0かつ
DY>0が成立し、傾斜角θが負のときには、DX<0
かつDY<0が成立する。(21) The binary image 10G shown in FIG.
The lengths X and Y of the sides of the circumscribed rectangle Q1Q2Q3Q4 are measured. The circumscribed rectangle is a straight line parallel to the X axis through the point P1, a straight line parallel to the Y axis through the point P2, a straight line parallel to the X axis through the point P3, and a straight line parallel to the Y axis through the point P4. It is obtained as a rectangle surrounded by Side length X and Y
Can be measured, so that the circumscribed rectangle Q1Q2Q3Q4
It is not necessary to ask itself. When the inclination angle θ is positive, it is obtained as X = X4-X2, Y = Y3-Y1 (2) as is clear from FIG. When the inclination angle θ is negative, X = X1−X3, Y = Y4−Y2 (3) The following DX and DY are related to Expressions (2) and (3), DX = (X4-X2)-(X1-X3) (4) DY = (Y3-Y1)-(Y4-Y2) (5), DX> 0 and DY> 0 are satisfied when the inclination angle θ is positive, and DX <0 when the inclination angle θ is negative.
DY <0 holds.
【0017】傾斜角θの正負判定にはDXとDYとの一
方を用いてもよいが、傾斜角θが微小角の場合には、量
子化誤差やノイズによる画素反転によりこれらのことが
成立しない場合も考えられる。そこで、量子化誤差やノ
イズによる画素反転の影響を低減するために、 D=DX+DY・・・(6) の正負により傾斜角θの正負を判定して、上記(2)又
は(3)によりX及びYを求める。One of DX and DY may be used to determine whether the inclination angle θ is positive or negative. However, when the inclination angle θ is a small angle, these are not established due to quantization errors and pixel inversion due to noise. It is possible. Therefore, in order to reduce the influence of pixel inversion due to quantization error or noise, the sign of the inclination angle θ is determined by the sign of D = DX + DY (6), and X is determined by the above (2) or (3). And Y.
【0018】(22)2値画像10Gの面積S0を測定
する。面積S0は、上記ステップ20でのラスタースキ
ャンにおいて、‘1’の画素を計数することにより、容
易にかつ精度よく求めることができる。精度がよい理由
は、‘1’の累積加算により正負の量子化誤差が平均化
され、かつ、ノイズの割合が極めて小さくなるからであ
る。(22) The area S0 of the binary image 10G is measured. The area S0 can be easily and accurately obtained by counting the number of “1” pixels in the raster scan in step 20 described above. The reason why the accuracy is good is that positive and negative quantization errors are averaged by the cumulative addition of “1”, and the ratio of noise becomes extremely small.
【0019】(23)外接長方形Q1Q2Q3Q4の面
積S=XYと2値画像10Gの面積S0との比S/S0
が大きくなるほど、傾斜角θが大きくなる。傾斜角θが
ある程度大きい場合には、上述の従来法で求めた傾斜角
θの測定精度は比較的高く、かつ、短時間で傾斜角θを
算出することができる。そこで、予め定められた後述の
比較定数Kに対し、XY/S0≧Kであればステップ2
4へ進み、そうでなければステップ25へ進む。(23) Ratio S / S0 between area S = XY of circumscribed rectangle Q1Q2Q3Q4 and area S0 of binary image 10G
Increases, the inclination angle θ increases. When the inclination angle θ is large to some extent, the measurement accuracy of the inclination angle θ obtained by the above-described conventional method is relatively high, and the inclination angle θ can be calculated in a short time. Therefore, if XY / S0 ≧ K with respect to a predetermined comparison constant K described later, step 2 is executed.
Go to step 4, otherwise go to step 25.
【0020】(24)傾斜角θを、上式(1)で算出し
て、傾斜角測定処理を終了する。 (25〜27)D>0であれば傾斜角θを次の近似式、 θ=0.5sin-1{2(XY−S0)/(X2+Y2)} ・・・(7) で算出し、そうでなければ次の近似式、 θ=−0.5sin-1{2(XY−S0)/(X2+Y2)} ・・・(8) で算出する。(24) The inclination angle θ is calculated by the above equation (1), and the inclination angle measurement processing ends. (25-27) If D> 0, the inclination angle θ is calculated by the following approximate expression: θ = 0.5 sin −1 {2 (XY−S0) / (X 2 + Y 2 )} (7) Otherwise, it is calculated by the following approximate expression: θ = −0.5 sin −1 {2 (XY−S0) / (X 2 + Y 2 )} (8)
【0021】上記近似式は、以下のようにして求められ
る。 X0=P1P2=P3P4、ΔX=P1Q1=P3Q3 ・・・(9) Y0=P2P3=P4P1、ΔY=P2Q2=P4Q4 ・・・(10) とおくと、次式が成立する。 X0=ΔY/sinθ ・・・(11) Y0=ΔX/sinθ ・・・(12) tanθ=ΔY/(X−ΔX)=ΔX/(Y−ΔY)・・・(13) この式(13)から、ΔX及びΔYは次式で表される。The above approximate expression is obtained as follows. X0 = P1P2 = P3P4, ΔX = P1Q1 = P3Q3 (9) Y0 = P2P3 = P4P1, ΔY = P2Q2 = P4Q4 (10) X0 = ΔY / sinθ (11) Y0 = ΔX / sinθ (12) tanθ = ΔY / (X−ΔX) = ΔX / (Y−ΔY) (13) This equation (13) Therefore, ΔX and ΔY are represented by the following equations.
【0022】 ΔX=tanθ(Y−Xtanθ)/(1−tan2θ) ・・・(14) ΔY=tanθ(X−Ytanθ)/(1−tan2θ) ・・・(15) これらΔY及びΔXをそれぞれ式(11)及び(12)
へ代入すると、次式が得られる。 X0=(X−Ytanθ)/cosθ(1−tan2θ) ・・・(16) Y0=(Y−Xtanθ)/cosθ(1−tan2θ) ・・・(17) 式(16)及び(17)の右辺の分母及び分子にcos
θを乗ずると、次式が得られる。ΔX = tan θ (Y−X tan θ) / (1−tan 2 θ) (14) ΔY = tan θ (X−Y tan θ) / (1−tan 2 θ) (15) ΔX is calculated by the equations (11) and (12), respectively.
Substituting into X0 = (X−Y tan θ) / cos θ (1-tan 2 θ) (16) Y0 = (Y−X tan θ) / cos θ (1-tan 2 θ) (17) Expressions (16) and ( 17) In the denominator and numerator on the right side of
Multiplying by θ gives the following equation:
【0023】 X0=(Xcosθ−Ysinθ)/{cos2θ(1−tan2θ)} ・( 18) Y0=(Ycosθ−Xsinθ)/{cos2θ(1−tan2θ)} ・( 19) よって、2値画像10Gの面積S0=X0・Y0は、次
式で表される。[0023] X0 = (Xcosθ-Ysinθ) / {cos 2 θ (1-tan 2 θ)} · (18) Y0 = (Ycosθ-Xsinθ) / {cos 2 θ (1-tan 2 θ)} · (19 Therefore, the area S0 = X0 · Y0 of the binary image 10G is represented by the following equation.
【0024】 S0=(Xcosθ−Ysinθ)(Ycosθ−Xsinθ)/{cos4 θ(1−tan2θ)2} ={XY−(X2+Y2)cosθsinθ}/{cos4θ(1−tan2θ) 2 } ・・・(20) ここで、傾斜角θが充分小さいときには、 cos4θ≒1、tan2θ≒0 ・・・(21) とみなせるので、式(20)は、以下のように近似する
ことができる。S0 = (Xcosθ−Ysinθ) (Ycosθ−Xsinθ) / {cosFour θ (1-tanTwoθ)Two{= {XY- (XTwo+ YTwo) Cos θ sin θ} / {cosFourθ (1-tanTwoθ) Two 20 (20) Here, when the inclination angle θ is sufficiently small, cosFourθ ≒ 1, tanTwoθ ≒ 0 (21) Since Equation (20) can be considered, Equation (20) is approximated as follows:
be able to.
【0025】 S=XY−(X2+Y2)cosθsinθ =XY−(X2+Y2)(sin2θ)/2 ・・・(22) この式(22)から、上記近似式(7)及び(8)が得
られる。ステップ23の比較定数Kは、画像のノイズの
程度や上式(21)の近似をどの程度の誤差まで認める
かを考慮して決定する。傾斜角θと、式(7)の式(2
0)に対する近似誤差との関係は、次のようになる。S = XY− (X 2 + Y 2 ) cos θ sin θ = XY− (X 2 + Y 2 ) (sin 2θ) / 2 (22) From this equation (22), the above approximate equations (7) and (8) ) Is obtained. The comparison constant K in step 23 is determined in consideration of the degree of noise in the image and how much error the approximation of equation (21) is allowed. The inclination angle θ and the equation (2) of the equation (7)
The relation between 0) and the approximation error is as follows.
【0026】θ=5゜のとき、COS4θ(1−tan2
θ)2=0.96984(約3.1%) θ=10゜のとき、COS4θ(1−tan2θ)2=
0.88303(約11.7%) 本第1実施形態では、2値画像10Gの面積S0と2値
画像10Gの外接長方形の面積S=XYと面積の次元の
X2及びY2に基づいて物体の傾斜角θを測定しているの
で、傾斜角θが小さくても、従来技術の欄で述べた量子
化誤差及びノイズの影響が小さくなり、より高い精度で
傾斜角θを測定することができる。[第2実施形態]上
述のDを用いずに物体傾斜角θの正負を判定することも
可能であり、これを第2実施形態として以下に説明す
る。When θ = 5 °, COS 4 θ (1-tan 2
θ) 2 = 0.96984 (about 3.1%) When θ = 10 °, COS 4 θ (1-tan 2 θ) 2 =
0.88303 In (about 11.7%) This first embodiment, based on the area S0 of the binary image 10G and the binary image X 2 and Y 2 dimensions of the area S = XY and area of a circumscribed rectangle of 10G Since the inclination angle θ of the object is measured, even if the inclination angle θ is small, the effects of the quantization error and noise described in the section of the related art become small, and the inclination angle θ can be measured with higher accuracy. it can. [Second Embodiment] It is also possible to determine whether the object inclination angle θ is positive or negative without using D described above. This will be described below as a second embodiment.
【0027】図3(A)〜(C)は、図2(A)の2値
画像10Gの上部拡大図である。図3(A)に示す如
く、点Q1と点Q2の中点Cを通り、傾きが|θ|の直
線と、直線Q2Q3との交点をR2とする。|θ|は、
上式(7)から求められる。三角形CQ2R2内に2値
画像10Gの画素が存在しなければ、すなわち、‘1’
の画素が存在しなければ、傾斜角θが正であると判定
し、‘1’の画素が存在すれば、傾斜角θが負であると
判定する。FIGS. 3A to 3C are enlarged top views of the binary image 10G of FIG. 2A. As shown in FIG. 3A, the intersection of a straight line passing through the midpoint C between the points Q1 and Q2 and having a slope of | θ | and a straight line Q2Q3 is defined as R2. | Θ | is
It is obtained from the above equation (7). If the pixel of the binary image 10G does not exist in the triangle CQ2R2, that is, '1'
If the pixel does not exist, it is determined that the inclination angle θ is positive, and if the pixel of “1” exists, it is determined that the inclination angle θ is negative.
【0028】他の正負判定方法を、図3(B)に示す。
この方法では、点Q1と点Q2の中点Cを通り、傾きが
−|θ|の直線と、直線Q1Q4との交点をR1とす
る。そして、三角形CQ1R1内に‘1’の画素が存在
すれば、傾斜角θが正であると判定し、‘1’の画素が
存在しなければ、傾斜角θが負であると判定する。さら
に他の正負判定方法を、図3(C)に示す。この方法
は、上記2つの考え方を用いており、三角形CR1Q1
内に存在する‘1’の画素数と、三角形CQ2R2内に
存在する‘1’の画素数との差が正であれば傾斜角θが
正であると判定し、そうでなけば傾斜角θが負であると
判定する。この方法によれば、ノイズによるビット反転
の影響が殆ど無くなる。FIG. 3B shows another positive / negative determination method.
In this method, the intersection of a straight line passing through the midpoint C between the points Q1 and Q2 and having a slope of − | θ | and a straight line Q1Q4 is defined as R1. If the pixel of '1' exists in the triangle CQ1R1, it is determined that the inclination angle θ is positive, and if the pixel of '1' does not exist, it is determined that the inclination angle θ is negative. FIG. 3C shows another positive / negative determination method. This method uses the above-mentioned two ideas, and uses the triangle CR1Q1
If the difference between the number of “1” pixels existing in the triangle and the number of “1” pixels existing in the triangle CQ2R2 is positive, it is determined that the inclination angle θ is positive. Is determined to be negative. According to this method, the influence of bit inversion due to noise is almost eliminated.
【0029】[第3実施形態]上記第1及び第2の実施
形態では、2値画像が長方形である場合を説明したが、
2値画像の外接長方形の面積Sと2値画像の面積S0と
の比が物体傾斜角θの関数であることに着目すれば、任
意の形状の物体の微小傾斜角θを測定することが可能で
ある。[Third Embodiment] In the first and second embodiments, the case where the binary image is rectangular has been described.
Paying attention to the fact that the ratio of the area S of the circumscribed rectangle of the binary image to the area S0 of the binary image is a function of the object inclination angle θ, it is possible to measure the minute inclination angle θ of an object having an arbitrary shape. It is.
【0030】図4(A)は2値画像10AGが三角形で
ある場合を示しており、図4(B)は2値画像10BG
がボトル形状である場合を示している。2値画像10A
Gの場合には、面積比S/S0と傾斜角θの関係を理論
的に算出することもできる。2値画像10BGの場合に
は、図5に示すような傾斜角θと面積比S/S0との関
係を画像処理により予め求めて、これをテーブル化し又
は近似式で表す。傾斜角測定の際には、面積比S/S0
を画像処理で求め、該関係から傾斜角θを求める。FIG. 4A shows a case where the binary image 10AG is a triangle, and FIG. 4B shows a case where the binary image 10BG is a triangle.
Shows a case where is a bottle shape. Binary image 10A
In the case of G, the relationship between the area ratio S / S0 and the inclination angle θ can be theoretically calculated. In the case of the binary image 10BG, the relationship between the inclination angle θ and the area ratio S / S0 as shown in FIG. 5 is obtained in advance by image processing, and this is tabulated or represented by an approximate expression. When measuring the tilt angle, the area ratio S / S0
Is obtained by image processing, and the inclination angle θ is obtained from the relationship.
【0031】本第3実施形態では、面積比S/S0に基
づいて物体傾斜角θを測定しているので、傾斜角θが小
さくても、従来技術の欄で述べた量子化誤差及びノイズ
の影響が小さくなり、2値画像に対し2角の点を結んだ
直線の傾きを直接測定する場合よりも高い精度で、傾斜
角θを測定することができる。なお、本発明には外にも
種々の変形例が含まれる。In the third embodiment, since the object inclination angle θ is measured based on the area ratio S / S0, even if the inclination angle θ is small, the quantization error and the noise described in the section of the prior art will be reduced. The influence is reduced, and the inclination angle θ can be measured with higher accuracy than when directly measuring the inclination of a straight line connecting the two corners to the binary image. The present invention also includes various modified examples.
【0032】例えば、上記近似式(7)及び(8)を用
いる替わりに、近似前の上式(20)の右辺から左辺を
引いた関数 f(θ)={XY−(X2+Y2)cosθsinθ}/{cos4θ(1−t an2θ)2}−S0 ・・・(23) を用い、右辺のX、Y及びS0に数値を代入し、方程式
f(θ)=0を満たす解θを1/2探索法又はニュート
ンラプソン法等で求める構成であってもよい。この場
合、図1のステップ23及び24の処理は不要である。For example, instead of using the above approximation formulas (7) and (8), a function f (θ) = {XY− (X 2 + Y 2 ) obtained by subtracting the left side from the right side of the above equation (20) before approximation. cos θ sin θ} / {cos 4 θ (1−tan 2 θ) 2 } −S0 (23), and by substituting numerical values for X, Y and S0 on the right side, the equation f (θ) = 0 is satisfied. The solution θ may be obtained by a 探索 search method, a Newton-Raphson method, or the like. In this case, the processing of steps 23 and 24 in FIG. 1 is unnecessary.
【0033】また、傾斜角θの正負判定式には、上記D
X、DY又はD以外にも考えられる。例えば、傾斜角θ
が正の場合にはX4>X1、X3>X2、Y2>Y1及
びY3>Y4が成立し、傾斜角θが負の場合にはこれら
の不等号を逆にした関係が成立するので、これらのいず
れか又は結合、例えば、X4−X1+Y2−Y1又は
(X4−X1)/X+(Y2−Y1)/Y等の正負によ
り傾斜角θの正負を判定してもよい。The expression for determining whether the inclination angle θ is positive or negative is D
Other than X, DY or D are also conceivable. For example, the inclination angle θ
Is positive, X4> X1, X3> X2, Y2> Y1, and Y3> Y4 are satisfied. When the inclination angle θ is negative, the relations in which these inequality signs are reversed are satisfied. Alternatively, the sign of the inclination angle θ may be determined by the sign, such as X4-X1 + Y2-Y1 or (X4-X1) / X + (Y2-Y1) / Y.
【0034】さらに、傾斜角θの正負判定に用いる図3
中の領域は三角形に限定されない。例えば図3(C)に
おいて、直線R1R2の中点をDとしたとき、長方形D
CQ1R1内に存在する‘1’の画素数と、長方形DC
Q2R2内に存在する‘1’の画素数との差が正であれ
ば傾斜角θが正であると判定し、そうでなけば傾斜角θ
が負であると判定してもよい。この場合、点R1及びR
2の位置はそれぞれ、点Q1及びQ2から等距離であれ
ば任意でよい。FIG. 3 is used to determine whether the inclination angle θ is positive or negative.
The inner region is not limited to a triangle. For example, in FIG. 3C, when the midpoint of the straight line R1R2 is D, a rectangle D
The number of '1' pixels present in CQ1R1 and the rectangle DC
If the difference from the number of “1” pixels existing in Q2R2 is positive, it is determined that the inclination angle θ is positive, and if not, the inclination angle θ
May be determined to be negative. In this case, the points R1 and R
The position of 2 may be any position as long as it is equidistant from points Q1 and Q2.
【図1】本発明の第1実施形態の物体傾斜角測定手順を
示すフローチャートである。FIG. 1 is a flowchart showing a procedure for measuring an object inclination angle according to a first embodiment of the present invention.
【図2】図1の処理で用いられる物体傾斜角計測方法の
説明図である。FIG. 2 is an explanatory diagram of an object inclination angle measuring method used in the processing of FIG. 1;
【図3】本発明の第2実施形態の物体傾斜角正負判定方
法説明図である。FIG. 3 is an explanatory diagram of an object inclination angle positive / negative determination method according to a second embodiment of the present invention.
【図4】本発明の第3実施形態の物体傾斜角計測方法説
明図である。FIG. 4 is an explanatory view of an object inclination angle measuring method according to a third embodiment of the present invention.
【図5】物体の傾斜角と面積比との関係を示す線図であ
る。FIG. 5 is a diagram showing a relationship between an inclination angle of an object and an area ratio.
【図6】従来の半導体チップ姿勢調整装置の概略構成図
である。FIG. 6 is a schematic configuration diagram of a conventional semiconductor chip attitude adjusting device.
【図7】従来の物体傾斜角計測方法説明図である。FIG. 7 is an explanatory view of a conventional method of measuring an object inclination angle.
10 半導体チップ 10G、10AG、10BG 2値画像 11 ハンド 12 回転駆動装置 13 撮像装置 14 画像入力回路 15 画像メモリ 16 画像処理装置 17 回転角制御回路 SL1〜SL4 走査線 θ 傾斜角 Reference Signs List 10 semiconductor chip 10G, 10AG, 10BG binary image 11 hand 12 rotation drive device 13 imaging device 14 image input circuit 15 image memory 16 image processing device 17 rotation angle control circuit SL1 to SL4 scan line θ tilt angle
フロントページの続き (72)発明者 矢吹 彰彦 神奈川県川崎市中原区上小田中4丁目1番 1号 富士通株式会社内 (72)発明者 小森谷 均 神奈川県川崎市中原区上小田中4丁目1番 1号 富士通株式会社内 (72)発明者 肥塚 哲男 神奈川県川崎市中原区上小田中4丁目1番 1号 富士通株式会社内Continuing from the front page (72) Inventor Akihiko Yabuki 4-1-1, Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa Prefecture Inside Fujitsu Limited (72) Inventor Hitoshi Komoriya 4-1-1, Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa Prefecture Inside Fujitsu Limited (72) Inventor Tetsuo Hitsuka 4-1-1 Kamikadanaka, Nakahara-ku, Kawasaki City, Kanagawa Prefecture Inside Fujitsu Limited
Claims (9)
の姿勢に対する傾斜角θを測定する物体傾斜角計測方法
において、 該物体の2値画像の外接長方形の面積Sと該物体の2値
画像の面積S0と該傾斜角θとの関係を予め求めてお
き、 該物体の2値画像について該面積S及び該面積S0を測
定し、 該関係に基づいて該傾斜角θを求める、 ことを特徴とする物体傾斜角計測方法。1. An object inclination angle measuring method for processing a binary image of an object to measure an inclination angle θ of the object with respect to a desired posture, comprising: an area S of a circumscribed rectangle of the binary image of the object; The relationship between the area S0 of the binary image and the inclination angle θ is determined in advance, the area S and the area S0 are measured for the binary image of the object, and the inclination angle θ is determined based on the relationship. An object inclination angle measuring method, characterized in that:
in2θ)/2で表され、ここに、X及びYは長方形の
隣り合う2辺の長さである、 ことを特徴とする請求項1記載の物体傾斜角計測方法。2. The binary image of the object is rectangular, and the relationship is substantially determined by the equation S0 = XY− (X 2 + Y 2 ) (s
2. The method according to claim 1, wherein X and Y are lengths of two adjacent sides of the rectangle.
り小さい場合には上記関係の式に基づき該面積比XY/
S0が所定値以上の場合には式tanθ=(Y2−Y
1)/(X1−X2)に基づいて、傾斜角θを算出す
る、 ことを特徴とする請求項2記載の物体傾斜角計測方法。3. When the area ratio XY / S0 is substantially smaller than a predetermined value, the area ratio XY / S0 is calculated based on the above equation.
If S0 is equal to or greater than a predetermined value, the expression tan θ = (Y2-Y
3) The method for measuring an object inclination angle according to claim 2, wherein the inclination angle θ is calculated based on 1) / (X1−X2).
sθsinθ}/{cos4θ(1−tan2θ)2}で
表され、ここに、X及びYは長方形の隣り合う2辺の長
さである、 ことを特徴とする請求項1記載の物体傾斜角計測方法。4. The binary image of the object is rectangular, and the relationship is substantially determined by the equation S0 = {XY- (X 2 + Y 2 ) co
The object according to claim 1, wherein sθ sin θ} / {cos 4 θ (1-tan 2 θ) 2 }, wherein X and Y are the lengths of two adjacent sides of the rectangle. Tilt measurement method.
標に基づいて、上記傾斜角θの正負を判定することを特
徴とする請求項2乃至4のいずれか1つに記載の物体傾
斜角計測方法。5. The method according to claim 2, wherein the sign of the inclination angle θ is determined based on the coordinates of two or more corners of the binary image of the object. Object tilt angle measurement method.
体の2値画像の画素が存在するか否かに基づいて上記傾
斜角θの正負を判定することを特徴とする請求項2乃至
4のいずれか1つに記載の物体傾斜角計測方法。6. The method according to claim 2, wherein the positive or negative of the inclination angle θ is determined based on whether or not a pixel of the binary image of the object exists in a predetermined region at an end of the circumscribed rectangle. The method for measuring an inclination angle of an object according to any one of the above.
領域と他方の角側所定領域とに存在する上記物体の2値
画像の画素数の差に基づいて上記傾斜角θの正負を判定
することを特徴とする請求項2記載の物体傾斜角計測方
法。7. A method for determining whether the inclination angle θ is positive or negative based on a difference in the number of pixels of a binary image of the object existing on one corner side predetermined area and the other corner side predetermined area of the end of the circumscribed rectangle. The method according to claim 2, wherein the determination is performed.
関係に基づいて上記傾斜角θを求めるプログラムが記憶
されていることを特徴とする記憶媒体。8. A storage medium storing a program for obtaining the inclination angle θ based on the relationship according to claim 1. Description:
の姿勢に対する傾斜角θを測定する物体傾斜角計測装置
において、 該物体の2値画像の面積S0及び該物体の2値画像の外
接長方形の面積Sを測定し、該面積S0と該面積Sと該
傾斜角θとの関係に基づいて該傾斜角θを求めることを
特徴とする物体傾斜角計測装置。9. An object inclination angle measuring apparatus for processing a binary image of an object to measure an inclination angle θ of the object with respect to a desired posture, the area S0 of the binary image of the object and the binary image of the object Measuring the area S of the circumscribed rectangle of the object and obtaining the inclination angle θ based on the relationship between the area S0, the area S, and the inclination angle θ.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP18088497A JP3685596B2 (en) | 1997-07-07 | 1997-07-07 | Object tilt angle measuring method and apparatus, and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP18088497A JP3685596B2 (en) | 1997-07-07 | 1997-07-07 | Object tilt angle measuring method and apparatus, and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH1123241A true JPH1123241A (en) | 1999-01-29 |
| JP3685596B2 JP3685596B2 (en) | 2005-08-17 |
Family
ID=16091029
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP18088497A Expired - Fee Related JP3685596B2 (en) | 1997-07-07 | 1997-07-07 | Object tilt angle measuring method and apparatus, and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3685596B2 (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006236326A (en) * | 2005-01-27 | 2006-09-07 | Shinsedai Kk | Tilt detection method and entertainment system |
| JP2011035536A (en) * | 2009-07-30 | 2011-02-17 | Mitsubishi Electric Corp | Image projection apparatus |
| JP2012137841A (en) * | 2010-12-24 | 2012-07-19 | Institute Of National Colleges Of Technology Japan | Picking system and picking method |
-
1997
- 1997-07-07 JP JP18088497A patent/JP3685596B2/en not_active Expired - Fee Related
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006236326A (en) * | 2005-01-27 | 2006-09-07 | Shinsedai Kk | Tilt detection method and entertainment system |
| JP2011035536A (en) * | 2009-07-30 | 2011-02-17 | Mitsubishi Electric Corp | Image projection apparatus |
| JP2012137841A (en) * | 2010-12-24 | 2012-07-19 | Institute Of National Colleges Of Technology Japan | Picking system and picking method |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3685596B2 (en) | 2005-08-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2802561B2 (en) | Semiconductor chip alignment method and laser repair target | |
| US7024041B2 (en) | Pattern inspection apparatus and method | |
| US7894660B2 (en) | Image processing alignment method and method of manufacturing semiconductor device | |
| JPH11126816A (en) | Method for correcting and deciding coordinates of objective point on wafer | |
| JP7613071B2 (en) | Image inspection device and image inspection program | |
| US20030059104A1 (en) | Pattern evaluation system, pattern evaluation method and program | |
| JP3164003B2 (en) | Mounted parts inspection device | |
| JP5114302B2 (en) | Pattern inspection method, pattern inspection apparatus, and pattern processing apparatus | |
| JPH1123241A (en) | Object tilt angle measuring method and apparatus, and storage medium | |
| JP3325120B2 (en) | Component recognition method and device | |
| JP3963156B2 (en) | Image processing apparatus and method, medium storing program for image processing, and inspection apparatus | |
| JP4890904B2 (en) | Component position detection method and apparatus | |
| JP4205044B2 (en) | Printed solder inspection equipment | |
| JP2000180138A (en) | Calibration plate and calibration device for visual sensor using the same | |
| JPH08315147A (en) | Template matching method | |
| JP2879357B2 (en) | Shape judgment method | |
| JPH10227622A (en) | Inspection method of lead and lead inspecting instrument | |
| JP2822700B2 (en) | Image processing device | |
| JPH1051199A (en) | Inspection method for mounting direction of electronic components | |
| JP3111434B2 (en) | Image processing device | |
| JPH03214008A (en) | Attitude measuring apparatus | |
| JP3069401B2 (en) | Inspection method of roundness by image processing | |
| JP4642648B2 (en) | Image processing method and apparatus for components mounted on mounting apparatus | |
| JPH10160681A (en) | Pattern defect detection device and pattern defect detection method | |
| JP2007048194A (en) | Image processing method and image processor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20050328 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20050531 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050531 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090610 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100610 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110610 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120610 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120610 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130610 Year of fee payment: 8 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140610 Year of fee payment: 9 |
|
| LAPS | Cancellation because of no payment of annual fees |