JP2523420B2 - Image processing method in optical measuring device - Google Patents

Image processing method in optical measuring device

Info

Publication number
JP2523420B2
JP2523420B2 JP3229216A JP22921691A JP2523420B2 JP 2523420 B2 JP2523420 B2 JP 2523420B2 JP 3229216 A JP3229216 A JP 3229216A JP 22921691 A JP22921691 A JP 22921691A JP 2523420 B2 JP2523420 B2 JP 2523420B2
Authority
JP
Japan
Prior art keywords
light
image
windows
section image
window
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP3229216A
Other languages
Japanese (ja)
Other versions
JPH0567200A (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.)
Honda Motor Co Ltd
Original Assignee
Honda Motor 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 Honda Motor Co Ltd filed Critical Honda Motor Co Ltd
Priority to JP3229216A priority Critical patent/JP2523420B2/en
Publication of JPH0567200A publication Critical patent/JPH0567200A/en
Application granted granted Critical
Publication of JP2523420B2 publication Critical patent/JP2523420B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、ワークにスリット光を
照射する投光器と、ワークに照射されたスリット光が描
く光切断像を撮像する撮像器とを備える光学式測定装置
の画像処理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing method for an optical measuring apparatus provided with a projector for irradiating a work with slit light and an imager for picking up a light section image drawn by the slit light irradiated on the work. .

【0002】[0002]

【従来の技術】従来、この種の光学式測定装置を用い、
撮像器の画面上の光切断画像からワークの形状や位置を
計測することは知られている。この場合、画面上の横方
向と縦方向の座標軸を夫々X軸、Y軸として、光切断画
像が一方の座標軸例えばX軸方向の極大部を有し、この
極大部が角付けされていて極大点が明瞭に識別できれ
ば、この極大点を基準にしてワークの形状や位置を計測
できるが、極大部が丸くなっていると極大点を一義的に
決定することが困難になるため、この場合は、極大部に
対しY軸方向両側に位置する光切断画像の部分の線の方
程式を算定して、画像のY軸方向の一側部分の線と他側
部分の線との交点の位置を両方程式から求め、この交点
を極大点に代わるものとしてワークの計測を行うことが
考えられている。
2. Description of the Related Art Conventionally, an optical measuring device of this kind is used,
It is known to measure the shape and position of a work from a light section image on the screen of an imager. In this case, with the horizontal and vertical coordinate axes on the screen as the X-axis and the Y-axis, respectively, the light-section image has a maximum portion in one coordinate axis, for example, the X-axis direction. If the point can be clearly identified, the shape and position of the workpiece can be measured with reference to this maximum point, but if the maximum point is rounded, it will be difficult to uniquely determine the maximum point. , Calculate the equations of the lines of the light-section image located on both sides in the Y-axis direction with respect to the maximum part, and determine the position of the intersection of the line of one side of the image in the Y-axis direction and the line of the other side of the image. It is considered that the workpiece is measured by using this equation as an alternative to the maximum point.

【0003】[0003]

【発明が解決しようとする課題】ところで、光切断画像
はある幅を持った帯線状の画像となり、上記の如くY軸
方向一側と他側の画像部分の線の方程式を算定する場
合、この画像部分に複数箇所のウインドを設定し、これ
らウインドの夫々における光切断画像の重心位置を計測
して、これら重心位置を通る曲線又は直線の方程式を算
定することになるが、光学式測定装置に対するワークの
位置が変化すると、光切断画像の画面上の位置も変化す
るため、ウインドを画面上の一定位置に設定したので
は、ウインドが光切断画像から外れたり、又個々のワー
クで光切断画像に対するウインドの設定位置がずれたり
するため、光切断画像の変位に応じてウインドの設定位
置も変位させる必要がある。この場合、光切断画像の極
大部の位置から該画像の変位を検出してウインドの設定
位置を変更することが考えられるが、上記の如く極大部
が丸くなっていると、極大部のX軸方向の変位はある程
度正確に検出できても、Y軸方向の変位は正確には検出
できないため、ウインドの設定位置がY軸方向にずれる
おそれがある。本発明は、以上の点に鑑み、光切断画像
が画面上で変位しても画像の所要箇所に正確にウインド
を設定し得るようにした画像処理方法を提供することを
その目的としている。
By the way, the light section image becomes a band-shaped image having a certain width, and when the equations of the lines of the image portion on one side and the other side in the Y-axis direction are calculated as described above, A plurality of windows are set in this image portion, the barycentric position of the light-section image in each of these windows is measured, and an equation of a curve or a straight line passing through these barycentric positions is calculated. When the position of the workpiece changes, the position of the light-cutting image on the screen also changes, so if the window is set to a fixed position on the screen, the window may deviate from the light-cutting image or the light-cutting may occur on individual workpieces. Since the set position of the window with respect to the image is displaced, the set position of the window needs to be displaced in accordance with the displacement of the light section image. In this case, it is conceivable to detect the displacement of the image from the position of the maximum portion of the light-section image and change the setting position of the window. However, if the maximum portion is rounded as described above, the X-axis of the maximum portion is detected. Even if the displacement in the direction can be detected to some extent accurately, the displacement in the Y-axis direction cannot be detected accurately, so that the set position of the window may shift in the Y-axis direction. The present invention has been made in view of the above points, and an object thereof is to provide an image processing method capable of accurately setting a window at a required portion of an image even if the light-section image is displaced on the screen.

【0004】[0004]

