JPS60120477A - Picture processor - Google Patents

Picture processor

Info

Publication number
JPS60120477A
JPS60120477A JP22850783A JP22850783A JPS60120477A JP S60120477 A JPS60120477 A JP S60120477A JP 22850783 A JP22850783 A JP 22850783A JP 22850783 A JP22850783 A JP 22850783A JP S60120477 A JPS60120477 A JP S60120477A
Authority
JP
Japan
Prior art keywords
address
circuit
edge
image data
signal
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.)
Pending
Application number
JP22850783A
Other languages
Japanese (ja)
Inventor
Toichi Kudo
工藤 統一
Hidetaka Suzuki
秀孝 鈴木
Hitoshi Nagakura
永倉 均
Masahiro Adachi
正博 足立
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.)
Nissan Motor Co Ltd
Original Assignee
Nissan 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 Nissan Motor Co Ltd filed Critical Nissan Motor Co Ltd
Priority to JP22850783A priority Critical patent/JPS60120477A/en
Publication of JPS60120477A publication Critical patent/JPS60120477A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0014Image feed-back for automatic industrial control, e.g. robot with camera

Landscapes

  • Engineering & Computer Science (AREA)
  • Robotics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

PURPOSE:To prevent occurrence of errors regardless of the sealing direction with a picture processor which is suitable for correcting the moving position of a playback type robot, etc., by calculating the deflection between a reading out address and prefixed reference address from both addresses. CONSTITUTION:When the 1st or 2nd edge signal b1 or b2 is inputted from the OR circuit 43 of a selection circuit 39, a latch circuit 44 latches a reading out address RE outputted from the 2nd counter 22 of a reading out circuit 21 at the time as the reading out address X indicating the image forming position of an edge corresponding to the sealing line SL2 of a shadow SH at the one-dimensional sensor of a camera 7. A deflection calculating circuit 45 finds the deflection DELTAX between the reading out address X latched at the latch circuit 44 and a reference address OFFH previsouly written in a data register 46 and, at the same time, outputs numerical data KDELTAX which is obtained by multiplying the deflection DELTAX by K (constant) to a controller 47 which drives a pulse motor 5.

Description

【発明の詳細な説明】 挟拵分」 この発明は1例えばプレーバック形ロボットのような被
作業部に対応して予め定めた作業軌跡を移動する移動装
置の位置補正装置に好適な画像処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention provides (1) an image processing device suitable for a position correction device for a moving device that moves along a predetermined work trajectory in response to a workpiece, such as a playback robot; Regarding.

従来筑W 近時、例えば自動車の組立工程でなされるシーリング作
業を移動装置としてのプレーバック形のロボットに行な
わせようとする試みが盛んになされている。
BACKGROUND OF THE INVENTION Recently, many attempts have been made to have playback type robots serving as moving devices perform sealing work, which is performed, for example, in the assembly process of automobiles.

ところで、この種のロボットにシーリング作業のような
比較的緻密な作業を行なわせる場合、ロボット自体の繰
り返し精度及びティーチング精度等に基づく作業誤差や
、ワークの位置決め精度及びワーク間誤差等に基づく誤
差を考慮する必要から、ロボットのアームの先端部にシ
ーリングノズルの位置を補正するようにした装置を設け
る試みもなされている。
By the way, when this type of robot performs relatively precise work such as sealing work, work errors due to the repeatability and teaching accuracy of the robot itself, errors due to workpiece positioning accuracy and errors between workpieces, etc. For this reason, attempts have been made to provide a device for correcting the position of the sealing nozzle at the tip of the robot arm.

ところで、このような位置補正装置としては。By the way, as such a position correction device.

次のようなものが考えられる。The following can be considered.

すなわち、ロボットのアームの先端部に、例えば−次元
イメージセンサを用いた撮像手段等を搭載した駆動機構
を設けて、この駆動機構にシーリングノズルを取り付け
ておく。
That is, a drive mechanism equipped with an imaging means using, for example, a -dimensional image sensor is provided at the tip of the arm of the robot, and a sealing nozzle is attached to this drive mechanism.

但し、この駆動機構によってアーム先端部に対して相対
移動する撮像手段及びシーリングノズルの移動方向は、
アームの移動方向であるシーリング方向と例えば直交す
る方向とし、この方向に撮像手段の直線状の撮像視野が
向いているものとする。
However, the direction of movement of the imaging means and sealing nozzle, which are moved relative to the arm tip by this drive mechanism, is as follows:
It is assumed that the direction is perpendicular to the ceiling direction, which is the moving direction of the arm, and that the linear imaging field of the imaging means faces in this direction.

そして、例えば鉄板の継目のシーリングラインに光を当
てて付けた一定幅のライン状の陰影(撮像対象)を、前
述の駆動機構に取り付けた撮像手段によって撮像する。
Then, for example, a line-shaped shadow (imaging target) of a constant width created by shining light on a ceiling line of a seam of an iron plate is imaged by an imaging means attached to the above-mentioned drive mechanism.

そして、ロボットのプレーバック中に、撮像手段から出
力される画像信号を画像処理装置によって処理しながら
、撮像した陰影の結像位置と一次元イメージセンサにお
ける予め定めた基準画素位置との間の偏差を逐次求め、
そのめた偏差に応じて該偏差が零となるように前述の駆
動機構を動かすことによって、その駆動機構に取り付け
たシーリングノズルとシーリングラインとの位置ずれを
補正するようにしたものである。
During playback of the robot, the image signal output from the imaging means is processed by the image processing device, and the deviation between the imaging position of the imaged shadow and the predetermined reference pixel position on the one-dimensional image sensor is detected. Find sequentially,
By moving the aforementioned drive mechanism according to the deviation so that the deviation becomes zero, the positional deviation between the sealing nozzle attached to the drive mechanism and the sealing line is corrected.

画像処理装置は、シーリングノズルとシーリングライン
との間の位置ずれを検知する機能を果し、撮像手段から
出力される画像信号に基づく1フレ一ム分の画像データ
を順次画像メモリに記憶した後、その画像メモリから画
像データを順次読み出しながら、その読み出した画像デ
ータとその画像データが記憶されていたアドレスとに基
づいて、シーリングラインの陰影の結像位置に対応する
アドレスを検知し、その検知したアドレスと予め定めた
基準画素に対応する画像データを記憶したアドレスとに
基づいて、前述の偏差を演算するよう3− にしている。
The image processing device has a function of detecting a positional deviation between the ceiling nozzle and the ceiling line, and after sequentially storing image data for one frame in an image memory based on the image signal output from the imaging means. , while sequentially reading image data from the image memory, detecting the address corresponding to the imaging position of the shadow of the ceiling line based on the read image data and the address where the image data was stored; The above deviation is calculated based on the address where the image data corresponding to the predetermined reference pixel is stored and the address where the image data corresponding to the predetermined reference pixel is stored.

ところで、上記のような画像処理装置においては、シー
リンクラインの結像位置を示すアドレスを、ラインに付
けた一定幅の陰影の一方のエツジに基づいて検出するこ
とが考えられるが、このようにすると次のような問題が
あった。
By the way, in the image processing device as described above, it is possible to detect the address indicating the imaging position of the ceiling line based on one edge of a constant-width shading added to the line. Then, the following problem occurred.

例えば、シーリンクラインに付けた一定幅の陰影におけ
るシーリンク方向に向って左側のエツジに基づく検出仕
様とした場合、第1図(イ)(ロ)に示すような重ね合
せのワーク(鉄板)W+ 、W2の継目のシーリンクラ
インSLoにおいて、シーリンク方向を矢示Y方向とす
れば、シーリングラインSLoに矢示X1方向から光を
当てて付けた幅ρXの陰影SHoのラインSLoに対応
するエツジEDoに基づくシーリンクラインSLoの結
像アドレスを検出することができ、その結像アドレスと
基準アドレスとの偏差に応じて図示しないシーリングノ
ズルを位置補正することにより、シーリングラインSL
oに沿ったシーリンクを行なうことができる。
For example, if the detection specification is based on the edge on the left side toward the sealink direction in a shadow of a certain width attached to the sealink line, overlapping workpieces (iron plates) as shown in Figure 1 (a) and (b) are used. In the sealing line SLo at the joint of W+ and W2, if the sealing direction is the direction of arrow Y, it corresponds to the line SLo of the shade SHo of width ρX created by shining light on the ceiling line SLo from the direction of arrow X1. The imaging address of the ceiling line SLo based on the edge EDo can be detected, and by correcting the position of the ceiling nozzle (not shown) according to the deviation between the imaging address and the reference address, the ceiling line SL
A sea link along the o can be performed.