【課題を解決するための手段】上記目的を達成すべく、
本発明は、ワークにスリット光を照射する投光器と、ワ
ークに照射されたスリット光が描く光切断像を撮像する
撮像器とを備える光学式測定装置の画像処理方法であっ
て、撮像器の画面上の光切断画像が該画面の一方の座標
軸方向の極大部を有し、該極大部に対し画面の他方の座
標軸方向両側に位置する光切断画像の部分に夫々所定の
ウインドを設定し、該各ウインドにおける光切断画像の
重心位置を計測するものにおいて、光切断画像の極大部
の前記一方の座標軸方向の最先端の位置を計測し、この
位置から該一方の座標軸方向に所定長さ後戻りした位置
に前記他方の座標軸方向に長手の2個のウインドを設定
し、該両ウインドの夫々における光切断画像の重心位置
を計測して、該両重心位置と所定の相関関係を持った基
準点を求め、前記所定のウインドを夫々該基準点に対し
所定の位置関係で設定することを特徴とする。
In order to achieve the above object,
The present invention is an image processing method for an optical measuring device, which comprises a light projector that irradiates a work with slit light, and an imager that captures a light-section image drawn by the slit light with which the work is irradiated. The upper light-section image has a maximum in the direction of one coordinate axis of the screen, and a predetermined window is set in each of the parts of the light-section image located on both sides of the other coordinate axis of the screen with respect to the maximum, In measuring the barycentric position of the light section image in each window, the position of the extreme end of the maximum section of the light section image in the direction of the one coordinate axis is measured, and a predetermined length is returned from the position in the direction of the one coordinate axis. At the position, two windows that are long in the other coordinate axis direction are set, the barycentric positions of the light-section images in each of the two windows are measured, and a reference point having a predetermined correlation with the barycentric positions is set. Ask, said And setting a constant of the window with respect to each said reference point in a predetermined positional relationship.

【0005】[0005]

【作用】上記一方の座標軸をX軸、他方の座標軸をY軸
として本発明の作用を説明する。光切断画像の極大部が
丸くなっていると、極大部の最先端の位置をY軸方向複
数の画素が検出して、該最先端のY軸座標値を一義的に
決定できなくなるが、X軸座標値は一義的に決定され、
このX軸座標値からX軸方向に所定長さ後戻りした位置
にY軸方向に長手の2つのウインドを設定すれば、極大
部からX軸方向に後戻りしつつY軸方向一側と他側とに
のびる光切断画像の所定部分に各ウインドがかかる。そ
して、両ウインドにおける画像重心位置を計測し、両重
心位置に対し所定の相関関係を持った点、例えば両重心
位置の中点を基準点にすれば、この基準点のX、Y座標
値は光切断画像の画面上のX軸方向とY軸方向の変位を
ほぼ正確に表わす。従って、光切断画像が画面上でX軸
及びY軸方向に変位しても、光切断画像の極大部に対す
るY軸方向一側部分と他側部分とに、上記基準点を基準
にして各所定のウインドをこれら画像部分に対し一定の
位置関係で正確に設定できる。そのため、これらウイン
ドにおいて計測される画像重心位置からY軸方向一側部
分の画像線の方程式と他側部分の画像線の方程式とを精
度良く算定できるようになり、両方程式から求められる
両画像線の交点を基準にしてワークの形状や位置を高精
度で計測できる。
The operation of the present invention will be described with the above-mentioned one coordinate axis as the X axis and the other coordinate axis as the Y axis. When the maximum portion of the light-section image is rounded, a plurality of pixels in the Y-axis direction detect the extreme position of the maximum portion, and the extreme Y-axis coordinate value cannot be uniquely determined. The axis coordinate values are uniquely determined,
If two windows, which are long in the Y-axis direction, are set at positions where the X-axis coordinate values are moved back by a predetermined length in the X-axis direction, the two windows are moved backward in the X-axis direction from the maximum portion and one side and the other side in the Y-axis direction are set. Each window hangs on a predetermined portion of the light-section image that extends to. Then, the image barycentric position in both windows is measured, and if a point having a predetermined correlation with both barycentric positions, for example, the midpoint of both barycentric positions is used as the reference point, the X and Y coordinate values of this reference point are The displacement of the light section image in the X-axis direction and the Y-axis direction on the screen is almost accurately represented. Therefore, even if the light-section image is displaced in the X-axis and Y-axis directions on the screen, the predetermined points are set in the Y-axis direction one side portion and the other-side portion with respect to the maximum portion of the light-section image based on the reference points. The window of can be accurately set with respect to these image parts with a fixed positional relationship. Therefore, it becomes possible to accurately calculate the equation of the image line of the one side portion in the Y-axis direction and the equation of the image line of the other side portion from the image centroid position measured in these windows, and to obtain both image lines obtained from the equations. The shape and position of the workpiece can be measured with high accuracy based on the intersection point of.

【0006】[0006]

【実施例】図示の実施例は、図1に示す自動車車体のル
ーフサイドレールから成るワークAの光切断画像に基い
てワークAの位置を計測し、車体の組立精度を判定する
光学式測定装置の画像処理に本発明を適用したもので、
該測定装置は、図2に示す如く、ワークAに向けて垂直
のスリット光を照射するレーザ等から成る投光器1と、
ワークAの表面上のスリット光の像たるワークAの光切
断像S′を撮像するCCDカメラから成る撮像器2と
を、スリット光の光軸と撮像器2の光軸とが所要の角度
θで斜交するような位置関係で、共通のベースプレート
3に取付けて成るものとした。図中4は画像処理を行う
電子制御回路である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The illustrated embodiment is an optical measuring device for measuring the position of the work A based on a light section image of the work A formed of the roof side rails of the vehicle body shown in FIG. The present invention is applied to the image processing of
As shown in FIG. 2, the measuring device includes a projector 1 including a laser or the like for irradiating a work A with vertical slit light,
The image pickup device 2 formed of a CCD camera for picking up the light section image S ′ of the work A, which is an image of the slit light on the surface of the work A, and the optical axis of the slit light and the optical axis of the image pickup device 2 have a required angle θ. The base plate 3 is attached to the common base plate 3 in such a positional relationship as to be obliquely crossed. Reference numeral 4 in the figure is an electronic control circuit for performing image processing.