=4− ところが、第2図(イ)(ロ)に示すように、第1図(
イ)(ロ)とは逆に重ね合せのワークW+ 、W2の継
目のシーリングラインSL1において、シーリング方向
が第1図の場合と同じ矢示Y方向の場合、シーリングラ
インSLIに矢示X2方向から光を当てて付けた幅i!
xの陰影SH,のラインのラインSL、に対応しないエ
ツジED、に基づくシーリンクラインSL1の結像アド
レスを検出することになってしまうため請求める偏差に
陰影SH,の幅11分だけ誤差が生じ、それによって正
しい位置補正がなされなくなってしまう問題があった。
=4− However, as shown in Figures 2 (a) and (b), Figure 1 (
b) Contrary to (b), when the sealing direction is in the direction of arrow Y, which is the same as in Fig. 1, at the sealing line SL1 of the joint of overlapping workpieces W+ and W2, the sealing line SLI is from the direction of arrow X2. Width i when exposed to light!
Since the imaging address of the seal line SL1 is detected based on the edge ED, which does not correspond to the line SL of the line of the shadow SH, of x, the deviation that can be claimed has an error of 11 times the width of the shadow SH This causes a problem in that correct position correction cannot be performed.

l−旬− この発明は、上記のような背景に鑑みてなされたもので
あり、どのような重ね合せのワークのシーリングライン
でもシーリング方向に拘らず前述のような誤差を生じな
いようにし得る画像処理装置を提供することを目的とす
る。
This invention has been made in view of the above-mentioned background, and provides an image that can prevent the above-mentioned error from occurring regardless of the sealing direction of the sealing line of any stacked workpieces. The purpose is to provide processing equipment.

構成 そのため、この発明による画像処理装置は、記憶手段か
ら順次読み出した画像データに基づいて、ライン状の撮
像対象の2つのエツジを夫々検出する第1.第2のエツ
ジ検出手段を設けて、これ等の第1.第2のエツジ検出
手段の何れか一方を選択できるようにし、その選択した
方のエツジ検出手段によって検出したエツジに対応する
画像データの読出アドレスと、予め定めた基準アドレス
とによって両者の偏差を演算するように構成する。
Structure Therefore, the image processing apparatus according to the present invention detects two edges of a line-shaped object to be imaged based on the image data sequentially read out from the storage means. A second edge detection means is provided to detect the first edge. Either one of the second edge detection means can be selected, and the deviation between the two is calculated based on the read address of the image data corresponding to the edge detected by the selected edge detection means and a predetermined reference address. Configure it to do so.

叉l二匹 以下、この発明の実施例を添付図面の第3図以降を参照
しながら説明する。
Embodiments of the present invention will now be described with reference to FIGS. 3 and subsequent figures of the accompanying drawings.

第3図は、この発明による画像処理装置を適用する位置
補正装置の機構部の構成図である。
FIG. 3 is a configuration diagram of a mechanical section of a position correction device to which the image processing device according to the present invention is applied.

同図において、互いに溶接等で重ね合せたワーク(板材
)W3.W4におけるシーリングラインSL2に対応し
て予めティーチングによって定めた作業軌跡を移動する
移動装置としてのプレーバック形ロボット1のアーム1
aの先端部には、以下に述べる各部によって構成した制
御系を除く位置補正袋@2を取り付けている。
In the figure, workpieces (plate materials) W3. Arm 1 of playback type robot 1 as a moving device that moves along a work trajectory predetermined by teaching corresponding to ceiling line SL2 at W4.
At the tip of a, a position correction bag @2 excluding the control system constituted by the various parts described below is attached.

なお、このアーム1aは、矢示A方向に回転するように
なっているが、ロボット1の他の部分を含めて公知のロ
ボットをそのまま利用できるので、その詳細は省略する
The arm 1a is designed to rotate in the direction of arrow A, but since any known robot including the other parts of the robot 1 can be used as is, the details will be omitted.

位置補正装置2において、アーム1aの先端部に取り付
けたブラケット乙には、軸線Rのまわりに取付盤4を揺
動回転させるパルスモータ5及び減速機6等を取り伺は
てあり、このブラケット3が図示の姿勢にあって、軸線
Rの向く方向がロボット1の移動方向であるシーリング
方向Bと一致した状態でパルスモータ5を回転させると
、取付盤4はシーリング方向と直交する方向(以下、「
位置補正方向」と云う)Cに揺動回転する。
In the position correction device 2, the bracket B attached to the tip of the arm 1a is equipped with a pulse motor 5, a speed reducer 6, etc. for swinging and rotating the mounting plate 4 around the axis R. When the pulse motor 5 is rotated in the illustrated posture and the direction of the axis R matches the sealing direction B, which is the moving direction of the robot 1, the mounting plate 4 is rotated in a direction perpendicular to the sealing direction (hereinafter referred to as "
The position correction direction is referred to as "position correction direction").

そして、この取付盤4には、撮像手段であるNビット(
例えば512ビツト)の−次元イメージセンサカメラ(
以下、「カメラ」と省略する)7と、高圧吹付方式のシ
ーリングノズル8とを次のような条件で取り付けである
This mounting board 4 is equipped with an N bit (
For example, a 512-bit) -dimensional image sensor camera (
(hereinafter abbreviated as "camera") 7 and a high-pressure spray type sealing nozzle 8 were installed under the following conditions.

すなわち、カメラ7は、その内部の一次元イメージセン
サの配列方向が取付盤4の揺動回転方向、7− すなわち位置補正方向Cを含む面と平行となるようにし
て、ブラケット3が図示の姿勢にある時に破線で示すカ
メラ7の直線状の撮像視野Eがシーリング方向Bと直交
する方向に向くようにすると共に、カメラ7の光軸りと
取付盤4の揺動回転軸線Rとが一次元イメージセンサの
中心位置(中心画素位置)で直角に交差し、且つ取付盤
4を揺動回転の基準位置で固定した時に光軸りがアーム
1aの回転中心と同軸となるように取り付け、シーリン
グノズル8はその先端部8aが光軸りと軸線Rとを含む
面内に位置し、且つシーリング方向Bに対して光軸りよ
り後方に若干オフセットした位置に位置するように取り
付けて、該位置で充填剤をシーリングラインSL2に吹
き付けるようにしている。
That is, the camera 7 is configured such that the arrangement direction of the one-dimensional image sensors therein is parallel to the rocking rotation direction of the mounting board 4, 7-, that is, the plane containing the position correction direction C, and the bracket 3 is placed in the illustrated posture. , the linear imaging field E of the camera 7 shown by the broken line faces in a direction perpendicular to the ceiling direction B, and the optical axis of the camera 7 and the swing rotation axis R of the mounting board 4 are aligned one-dimensionally. The sealing nozzle is installed so that it intersects at right angles at the center position (center pixel position) of the image sensor, and the optical axis is coaxial with the rotation center of the arm 1a when the mounting board 4 is fixed at the reference position for rocking rotation. 8 is installed so that its tip 8a is located in a plane including the optical axis and the axis R, and is located at a position slightly offset rearward from the optical axis with respect to the ceiling direction B. The filler is sprayed onto the sealing line SL2.

なお、シーリングノズル8は、ホルダSによって取り付
けてあり、又このホルダ9によってシーリングノズル8
と充填剤を圧送する可撓性ホース10とを連結している
The sealing nozzle 8 is attached by a holder S, and the sealing nozzle 8 is attached by this holder 9.
and a flexible hose 10 for pumping the filler.

次に、スポットランプ11は、固定の減速機6−8= に取り付けたステー12の先端に設けてあり、ロボット
1の移動方向であるシーリンク方向Bにおけるジ−リン
グツスル8の前方左側斜め上方から平行光線(スポット
光)を、撮像視野Eを含む予め定めた領域に照射して、
ワークW4側にシーリングラインSL2に沿った一定幅
の陰影SH2を付けるようにしている。
Next, the spot lamp 11 is installed at the tip of the stay 12 attached to the fixed speed reducer 6-8, and is directed from diagonally above the front left side of the Ziering twistle 8 in the sea link direction B, which is the moving direction of the robot 1. A parallel light beam (spot light) is irradiated onto a predetermined area including the imaging field of view E,
A shadow SH2 of a constant width is provided on the work W4 side along the ceiling line SL2.

スポットランプ13は、やはり減速機6に取り付けたス
テー14の先端に設けて、カメラ7の光軸りに関してス
ポットランプ11と対称な位置に位置するようにしてあ
り、ワークWa 、w、tの重ね合せが第6図と逆にな
っている場合に用いる。
The spot lamp 13 is also provided at the tip of the stay 14 attached to the reducer 6, and is located at a position symmetrical to the spot lamp 11 with respect to the optical axis of the camera 7. Used when the alignment is opposite to that shown in Figure 6.

次に、第4図を参照しながら、位置補正装置2の制御系
に用いるこの発明による画像処理装置の一実施例に就で
説明する。
Next, with reference to FIG. 4, an embodiment of the image processing apparatus according to the present invention used in the control system of the position correction device 2 will be specifically described.

先ず、カメラ7から出力される信号に就で説明すると、
カメラ7は、第1図゛における撮像視野Eに入った被撮
像部の明暗に応じた第5図(イ)に示す画像(ビデオ)
信号Svと、同図(ロ)に示すスキャニング用のクロッ
クパルス信号Scと、同図(ハ)に示すビデオクリア信
号Soとを出力する。
First, to explain the signal output from camera 7,
The camera 7 generates an image (video) shown in FIG. 5(a) according to the brightness of the imaged area that has entered the imaging field of view E in FIG.
It outputs a signal Sv, a clock pulse signal Sc for scanning shown in (b) of the same figure, and a video clear signal So shown in (c) of the same figure.

なお、画像信号Svは、アナログ信号で被撮像部か明る
い程信号レベルが高く、逆に暗い程信号レベルが低くな
る。また、クロックパルス信号SCは、画像信号Svの
1フレームにつきN回” t ”になるパルス信号であ
り、ビデオクリア信号Soは、1フレームに相当する時
間たけ1″になる信号である。
The image signal Sv is an analog signal, and the brighter the imaged part, the higher the signal level, and conversely, the darker the imaged part, the lower the signal level. Further, the clock pulse signal SC is a pulse signal that occurs N times "t" per one frame of the image signal Sv, and the video clear signal So is a signal that occurs 1'' for a time corresponding to one frame.

但し、カメラ7の一次元イメージセンサのスキャニング
(走査)方向は、常にシーリンク方向に向って左側に位
置する端部画素から右側の端部画素へ向う方向とする・
However, the scanning direction of the one-dimensional image sensor of the camera 7 is always from the edge pixel located on the left side toward the edge pixel on the right side when facing the sea link direction.
.

次に、ランプ点灯方向検出器15は、第6図のスポット
ランプ11.13の点灯の有無を検出して、スポットラ
ンプ11の方が点灯している場合にl″となり、スポッ
トランプ13の方が点灯している場合に0″となるラン
プ点灯方向信号aを出力する。
Next, the lamp lighting direction detector 15 detects whether or not the spot lamps 11 and 13 shown in FIG. outputs a lamp lighting direction signal a which becomes 0'' when the lamp is lit.

このランプ点灯方向検出器15は、例えばスポットラン
プ11.13に電流が流れているが否がを検出する回路
等によって簡単に構成することができる。
The lamp lighting direction detector 15 can be easily constructed, for example, by a circuit that detects whether or not current is flowing through the spot lamps 11 and 13.

但し、スポットランプ11.13の点灯制御は位置補正
装置2の制御系の図示しない制御部において、例えは次
のようになされるものとする。
However, the lighting control of the spot lamps 11 and 13 is performed by a control section (not shown) of the control system of the position correction device 2, for example, as follows.

すなわち、ロボット1をシーリンクラインに対応してテ
ィーチングする際、教示者がそのシーリンクラインにお
けるワークの重ね合せ及びシーリング方向に応じて図示
しないティーチング用のランプスイッチを操作して、ス
ポットランプ11゜13の何れかを点灯させ、その時に
ランプ点灯方向検出器15が出力するランプ点灯方向信
号aを当該シーリングラインに対応して図示しないメモ
リ記憶しておく。
That is, when teaching the robot 1 according to the ceiling line, the instructor operates a teaching lamp switch (not shown) according to the stacking of the workpieces on the ceiling line and the ceiling direction, and turns the spot lamp 11°. 13 is turned on, and a lamp lighting direction signal a output from the lamp lighting direction detector 15 at that time is stored in a memory (not shown) corresponding to the ceiling line concerned.

そして、ロボット1のプレーバック時、ロボット制御部
からプレーバック対象のシーリングラインを示すデータ
を受けて、前記メモリからそのデータに対応するランプ
点灯方向信号aを読み出し。
When the robot 1 plays back, data indicating a ceiling line to be played back is received from the robot control section, and a lamp lighting direction signal a corresponding to the data is read from the memory.

その読み出したランプ点灯方向信号aに基づいて、a=
”1”ならスポットランプ11を、a=”O”11− ならスポットランプ13を夫々点灯する。
Based on the read lamp lighting direction signal a, a=
If it is "1", the spot lamp 11 is turned on, and if a="O"11-, the spot lamp 13 is turned on.

次に、位置すれ検出機能を果す画像処理装置16におい
て、2値化回路17は、カメラ7からの画像信号Svを
入力して、第3図の撮像視野Eにおけるシーリンクライ
ンSL2の陰影SH2の投影像に対応する画像信号Sv
(第5図(イ)参照)のノツチ部を検出し、その検出し
たノツチ部の幅に相当する幅だけ1フレームにおいて0
″となる2値化信号を時系列の画像データDv(第5図
(ニ)参照)として出力する。
Next, in the image processing device 16 that performs the positional deviation detection function, the binarization circuit 17 inputs the image signal Sv from the camera 7 and detects the shadow SH2 of the sea link line SL2 in the imaging field of view E in FIG. Image signal Sv corresponding to the projected image
(Refer to Figure 5 (a)) is detected, and a width corresponding to the width of the detected notch is zeroed in one frame.
'' is output as time-series image data Dv (see FIG. 5(d)).

なお、この時系列の画像データDvにおいて、矢示δ方
向がカメラ7の一次元イメージセンサのスキャニング方
向と対応している。
Note that in this time-series image data Dv, the direction of the arrow δ corresponds to the scanning direction of the one-dimensional image sensor of the camera 7.

データセレクタ18は、後述する第1のカウンタ19か
らの書込アドレスWR又は第2のカウンタ22からの読
出アドレスREの何れか一方を選択するためのものであ
り、カメラ7からのビデオクリア信号So(第5図(ハ
)参照)が1″の時に書込アドレスWRを、” o ″
の時に読出アドレスREを夫々選択する。
The data selector 18 is for selecting either the write address WR from the first counter 19 or the read address RE from the second counter 22, which will be described later. (See Figure 5 (c)) is 1'', write address WR is ``o''
The read addresses RE are respectively selected at the time of .

12− 第1のカウンタ(バイナリカウンタ)1Bは、カメラ7
からのビデオクリア信号Soが0″に立ち下る毎にクリ
アされ、カメラ7からクロックパルス信号Scが入力さ
れる毎にカウント値である書込アドレスWRを+1イン
クリメントする。
12- The first counter (binary counter) 1B is the camera 7
It is cleared every time the video clear signal So from the camera 7 falls to 0'', and the write address WR, which is a count value, is incremented by +1 every time the clock pulse signal Sc is input from the camera 7.

したがって、この第1のカウンタ19から出力される書
込アドレスWRは、カメラ7から出力されるクロックパ
ルス信号Scに同期して「0」〜rNJまで変化する。
Therefore, the write address WR output from the first counter 19 changes from "0" to rNJ in synchronization with the clock pulse signal Sc output from the camera 7.

なお、カメラ7として512ビツトのものを用いた場合
、第1のカウンタ1日として少なくとも9ビツトのバイ
ナリカウンタを用意すれば、書込アドレスWRは、00
0■〜I F F Hまで変化する。
Note that when a 512-bit camera 7 is used, if a binary counter of at least 9 bits is prepared as the first counter 1 day, the write address WR will be 00.
It changes from 0■ to IFFH.

記憶手段としての画像メモリ(少なくともNX1ビツト
の構成容量)20は、カメラ7からのビデオクリア信号
SOが1″となってデータセレクタ18が第1のカウン
タ1Sからの書込アドレスWRを選択している時には、
その書込アドレスWRに基づいて2値化回路17からの
画像データDvを順次lフレーム分記憶し、カメラ7か
らのビデオクリア信号SOが0″となってデータセレク
タ18が第2のカウンタ22からの読出アドレスREを
選択している時には、その読出アドレスREに基づく順
番で記憶した画像データDvを順次出力する。
The image memory (capacity of at least NX1 bits) 20 as a storage means is stored when the video clear signal SO from the camera 7 becomes 1'' and the data selector 18 selects the write address WR from the first counter 1S. When you are there,
Based on the write address WR, the image data Dv from the binarization circuit 17 is sequentially stored for l frames, and the video clear signal SO from the camera 7 becomes 0'', and the data selector 18 selects the data from the second counter 22. When the read address RE is selected, the stored image data Dv are sequentially output in the order based on the read address RE.

なお、第4図では簡略して示しであるが、実際には画像
メモリ20のR/W端子には、例えばビデオクリア信号
Soを反転した信号を入力して、ビデオ信号Soが′1
″の時に書込モードに、又゛0″の時に読出モードに夫
々なるようにしている。
Although shown in a simplified manner in FIG. 4, in reality, a signal obtained by inverting the video clear signal So, for example, is input to the R/W terminal of the image memory 20, so that the video signal So becomes '1'.
When the value is ``, the write mode is set, and when the value is 0, the read mode is set.

読出回路21は、例えばプリセット可能な9ビツトバイ
ナリカウンタによって構成した第2のカウンタ22と、
1フレームの画像データDvの内の読出範囲を規定する
ウィンドウ処理用の下限アドレスMXoを設定する下限
アドレス設定器23と、一定周期のクロックパルスck
を出カスる発振器24と、上記ウィンドウ処理用の上限
アドレスMx1を設定する上限アドレス設定器25と、
第2のカウンタ22のカウント値である続出アドレスR
Eと上限アドレス設定器25に設定した上限アドレスM
 x 1とを比較して、RE≧M x 1の時にのみク
リア信号CLを出力する比較器26と。
The readout circuit 21 includes a second counter 22 configured by, for example, a presettable 9-bit binary counter;
A lower limit address setter 23 that sets a lower limit address MXo for window processing that defines a reading range within one frame of image data Dv, and a clock pulse ck of a constant period.
an oscillator 24 that outputs a
Successive address R which is the count value of the second counter 22
E and the upper limit address M set in the upper limit address setter 25
x 1 and outputs a clear signal CL only when RE≧M x 1.

カメラ7からのW゛デオクリア信号SOを反転するNO
T回路27と、発振器24からのクロックパルスckと
NOT回路27の出力SOの論理積を取るAND@路2
B等とによって構成しである。
NO to invert the W video clear signal SO from camera 7
AND @ path 2 which takes the AND of the T circuit 27, the clock pulse ck from the oscillator 24, and the output SO of the NOT circuit 27.
It is composed of B, etc.

そして、第2のカウンタ22は、カメラ7からのビデオ
クリア信号Soが1″から” o ″に立ち下る毎に下
限アドレス設定器23に設定した下限アドレスMxoが
プリセットされ、ビデオクリア信号Soが0″となって
NOT回路27の出力Soが1″となることにより開<
AND回路28を介して発振器24からのクロックパル
スckが入力される毎に、その各立ち下りで下限アドレ
スM x Oからのカウント値である続出アドレスRE
を+1インクリメントする。
The second counter 22 is preset with the lower limit address Mxo set in the lower limit address setter 23 every time the video clear signal So from the camera 7 falls from 1'' to "o", and the video clear signal So becomes 0. '', and the output So of the NOT circuit 27 becomes 1'', which causes the opening<
Every time the clock pulse ck from the oscillator 24 is input through the AND circuit 28, the successive address RE, which is the count value from the lower limit address M x O, is input at each falling edge.
Increment by +1.

そして、読出アドレスREか上限アドレス設定器25に
設定した上限アドレスM x Hに達して15− RE≧M x 1となると、比較器26がクリア信号C
Lを第2のカウンタ22に出力して読出アドレスREを
to 00 HJにクリアする。
Then, when the read address RE reaches the upper limit address M x H set in the upper limit address setter 25 and 15-RE≧M x 1, the comparator 26 outputs a clear signal C.
L is output to the second counter 22 to clear the read address RE to 00 HJ.

したがって、この第2のカウンタ22のカウント値であ
る読出アドレスREは、ビデオクリア信号Soが1″か
ら0″に立ち下った時、すなわち1フレ一ム分の画像デ
ータDvが画像メモリ20に記憶された時点からクロッ
クパルスckの周期で下限アドレスMxoから上限アド
レスMx1まで変化する。
Therefore, the read address RE, which is the count value of the second counter 22, is determined when the video clear signal So falls from 1'' to 0'', that is, when the image data Dv for one frame is stored in the image memory 20. From the point in time, the address changes from the lower limit address Mxo to the upper limit address Mx1 at the cycle of the clock pulse ck.

なお、上記のようなウィンドウ処理を行なえると云うこ
とは、シーリングラインSL2の陰影SH2の結像位置
が一次元イメージセンサの端部画素付近まで大きく位置
ずれしないと云う保証があると云うことであり、その保
証がなければ1フレ一ム分の画像データDvを全て読み
出せば良い。
Note that the fact that the window processing described above can be performed means that there is a guarantee that the imaging position of the shadow SH2 of the ceiling line SL2 will not shift significantly to the vicinity of the end pixels of the one-dimensional image sensor. Yes, and if there is no guarantee, it is sufficient to read out all the image data Dv for one frame.

次に、第1のエツジ検出手段としての立上検出回路2日
は、図示を省略しているがビデオクリア信号Soが0″
から1″に立ち上った時点でクリアされると共に、Q、
=゛ドtQ2 = −1″−16= となるようにデータがプリセットされ、読出回路21に
おけるNOT回路27の出力であるSoが” 1 ″と
なっている間のみ開<AND回路33を介してクロック
パルスckが入力される毎にその各立ち上りで画像メモ
リ20からの画像データDvをシフトしていく2ビツト
のシフトレジスタ30と、このシフトレジスタ30のQ
1出力とQ2出力との排他的論理和を取るEX−OR回
路31と、このEX−OR回路31の出力とQ1出力と
の論理積を取るAND回11fi32等とによって構成
しである。
Next, on the second day of the rising detection circuit as the first edge detection means, although not shown, the video clear signal So is 0''.
It will be cleared when it rises from 1″, and Q,
=゛dotQ2 = -1''-16= The data is preset so that A 2-bit shift register 30 that shifts image data Dv from the image memory 20 at each rising edge every time a clock pulse ck is input, and a Q of this shift register 30.
It consists of an EX-OR circuit 31 that takes the exclusive OR of the output of Q1 and the output of Q2, and an AND circuit 11fi32 that takes the logical product of the output of this EX-OR circuit 31 and the output of Q1.

このように構成すると、画像メモリ20から前述の読出
アドレスREの順番で読み出された画像データDvが、
シーリングラインSL2の陰影SH2に対応するデータ
゛′0゛′からスポットランプ11によって明るく照射
されている部分に対応するデータ゛′l″に変化(立ち
上る)することによって、シフトレジスタ34の01出
力が” 1 ″でQ2出力が” o ″になった時にの
み” 1 ”となる第1のエツジ信号 blをAND回
路32 が出力するようになり、それによって陰影SH
2の一方のエツジを検出できる。
With this configuration, the image data Dv read out from the image memory 20 in the order of the read address RE described above is
The 01 output of the shift register 34 changes (rises) from the data ``0'' corresponding to the shadow SH2 of the ceiling line SL2 to the data ``1'' corresponding to the portion brightly illuminated by the spot lamp 11, so that the 01 output of the shift register 34 becomes ``1''. '', the AND circuit 32 outputs the first edge signal bl which becomes ``1'' only when the Q2 output becomes ``o''.
One edge of 2 can be detected.

次ニ、第2のエツジ検出手段としての立下検出回路34
は、やはり図示を省略しているがビデオクリア信号So
が0″から1″に立ち上った時点でクリアされると共に
、Q+ =−0″、Q2=−〇″となるようにデータが
プリセットされ、AND回路33を介してクロックパル
スckが入力される毎にその各立ち上りで画像メモリ2
0からの画像データDvをシフトしていく2ビツトのシ
フトレジスタ35と、このシフトレジスタ35のQ1出
力とQ2出力との排他的論理和を取るEX−OR回路3
Bと、このEX−OR回路36の出力とQ1出力を反転
するNOT回路37の出力との論理積を取るAND回路
38等とによって構成しである。
Next, a fall detection circuit 34 as a second edge detection means
Although not shown, the video clear signal So
The data is cleared at the time when it rises from 0'' to 1'', and the data is preset so that Q+ = -0'' and Q2 = -〇'', and each time a clock pulse ck is input via the AND circuit 33. image memory 2 at each rising edge.
A 2-bit shift register 35 that shifts the image data Dv from 0, and an EX-OR circuit 3 that takes the exclusive OR of the Q1 output and Q2 output of this shift register 35.
B, an AND circuit 38, etc., which takes the logical product of the output of the EX-OR circuit 36 and the output of the NOT circuit 37, which inverts the Q1 output.

このように構成すると、立上検出回路2日とは逆に、画
像データDvが1″から0″に変化することによって、
シフトレジスタ35のQ1出力が0″でQ2出力が1″
になった時にのみ、1″となるエツジ信号b2をAND
回路38が出力するようしこなり、それによって陰影3
1−12の他方のエツジを検出できる。
With this configuration, contrary to the rise detection circuit 2 days, when the image data Dv changes from 1'' to 0'',
The Q1 output of the shift register 35 is 0'' and the Q2 output is 1''.
AND the edge signal b2 which becomes 1'' only when
circuit 38 outputs, thereby causing shade 3
The other edge of 1-12 can be detected.

次に、選択回路6日は、ランプ点灯方向検出器15から
のランプ点灯方向信号aを反転するN。
Next, the selection circuit 6 inverts the lamp lighting direction signal a from the lamp lighting direction detector 15 (N).

T回路40と、このNOT回路40の出力iと立上検出
回路29のAND回路32の出力である第1のエツジ信
号b1との論理積を取るAND回路41と、ランプ点灯
方向信号aと立下検出回路34のAND回路38の出力
である第2のエツジ信号b2との論理積を取るAND回
路42と、AND回路41.42の出力の論理和をとる
OR回路43によって構成しである。
A T circuit 40, an AND circuit 41 which takes the logical product of the output i of the NOT circuit 40, and the first edge signal b1 which is the output of the AND circuit 32 of the rise detection circuit 29, It is composed of an AND circuit 42 which takes a logical product with the second edge signal b2 which is the output of the AND circuit 38 of the lower detection circuit 34, and an OR circuit 43 which takes the logical sum of the outputs of the AND circuits 41 and 42.

このように構成すると、第3図のスポットランプ13が
点灯していて、ランプ点灯方向検出器15からのランプ
点灯方向信号aが0″の時には、AND回路41のみが
開いて立上検出回路2日の方が選択され、第6図のスポ
ットランプ1か点灯していて、ランプ点灯方向信号aが
” l ”の時には、AND回路42のみが開いて立下
検出19− 回路34の方が選択される。
With this configuration, when the spot lamp 13 shown in FIG. When the day is selected, the spot lamp 1 in Fig. 6 is lit, and the lamp lighting direction signal a is "l", only the AND circuit 42 is opened and the falling detection circuit 19-34 is selected. be done.

そして、その選択された方の検出回路のエツジ信号がO
R回路43を介して出力される。
Then, the edge signal of the selected detection circuit becomes O
It is output via the R circuit 43.

ラッチ回路44は、選択回路3SのOR回路43から第
1又は第2のエツジ信号1)I r b2が入力される
と、それをラッチ信号として、その時読出回路21の第
2のカウンタ22から出力されている続出アドレスRE
を、カメラ7の一次元イメージセンサにおける陰影SH
2のシーリンクラインSL2に対応するエツジの結像位
置を示す読出アドレスXとしてラッチする。
When the first or second edge signal 1) I r b2 is input from the OR circuit 43 of the selection circuit 3S, the latch circuit 44 uses it as a latch signal and outputs it from the second counter 22 of the readout circuit 21 at that time. Continued address RE
, the shadow SH in the one-dimensional image sensor of the camera 7
It is latched as a read address X indicating the imaging position of the edge corresponding to the second seal line SL2.