【0007】撮像器2の画面Wには、図3に示すよう
に、画面Wの横方向と縦方向の座標軸を夫々X軸、Y軸
として、X軸方向の極大部を有し、この極大部に対しY
軸方向上側が曲線部分、下側が直線部分となった光切断
画像Sが結像される。この画像Sは、極大部が丸くなっ
ていて位置の判定基準に適した明瞭な角部が無いため、
曲線部分の線S1と直線部分の線S2との交点Qの画面W
上のX、Y座標値を、曲線S1の方程式と直線S2の方程
式とから算出し、この交点Qを基準点としてワークAの
位置を計測するようにした。
As shown in FIG. 3, the screen W of the image pickup device 2 has a maximum part in the X-axis direction with the horizontal and vertical coordinate axes of the screen W as the X-axis and the Y-axis, respectively. Y for department
A light-section image S having a curved portion on the upper side in the axial direction and a linear portion on the lower side is formed. In this image S, since the maximum portion is rounded and there is no clear corner portion suitable for the position determination reference,
Screen W of the intersection Q of the curved line S 1 and the straight line S 2
The above X and Y coordinate values are calculated from the equation of the curve S 1 and the equation of the straight line S 2 , and the position of the work A is measured with the intersection Q as a reference point.

【0008】ここで、曲線S1の方程式は、近似的に曲
線部分の特定領域の3点を通る円の方程式として表わす
ことができ、そのため光切断画像Sの上半部に第1乃至
第3の3つのウインドW1、W2、W3を設定して、こ
れら各ウインドにおける光切断画像Sの重心G1、G
2、G3のX、Y座標値を計測し、これら3つの重心を
通る円の方程式を求めてこれを曲線S1の方程式とし
た。ところで、光切断画像Sはある幅を持っており、こ
の画像Sの境界線近傍に位置する画素の受光量が所定の
閾値を上回るか否かの微妙な差で重心の座標値が変化し
てしまい、同一のワークを同一の位置に置いた場合でも
重心の座標値は多少とも変化する。この場合、中間の第
2ウインドW2の画像重心G2の座標値の変化に対する
円の半径の変化率と、他の重心G1、G3の座標値の変
化に対する円の半径の変化率とを比べると、前者の変化
率の方が大きく、重心G2の座標値の誤差が曲線S1
方程式の算出精度に大きく影響する。一方、ワークAの
曲率は個々の製品で左程ばらつくことはなく、この曲率
半径を予め計測しておけば、曲線S1上の2点の座標値
と曲率半径とから曲線S1の方程式を算出できる。そし
て、曲線方程式を微小領域からサンプリングして算出す
る場合、上記G2の座標値の誤差による影響を排除して
方程式の算出精度を向上させるには、2つの点と曲率半
径とから曲線S1の方程式を算出する方が有利であり、
そこで本実施例では、図4に示すように、光切断画像S
の上半部に第1と第3の2つのウインドW1、W3を設
定して、該各ウインドの画像重心G1、G3の座標値を
計測し、これと曲率半径Rとから曲線S1の方程式を算
出するようにした。尚、曲率半径Rの計測に際しては、
ワークAと同形状のマスタワークを所定の基準位置に置
いてその光切断画像を撮像し、画面Wに上記第1乃至第
3の3つのウインドW1、W2、W3を設定して、これ
らウインドの画像重心からマスタワークの光切断画像の
曲線の半径を求め、これを数回繰返して求められた半径
の平均値を曲率半径Rとし、この値を電子制御回路4に
記憶させておく。尚、前記マスタワークは、生産ライン
でのオンライン計測をする場合、該ラインに流れる車体
でもよく、その場合、測定を開始する際の最初の1台も
しくは数台をマスタワークとする。ワークAの光切断画
像Sの直線S2の方程式は、画像Sの下半部に第4と第
5の2つのウインドW4、W5を設定し、該各ウインド
の画像重心G4、G5の座標値を計測することで算出す
る。
Here, the equation of the curve S 1 can be approximately expressed as an equation of a circle passing through the three points in the specific region of the curved portion, and therefore the first to third portions of the upper half of the light section image S are represented. 3 windows W1, W2, W3 are set, and the centers of gravity G1, G of the light section images S in these windows are set.
2. The X and Y coordinate values of G3 were measured, the equation of a circle passing through these three centers of gravity was determined, and this was used as the equation of the curve S 1 . By the way, the light section image S has a certain width, and the coordinate value of the center of gravity changes due to a subtle difference in whether or not the amount of light received by the pixels located near the boundary line of the image S exceeds a predetermined threshold value. Even if the same work is placed at the same position, the coordinate value of the center of gravity changes slightly. In this case, comparing the change rate of the radius of the circle with respect to the change of the coordinate value of the image center of gravity G2 of the intermediate second window W2 and the change rate of the radius of the circle with respect to the change of the coordinate values of the other center of gravity G1 and G3, The former rate of change is larger, and the error in the coordinate value of the center of gravity G2 greatly affects the calculation accuracy of the equation of the curve S 1 . On the other hand, the curvature of the work A does not fluctuate to the left for individual products. If this curvature radius is measured in advance, the equation of the curve S 1 can be calculated from the coordinate values of the two points on the curve S 1 and the curvature radius. Can be calculated. When the curve equation is sampled and calculated from a minute area, in order to eliminate the influence of the error of the coordinate value of G2 and improve the equation calculation accuracy, the curve S 1 is calculated from two points and the radius of curvature. It is advantageous to calculate the equation,
Therefore, in this embodiment, as shown in FIG.
The first and third windows W1 and W3 are set in the upper half part of each of the windows, the coordinate values of the image centroids G1 and G3 of the respective windows are measured, and from this and the radius of curvature R, the equation of the curve S 1 is obtained. Was calculated. When measuring the radius of curvature R,
A master work having the same shape as the work A is placed at a predetermined reference position, a light-section image of the master work is taken, and the three first to third windows W1, W2, and W3 are set on the screen W, and these windows are set. The radius of the curve of the light-cut image of the masterwork is obtained from the image center of gravity, and the average value of the radii obtained by repeating this several times is set as the radius of curvature R, and this value is stored in the electronic control circuit 4. In the case of performing online measurement on a production line, the master work may be a vehicle body flowing through the line. In that case, the first one or several machines at the time of starting the measurement are master works. The equation of the straight line S 2 of the light-cut image S of the work A is set with the fourth and fifth windows W4 and W5 in the lower half of the image S, and the coordinate values of the image centroids G4 and G5 of the respective windows are set. It is calculated by measuring.