偏差演算回路45は、ラッチ回路44にラッチされてい
る読出アドレスXと、データレジスタ46に予め書き込
んである基準アドレス0FFH(255)との偏差ΔX
をめると共に、そのめた偏差ΔX@:K(定数)倍した
数値データにΔXをパルスモータ5を駆動するコントロ
ーラ47に出力する。
The deviation calculation circuit 45 calculates the deviation ΔX between the read address X latched in the latch circuit 44 and the reference address 0FFH (255) written in advance in the data register 46.
At the same time, the deviation ΔX@:K (constant) is multiplied by numerical data and ΔX is output to the controller 47 that drives the pulse motor 5.

なお、当然のことながら、シーリンクノズル8の先端と
シーリンクラインSL2とが一致して、20− 陰影SH2の一方のエツジの結像位置がカメラ7の一次
元イメージセンサにおける基準画素である中心画素位置
にきていれば偏差ΔXは「0」となり、位置ずれしてい
ればその位置ずれ方向及び位置ずれ量に応じた正又は負
の値となる。
As a matter of course, the tip of the seal nozzle 8 and the seal line SL2 coincide with each other, so that the imaging position of one edge of the 20-shade SH2 is at the center of the reference pixel in the one-dimensional image sensor of the camera 7. If the pixel is at the pixel position, the deviation ΔX will be "0", and if the pixel is out of position, it will be a positive or negative value depending on the direction and amount of the positional deviation.