【0009】ところで、ワークAの撮像器2との相対位
置関係が変化すると、画面W上の光切断画像Sの位置も
変化し、上記ウインドW1〜W5を画面Wの定位置に設
定したのでは、ウインドが光切断画像Sから外れたり、
又曲線部分に設定するウインドW1、W3が曲率半径の
小さな画像部分にかかって曲線方程式を正確に算出でき
なくなることがある。この場合、図4に示すように、光
切断画像SのX軸方向の極大部の最左端の点Pを基準に
してウインドW1〜W5の位置を設定することも考えら
れるが、光切断画像Sの極大部が角付けされていない限
り点PのY軸座標値を一義的に決定することは困難であ
り、ウインドW1〜W5の光切断画像Sに対する相対的
位置がY軸方向にばらついてしまう。そこで、本実施例
では、点PのX座標値を基準にして右方に所定長さ離間
した位置に、図5(a)に示す如く、Y軸方向に長手の
第6と第7の上下1対のウインドW6、W7を設定し、
該各ウインドの画像重心G6、G7の座標値を計測し
て、両重心G6、G7と所定の相関関係を持った点、例
えば両重心G6、G7の中点となる基準点Mの座標値を
求め、この点Mを基準にして図5(b)に示すように前
記各ウインドW1〜W5の位置を決定するようにした。
By the way, when the relative positional relationship between the work A and the image pickup device 2 changes, the position of the light section image S on the screen W also changes, and the windows W1 to W5 may be set to the fixed positions of the screen W. , The window is out of the light section image S,
Further, the windows W1 and W3 set in the curved portion may be applied to the image portion having a small radius of curvature, and the curve equation may not be accurately calculated. In this case, as shown in FIG. 4, it is conceivable that the positions of the windows W1 to W5 are set with reference to the leftmost end point P of the maximum portion in the X-axis direction of the light section image S, but the light section image S It is difficult to unambiguously determine the Y-axis coordinate value of the point P unless the maximum part of the is not squared, and the relative positions of the windows W1 to W5 with respect to the light section image S vary in the Y-axis direction. . In view of this, in the present embodiment, as shown in FIG. 5A, the sixth and seventh upper and lower parts that are long in the Y-axis direction are provided at positions separated by a predetermined length to the right with respect to the X coordinate value of the point P. Set a pair of windows W6 and W7,
The coordinate values of the image centroids G6 and G7 of the respective windows are measured, and the coordinate value of a point having a predetermined correlation with the centroids G6 and G7, for example, the coordinate value of the reference point M which is the midpoint of the centroids G6 and G7, is calculated. Based on this point M, the positions of the windows W1 to W5 are determined as shown in FIG. 5 (b).

【0010】これによれば、光切断画像Sの画面W上の
位置がずれても、この画像Sに対し一定の相関関係を保
って正確にウインドW1〜W5を設定でき、かくて曲線
1と直線S2との方程式を正しく算出して、正確に交点
Qの座標値を求めることができる。尚、図5(b)にお
いて、dxn、dynは各ウインドWnの左上コーナの
基準点Mに対するX軸方向とY軸方向の位置、Wxn、
Wynは各ウインドWnのX軸方向とY軸方向の長さで
あり、電子制御回路4に記憶されている。
According to this, even if the position of the light cut image S on the screen W is displaced, the windows W1 to W5 can be accurately set while maintaining a constant correlation with the image S, and thus the curve S 1 And the straight line S 2 are correctly calculated, and the coordinate value of the intersection Q can be accurately obtained. In FIG. 5B, dxn and dyn are the positions in the X-axis direction and the Y-axis direction with respect to the reference point M of the upper left corner of each window Wn, Wxn,
Wyn is the length of each window Wn in the X-axis direction and the Y-axis direction, and is stored in the electronic control circuit 4.