また、定数には、コントローラ47に数値データαを与
えた時に、コントローラ47によって駆動されるパルス
モータ5が回転して、カメラ7も回転し、それによって
陰影S H□の一方のエツジの結像位置がアドレス値に
してβだけ動いたとした場合、β/αによって決定する
Furthermore, when the constant is given numerical data α to the controller 47, the pulse motor 5 driven by the controller 47 rotates, and the camera 7 also rotates, thereby forming an image of one edge of the shadow SH□. If the position moves by β based on the address value, it is determined by β/α.

コントローラ47は、偏差演算回路45からの数値デー
タにΔXに応じた駆動パルスをパルスモータ5に出力し
て、取付盤4に取り付けたカメラ7の光軸り及びシーリ
ングノズル8の先端部8aの位置補正を行なう。
The controller 47 outputs a drive pulse according to ΔX to the numerical data from the deviation calculation circuit 45 to the pulse motor 5, and adjusts the optical axis of the camera 7 attached to the mounting board 4 and the position of the tip 8a of the sealing nozzle 8. Make corrections.

したがって1以上のように構成された位置補正装置を取
り付けたロボット1を用いて、カメラ7の直線状の撮像
視野EにシーリングラインSL2が交差する条件のみを
満したラフなテイーチング作業を行なった後、そのティ
ーチングデータに基づいてロボット1をプレーバックし
ても、画像処理装置16が、カメラ7によって撮像した
シーリングラインSL2の陰影SH2の一方のエツジの
一次元イメージセンサにおける結像位置と中心画素位置
との偏差ΔXを速やかに検出して、その偏差ΔXに応じ
た数値データにΔXをコントローラ47に出力し、コン
トローラ47がその数値データにΔXに応じてパルスモ
ータ5を回転させてシーリンクノズル8の先端を、常に
シーリングラインSL2上に位置させるようにするので
、シーリングラインSL2に沿った正確なシーリングを
行なうことができる。
Therefore, after performing rough teaching work that only satisfies the condition that the ceiling line SL2 intersects the linear imaging field of view E of the camera 7, using the robot 1 equipped with the position correction device configured as described above. Even if the robot 1 is played back based on the teaching data, the image processing device 16 determines the imaging position and center pixel position of one edge of the shadow SH2 of the ceiling line SL2 captured by the camera 7 on the one-dimensional image sensor. The deviation ΔX from the deviation ΔX is promptly detected, and the numerical data corresponding to the deviation ΔX is outputted to the controller 47, and the controller 47 rotates the pulse motor 5 according to the numerical data and ΔX to rotate the sea link nozzle 8. Since the tip of the seal is always positioned on the sealing line SL2, accurate sealing can be performed along the sealing line SL2.

勿論ワークW3 、W4の重ね合せ誤差や作業エリアへ
の位置決め誤差等があっても、それ等の誤差を充分に吸
収することもできる。
Of course, even if there is an error in overlapping the workpieces W3 and W4 or an error in positioning them to the work area, such errors can be sufficiently absorbed.

しかも、画像処理装置16においては、ワークw3 、
W4の重ね合せ及びシーリング方向が第3図に示す状態
で、スポットランプ11の方が点灯している場合には、
立下検出回路34が選択回路3日によって選択されて、
その立下検出回路34が出力する第2のエツジ信号b2
により、画像メモリ20から読み出された画像データD
vが1″から0″に立ち下った時、すなわち画像データ
Dvか第6図に拡大して示すシーリングラインSL2に
対応する陰影SH2のエツジED2を示した時の読出ア
ドレスXを、ラッチ回路44にラッチすることができ、
又例えばワークW’31 w、iの重ね合せのみが第3
図の状態と逆でスポットランプ13の方が点灯している
場合には、立上検出回路29が選択されてその第1のエ
ツジ信号b1により、画像データDvが0″から1″に
立ち上った時、すなわち画像データDvが第7図に示す
シーリンクラインSL3に対応する陰影SH3のエツジ
ED3を示した時の読出アドレスXをラッチ回路44に
ラッチすることができるため、陰影の幅分の誤差の生じ
る誤補正がなされることはない。
Moreover, in the image processing device 16, the work w3,
If the overlapping and sealing direction of W4 is as shown in FIG. 3 and the spot lamp 11 is lit,
The fall detection circuit 34 is selected by the selection circuit 3,
The second edge signal b2 outputted by the fall detection circuit 34
The image data D read out from the image memory 20 by
The latch circuit 44 stores the read address can be latched to,
For example, only the superposition of workpieces W'31 w and i is the third one.
When the spot lamp 13 is on, contrary to the state shown in the figure, the rise detection circuit 29 is selected and the image data Dv rises from 0'' to 1'' by the first edge signal b1. In other words, the read address X when the image data Dv indicates the edge ED3 of the shadow SH3 corresponding to the seal line SL3 shown in FIG. 7 can be latched in the latch circuit 44. Erroneous corrections that occur will not be made.

なお、ワークW3.W4の重ね合せが第3図及びm16
図に示す状態のままで、シーリンク方向を23− 第3図に示すシーリンク方向Bとは反対にした場合、ブ
ラケット3が第3図に示す位置から180゜回転してカ
メラ7の一次元イメージセンサのスキャニング方向が、
ワーク面に対して180°反転することにより第6図に
示すシーリングラインSL2に対応する陰影SH2のエ
ツジED2が画像データDvのO″から1″への立ち下
りに対応するようになっても、この場合スポットランプ
13の方が点灯して立上検出回路2日が選択されるため
、問題はない。
In addition, work W3. The superposition of W4 is shown in Figure 3 and m16.
If the sea link direction is reversed from the sea link direction B shown in FIG. The scanning direction of the image sensor is
Even if the edge ED2 of the shadow SH2 corresponding to the ceiling line SL2 shown in FIG. 6 corresponds to the fall of the image data Dv from O'' to 1'' by 180° reversal with respect to the work surface, In this case, the spot lamp 13 lights up and the start-up detection circuit selects the 2nd day, so there is no problem.

次に、画像処理装置の他の実施例を説明する。Next, another embodiment of the image processing device will be described.

第8図は、マイクロコンピュータを用いた画像処理装置
の実施例を示す構成図である。
FIG. 8 is a block diagram showing an embodiment of an image processing device using a microcomputer.

同図において、画像処理装置48は、中央処理装置(C
PU)4B、プログラムメモリ(ROM)50、データ
メモリ(RAM)51 、入力ポート(I/P)52.
及び出力ポート(○/P)53からなるマイクロコンピ
ュータ54と、前実施例と同様な2値化回路17とによ
って構成してあり、CPU49が第9図に示すフロー図
に基づくプログ24− ラムを実行することによって、前実施例の画像処理装置
16と同様な機能を果すばかりか、後述する追従ライン
の切換機能も果す。
In the figure, the image processing device 48 is a central processing unit (C
PU) 4B, program memory (ROM) 50, data memory (RAM) 51, input port (I/P) 52.
The CPU 49 executes a program 24 based on the flowchart shown in FIG. By executing this, it not only performs the same function as the image processing device 16 of the previous embodiment, but also performs the following line switching function, which will be described later.

なお、マイクロコンピュータ54の入力ポート52には
、2値化回路17からの画像データDv。
Note that the input port 52 of the microcomputer 54 receives image data Dv from the binarization circuit 17.

カメラ7からのクロックパルス信号Sc及びビデオクリ
ア信号So、ランプ点灯方向検出器15からのランプ点
灯方向信号a、及び例えば図示しないロボット制御部か
らの後述する切換信号eとが入力され、出力ポート53
からは、数値データΔI (前実施例のにΔXに相当す
る)がコントローラ47に出力される。
A clock pulse signal Sc and a video clear signal So from the camera 7, a lamp lighting direction signal a from the lamp lighting direction detector 15, and a switching signal e described later from a robot control section (not shown), for example, are inputted to the output port 53.
From there, numerical data ΔI (corresponding to ΔX in the previous embodiment) is output to the controller 47.

以下、第9図のフロー図を順を追って説明する。The flowchart shown in FIG. 9 will be explained step by step below.

5TEP l カウンタCNにRAM51の画像データ
格納エリアの先頭アドレスMxを書き込む。
5TEP l Write the start address Mx of the image data storage area of the RAM 51 to the counter CN.

5TEP 2 カメラ7からのビデオクリア信号S。5TEP 2 Video clear signal S from camera 7.

(第5図(ハ)参照)が0″から1″に立ち上るまで待
機する。
(See FIG. 5(c)) waits until it rises from 0'' to 1''.

5TEP 3 カメラ7からのクロックパルス信号Sc
(第5図(ロ)参照)の1″から” o ”への立ち下
りをチェックし、立ち下った時に5TEP 4に進む。
5TEP 3 Clock pulse signal Sc from camera 7
Check the fall from 1'' to "o" (see Figure 5 (b)), and when it falls, proceed to 5TEP 4.

5TEP42値化回路17からの画像データDvを取り
込む。
The image data Dv from the 5TEP4 binarization circuit 17 is taken in.

5TEP 5 カウンタCNが示すRAM51のアドレ
スに5TEP 4で取り込んだ画像データDvを記憶す
る。
5TEP 5 Stores the image data Dv captured in 5TEP 4 at the address of the RAM 51 indicated by the counter CN.

5TEP 6 カウンタCNのイ直(アドレス)を+1
インクリメントする。
5TEP 6 Counter CN address (address) +1
Increment.

5TEP 7 ビデオクリア信号Soが1″から” o
 ″に立ち下って1フレ一ム分の画像データDvの取り
込みが終了したか否かをチェックし、終了していなけれ
ば5TEP 3に戻って5TEP 3〜7までの処理を
繰り返し、終了していれば5TEP 8に進む。
5TEP 7 Video clear signal So is from 1" o
'' and check whether the capture of one frame's worth of image data Dv has been completed. If not, return to 5TEP 3 and repeat the processes from 5TEP 3 to 7 to complete the process. If so, proceed to 5TEP 8.

このようにして、■フレーム分の画像データDvをRA
M51の画像データ格納エリア(画像メモリに相当する
)に記憶する。
In this way, the image data Dv for the frame is RA
It is stored in the image data storage area (corresponding to image memory) of M51.

但し、上記のように一次元イメージセンサの1画素分ず
つデータを取り込む場合、クロックパルス信号Scの周
期(例えば1.36μ5ec)では通常のCPUで処理
しきれないので、例えばクロックパルス信号SCをm分
周すると共に、シリアルの画像データDvをmピッ1−
のパラレルデータに変換して、上記m分周した信号に同
期してmビットのパラレルデータを一度に取り込むよう
にすると良い。
However, when acquiring data for each pixel of a one-dimensional image sensor as described above, the period of the clock pulse signal Sc (for example, 1.36μ5ec) cannot be processed by a normal CPU, so for example, if the clock pulse signal SC is At the same time, the serial image data Dv is divided into m-pitch 1-
It is preferable to convert it into parallel data of m bits and take in the m-bit parallel data at once in synchronization with the m-divided signal.

5TEP 8 カウンタCNに下限アドレスM x o
を、ポインタGに画像データDvの変化点アドレスデー
タの格納エリアの先頭アドレスMYを夫々書き込む。
5TEP 8 Lower limit address M x o to counter CN
and the start address MY of the storage area of the change point address data of the image data Dv are written into the pointer G, respectively.

5TEP 9 ランプ点灯方向検出器15からのランプ
点灯方向信号aを取り込む。
5TEP 9 Take in the lamp lighting direction signal a from the lamp lighting direction detector 15.

5TEPIO5TEP 9で取り込んだランプ点灯方向
信号aが” 1 ″か否かをチェックし、”1”なら5
TEP 11に、”o″なら5TEP12に夫々進む。
5TEPIO5TEP Check whether the lamp lighting direction signal a taken in 9 is "1" or not, and if it is "1", 5
Go to TEP 11, and if "o" go to 5 TEP 12, respectively.

5TEP1.1 レジスタFを0″にする。5TEP1.1 Set register F to 0''.

5TEP t 2 レジスタFを1″にする。5TEP t2 Set register F to 1''.

5TIEP13 図示しないロボット制御部から次のよ
うな切換信号eを取り込む。
5TIEP13 The following switching signal e is taken in from a robot control section (not shown).

27− 例えば、第10図に示すようにワークW5〜W7の重ね
合せによって形成されるシーリンクライン5LxO,5
Lxl 、5Lx2において、矢示2方向に向って例え
ばラインS L xO、S Lx2のシーリングを行な
う場合、ロボット制御部において、ライン5LxOがラ
イン5Lxl、5Lx2に分岐するポイントPxを挾む
ポイントPx〜1 がらポイントPx++ までロボッ
ト1が移動する間のみl″となる切換信号eをロボット
1の移動位置に基づいて形成するようにしておき、この
切換信号eを取り込むようにする。
27- For example, as shown in FIG. 10, the seal line 5LxO, 5 formed by overlapping the works W5 to W7
When sealing the lines S L xO and S Lx2 in the two directions indicated by the arrows in Lxl and 5Lx2, for example, the robot control unit selects a point Px~1 between the point Px where the line 5LxO branches into the lines 5Lxl and 5Lx2. A switching signal e, which becomes l'' only while the robot 1 is moving to a point Px++, is generated based on the moving position of the robot 1, and this switching signal e is taken in.

5TEP14 5TEP13で取り込んた切換信号eが
l″か否かをチェックし、” 1 ″なら5TEP1.
5ニ、” o ″なら5TEPi6に夫々進む。
5TEP14 Checks whether the switching signal e taken in by 5TEP13 is ``1'', and if it is ``1'', 5TEP1.
If it is 5 ni or "o", proceed to 5TEPi6 respectively.