【0011】又、ワークAがスリット光の光軸方向に変
位すると、光切断画像Sが画面W上でX軸方向に変位す
ると共に、画像Sの拡大率が変化する。これを図6を参
照して説明する。図6は、撮像器2の光軸をZ軸とし、
Z軸上のC点に撮像器2を置いて、C点から所定の基準
距離Lだけ離れた撮像器2の基準撮像面W′上にX軸と
Y軸とを取ると共に、スリット光の光軸を含むスリット
光に平行な光切断面T上に光軸方向のU軸とこれに直交
するV軸とを取ってV軸をY軸に合致させ、且つX−Y
座標の原点OをU軸が通るように座標系を設定した状態
を示している。今、撮像面W′からZ軸方向に距離aだ
け離れた位置に存する光切断面T上の長さHの像をC点
を視点として撮像面W′に投射したときの像の長さをh
とすると、拡大率K=h/HはL/(L−a)となる。
ここで、HのU軸座標値をu、hのX軸座標値をx(原
点Oの左側が正、右側が負)とすると、aはucosθ
となり、拡大率Kは、 K=L/(L−ucosθ) ……(1) となる。一方、X−Z座標面におけるC点からHへの視
線とZ軸との成す角度をαとして、tanα=x/Lと
なり、又、HのX軸座標値はusinθであるから、 tanα=usinθ/(L−a)=usinθ/(L−ucosθ) となり、これからxとuとの関係を求めると、 x/L=usinθ/(L−ucosθ) 即ち、 u=Lx/(Lsinθ+xcosθ) ……(2) となり、(2)式を(1)式に代入して整理すると、拡
大率Kは、 K=1+(x/L)cotθ ……(3) となる。従って、ワークAがスリット光の光軸方向に変
位するとき、光切断画像Sが画面W上においてX軸方向
に変位し、この変位の方向はワークAが近付くとき左
方、遠ざかるとき右方となり、且つ画像Sの大きさが
(3)式の拡大率に応じて拡大縮小されることになる。
そのため、画像Sの拡大率に応じて上記ウインドW1〜
W5の位置及び大きさを変更することが望まれる。そこ
で、本実施例では、ワークAを正規の位置にセットした
ときに、光切断画像Sの最左端の点Pの画面W上のX軸
座標値が零になるように光学式測定装置を調節してお
き、画像SがX軸方向に変位したとき、点PのX軸座標
値Pxを(3)式のxとして代入して拡大率Kを求め、
図7に示すように各ウインドWnのY軸座標値を上記d
ynにKを乗算した値とし、更に各ウインドWnの大き
さも拡大率Kに応じて変え、光切断画像Sの所要位置に
夫々ウインドW1〜W5を設定できるようにした。
Further, when the work A is displaced in the optical axis direction of the slit light, the light section image S is displaced in the X axis direction on the screen W and the enlargement ratio of the image S is changed. This will be described with reference to FIG. In FIG. 6, the optical axis of the image pickup device 2 is the Z axis,
The image pickup device 2 is placed at a point C on the Z axis, the X axis and the Y axis are taken on the reference image pickup surface W ′ of the image pickup device 2 which is separated from the point C by a predetermined reference distance L, and the light of slit light is emitted. A U-axis in the optical axis direction and a V-axis orthogonal to the optical-axis are arranged on a light-cutting plane T parallel to the slit light including the axis so that the V-axis coincides with the Y-axis and XY
It shows a state in which the coordinate system is set so that the U axis passes through the origin O of the coordinates. Now, let us say that the image length when an image of length H on the light section plane T, which is located at a distance a in the Z-axis direction from the image plane W ′, is projected onto the image plane W ′ with the point C as the viewpoint. h
Then, the enlargement ratio K = h / H is L / (La).
Here, assuming that the U-axis coordinate value of H is u and the X-axis coordinate value of h is x (the left side of the origin O is positive and the right side is negative), a is ucos θ.
Therefore, the enlargement ratio K is K = L / (L-ucos θ) (1) On the other hand, tan α = x / L, where α is the angle between the Z-axis and the line of sight from point C to H on the X-Z coordinate plane, and the X-axis coordinate value of H is usinθ, so tan α = usinθ / (L−a) = usinθ / (L−ucosθ), from which the relationship between x and u is calculated: x / L = usinθ / (L−ucosθ) That is, u = Lx / (Lsinθ + xcosθ). 2), and by substituting the equation (2) into the equation (1) and rearranging, the enlargement factor K is K = 1 + (x / L) cotθ (3). Therefore, when the work A is displaced in the optical axis direction of the slit light, the light section image S is displaced in the X axis direction on the screen W, and the displacement direction is left when the work A approaches, and right when the work A moves away. Moreover, the size of the image S is enlarged or reduced according to the enlargement ratio of the equation (3).
Therefore, the window W1 to
It is desired to change the position and size of W5. Therefore, in the present embodiment, when the work A is set to the normal position, the optical measuring device is adjusted so that the X-axis coordinate value on the screen W of the point P at the leftmost end of the light section image S becomes zero. Incidentally, when the image S is displaced in the X-axis direction, the X-axis coordinate value Px of the point P is substituted as x in the equation (3) to obtain the enlargement factor K,
As shown in FIG. 7, the Y-axis coordinate value of each window Wn is set to the above d.
The value of yn is multiplied by K, and the size of each window Wn is changed according to the enlargement ratio K so that the windows W1 to W5 can be set at the required positions of the light section image S, respectively.