5TEP15 レジスタFの値を反転(”O=なら’l
= 。
5TEP15 Invert the value of register F (if O='l
= .

1″なら’O’lにする。If it is 1″, set it to ‘O’l.

5TEP16 レジスタTにカウンタCNの値が示すア
ドレス(最初はMx□)の画像データを書き込む。
5TEP16 Write the image data of the address (initially Mx□) indicated by the value of counter CN to register T.

5TEP17 レジスタDにカウンタCNの値が示すア
−28= ドレスの画像データを書き込む。
5TEP17 Writes image data at address -28=address indicated by the value of counter CN to register D.

5TEP18 レジスタD、Tの内容が一致しているか
否かをチェックし、一致していれば画像データ変化なし
として5TEP22に進み、不一致なら変化ありとして
5TEP19に進む。
5TEP18 It is checked whether the contents of registers D and T match. If they match, it is assumed that the image data has not changed and the process proceeds to 5TEP22. If they do not match, it is assumed that there has been a change and the process proceeds to 5TEP19.

5TEP1.9 レジスタTにレジスタDの内容を書き
込む。
5TEP1.9 Write the contents of register D to register T.

5TEP20 レジスタD、Fの内容が一致しているか
否かをチェックし、0″で一致していれば1″から0″
への立ち下り変化があ ったとして、又゛1″で一致していれは” o ”から
l ”への立ち上り変化があったとして夫々5TEP2
1に進み、不一致なら5TEP22に進む。
5TEP20 Check whether the contents of registers D and F match or not, and if they match at 0″, change from 1″ to 0″
If there is a falling change from "o" to "l", and if they match at "1", then there is a rising change from "o" to "l", then 5TEP2.
Proceed to 1, and if there is no match, proceed to 5TEP22.

5TEP21 カウンタCNの値が示す画像データの立
ち下り変化点又は立ち」ニリ変化点のアドレスデータ■
を、ポインタGのアドレス(最初はMy)に記憶した後
、ポインタGの値を+2インクリメントする。
5TEP21 Address data of the falling or rising change point of the image data indicated by the value of counter CN■
is stored in the address of pointer G (initially My), and then the value of pointer G is incremented by +2.

なお、ポインタGの値を+2イクリメントするのは、カ
メラ7が512ビツトの場合、アドレスデータ■が少な
くとも10ビツト仕様のデ〜りになるため、このアドレ
スデータIを8ビツトのRAM51に格納するには2バ
イ1〜のアドレス領域が必要となるからである。
The reason why the value of pointer G is incremented by +2 is because if the camera 7 is 512 bits, the address data (2) will be at least 10-bit specification data. This is because an address area of 2 by 1 is required.

5TEP22 カウンタCNのイ直を+1インクリメン
トする。
5TEP22 Increment counter CN by +1.

5TEP23 カウンタCNの値が示すアドレスが上限
アドレスM x lと一致しているが否がをチェックし
、一致していなければ5TEP17に戻って5TEP1
7〜23の処理を繰り返し、一致していれば5TEP2
4に進む。
5TEP23 Check whether the address indicated by the value of counter CN matches the upper limit address M x l. If not, return to 5TEP17 and 5TEP1
Repeat steps 7 to 23 and if they match, 5TEP2
Proceed to step 4.

したがって、」二記の5TEP 8から5TEP23ま
での処理の概要をまとめると次のようになる。
Therefore, the outline of the processing from 5TEP 8 to 5TEP 23 in Section 2 is summarized as follows.

すなわち、ロボット1が第10図に示すような重ね合せ
のワークW5〜w7におけるシーリンクライン5LxO
,5Lx2を矢示2方向に移動する場合、第3図のスポ
ットランプ11が点灯してランプ点火方向信号aが” 
1 ″となるため、ロボット1がポイントPx−1に達
するまでの間は切換信号eは 0″でレジスタFも0″
である。
That is, the robot 1 moves the seal line 5LxO in the overlapping works W5 to w7 as shown in FIG.
, 5Lx2 in the two directions indicated by the arrows, the spot lamp 11 shown in FIG. 3 lights up and the lamp ignition direction signal a is "
1'', the switching signal e is 0'' and the register F is also 0'' until the robot 1 reaches point Px-1.
It is.

したがって、その間は第10図のシーリングライン5L
xOに対応する陰影5HXOのエツジE DxOを示す
画像データDvの1″から” o ”への立ち上り変化
点のアドレスデータ■がポインタGの値か示すアドレス
(My)に記憶される。
Therefore, during that time, the sealing line 5L in Figure 10
Edge E DxO of the shadow 5HXO corresponding to xO Address data (2) at the rising change point from 1'' to "o" of the image data Dv indicating the edge E DxO is stored in the address (My) indicating the value of the pointer G.

そして、ロボット1がポイントP x−1に到達すると
、ポイントPx+1 を越えるまでの間は、切換信号e
は1゛′になリレジスタFも1″になる。
When the robot 1 reaches the point Px-1, the switching signal e
becomes 1'' and reregister F also becomes 1''.

そのため、」二記期間中ばロボ′ット1か第10図のポ
イントPxxを越えるまでは陰影5HXOのエツジED
”10を示す画像データDvの′0″から1″への立ち
上り変化点のアドレスデータ■のみが、ポインl’−P
xxを越えるとワークW6上の陰影S HxlにおUる
エツジEDy1及び陰影5t−1x 2のエツジEDy
2を夫々示す画像データDvの0″から1゛′への立ち
上り変化点の2つのアドレスデータI、Iが夫々ポイン
タGの値が示すアドレス(My、My+2)に記憶され
る。
Therefore, during the second period, until robot 1 or point Pxx in Figure 10 is crossed, the edge ED of the shadow 5HXO
Only the address data ■ at the rising change point from ``0'' to 1'' of the image data Dv indicating ``10'' is at the point l'-P.
Beyond xx, the edge EDy1 of the shadow S Hxl on the workpiece W6 and the edge EDy of the shadow 5t-1x2
Two address data I, I at the rising change point from 0'' to 1'' of the image data Dv indicating 2, respectively, are stored at the addresses (My, My+2) indicated by the value of the pointer G, respectively.

31− そして、ロボット1かポイントPx++ を越えると、
切換信号eが0″になってレジスタFも” o ”にな
り、それによってカメラ7の撮像視野Eから第10図の
陰影5Hx1が消えるまでは、シーリンクライン5Lx
1,5Lx2に対応する陰影5Hxl、5Hx2のエツ
ジE Dxl、 E Dx2を夫々示す画像データDv
の1 ″がら0″への立ち下り変化点の2つのアドレス
データI、Iが、撮像視野Eから陰影5Hx1が消える
と、エツジE D x 2を示すアドレスデータ■のみ
がポインタGの値から示すアドレス(My、My+23
に記憶される。
31- Then, when robot 1 or point Px++ is exceeded,
The seal line 5Lx remains unchanged until the switching signal e becomes 0'' and the register F also becomes ``o'', thereby causing the shadow 5Hx1 in FIG.
Image data Dv showing shading 5Hxl corresponding to 1,5Lx2 and edges E Dxl and E Dx2 of 5Hx2, respectively.
When the shadow 5Hx1 disappears from the imaging field of view E, only the address data ■ indicating the edge E D x 2 is shown from the value of pointer G. Address (My, My+23
is memorized.

なお、第3図のスポットランプ13の方が点灯して、ラ
ンプ点灯方向信号aが0゛′になり、且つ切換信号eが
0′なら、画像データDvの0″から1″への立ち」ニ
リ変化点のアドレスデータIか記憶され、a=”O″で
e = ” 1 ”なら、逆に′1゛′から0″への立
ち下り変化点のアドレスデータIが記憶される。
Incidentally, if the spot lamp 13 in FIG. 3 is lit, the lamp lighting direction signal a becomes 0', and the switching signal e is 0', the image data Dv changes from 0'' to 1''. Address data I at the falling change point is stored, and if a="O" and e="1", address data I at the falling change point from '1' to 0' is stored.

5TEP24 RAM51に記憶されたアドレスデータ
32− の中から基準アドレスIo (OFFH)に最も近いも
のをサーチし、そのサーチしたアドレスI、基準アドレ
ス■o、及び定数μとに基づいて、数値データΔI=μ
(■Io)を演算する。
5TEP24 Search for the one closest to the reference address Io (OFFH) from among the address data 32- stored in the RAM 51, and based on the searched address I, reference address ■o, and constant μ, numerical data ΔI= μ
(■Io) is calculated.

5TEP25 5TEP24でめた数値データΔIをコ
ンjへローラ47に出力して5TEP 1に戻る。
5TEP25 Output the numerical data ΔI obtained in 5TEP24 to the controller j to the roller 47 and return to 5TEP1.

このようにすれば、前実施例と同様な効果を奏するばか
りか、例えば第10図に示すようにポインl−P xで
シーリングラインS T−x oが、2つのラインSL
x+、5Lx2に分岐していても位置補正装@2は追従
すべきラインを次のような作用により見失うことがない
By doing this, not only the same effect as in the previous embodiment can be obtained, but also, for example, as shown in FIG.
Even if the line is branched into x+ and 5Lx2, the position correction device @2 will not lose sight of the line to be followed due to the following action.

すなわち、第10図に示す分岐ポインI−P xを挾む
ポイントPx−I、Px++の間のポイントPxxまで
は、先ず陰影5HxO,5Hx2のエツジE D y 
O、E D ’I 2を示す画像データDvの= o 
″から1゛′への立ち」ニリ変化点のアドレスデータ■
と基準アドレス■oとに基づいて、シーリングノズル8
の先端をエツジED yo r E D y 2に沿う
ように位置補正するので、ポイントPxx到達後エツジ
EDy、I EDY2によって立ち下り変化点が2つに
なっても、基準アドレス■oに近い方をサーチすること
により、エツジEDy2に対応するアドレスデータ■が
選び出され、それによってポイントPx↑畷まで引き続
きエツジEDy2に沿うような位置補正がなされる。
That is, up to the point Pxx between the points Px-I and Px++ that sandwich the branch point I-Px shown in FIG.
= o of image data Dv indicating O, E D 'I 2
Address data at the change point from ``to 1''■
Based on the reference address ■o, the sealing nozzle 8
Since the position is corrected so that the tip of the edge is along the edge ED y o r E D y 2, even if there are two falling change points due to the edges EDy and I EDY2 after reaching the point Pxx, the one closest to the reference address o is By searching, the address data {circle around (2)} corresponding to the edge EDy2 is selected, and thereby the position is corrected so as to continue along the edge EDy2 up to the point Px↑Nawate.

そして、そのエツジEDy2に沿う位置補正がなされる
と、ポイントPx↑1到達後、陰影5Hx1,5Hx2
のエツジEDx1.EDx2に対応する画像データDv
のI ″から0″への立ち下り変化点を検出するように
なっても、それ等のアドレスデータの中から基準アドレ
スIOに近い方をサーチすることにより、シーリンクラ
イン5Lx2に対応するエツジE D x 2のアドレ
スデータ■を選び出すことができ、それによってシーリ
ンクライン5Lx2を見失うことがなくなる。
Then, when the position is corrected along the edge EDy2, after reaching the point Px↑1, the shadows 5Hx1, 5Hx2
Edge EDx1. Image data Dv corresponding to EDx2
Even if a falling change point from I'' to 0'' is detected, the edge E corresponding to the sea link line 5Lx2 can be found by searching for the one closer to the reference address IO from among those address data. The address data (2) of D x 2 can be selected, thereby preventing the sight link line 5Lx2 from being lost.

なお、ポイントPx−+ 、 Px+1 間は陰影SH
x。
Note that there is a shadow SH between points Px-+ and Px+1
x.

5Hx2の幅分だけ作業誤差を生じるが、ポイントPx
−+ 、Px+1間を出来るだけ狭くすれば問題はない
There will be a work error by the width of 5Hx2, but the point Px
There is no problem if the distance between -+ and Px+1 is made as narrow as possible.

また、上記各実施例では、2値化回路17によって形成
した画像データDvを処理するようにした例に就で述べ
たが、これに限るものではなく、2値化回路17の代り
にA/D変換器を用いて画像データを形成するようにし
ても良い。
Further, in each of the above embodiments, an example in which the image data Dv formed by the binarization circuit 17 is processed has been specifically described, but the invention is not limited to this, and instead of the binarization circuit 17, the image data Dv is processed. The image data may be formed using a D converter.

但し、そのようにした場合、立ち上り又は立ち下りの検
出をする代りに、撮像対象の明暗を示す画像データが一
定値以上増加する方向又は減少する方向に変化したか否
かを検出することによってライン状の撮像対象のエツジ
を検出する必要がある。
However, in this case, instead of detecting the rise or fall, the line is detected by detecting whether the image data indicating the brightness or darkness of the imaged object has changed in the direction of increasing or decreasing by more than a certain value. It is necessary to detect the edges of the object to be imaged.

効果 以上述べたように、この発明による画像処理装置にあっ
ては、記憶手段から順次読み出した画像データに基づい
て、ライン状の撮像対象の2つのエツジを夫々検出する
第1.第2のエツジ検出手段を設けて、これ等の第1.
第2のエツジ検出手段の何れか一方を選択できるように
し、その選択35− した方のエツジ検出手段によって検出したエツジに対応
する画像データの読出アドレスと、予め定めた基準アド
レスとによって両者の偏差を演算するようにしたので、
この画像処理装置を用いた位置補正装置によって1例え
ばシーリングロボットのシーリンクノズルの位置補正を
行なえば、どのような重ね合せのワークのシーリングラ
インでもシーリング方向に拘らず誤差な(シーリング作
業を行なうことが可能になり、特に、前述した実施例に
おけるスポットランプによる光の照射角が浅くなって陰
影の幅が広くなっている場合でも、その陰影の幅に拘ら
ず正確なシーリング作業をなし得る。
Effects As described above, in the image processing apparatus according to the present invention, the first and second edges of the line-shaped imaging target are respectively detected based on the image data sequentially read out from the storage means. A second edge detection means is provided to detect the first edge.
Either one of the second edge detection means can be selected, and the deviation between the two is determined by the read address of the image data corresponding to the edge detected by the selected edge detection means and a predetermined reference address. Since we decided to calculate
For example, if the position correction device using this image processing device corrects the position of the sealing nozzle of a sealing robot, the sealing line of any stacked workpieces will be free from errors regardless of the sealing direction. Particularly, even when the light irradiation angle of the spot lamp in the embodiment described above becomes shallow and the width of the shadow becomes wide, accurate sealing work can be performed regardless of the width of the shadow.

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

第1図及び第2図は、夫々この発明の背景説明に供する
図、 第3図は、この発明による画像処理装置を適用する位置
補正装置の機構部の構成図、 第4図は、第3図の位置補正装置の制御系に用いるこの
発明による画像処理装置の一実施例36− を示すブロック図、 第5図は、第4図の動作説明に供する各部の信号波形図
、 第6図及び第7図は、夫々第4図の作用説明に供する図
、 第8図は、この発明による画像処理装置の他の実施例を
示すブロック図、 第9図は、第8図のCPUの動作説明に供するフロー図
、 第10図は、第8図の作用説明に供する図である。 1・・・ロボット 2・・・位置補正装置5・・・パル
スモータ 7・・・カメラ(撮像手段)8・・・シーリ
ングノズル 11、IES・・・スポットランプ 16・・・画像処理装置 17・・・2値化回路20・
・・画像メモリ 21・・・読出回路2日・・・立上検
出回路(第1のエツジ検出手段)34・・・立下検出回
路(第2のエツジ検出手段)3日・・・選択回路 45
・・・偏差演算回路47・・・コントローラ 第6図 第7図 特開昭GO−120477(14)
1 and 2 are diagrams for explaining the background of the present invention, respectively. FIG. 3 is a configuration diagram of a mechanism section of a position correction device to which an image processing device according to the present invention is applied. Embodiment 36 of the image processing device according to the present invention used in the control system of the position correction device shown in FIG. 7 is a diagram for explaining the operation of FIG. 4, FIG. 8 is a block diagram showing another embodiment of the image processing apparatus according to the present invention, and FIG. 9 is an explanation of the operation of the CPU shown in FIG. 8. FIG. 10 is a flowchart used to explain the operation of FIG. 8. 1... Robot 2... Position correction device 5... Pulse motor 7... Camera (imaging means) 8... Ceiling nozzle 11, IES... Spot lamp 16... Image processing device 17.・Binarization circuit 20・
... Image memory 21 ... Readout circuit 2 days ... Rise detection circuit (first edge detection means) 34 ... Fall detection circuit (second edge detection means) 3 days ... Selection circuit 45
... Deviation calculation circuit 47 ... Controller Fig. 6 Fig. 7 JP-A-120477 (14)

Claims (1)

【特許請求の範囲】 1 ライン状の撮像対象を、それに交差する方向に直線
状の撮像視野を向けて撮像する一次元イメージセンサを
用いた撮像手段から出力される画像信号に基づくlフレ
ー4分の画像データを順次記憶する記憶手段と、 この記憶手段から前記画像データを順次読み出す読出手
段と、 この読出手段によって順次読み出した画像データに基づ
いて、前記ライン状の撮像対象の一方のエツジを検出す
る第1のエツジ検出手段と、前記読出手段によって順次
読み出した画像データに基づいて、前記ライン状の撮像
対象の他方のエツジを検出する第2のエツジ検出手段と
、前記第1又は第2のエツジ検出手段の何れか一方髪選
択する選択手段と、 この選択手段によって選択された前記第1又は第2のエ
ツジ検出手段によって検出したエツジに対応する画像デ
ータの読出アドレスと、予め定めた基準アドレスとの偏
差を演算する偏差演算手段とによって構成したことを特
徴とする画像処理装置。
[Claims] 1. 1 frame 4 minutes based on an image signal output from an imaging means using a one-dimensional image sensor that images a linear imaging target with a linear imaging field directed in a direction intersecting the linear imaging target. a storage means for sequentially storing image data of the image data, a reading means for sequentially reading the image data from the storage means, and detecting one edge of the line-shaped imaging target based on the image data sequentially read by the reading means. a first edge detecting means for detecting the other edge of the line-shaped imaging target based on the image data sequentially read by the reading means; a selection means for selecting one of the edge detection means; a readout address of image data corresponding to an edge detected by the first or second edge detection means selected by the selection means; and a predetermined reference address; 1. An image processing device comprising: deviation calculation means for calculating a deviation between the image processing device and the image processing device.
JP22850783A 1983-12-05 1983-12-05 Picture processor Pending JPS60120477A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22850783A JPS60120477A (en) 1983-12-05 1983-12-05 Picture processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22850783A JPS60120477A (en) 1983-12-05 1983-12-05 Picture processor

Publications (1)

Publication Number Publication Date
JPS60120477A true JPS60120477A (en) 1985-06-27

Family

ID=16877520

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22850783A Pending JPS60120477A (en) 1983-12-05 1983-12-05 Picture processor

Country Status (1)

Country Link
JP (1) JPS60120477A (en)

Similar Documents

Publication Publication Date Title
US5049028A (en) Control system of multi-joint arm robot apparatus
US5307447A (en) Control system of multi-joint arm robot apparatus
JP3621123B2 (en) Surveying instrument
JPH05231836A (en) System for measuring three-dimensional position/posture of object
US5340060A (en) Rendezvous docking optical sensor system
CN203791808U (en) Intelligent welding robot based on machine vision
JPH04336514A (en) Distance measuring device
JPH11208895A (en) Relative position measuring device for continuous unloader
JPS60120477A (en) Picture processor
JPH054605B2 (en)
JPH0755439A (en) Three-dimensional shape measuring equipment
JPS60120408A (en) Position correcting device
JPS60120475A (en) Picture processor
JPS6045803A (en) Position correcting device
JPS60120476A (en) Picture processor
JP3368492B2 (en) Welding line detection method and device, and welding device
JPS60120478A (en) Picture processor
JPS60120407A (en) Position correcting device
JP3448074B2 (en) Correlation detection type 3D position measurement device
JPS6325871B2 (en)
JPS60120405A (en) Position correcting device
JPH02243909A (en) Light interrupting image position detector
JPS6257772A (en) Profiling device for butt welding
JP6842171B2 (en) Automatic welding machine and automatic welding method
JPH0553225B2 (en)