【0012】又、画像処理による形状の計測では、撮像
器2のレンズ系の歪曲による誤差や、ピントずれによる
誤差や、ベースプレート3の加工誤差及びこれへの投光
器1と撮像器2の取付誤差に起因した投光器1と撮像器
2の相対位置関係の誤差による誤差を生ずることがあ
る。そこで、図8に示す如く、光学式測定装置を定盤5
上に取付けると共に、定盤5上に光切断面上の直交2方
向即ち前記U軸方向とV軸方向とに移動可能なテーブル
6を設けて、該テーブル6上にワークAの形状に似た形
状の基準ブロック7を置き、誤差を予め計測するように
した。これを詳述するに、基準ブロック7をテーブル6
により後記する交点に対応する基準ブロック7の仮想コ
ーナ点が光切断面上に設定した複数の計測ポイントU1
1、…UmVmに各合致するように順に移動し、各ポイ
ントにおいて基準ブロック7に投光器1からスリット光
を照射して該ブロック7上の光切断像S′を撮像器2で
撮像し、撮像器2の画面上の光切断画像から上記と同様
の方法で該画像を構成する2つの線の交点(上記Qに対
応する点)の位置を求め、この交点に対応する光切断面
上の座標値と計測ポイントの座標値とのU軸方向とV軸
方向の誤差Δu、Δvを各計測ポイント毎に計測する。
尚、本実施例では基準ブロック7の基部に上記仮想コー
ナ点に合致するエッジ部7aを形成し、仮想コーナ点が
計測ポイントに合致するように該エッジ部7aを目安に
して基準ブロック7を正確にセッティングし得るように
した。図9は、複数の計測ポイントU11、…UmVmに
おける夫々のΔuを立体的に示した図であり、Δuのデ
ータから重回帰によりΔuを表す補正式Δu=f
1(u、v)を求め、同様にΔvを表す補正式Δy=f2
(u、v)を求め、ワークAの計測で得られた交点Qの
光切断面上の座標値にこれら補正式で求められる補正値
を加減算して、ワークAの位置を判定する座標値とし、
上記種々の原因による誤差を一括して補正して正確な計
測を行い得られるようにした。
Further, in the measurement of the shape by image processing, an error due to the distortion of the lens system of the image pickup device 2, an error due to focus shift, a processing error of the base plate 3 and an attachment error of the projector 1 and the image pickup device 2 to the error. An error may occur due to an error in the relative positional relationship between the projector 1 and the image pickup device 2 caused by the error. Therefore, as shown in FIG.
A table 6 which is mounted on the base 5 and is movable in two orthogonal directions on the light cutting plane, that is, the U-axis direction and the V-axis direction, is provided on the surface plate 5, and the table 6 resembles the shape of the work A. The reference block 7 having a shape was placed, and the error was measured in advance. To explain this in detail, the reference block 7 is set to the table 6
Therefore, the virtual corner points of the reference block 7 corresponding to the intersections to be described later are set to a plurality of measurement points U 1 set on the light cutting plane.
V 1 , ... Umvm are sequentially moved so as to match each other, and at each point, the reference block 7 is irradiated with slit light from the light projector 1 and a light-section image S ′ on the block 7 is picked up by the image pickup device 2 and picked up. From the light section image on the screen of the container 2, the position of the intersection (the point corresponding to the above Q) of the two lines forming the image is obtained by the same method as above, and the coordinates on the light section plane corresponding to this intersection point are obtained. The errors Δu and Δv in the U-axis direction and the V-axis direction between the value and the coordinate value of the measurement point are measured for each measurement point.
In this embodiment, an edge portion 7a that coincides with the virtual corner point is formed at the base of the reference block 7, and the reference block 7 is accurately measured by using the edge portion 7a as a guide so that the virtual corner point coincides with the measurement point. I was able to set to. FIG. 9 is a diagram three-dimensionally showing each Δu at a plurality of measurement points U 1 V 1 , ... UmVm, and a correction formula Δu = f representing Δu by multiple regression from the data of Δu.
1 (u, v) is calculated, and a correction expression Δy = f 2 that similarly expresses Δv
(U, v) is obtained, and the correction value obtained by these correction equations is added to or subtracted from the coordinate value on the optical cutting plane of the intersection Q obtained by the measurement of the work A to obtain the coordinate value for determining the position of the work A. ,
The errors due to the above various causes are collectively corrected so that accurate measurement can be performed.

【0013】以上の処理手順をまとめて表わすと図10
の通りとなる。即ち、先ず誤差計測により補正式f1
2を求め、次にマスタワークを用いて曲率半径Rを求
め、その後に量産車体の計測を行う。この計測に際して
は、図11に示す如く、先ず光切断画像Sの最左端の点
Pの位置を計測し(S1)、次に点Pを基準にして第6
ウインドW6を設定し(S2)、該ウインドW6におけ
る画像重心G6の位置を計測する(S3)。又、点Pを
基準にして第7ウインドW7を設定し(S4)、該ウイ
ンドW7における画像重心G7の位置を計測して(S
5)、両重心G6、G7の位置から基準点Mを決定する
(S6)。次に、基準点Mに基いて第1ウインドW1を
設定して該ウインドW1の画像重心G1の位置を計測し
(S7、S8)、以下同様にして第3乃至第5ウインド
W3、W4、W5を順に設定して各ウインドの画像重心
G3、G4、G5の位置を計測する(S9…S14)。
ここで各ウインドW1〜W5の設定処理手順は図12に
示す通りであり、即ちメモリから各ウインドWnの位置
及び大きさを表すパラメータdxn、dyn、Wxn、
Wynを読出し()、次に点PのX軸座標値Pxに応
じた拡大率Kを求めて()、dynをK・dyn、W
xnとWynを夫々K・Wxn、K・Wynに変更し
()、基準点Mからdxn、dynの位置にWxn、
Wynの大きさのウインドWnを設定する()。図1
1に戻って、各重心G1〜G5の位置を計測した後、G
1とG3と上記曲率半径Rに前記拡大率Kを乗算した半
径とから曲線S1の方程式を算出し(S15)、次にG
4とG5から直線S2の方程式を算出して(S16)、
両方程式から交点Qの位置を求め(S17)、次いで交
点Qの画面Wの座標値を光切断面上の座標値に変換して
(S18)、この座標値に補正式f1、f2から求められ
る補正値を加減算して(S19)、このように補正され
た座標値をワークAの位置データとして車体の組立精度
を判定する上位コンピュータに送信し(S20)、1回
の計測処理を完了する。
A summary of the above processing procedure is shown in FIG.
It becomes the street. That is, first, the correction formula f 1 ,
f 2 is obtained, then the radius of curvature R is obtained using the master work, and then the mass production vehicle body is measured. In this measurement, as shown in FIG. 11, first, the position of the leftmost point P of the light section image S is measured (S1), and then the sixth point is set with reference to the point P.
The window W6 is set (S2), and the position of the image center of gravity G6 on the window W6 is measured (S3). Further, the seventh window W7 is set based on the point P (S4), and the position of the image center of gravity G7 on the window W7 is measured (S4).
5) Then, the reference point M is determined from the positions of the center of gravity G6 and G7 (S6). Next, the first window W1 is set on the basis of the reference point M, the position of the image center of gravity G1 of the window W1 is measured (S7, S8), and the third to fifth windows W3, W4, W5 are similarly processed. Are sequentially set and the positions of the image centroids G3, G4, and G5 of each window are measured (S9 ... S14).
Here, the setting processing procedure of each window W1 to W5 is as shown in FIG. 12, that is, the parameters dxn, dyn, Wxn, indicating the position and size of each window Wn from the memory.
Wyn is read (), then the enlargement factor K corresponding to the X-axis coordinate value Px of the point P is obtained (), and dyn is K · dyn, W
xn and Wyn are changed to K · Wxn and K · Wyn, respectively (), and Wxn, dxn, dyn at the position from the reference point M to dxn, dyn
A window Wn having a size of Wyn is set (). FIG.
After returning to 1 and measuring the positions of the respective centers of gravity G1 to G5,
The equation of the curve S 1 is calculated from 1 and G3 and the radius obtained by multiplying the radius of curvature R by the enlargement factor K (S15), and then G
Calculate the equation of the straight line S 2 from 4 and G5 (S16),
The position of the intersection Q is obtained from both equations (S17), then the coordinate value of the screen W of the intersection Q is converted into the coordinate value on the light cutting plane (S18), and this coordinate value is calculated from the correction formulas f 1 and f 2. The calculated correction values are added and subtracted (S19), and the coordinate values thus corrected are transmitted as position data of the work A to a host computer that determines the assembly accuracy of the vehicle body (S20), and one measurement process is completed. To do.

【0014】[0014]

【発明の効果】以上の説明から明らかなように、本発明
によれば、光切断画像が変位しても、拡大部の両側の画
像部分の所定箇所に正確にウインドを設定でき、両側の
画像部分の画像線の方程式を正確に算定して、両画像線
の交点を基準にしたワークの計測を高精度で行い得られ
る効果を有する。
As is apparent from the above description, according to the present invention, even if the light section image is displaced, the windows can be accurately set at the predetermined portions of the image portions on both sides of the enlarged portion, and the images on both sides can be set. There is an effect that the equation of the image line of the part is accurately calculated and the work can be measured with high accuracy based on the intersection of both image lines.

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

【図1】 ワークの斜視図FIG. 1 is a perspective view of a work.

【図2】 本発明を適用する光学式測定装置の一例の
平面図
FIG. 2 is a plan view of an example of an optical measuring device to which the present invention is applied.

【図3】 光切断画像の極大部両側の画像線の交点の
求め方を示す図
FIG. 3 is a diagram showing a method of obtaining an intersection of image lines on both sides of a maximum part of a light section image.

【図4】 光切断画像の曲線部分の画像線の方程式を
2つのウインドを設定して求める方法を示す図
FIG. 4 is a diagram showing a method of obtaining an equation of an image line of a curved portion of a light section image by setting two windows.

【図5】 (a)は本発明の基準点の求め方を示す
図、(b)は基準点を基準にしたウインドの設定パラメ
ータを示す図
5A is a diagram showing how to obtain a reference point according to the present invention, and FIG. 5B is a diagram showing setting parameters of a window based on the reference point.

【図6】 ワークの光軸方向の変化による画像変化の
原理を示す図
FIG. 6 is a diagram showing the principle of image change due to a change in the optical axis direction of the work.

【図7】 画像変化に合わせたウインドの設定パラメ
ータの変更を示す図
FIG. 7 is a diagram showing changes in window setting parameters according to image changes.

【図8】 誤差を計測する際の装置レイアウトを示す
斜視図
FIG. 8 is a perspective view showing a device layout when measuring an error.

【図9】 光切断面に合致する座標面上に計測された
誤差を立体的に表わした図
FIG. 9 is a three-dimensional view of an error measured on a coordinate plane that matches a light-section plane.

【図10】 全体的な計測手順を示すフローチャートFIG. 10 is a flowchart showing the overall measurement procedure.

【図11】 ワーク計測時の処理手順を示すフローチャ
ート
FIG. 11 is a flowchart showing a processing procedure when measuring a workpiece.

【図12】 ウインドの設定手順を示すフローチャートFIG. 12 is a flowchart showing a window setting procedure.

【符号の説明】[Explanation of symbols]

1 投光器 2 撮像器 A ワーク W 画面 S 光切断画像 W1〜W5 極大部両側に設定するウインド W6、W7 極大部先端から所定長さ離して設定するウ
インド G1〜G7 画像重心 M 基準点 Q 交点
1 Light projector 2 Imager A Work W screen S Light section image W1 to W5 Windows W6 and W7 set on both sides of maximal part Window G1 to G7 set at a predetermined distance from the tip of maximal part Image center of gravity M Reference point Q Intersection point

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 ワークにスリット光を照射する投光器
と、ワークに照射されたスリット光が描く光切断像を撮
像する撮像器とを備える光学式測定装置の画像処理方法
であって、撮像器の画面上の光切断画像が該画面の一方
の座標軸方向の極大部を有し、該極大部に対し画面の他
方の座標軸方向両側に位置する光切断画像の部分に夫々
所定のウインドを設定し、該各ウインドにおける光切断
画像の重心位置を計測するものにおいて、光切断画像の
極大部の前記一方の座標軸方向の最先端の位置を計測
し、この位置から該一方の座標軸方向に所定長さ後戻り
した位置に前記他方の座標軸方向に長手の2個のウイン
ドを設定し、該両ウインドの夫々における光切断画像の
重心位置を計測して、該両重心位置と所定の相関関係を
持った基準点を求め、前記所定のウインドを夫々該基準
点に対し所定の位置関係で設定することを特徴とする光
学式測定装置における画像処理方法。
1. An image processing method for an optical measuring device, comprising: a light projector for irradiating a workpiece with slit light; and an imager for capturing a light-section image drawn by the slit light irradiating the workpiece. The light cut image on the screen has a maximum in the direction of one coordinate axis of the screen, and a predetermined window is set in each of the parts of the light cut image located on both sides of the coordinate axis of the screen with respect to the maximum. In measuring the barycentric position of a light-section image in each window, the tip of the maximum position of the light-section image in the direction of the one coordinate axis is measured, and the position is returned from this position in the direction of the one coordinate axis by a predetermined length. At this position, two windows that are long in the direction of the other coordinate axis are set, the barycentric positions of the light-section images in each of the two windows are measured, and a reference point having a predetermined correlation with the barycentric positions. Ask for An image processing method in an optical measuring apparatus, characterized in that a predetermined window is set in a predetermined positional relationship with respect to the reference point.
【請求項2】 前記極大部に対し前記他方の座標軸方向
両側に位置する光切断画像の部分に夫々前記所定のウイ
ンドを複数箇所設定し、光切断画像の該座標軸方向一側
部分に設定した複数のウインドにおいて計測される光切
断画像の重心位置から該一側部分の線の方程式を算定す
ると共に、光切断画像の該座標軸方向他側部分に設定し
た複数のウインドにおいて計測される光切断画像の重心
位置から該他側部分の線の方程式を算定し、両方程式か
ら一側部分の線と他側部分の線との交点の位置を求める
ことを特徴とする請求項1に記載の光学式測定装置にお
ける画像処理方法。
2. A plurality of the predetermined windows are respectively set in portions of the light section image located on both sides in the other coordinate axis direction with respect to the maximum portion, and a plurality of the predetermined windows are set at one side of the light section image in the coordinate axis direction. While calculating the equation of the line of the one side portion from the position of the center of gravity of the light section image measured in the window of, the light section image of the light section image measured in a plurality of windows set in the coordinate axis direction other side portion of the light section image. The optical measurement according to claim 1, wherein the equation of the line of the other side portion is calculated from the position of the center of gravity, and the position of the intersection of the line of the one side portion and the line of the other side portion is obtained from both equations. Image processing method in device.
JP3229216A 1991-09-09 1991-09-09 Image processing method in optical measuring device Expired - Lifetime JP2523420B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3229216A JP2523420B2 (en) 1991-09-09 1991-09-09 Image processing method in optical measuring device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3229216A JP2523420B2 (en) 1991-09-09 1991-09-09 Image processing method in optical measuring device

Publications (2)

Publication Number Publication Date
JPH0567200A JPH0567200A (en) 1993-03-19
JP2523420B2 true JP2523420B2 (en) 1996-08-07

Family

ID=16888648

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3229216A Expired - Lifetime JP2523420B2 (en) 1991-09-09 1991-09-09 Image processing method in optical measuring device

Country Status (1)

Country Link
JP (1) JP2523420B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5633950A (en) * 1993-12-28 1997-05-27 Honda Giken Kogyo Kabushiki Kaisha Method of image processing in optical measuring apparatus
JP5832928B2 (en) * 2012-02-17 2015-12-16 株式会社キーエンス Optical displacement meter and measuring method of measurement object
JP5832927B2 (en) * 2012-02-17 2015-12-16 株式会社キーエンス Optical displacement meter

Also Published As

Publication number Publication date
JPH0567200A (en) 1993-03-19

Similar Documents

Publication Publication Date Title
JP4234059B2 (en) Camera calibration method and camera calibration apparatus
JP3988588B2 (en) 3D measuring device
JP2509357B2 (en) Work position detector
JP2021193400A (en) Method for measuring artefact
JP5001330B2 (en) Curved member measurement system and method
US5311289A (en) Picture processing method in optical measuring apparatus
JP2002099902A (en) Image processing device for measuring three-dimensional information of object through binocular stereoscopic vision, its method, and storage medium with measurement program stored therein
JP2523420B2 (en) Image processing method in optical measuring device
JP2000205821A (en) Instrument and method for three-dimensional shape measurement
JP2552966B2 (en) Correction method of error in optical measuring device
JPH0484707A (en) Three-dimensional size measuring apparatus
JP2520804B2 (en) Image processing method in optical measuring device
JP2559646B2 (en) Image processing method in optical measuring device
JP2624557B2 (en) Angle measuring device for bending machine
JPH03259705A (en) Angle measuring instrument for bending machine
JPH07218227A (en) Method and apparatus for measuring sectional shape
JPH0996506A (en) Adjusting method for position by three-dimensional visual sensor and recognition apparatus for three-dimensional image
JP2691683B2 (en) Image processing method in optical measuring device
WO2021240934A1 (en) Marker for measuring position and orientation of subject, device, system, and measurement method
JP2691682B2 (en) Image processing method in optical measuring device
JP2691681B2 (en) Image processing method in optical measuring device
JP3013255B2 (en) Shape measurement method
JPH05329793A (en) Visual sensor
JP2724961B2 (en) Image processing method in optical measuring device
JP2000331924A (en) Measurement method for leveling mask or wafer in aligner and measurement controller