JPS62285108A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPS62285108A
JPS62285108A JP12971886A JP12971886A JPS62285108A JP S62285108 A JPS62285108 A JP S62285108A JP 12971886 A JP12971886 A JP 12971886A JP 12971886 A JP12971886 A JP 12971886A JP S62285108 A JPS62285108 A JP S62285108A
Authority
JP
Japan
Prior art keywords
image
input
processing
floor
programmable controller
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
JP12971886A
Other languages
Japanese (ja)
Inventor
Kazuo Mikami
和夫 三上
Suguru Ishihara
石原 英
Hiroshi Nakamoto
浩 中本
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.)
Omron Corp
Original Assignee
Omron Tateisi Electronics Co
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 Omron Tateisi Electronics Co filed Critical Omron Tateisi Electronics Co
Priority to JP12971886A priority Critical patent/JPS62285108A/en
Publication of JPS62285108A publication Critical patent/JPS62285108A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To increase the processing speed of a programmable controller compared with a system where an input port is cyclically measured, by fetching the visual measurement data on a feature parameter from a picture input processing part and applying the arithmetic processing to said measurement data. CONSTITUTION:A picture input processing part 21 receives the video signals from a TV camera 30 and always performs a prescribed visual measurement operation to calculate a feature parameter of input pictures. An arithmetic processing part 28 decodes the user program written to a RAM 25 and performs the processing in response to the contents of instructions. If an instruction for visual measurement is indicated by the instruction contents, the visual measurement data on the feature parameter is fetched directly from the part 21 via a bus 22. The part 28 stars immediately the desired arithmetic processing.

Description

【発明の詳細な説明】 3、発明の詳細な説明 〈産業上の利用分野〉 この発明は、物体の位置決め、認識、計測などの視覚計
測処理を伴なうマシン動作の制御に用いられるプログラ
マブル・コントローラに関する。
[Detailed Description of the Invention] 3. Detailed Description of the Invention <Industrial Application Field> This invention is a programmable computer used to control machine operations that involve visual measurement processing such as object positioning, recognition, and measurement. Regarding the controller.

〈従来の技術〉 従来のこの種プログラマブル・コントローラは、シーケ
ンス制御処理と一部のデータ処理とを行うものが中心で
あり、高速画像処理やグラフィック処理を行うことは不
可能であった。従ってプログラマブル・コントローラを
用いて、物体の位置決め、認識、計測などの視覚計測処
理を伴なう各種マシン動作を制御するには、第13図に
示す如く、プログラマブル−コントローラ3の前処理部
としてテレビカメラ1を画像入力手段とする視覚装置2
を付加し、この視覚装置2で生成された入力画像の面積
1位置ずれ量2回転ずれ量等の視覚計測データを特徴パ
ラメータとしてプログラマブル・コントローラ3に取り
込んで、条件判定、認識、マシン制御処理等を実行して
いた。
<Prior Art> Conventional programmable controllers of this type mainly perform sequence control processing and some data processing, and are not capable of high-speed image processing or graphic processing. Therefore, in order to control various machine operations involving visual measurement processing such as object positioning, recognition, and measurement using a programmable controller, a television set is used as a preprocessing section of the programmable controller 3, as shown in FIG. Visual device 2 using camera 1 as image input means
The visual measurement data, such as area 1 positional deviation 2 rotational deviation of the input image generated by the visual device 2, is taken into the programmable controller 3 as a feature parameter to perform condition judgment, recognition, machine control processing, etc. was running.

例えば第13図に示す例では、マシン4上に位置する物
体5をテレビカメラ1で観測し、視覚装置2にて基準位
置からの位置ずれ量や回転ずれ量を入力画像の特徴パラ
メータとして生成した後、これらをプログラマブル・コ
ントローラ3が取り込んで対応する処理プログラムを実
行し、マシンコントローラ6を介してマシン4の動作を
制御している。なお図中モニタテレビ7は、テレビカメ
ラ1が逼像した物体画像や各種演算結果をモニタ表示す
るためのものである。
For example, in the example shown in FIG. 13, an object 5 located on a machine 4 is observed by a television camera 1, and a visual device 2 generates the amount of positional deviation and rotational deviation from a reference position as characteristic parameters of the input image. Thereafter, the programmable controller 3 takes in these, executes the corresponding processing program, and controls the operation of the machine 4 via the machine controller 6. A monitor television 7 in the figure is for displaying an object image captured by the television camera 1 and various calculation results on a monitor.

一般に視覚機能を有する知能ロボットやインテリジェン
スマシンの分野では、演算処理の高速化が強く要請され
、これに加えて制御回路部のコンパクト化や低コスト化
が要求される。
In general, in the field of intelligent robots and machines that have visual functions, there is a strong demand for faster arithmetic processing, and in addition to this, there is a demand for smaller and lower cost control circuits.

第14図は、前記第13図に示すシステム構成を実現す
るためのハードウェア構成例を具体的に示している。
FIG. 14 specifically shows an example of a hardware configuration for realizing the system configuration shown in FIG. 13.

図示例のものは、プログラマブル・コントローラ3の前
処理部として視覚装置2を独立して備え、この視覚装置
2に画像演算部8を中心として画像入力回路9.出力回
路10.ROMLL。
The illustrated example is equipped with a visual device 2 independently as a preprocessing section of a programmable controller 3, and this visual device 2 includes an image calculation section 8 and an image input circuit 9. Output circuit 10. ROMLL.

RAM12.表示回路13を設けである。前記画像入力
回路9はテレビカメラ1からのビデオ信号を入力して物
体画像を画像メモリに格納するためのものであり、画像
演算部8はこの画像メモリより画像データを読み出して
入力画像の重心位置や傾き、或いは基準位置に対する位
置ずれ量や回転ずれ量等を特徴パラメータとして算出す
る。
RAM12. A display circuit 13 is provided. The image input circuit 9 inputs a video signal from the television camera 1 and stores an object image in an image memory, and the image calculation section 8 reads image data from this image memory and calculates the center of gravity position of the input image. , tilt, positional deviation amount, rotational deviation amount, etc. with respect to the reference position are calculated as characteristic parameters.

またプログラマブル・コントローラ3は、演算処理部1
4を中心として入力回路153出力回路16.RC)M
L ?、RAVLI 8各構成を含む他、ユーザプログ
ラムを記憶させるバッテリでハックアップされたRAM
19が接続されている。
Furthermore, the programmable controller 3 includes an arithmetic processing section 1
The input circuit 153 and the output circuit 16. RC)M
L? , RAVLI 8 configuration, as well as a hacked-up RAM with a battery that stores user programs.
19 are connected.

第15図は、このプログラマブル・コントローラ3にお
ける演算処理部14の制御動作を示している。まず演算
処理部14は、同図ステップ1 (図中、rsTIJで
示す)で前記RAM19よりユーザプログラムの命令語
を読み出してこれを解析し、続くステップ2でそれが計
測スタート指令であるか否かを判定する。もしステップ
2の判定が“NO”のときは、ステップ3に進み、その
命令内容に対応する処理を実行した後、つぎにステップ
4で次の命令語を解読する。
FIG. 15 shows the control operation of the arithmetic processing section 14 in this programmable controller 3. First, the arithmetic processing unit 14 reads the command word of the user program from the RAM 19 in step 1 (indicated by rsTIJ in the figure) and analyzes it, and in the subsequent step 2, determines whether it is a measurement start command or not. Determine. If the determination in step 2 is "NO", the process proceeds to step 3 to execute the process corresponding to the contents of the instruction, and then in step 4 the next instruction word is decoded.

前記ステップ2の[命令は計測スタート指令か」の判定
が“YES”のときは、ステップ5へ進み、演算処理部
14ば出力回路16を介して計測スタート信号を視覚装
置2に与え、視覚計測処理を開始させる。
If the determination in step 2 is "Is the command a measurement start command?" Start processing.

かくして視覚装置2において、視覚計測処理が実行され
て物体画像の特徴パラメータが算出されると、その特徴
パラメータにかかる視覚計測データはプログラマブル・
コントローラ3の入力回路15へ出力される。プログラ
マブル・コントローラ3では、計測スタート信号を出力
した後一定の遅延時間を経過した後に入力回路15の全
入力ポートを順次サイクリックにセンスしてゆき(ステ
ップ6.7)、前記視覚計測データをセンスできた時点
でそのデータを一旦RAM18に格納して(ステップ8
.9)、次の命令語を解読する(ステップ4)。
In this way, in the visual device 2, when the visual measurement process is executed and the feature parameters of the object image are calculated, the visual measurement data related to the feature parameters are programmable.
It is output to the input circuit 15 of the controller 3. After a certain delay time has elapsed after outputting the measurement start signal, the programmable controller 3 sequentially and cyclically senses all input ports of the input circuit 15 (step 6.7), and senses the visual measurement data. Once completed, the data is temporarily stored in the RAM 18 (step 8).
.. 9), decode the next instruction word (step 4).

第16図は、上記の動作タイミングを示しており、図中
T、は視覚装置2における視覚計測処理時間を、T2は
前記の遅延時間を、T、は入力ボートをセンスする時間
を、T4はセンスされたデータをRAM18に格納する
時間を、それぞれ示す。
FIG. 16 shows the above operation timing, where T is the visual measurement processing time in the visual device 2, T2 is the delay time, T is the time to sense the input port, and T4 is the time for sensing the input port. Each indicates the time for storing sensed data in the RAM 18.

〈発明が解決しようとする問題点〉 上記プログラマブル・コントローラ3の動作において、
演算処理部14による全入力ボートのサイクリックなセ
ンス時間は1サイクル終了するのに〔ミリ抄〕車位の時
間がかかるもので、処理速度が遅いという問題がある。
<Problems to be solved by the invention> In the operation of the programmable controller 3,
The cyclic sensing time of all input ports by the arithmetic processing unit 14 takes millimeter hours to complete one cycle, and there is a problem that the processing speed is slow.

これがためプログラマブル・コントローラ3において、
テレビカメラ1からのビデオ信号(水平走査期間763
.5マイクロ秒)を入力ポートより直接センスして、視
覚計測処理を伴うマシンの制御を一貫して行うよう構成
する等到底不可能であり、処理・動作の高速化は殆ど期
待できない。
Therefore, in the programmable controller 3,
Video signal from TV camera 1 (horizontal scanning period 763
.. 5 microseconds) directly from the input port to consistently control a machine that involves visual measurement processing, and it is hardly possible to expect faster processing and operation.

そこで第14図に示すように、プログラマブル・コント
ローラ3の前処理部として視覚装置2を付加する構成と
なるが、これだと回路構成が複雑化し、かつプログラマ
ブル・コントローラ3との間でハードウェアの重複が生
じてコスト高となり、また制御回路部をコンパクト化で
きず、業界の要請に応えるのが困難となる。
Therefore, as shown in FIG. 14, a visual device 2 is added as a pre-processing section to the programmable controller 3, but this complicates the circuit configuration and requires hardware communication between the programmable controller 3 and the programmable controller 3. Duplication occurs, resulting in high costs, and the control circuit section cannot be made compact, making it difficult to meet industry demands.

さらに第14図の回路構成例において、プログラマブル
・コントローラ3によって、視覚計測データをセンスす
るタイミングが同期していないと、視覚計測データの更
新中(第15図中、aで示す)にそのデータがセンスさ
れて、適正なデータの取り込みが行われない虞れがある
Furthermore, in the circuit configuration example of FIG. 14, if the timing of sensing the visual measurement data by the programmable controller 3 is not synchronized, the data may be lost during the update of the visual measurement data (indicated by a in FIG. 15). There is a risk that the data may be sensed and the proper data may not be captured.

これを防止するのに、第16図に示す如く、計測スター
ト信号を出力した後一定の遅延時間T□経過後に視覚計
測データをセンスしているが、これだと視覚装置2とプ
ログラマブル・コントローラ3との間での視覚計測デー
タの授受に時間がかかり、処理・動作の高速化は期待で
きない。
To prevent this, the visual measurement data is sensed after a certain delay time T□ has elapsed after outputting the measurement start signal, as shown in FIG. It takes time to send and receive visual measurement data to and from the computer, and we cannot expect faster processing and operation.

この発明は、上記問題を一挙に解消するためのものであ
って、視覚計測処理を伴なうマシン制御の高速化をはか
ると共に、制御回路部のコンパクト化およびローコスト
化を実現する新規なプログラマブル・コントローラを提
供することを目的とする。
This invention aims to solve the above problems all at once, and is a new programmable system that speeds up machine control that involves visual measurement processing, and also makes the control circuit section more compact and low-cost. The purpose is to provide a controller.

く問題を解決するための手段〉 上記目的を達成するためのこの発明の構成を、一実施例
に対応する第1図を用いて説明すると、この発明では、
ビデオ信号を取り込み入力′@像の特徴パラメータを生
成するための視覚計測演算を常時実行する画像入力処理
部21と、この画像入力処理部21にバス22を介して
直接接続される制御部23とでプログラマブル・コント
ローラ24を構成している。
Means for Solving the Problems> The configuration of the present invention for achieving the above object will be explained using FIG. 1 corresponding to one embodiment.
An image input processing section 21 that takes in a video signal and constantly executes visual measurement calculations for generating feature parameters of an input image, and a control section 23 that is directly connected to this image input processing section 21 via a bus 22. This constitutes the programmable controller 24.

そして前記制御部23には、ユーザプログラムが格納さ
れるメモリ (第1図では、RAM25に相当する)と
、外部入力信号が与えられる入力回路26と、外部出力
信号を送出するための出力回路27と、ユーザプログラ
ムの各命令を解読実行すると共に前記入力回路26を介
して得られる入力データに基づき所定の演算処理を行っ
てその処理結果で前記出力回路27の出力データを書き
換える演算処理部28とが設けである。
The control unit 23 includes a memory in which a user program is stored (corresponding to the RAM 25 in FIG. 1), an input circuit 26 to which an external input signal is applied, and an output circuit 27 to send an external output signal. and an arithmetic processing unit 28 that decodes and executes each instruction of the user program, performs predetermined arithmetic processing based on input data obtained via the input circuit 26, and rewrites the output data of the output circuit 27 with the processing result. is the provision.

さらに前記メモリのユーザプログラムには、画像入力処
理部21より特徴パラメータにかかる視覚計測データを
取り込んで、前記演算処理部28に対し対応する所定の
演算処理を実行させるための命令を含ませである。
Furthermore, the user program in the memory includes an instruction for importing visual measurement data related to the feature parameters from the image input processing section 21 and causing the arithmetic processing section 28 to execute a corresponding predetermined arithmetic processing. .

く作用〉 上記構成において、画像入力処理部21はビデオ信号を
入力して所定の視覚計測演算を常時実行し、入力画像の
特徴パラメータを算出する。
Function> In the above configuration, the image input processing section 21 receives a video signal, constantly executes a predetermined visual measurement calculation, and calculates the characteristic parameters of the input image.

演算処理部28はユーザプログラムを解読して命令内容
に応じた処理を実行するが、その命令が視覚計測用の命
令であるときは、画像入力処理部21より特徴パラメー
タにかかる視覚計測データをバス22を介して直接取り
込む。これにより演算処理部28は、そのデータをもと
に直ちに目的とする演算・処理が開始できることになり
、処理の高速化がはかられる。
The arithmetic processing unit 28 decodes the user program and executes processing according to the contents of the instruction, but if the instruction is for visual measurement, the image input processing unit 21 sends visual measurement data related to the feature parameters to the bus. 22 directly. As a result, the arithmetic processing section 28 can immediately start the intended arithmetic/processing based on the data, thereby speeding up the processing.

〈実施例〉 第1図は、この発明の一実施例にかかるプログラマブル
・コントローラ24の回路、構成例を示す。
<Embodiment> FIG. 1 shows an example of the circuit and configuration of a programmable controller 24 according to an embodiment of the present invention.

このプログラマブル・コントローラ24は、命令を解読
して命令内容に基づく演算や処理を行い、その結果に応
じてマシンコントローラ29を介してマシン動作を制御
する。そしてこの発明による実施例の場合、従来の一般
動作に加えて、各種視覚計測用の命令を解読し、その命
令に対応する演算や処理をも実行するものである。
This programmable controller 24 decodes the command, performs calculations and processing based on the contents of the command, and controls machine operation via the machine controller 29 according to the results. In the case of the embodiment according to the present invention, in addition to conventional general operations, it also decodes various visual measurement commands and executes calculations and processing corresponding to the commands.

それ故図示例のプログラマブル・コントローラ24では
、テレビカメラ30よりビデオ信号を取り込み入力画像
の特徴パラメータを生成するための視覚計測演算を常時
実行する画像入力処理部21を具備させており、この画
像入力処理部21にバス22を介して制御部23を直接
接続する構成となっている。
Therefore, the programmable controller 24 in the illustrated example is equipped with an image input processing section 21 that captures a video signal from a television camera 30 and constantly executes visual measurement calculations for generating characteristic parameters of the input image. The control unit 23 is directly connected to the processing unit 21 via a bus 22.

前記の制御部23は、CPUより成る演算処理部28を
中心として、ユーザプログラムを記憶させるRAM25
、外部入力信号が与えられる入力回路26、外部出力信
号を送出するための出力回路27、制御プログラムが格
納されるROM31、ワークエリア(こ供されるRAM
32を含む他、前記RAM2・5に対するユーザプログ
ラムの読み書きや編集を行うためのプログラミングコン
ソール部33や、テレビカメラ30により生成された物
体画像や各種演算結果等をモニタテレビ34に表示させ
るための表示回路35が接続されている。
The control unit 23 includes an arithmetic processing unit 28 consisting of a CPU, and a RAM 25 that stores user programs.
, an input circuit 26 to which an external input signal is applied, an output circuit 27 for sending an external output signal, a ROM 31 in which a control program is stored, a work area (RAM provided)
32, a programming console section 33 for reading/writing and editing user programs in the RAMs 2 and 5, and a display for displaying object images generated by the television camera 30, various calculation results, etc. on a monitor television 34. A circuit 35 is connected.

前記演算処理部28は、入力回路26や画像入力処理部
21の状態に応じてシーケンス演算、データ演算、画像
演算処理を実行し、その演算結果データを出力回路27
や表示回路35に対し送出する。
The calculation processing unit 28 executes sequence calculation, data calculation, and image calculation processing according to the states of the input circuit 26 and the image input processing unit 21, and outputs the calculation result data to the output circuit 27.
and the display circuit 35.

前記RAM25に記憶させるユーザプログラムには、画
像入力処理部21からのデータ取り込みを指示するため
の命令(以下、「視覚計測命令」という)が含まれてお
り、従って演算処理部2Bがこの命令を解読したとき、
視覚計測データを画像入力処理部21より直接取り込ん
で、これをRA M 32に一旦格納する。
The user program stored in the RAM 25 includes an instruction (hereinafter referred to as a "visual measurement instruction") for instructing data import from the image input processing section 21, and therefore, the arithmetic processing section 2B executes this instruction. When deciphered,
Visual measurement data is directly taken in from the image input processing section 21 and temporarily stored in the RAM 32.

前記画像入力処理部21は、テレビカメラ30より物体
画像のビデオ信号を直接入力し、所定の視覚計測演算を
常時行って、入力画像の各種特徴パラメータを算出する
もので、RAM25より視覚計測命令を読み出されたと
き、演算処理部281よいずれかの特徴パラメータにか
かる視覚計測データを取り込んで、目的とする画像演算
を開始できるようになっている。この画像入力処理部2
1は、特徴パラメータをリアルタイムで算出するための
純ハードウェアで構成することも可能であり、またビデ
オ信号を一旦画像メモリに格納した後ソフト処理にて特
徴パラメータを演算するよう構成することもできる。
The image input processing section 21 directly inputs the video signal of the object image from the television camera 30 and constantly performs predetermined visual measurement calculations to calculate various characteristic parameters of the input image. When read out, the arithmetic processing unit 281 can take in the visual measurement data related to any of the feature parameters and start the desired image calculation. This image input processing section 2
1 can be configured with pure hardware for calculating feature parameters in real time, or can be configured so that the video signal is once stored in an image memory and then the feature parameters are calculated by software processing. .

この場合、CPU機能を果たす手段として前記演算処理
部28を用いてもよく、また専用のマイクロプロセッサ
を用いてもよい。
In this case, the arithmetic processing unit 28 may be used as a means for performing the CPU function, or a dedicated microprocessor may be used.

第3図は、画像入力処理部21の具体回路構成例であっ
て、この実施例では特徴パラメータとして入力画像の位
置ずれ量や回転ずれ量をビデオレート(16,6ナノ秒
)で算出する。
FIG. 3 shows an example of a specific circuit configuration of the image input processing section 21, and in this embodiment, the amount of positional deviation and rotational deviation of the input image are calculated as characteristic parameters at the video rate (16.6 nanoseconds).

以下、第4図〜第7図に基づき入力画像の基準位置に対
する位置ずれ量や回転ずれ量の検出原理を説明した後、
第3図に示す回路の構成並びにその動作を説明する。
Hereinafter, after explaining the principle of detecting the amount of positional deviation and rotational deviation of the input image with respect to the reference position based on FIGS. 4 to 7,
The configuration and operation of the circuit shown in FIG. 3 will be explained.

一般に物体画像の位1ずれや回転ずれを検出する場合、
まずテレビカメラで基準モデルの画像41 (第4図(
1)に示す)を得た後、xy座標上でのその画像41の
重心G0の座標(xG’。。
Generally, when detecting a one-dimensional displacement or rotational displacement of an object image,
First, an image 41 of the reference model (Fig. 4) was taken with a television camera.
1)), the coordinates of the center of gravity G0 of the image 41 on the xy coordinates (xG'.

YGa)および主軸角θ。を求める。つぎにテレビカメ
ラで被認識物体の画像42(第4図(2)に示す)を得
、同様にその重心Gの座標(Xr、。
YGa) and principal axis angle θ. seek. Next, an image 42 (shown in FIG. 4 (2)) of the object to be recognized is obtained using a television camera, and the coordinates of its center of gravity G (Xr,

YG)および主軸角θを求めた後、その位置ずれ量ΔX
、ΔYや回転ずれ量Δθを次式で算出する。
YG) and the main axis angle θ, the positional deviation amount ΔX
, ΔY and rotational deviation amount Δθ are calculated using the following equations.

ΔX=X、。−XG・・・・■ A Y ” YG6  Ya ・・・・■Δθ=θ。−
θ ・・・・■ ところで画像ノイズの多い物体画像につき、その位置ず
れや回転ずれを検出するのに、画像のモーメントを利用
してその重心の座標や主軸角を算出する方式が採用され
る。
ΔX=X,. -XG...■ A Y ''YG6 Ya...■Δθ=θ.-
θ...■ By the way, in order to detect the positional deviation or rotational deviation of an object image with a lot of image noise, a method is adopted in which the moment of the image is used to calculate the coordinates of the center of gravity and the principal axis angle.

第5図は、この方式による重心および主軸角の検出理論
を説明するための図であり、図中、升目は縦横各256
ビツトより成る各画素を示し、物体画像43を構成する
各画素の位置はXY[標によって規定されている。
Figure 5 is a diagram for explaining the theory of detecting the center of gravity and principal axis angle using this method.
Each pixel consisting of a bit is shown, and the position of each pixel constituting the object image 43 is defined by an XY mark.

同図において、任意の画素44の座標を(Xi、Yj)
(ただしり、j=4.2.−・・・。
In the same figure, the coordinates of an arbitrary pixel 44 are (Xi, Yj)
(However, j=4.2.-...

256)、その画素44の濃度の重み関数をf (Xi
、Yj )とすると、画像43のモーメントM、:Q(
ただしp、q=o、l、2.  ・・・・)はつぎの0
式で与えられ、また画像43の重心Gの座標(XG、Y
G )および主軸各θは、前記モーメントを利用して、
つぎの0〜0式で与えられる。
256), the density weighting function of the pixel 44 is f (Xi
, Yj ), the moment M of image 43, :Q(
However, p, q=o, l, 2. ...) is the next 0
The coordinates of the center of gravity G of the image 43 (XG, Y
G) and each principal axis θ using the above moments,
It is given by the following 0-0 formula.

ただし、MS。、ば被測定パターンの面積。However, MS. , is the area of the pattern to be measured.

Xc、YGは被測定パターンの重心のX座標。Xc and YG are the X coordinates of the center of gravity of the pattern to be measured.

Y座標である。This is the Y coordinate.

かくして上記0〜0式の演算を実行すれば、画像44の
重心Gの座標(x、、、Ya )や主軸角θ力q負出で
きる。ところが上記各式は、二重積分1乗除算、逆三角
関数を含んでおり、これらの演算をソフト的に実施する
と、多大の時間(秒オーダ)がかかり、特に1画面分の
ビデオ信号出力期間以内に演算を終了させる等、到底不
可能である。
Thus, by executing the calculations of the above equations 0 to 0, the coordinates (x, . . . , Ya) of the center of gravity G of the image 44 and the principal axis angle θ force q can be obtained. However, each of the above equations includes double integration, multiplication and division, and inverse trigonometric functions, and if these calculations were performed using software, it would take a large amount of time (on the order of seconds), especially the video signal output period for one screen. It is completely impossible to complete the calculation within this time.

そこで第3図に示す回路構成をもって、ビデオ信号の1
水平走査期間毎に1水平走査ライン分の0次、1次、2
次の各モーメントを求め、各ラインの総和を有効垂直走
査期間にわたり演算し、次の帰線消去期間に重心および
主軸角を演算することにより、ビデオ信号期間を無駄な
くフルに利用して、物体画像の重心位置やその傾きをリ
アルタイムで検出している。
Therefore, with the circuit configuration shown in Figure 3, one of the video signals is
0th, 1st, 2nd order for 1 horizontal scanning line per horizontal scanning period
By determining each of the following moments, calculating the sum of each line over the effective vertical scanning period, and calculating the center of gravity and principal axis angle during the next blanking period, the video signal period can be fully utilized without wasting the object. The center of gravity of the image and its tilt are detected in real time.

第6図はこの実施例についての理論脱明を行うための図
である。
FIG. 6 is a diagram for explaining the theory of this embodiment.

第6図において、縦横の各升目は画素を示し、各画素に
は水平座標アドレスX、、X2・・・・。
In FIG. 6, each vertical and horizontal square represents a pixel, and each pixel has a horizontal coordinate address X,, X2, . . . .

X8.、および、垂直座標アドレスY+ 、Yt 。X8. , and vertical coordinate addresses Y+, Yt.

・・・・+  Yxshが割り当てられる。画像45は
、物体を盪像して得たビデオ信号を24直化処理して求
めた2値画像であって、例えば物体部分が黒画素、背景
部分が白画素より構成される。図中、Gは画像45の重
心を示し、その座標(XG、Y、)や主軸角θは、つぎ
の0〜0式で示す如く、Σの関数式として表される。
...+Yxsh is assigned. The image 45 is a binary image obtained by converting a video signal obtained by imaging an object into 24-digit data, and is composed of, for example, black pixels in the object portion and white pixels in the background portion. In the figure, G indicates the center of gravity of the image 45, and its coordinates (XG, Y,) and principal axis angle θ are expressed as a function of Σ, as shown by the following 0-0 equation.

ΣX、Σf  (X、、Y、) ΣYJΣf(Xi Yj )  ΣY、−N。ΣX, Σf (X,,Y,) ΣYJΣf(Xi Yj) ΣY, -N.

YG=         =□・・・・■戸Σf  (
Xi、Yj)     ΣNJなお画像45は2値画像
であるから、前記した濃度の重み関数f  (Xt、Y
J)は、次式で示す如く、rOJ  rlJのいずれか
値をとる。
YG= =□・・・・■doorΣf (
Xi, Yj) ΣNJ Since the image 45 is a binary image, the density weighting function f (Xt, Y
J) takes one of the values rOJ rlJ as shown in the following equation.

かくして上記■〜@式において、ΣY4 ・NJオヨび
pY、” NJは垂直座標アドレスに関する1次モーメ
ントおよび2次モーメント、Σ・N5−M;。、ΣΣX
jおよびΣΣX、′は水平座標アドレスに関する0次モ
ーメント、1次モーメント垂直座標アドレスに関する相
関モーメントであり、第6図に示す実施例において、そ
れぞれモーメントの具体例が図の左右両側にあられしで
ある。
Thus, in the above formula ■~@, ΣY4 ・NJ oyobi pY, "NJ is the first moment and second moment regarding the vertical coordinate address, Σ・N5-M;., ΣΣX
j and ΣΣ .

この実施例の場合、ビデオ信号の各水平走査ライン毎に
2値画像45の水平座標アドレスに関する0次モーメン
トN4,1次モーメントΣX、および、2次モーメント
ΣX、をハード的に求め、つぎの水平走査ラインで垂直
座標アドレスに関する1次モーメントYJNJおよび2
次モーメントY、” Nj、さらに水平・垂直座標アド
レスに関する相関モーメントYLΣX1をソフト的に算
出すると共に、各水平走査ライン毎に有効垂直走査期を
それぞれ求め、つぎの垂直帰線消去期間乙こ前記累積加
算値に基づき■〜[相]式の演算を実行して、重心Gの
座標(Xa、Ya)および主軸θをソフト的に算出する
In the case of this embodiment, the zero-order moment N4, first-order moment ΣX, and second-order moment ΣX with respect to the horizontal coordinate address of the binary image 45 are determined by hardware for each horizontal scanning line of the video signal, and the next horizontal The first moment YJNJ and 2 with respect to the vertical coordinate address in the scan line
The next moment Y, "Nj, and the correlation moment YLΣX1 regarding the horizontal and vertical coordinate addresses are calculated by software, and the effective vertical scanning period is calculated for each horizontal scanning line, and the next vertical blanking period is calculated. Based on the added value, the calculations of equations 1 to [phase] are executed to calculate the coordinates (Xa, Ya) of the center of gravity G and the principal axis θ using software.

第7図は、この実施例におけるビデオ信号VD、のタイ
ムチャートを示す。同図において、上半分の図は、垂直
走査期間にかかるビデオ信号VD、を、下半分の図は水
平走査期間にかかるビデオ信号■DLを、それぞれ示し
ている。
FIG. 7 shows a time chart of the video signal VD in this embodiment. In the figure, the upper half shows the video signal VD during the vertical scanning period, and the lower half shows the video signal DL during the horizontal scanning period.

図中、VDは垂直同期信号、HDは水平同期信号を示し
、1垂直走査期間(16,7ミリ秒)は20H(ただし
IHは1水平走査期間を意味し63.5マイクロ秒であ
る)の垂直帰線消去期間と、残りの有効垂直走査期間と
から構成されている。この有効垂直走査期間には、24
2本の水平走査ラインを含み、また各水平走査ラインに
は、256個の画素データを含んでいる。
In the figure, VD indicates a vertical synchronization signal, HD indicates a horizontal synchronization signal, and one vertical scanning period (16.7 milliseconds) is 20H (however, IH means one horizontal scanning period, which is 63.5 microseconds). It consists of a vertical blanking period and the remaining valid vertical scanning period. During this effective vertical scanning period, 24
It includes two horizontal scanning lines, and each horizontal scanning line includes 256 pixel data.

なお図中、Y+ 、Yz、YJ 、・・・・、Y24□
は前記第2図における垂直座標アドレスに、またX+、
Xz、Xi、・・・・、X、、、は水平座標アドレスに
それぞれ対応する。
In the figure, Y+, Yz, YJ,..., Y24□
is the vertical coordinate address in FIG. 2, and X+,
Xz, Xi, . . . , X, . . . correspond to horizontal coordinate addresses, respectively.

つぎに第3図の回路構成を説明するに、図中、テレビカ
メラ30は、物体47を例えば上方より撮像し、濃淡画
像を構成するところのビデオ信号VD、を出力する。同
期分離回路48は、ビデオ信号VD、より水平同期信号
HD、垂直同期信号VD、クロック信号CK等を分離し
て、これを2値化回路49へ出力する。2値化回路49
は、ビデオ信号VD、に対し一定のスレシュホールドレ
ベルを設定することにより、ビデオ信号VD、を白黒2
値化して2値化画像を生成する。画素カウンタ50は、
ビデオ信号VD。
Next, the circuit configuration of FIG. 3 will be described. In the figure, a television camera 30 images an object 47 from above, for example, and outputs a video signal VD that constitutes a grayscale image. The synchronization separation circuit 48 separates the video signal VD, horizontal synchronization signal HD, vertical synchronization signal VD, clock signal CK, etc., and outputs them to the binarization circuit 49. Binarization circuit 49
By setting a certain threshold level for the video signal VD,
A binarized image is generated by digitizing. The pixel counter 50 is
Video signal VD.

の1水平走査ライン毎に、物体部分を構成する画素(こ
の実施例では黒画素)の数を計数するためのもので、そ
の計数イ直NJはI / O(Inputloutpu
t)ボート51を介してCP U (Centra]P
rocesstngUnit)  52に取り込まれる
ようになっている。
This is to count the number of pixels (black pixels in this example) constituting the object part for each horizontal scanning line.
t) CPU (Centra) P via boat 51
rocessstngUnit) 52.

水平カウンタ53は、前記の水平座標アドレスを割り当
てるためのもので、水平同期信号HDの立下がりから例
えば10画素分に相当する時間経過後よりクロック信号
CKの計数を開始する。加算器54およびバッファ55
は、黒画素が存在位置する水平座標アドレスにつき、そ
の累積加算値ΣxLを求めてCPU52へ出力するため
のもので、水平カウンタ53の内容X、とバッファ55
の内容とが加算器54に入力されて累積加算処理される
The horizontal counter 53 is used to allocate the above-mentioned horizontal coordinate address, and starts counting the clock signal CK after a time corresponding to, for example, 10 pixels has elapsed since the fall of the horizontal synchronizing signal HD. Adder 54 and buffer 55
is for calculating the cumulative addition value ΣxL for the horizontal coordinate address where a black pixel is located and outputting it to the CPU 52, and the content X of the horizontal counter 53 and the buffer 55
The contents are input to the adder 54 and subjected to cumulative addition processing.

テーブル変換ROM56は、水平カウンタ53の内容X
1を、その2乗(IXt”に変換するためのテーブルT
I  (第8図に示す)が格納されたものであり、水平
カウンタ53の内容xLでテーブル変?AROM56の
アドレスがアクセスされて、その2乗値X、′が加算器
57へ出力される。この加算器57およびバッファ58
は、黒画素が存在位置する水平座標アドレスにつき、そ
の2乗値X、2の累積加算値ΣX、2を求めてCPU5
2へ出力するためのもので、テーブルifiROM56
の出力X1′とバ・ンファ58の内容とが加X器57に
入力されて累積加算処理される。
The table conversion ROM 56 stores the contents of the horizontal counter 53
Table T for converting 1 to its square (IXt")
I (shown in FIG. 8) is stored, and the table changes with the content xL of the horizontal counter 53? The address of the AROM 56 is accessed and its square value X,' is output to the adder 57. This adder 57 and buffer 58
calculates the cumulative addition value ΣX,2 of its square value X,2 for the horizontal coordinate address where the black pixel is located and sends it to the CPU 5.
This is for outputting to the table ifiROM56.
The output X1' of the buffer 58 and the contents of the buffer 58 are inputted to the adder 57 and subjected to cumulative addition processing.

上記カウンタ50の計数値NJや各バッファ55.58
の内容ΣX4.ΣX、2は1水平走査毎にI10ボート
51を介してCPU52に取り込まれ、CPU52はこ
れらのデータに基づき所定の演算処理を実行して、画像
の重心Gの座標(Xs 、 YG )および主軸角θを
求める。
The count value NJ of the counter 50 and each buffer 55.58
Contents of ΣX4. ∑ Find θ.

なお図中、FROM59は位置ずれ検出等の一連のプロ
グラムを格納し、またRAM60は各種データを格納す
る他、処理実行のためのワークエリアを有する。
In the figure, FROM 59 stores a series of programs such as positional deviation detection, and RAM 60 stores various data and has a work area for processing execution.

つぎに第3図の回路につき、その動作を説明する。Next, the operation of the circuit shown in FIG. 3 will be explained.

まず同図の回路のモードを学習モードに設定した上で、
テレビカメラ30で基準モデルを逼像すると、同期分離
回路48で同!tIN信号等が分離され、さらに2値化
回路49でビデオ信号VD、の2値化処理が実行されて
、2値画像が生成される。この2値画像出力は、画素カ
ウンタ50および各hU算器54.57へ送られるもの
で、この画素カウンタ50や各加算器54゜57におい
ては、前記した所定の計数ないしは演算が実行される。
First, set the mode of the circuit in the same figure to learning mode, and then
When the reference model is imaged with the television camera 30, the synchronization separation circuit 48 shows the same image! The tIN signal and the like are separated, and a binarization circuit 49 executes binarization processing on the video signal VD to generate a binary image. This binary image output is sent to the pixel counter 50 and each hU calculator 54, 57, and in this pixel counter 50 and each adder 54, 57, the above-described predetermined counting or calculation is executed.

そして各水平走査期間毎に、CPU52に対し水平同期
信号HDによる割込みINTが発生せられ、その都度、
画素カウンタ50の内容や、各加算器54.57による
加算結果がCPU52取り込まれる。
Then, for each horizontal scanning period, an interrupt INT is generated to the CPU 52 by the horizontal synchronizing signal HD, and each time,
The contents of the pixel counter 50 and the addition results by the adders 54 and 57 are taken into the CPU 52.

第9図はCPU52における割込み制御動作を示す。FIG. 9 shows the interrupt control operation in the CPU 52.

なお同図中、YjはCPLI52が内部に有する垂直カ
ウンタの計数値(前記垂直座標アドレスに相当する)を
示しており、この垂直カウンタは前記割込みINTの発
生がある毎に歩進されるものであって、垂直同期信号V
Dの立下がりより20Hに相当する時間経過後より計数
を間り合する。
In the figure, Yj indicates the count value of a vertical counter (corresponding to the vertical coordinate address) that the CPLI 52 has internally, and this vertical counter is incremented every time the interrupt INT occurs. Therefore, the vertical synchronization signal V
Counting is started after a time corresponding to 20H has elapsed since the fall of D.

今、YJ番目の水平走査ラインにつき、画素カウンタ5
0による黒画素計数動作が完了した時点を想定すると、
まずCPU52はステップ11で画素カウンタ50の内
容N、を読み取った後、つぎのステ・ノブ12でその累
積加算値N(前記各NJに対応する)を演算して、RA
M6Qへ格納する。さらにステップ13では、CPU5
2内の垂直カウンタの内容YJが読み取られ、つぎのス
テップ14でCPU52はその累積加算値NT、(前記
ΣNjY、に対応する)を演算して、演算結果をRAM
60へへ格納する。続りステップ15では、垂直カウン
タの内容Y、をその2乗値YJ′に変換するため、FR
OM59に格納された変換テーブル(図示せず)が参照
されて2乗値Y、2が求められる。そしてつぎのステッ
プ16では、YJ”Njの累積加算値N1.(前記ΣY
、” N、に対応する)が演算されて、その演算結果が
RAM60へ格納される。さらに久テップ17では、バ
ッファ55の内容ΣxiがCPU52に取り込まれて、
つぎのステップ18で、その累積加算値NT、(前記Σ
ΣxLに対応する)が演算されると共に、つぎのステッ
プ19で、に対応する)が演算されて、それぞれ演算結
果がRAM6Qへ格納される。さらにステップ20では
、バッファ58の内容ΣX□′がCPU52に取り込ま
れ、続くステップ21で、CPU52はその累積加算イ
直Nx (前記ΣΣX、2対応する)を演算して、その
結果をRAM60へ格納する。つぎのステップ22は、
前記垂直カウンタの内容Yjがr242」に達したが否
が、すなわち最終242番目の水平走査ラインについて
のステップ11〜21の処理が完了したか否かを判定し
ており、もしその判定が“NO”のとき、つぎの割込み
LNTに待機し、以下の水平走査ラインについての上記
各処理が繰返し実行される。
Now, for the YJ-th horizontal scanning line, the pixel counter is 5.
Assuming that the black pixel counting operation using 0 is completed,
First, the CPU 52 reads the content N of the pixel counter 50 in step 11, and then calculates the cumulative addition value N (corresponding to each NJ mentioned above) using the next step knob 12, and calculates the cumulative addition value N (corresponding to each NJ mentioned above).
Store in M6Q. Furthermore, in step 13, the CPU 5
The content YJ of the vertical counter in 2 is read, and in the next step 14, the CPU 52 calculates the cumulative addition value NT, (corresponding to the above ΣNjY), and stores the calculation result in the RAM.
60. Continuing in step 15, in order to convert the content Y of the vertical counter into its square value YJ', FR
A conversion table (not shown) stored in the OM 59 is referred to to obtain the square value Y,2. Then, in the next step 16, the cumulative addition value N1 of YJ''Nj (the above ΣY
, "N") is calculated, and the result of the calculation is stored in the RAM 60.Furthermore, in step 17, the content Σxi of the buffer 55 is taken into the CPU 52,
In the next step 18, the cumulative addition value NT, (the above Σ
) corresponding to ΣxL is calculated, and in the next step 19, corresponding to ) is calculated, and the respective calculation results are stored in the RAM 6Q. Further, in step 20, the content ΣX□' of the buffer 58 is fetched into the CPU 52, and in the following step 21, the CPU 52 calculates the cumulative sum Nx (corresponding to ΣΣX, 2) and stores the result in the RAM 60. do. The next step 22 is
It is determined whether the content Yj of the vertical counter has reached ``r242'', that is, whether the processing of steps 11 to 21 for the final 242nd horizontal scanning line has been completed, and if the determination is ``NO''. ”, the process waits for the next interrupt LNT, and the above-mentioned processes for the following horizontal scanning lines are repeatedly executed.

かくして最終の水平走査ラインについてのステップ11
〜21の処理が終了すると、ステップ22の判定が“Y
ES”となり、っぎのステップ23.24において、前
記累積加算値N、NT、。
Thus step 11 for the final horizontal scan line
When the processing in steps 21 to 21 is completed, the determination in step 22 is “Y”.
ES'', and in step 23.24, the cumulative addition values N, NT,.

N T tを用いて、重心G、の座標(Xco、YGJ
が算出され、その結果がRAM60の所定エリアに格納
される。またっぎのステ・ノブ25゜26.27におい
て、前記累積加算値N8゜NY、N、Lvを用いて、そ
れぞれN v = N v−NYco” 、Nxy=N
xy  NXcaYa、、Nx =NX −NX” 、
。を演算して主軸角θ。が算出され、その結果がRAM
60の所定エリアに格納される(ステップ30)、この
場合この実施例では、まずつぎの0式を換算してZの値
を求め、このZを10倍または1/1o倍した値でFR
OM19に格納された変換テーブル(第11図および第
12図)のアドレスを了りセ久して、主軸角θ。の算出
を行っている。
Using N T t, the coordinates of the center of gravity G (Xco, YGJ
is calculated, and the result is stored in a predetermined area of the RAM 60. At the matagi steering knob 25°26.27, using the cumulative addition value N8°NY, N, Lv, N v = N v - NYco'', Nxy = N, respectively.
xy NXcaYa,, Nx = NX − NX”,
. Calculate the principal axis angle θ. is calculated and the result is stored in RAM
60 (step 30). In this case, in this embodiment, the following 0 formula is first converted to obtain the value of Z, and the value obtained by multiplying this Z by 10 or 1/1o is used to calculate the FR.
After completing the address of the conversion table (FIGS. 11 and 12) stored in the OM 19, the main axis angle θ is determined. is being calculated.

なお第11図は主軸角θ。が0〜22.5゜である場合
の変換テーブルT2およびtanθ。
Note that FIG. 11 shows the principal axis angle θ. Conversion table T2 and tanθ when is 0 to 22.5°.

の変換曲線を、また第12図は主軸角θ。が22.5〜
45°である場合の変換テーブルT3およびcote、
の変換曲線をそれぞれ示し、この変換テーブルT2.T
3は主軸角θ。の大きさに応じて用いわけられる。
Fig. 12 shows the conversion curve of , and the principal axis angle θ. is 22.5~
Conversion table T3 and cote when the angle is 45°,
, respectively, and this conversion table T2. T
3 is the principal axis angle θ. It is used depending on the size of the

上記重心G。の座標(X Go 、 Y a。)および
主軸角θ。の算出が終わると、最後にステップ31でR
AM60より各累積加算値N、NTr、NTよ。
The center of gravity G above. coordinates (X Go , Y a.) and principal axis angle θ. When the calculation of R is completed, finally, in step 31, R
From AM60, each cumulative addition value N, NTr, NT.

Nに、Nv 、Nxvがクリアされ、基準パターンにつ
いての一連の処理を終了する。
At N, Nv and Nxv are cleared, and the series of processing for the reference pattern is completed.

つぎにモードを計測モードに設定した上で、テレビカメ
ラ30で対象物体を撮像する。この場合も、上記基準モ
デルの場合と同様の画像処理、さらには画素カウンタ5
0および各加算器54.57の計数ないしは演算が実行
される。
Next, after setting the mode to measurement mode, the television camera 30 images the target object. In this case as well, the same image processing as in the case of the above reference model is performed, and furthermore, the pixel counter 5
0 and each adder 54, 57 counts or operations are performed.

そして各水平走査毎に、CPU52に対し水平同期信号
t(Dによる割込みINTが発生せられ、画素カウンタ
50の内容や各加算器54.57による加算結果がその
都度読み込まれる。
Then, for each horizontal scan, an interrupt INT is generated by the horizontal synchronizing signal t(D) to the CPU 52, and the contents of the pixel counter 50 and the addition results by the adders 54 and 57 are read each time.

第10図はこの場合のCPU52における割込み制御動
作を示す。同図において、ステップ41〜51は累積加
算値N、NTr、Ny 、NTz 。
FIG. 10 shows the interrupt control operation in the CPU 52 in this case. In the figure, steps 41 to 51 are cumulative addition values N, NTr, Ny, and NTz.

Nxv、Nxを算出するステップであって、これは第9
図のステップ11〜21と全く同様である。
This is the step of calculating Nxv and Nx, which is the ninth step.
This is exactly the same as steps 11 to 21 in the figure.

そして最終の水平走査ラインについてのステップ41〜
51の処理が済むと、ステップ52の判定が“YES”
となり、ステップ53〜6oにおいて、重心Gの座標(
XG、YG )および主軸角θが算出される。しかる後
、CPU52は、これらデータおよび学習モードで得た
基準モデルについてのデータを用いて前記0〜0式の演
算が実行され、画像の位置ずれ量ΔX、ΔY。
and steps 41-- for the final horizontal scan line.
When the process in step 51 is completed, the determination in step 52 is "YES".
Then, in steps 53 to 6o, the coordinates of the center of gravity G (
XG, YG) and the principal axis angle θ are calculated. Thereafter, the CPU 52 uses these data and the data about the reference model obtained in the learning mode to execute the calculations of the equations 0 to 0, and calculates the image positional deviation amounts ΔX, ΔY.

および回転ずれ量Δθが算出される。(ステップ61〜
63)。そしてつぎのステップ64でこの算出結果がR
AM60にストアされた後、ステ・ノブ65において、
RAM60より各累積加算値N、NTr 、NTz 、
Nx 、Nv 、Nwvがクリアされて、一連の処理を
終了する。
and the amount of rotational deviation Δθ is calculated. (Step 61~
63). Then, in the next step 64, this calculation result is calculated as R
After being stored in AM60, in Ste Nobu 65,
Each cumulative addition value N, NTr, NTz,
Nx, Nv, and Nwv are cleared, and the series of processing ends.

つぎに第1図に示すプログラマブル・コントローラ24
の回路動作を、第2図に示す制御フローに基づき説明す
る。
Next, the programmable controller 24 shown in FIG.
The circuit operation will be explained based on the control flow shown in FIG.

第1図において、画像入力処理部21ヘテレビカメラ3
0よりビデオ信号が入力されると、ビデオ入力処理部2
1は前記の視覚計測処理を行って、入力画像の位置ずれ
量ΔX、ΔYおよび回転ずれ量Δθを特徴パラメータと
して算出する。これを同時に演算処理部28は、RA 
M2Sのユーザプログラムより命令を読み出し、ステッ
プ71でその命令語の解析を行い、ステップ73でその
命令内容に応じた処理を実行する。
In FIG. 1, the television camera 3 is input to the image input processing section 21.
When a video signal is input from 0, the video input processing section 2
1 performs the above-mentioned visual measurement process to calculate the positional deviation amounts ΔX, ΔY and the rotational deviation amount Δθ of the input image as characteristic parameters. At the same time, the arithmetic processing unit 28 processes the RA
An instruction is read from the user program of the M2S, the instruction word is analyzed in step 71, and processing according to the content of the instruction is executed in step 73.

もし読み出された命令が視覚計測命令である場合は、ス
テップ72の判定が“YES”となり、ステップ74で
演算処理部28は画像入力処理部21のRAM60より
入力画像の位置ずれ量ΔX、ΔYや回転ずれ量Δθを取
り込み、続くステップ5でこれをRAM32へ一旦格納
する。
If the read command is a visual measurement command, the determination in step 72 becomes "YES", and in step 74, the arithmetic processing unit 28 calculates the positional deviation amount ΔX, ΔY of the input image from the RAM 60 of the image input processing unit 21. and the amount of rotational deviation Δθ, and temporarily stores them in the RAM 32 in the following step 5.

これにより演算処理部28は、これら視覚計測データを
用いて、目的とする画像演算処理を開始できることにな
る。
This allows the arithmetic processing unit 28 to start the desired image arithmetic processing using these visual measurement data.

かくて演算処理部28は、つぎのステップ76において
、RAM25のユーザプログラムより次の命令を読み出
し、その命令内容に応じた条件判定等の画像演算処理を
実行しくステップ73)その結果に基づきマシンコント
ローラ29を介してマシン動作を制御する。
In this way, in the next step 76, the arithmetic processing unit 28 reads the next command from the user program in the RAM 25, and executes image calculation processing such as condition determination according to the contents of the command (step 73).Based on the result, the machine controller 29 to control machine operation.

〈発明の効果〉 この発明は上記の如く、ビデオ信号を取り込み入力画像
の特徴パラメータを生成するための視覚計測演算を常時
実行する画像入力処理部と、この画像入力処理部にバス
を介して直接接続される制御部とでプログラマブル・コ
ントローラを構成し、前記制御部が有するユーザプログ
ラム用のメモリには、画像入力処理部より特徴パラメー
タにかかる視覚計測データを取り込んで演算処理部に対
し所定の演算処理を実行させるための命令を格納したか
ら、入力ポートをサイクリックにセンスして視覚計測デ
ータの取り込みを行う従来方式に比較して、処理速度を
大幅に高速化し得る。また前処理部としての視覚装置は
不要であるから、制御回路部を節易化でき、しかもハー
ドウェア構成の重複を防止できるから、制御回路のロー
コスト化やコンパクト化を実現し得、業界の要請に応え
ることができる等、発明目的を達成した顕著な効果を奏
する。
<Effects of the Invention> As described above, the present invention includes an image input processing section that takes in a video signal and constantly executes visual measurement calculations for generating characteristic parameters of an input image, and a system that directly connects the image input processing section to the image input processing section via a bus. A programmable controller is configured with a connected control unit, and the control unit has a user program memory that receives visual measurement data related to feature parameters from an image input processing unit and executes predetermined calculations for an arithmetic processing unit. Since instructions for executing the process are stored, the processing speed can be significantly increased compared to the conventional method in which visual measurement data is captured by cyclically sensing the input port. In addition, since a visual device as a preprocessing section is not required, the control circuit section can be simplified, and duplication of hardware configurations can be prevented, making it possible to reduce the cost and size of the control circuit, which is a requirement in the industry. The present invention has a remarkable effect of achieving the purpose of the invention, such as being able to meet the following requirements.

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

第1図はこの発明の一実施例にかかるプログラマブル・
コントローラの回路ブロック図、第2図はプログラマブ
ル・コントローラの動作を示すフローチャート、第3図
は画像入力処理部の具体例を示す回路ブロック図、第4
図は画像の位置ずれ量や回転ずれ量を説明するための図
、第5図は重心および主軸角の検出理論を説明するため
の図、第6図は第3図の具体回路例の動作理論を説明す
るための図、第7図はビデオ信号のタイムチャート、第
8図はテーブル変換ROMの内容を示す図、第9図およ
び第10図は画像入力処理部の割込み制御動作を示すフ
ローチャート、第11図および第12図は変換テーブル
および変換曲線を示す図、第13図は従来の視覚計測処
理を伴なうマシンのシステム構成を示す図、第14図は
従来システムの具体回路構成例を示すブロック図、第1
5図は従来システムにおけるプログラマブル・コントロ
ーラの動作を示すフローチャート、第16図は従来例の
プログラマブル・コントローラの動作タイミングを示す
タイムチャートである。 21・・・・画像入力処理部 23・・・・制御部 24・・・・プログラマブル・コントローラ25・・・
・RA M      26・・・・入力回路27・・
・・出力回路    28・・・・演算処理部特許 出
 願人  立石電機株式会社 う+7121   −笑左りイナ・し1・η・る7・0
り゛ラマ7−、L コシトローウn60条7−o、、7
1グth                  +2+
”y+s+21    重、し・Lよ1f工第白^〜オ
倹1歎4詣室をシ之−1オるに1め−)27f′712
1   ビテ゛オイ寞号め2イAす・−トー^t・忙
FIG. 1 shows a programmable computer according to an embodiment of the present invention.
A circuit block diagram of the controller; FIG. 2 is a flowchart showing the operation of the programmable controller; FIG. 3 is a circuit block diagram showing a specific example of the image input processing unit;
The figure is a diagram to explain the amount of positional shift and rotational shift of the image, Figure 5 is a diagram to explain the theory of detecting the center of gravity and principal axis angle, and Figure 6 is the theory of operation of the specific circuit example in Figure 3. 7 is a time chart of the video signal, FIG. 8 is a diagram showing the contents of the table conversion ROM, FIGS. 9 and 10 are flow charts showing the interrupt control operation of the image input processing section, Figures 11 and 12 are diagrams showing conversion tables and conversion curves, Figure 13 is a diagram showing a system configuration of a machine that involves conventional visual measurement processing, and Figure 14 is a diagram showing an example of a specific circuit configuration of a conventional system. Block diagram shown, 1st
FIG. 5 is a flowchart showing the operation of the programmable controller in the conventional system, and FIG. 16 is a time chart showing the operation timing of the conventional programmable controller. 21... Image input processing section 23... Control section 24... Programmable controller 25...
・RAM 26... Input circuit 27...
...Output circuit 28...Arithmetic processing unit patent Applicant: Tateishi Electric Co., Ltd. U+7121 - Laugh left ina・shi1・η・ru7・0
Rirama 7-, L Koshitroun n60 article 7-o,,7
1gth +2+
”y+s+21 Heavy, L, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor - 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor, 1st floor - 1st floor - 1st floor - 1st floor - 1st floor]
1 Bit oi No. 2

Claims (3)

【特許請求の範囲】[Claims] (1)ビデオ信号を取り込み入力画像の特徴パラメータ
を生成するための視覚計測演算を常時実行する画像入力
処理部と、この画像入力処理部にバスを介して直接接続
される制御部とで構成されるプログラマブル・コントロ
ーラであって、前記制御部は、ユーザプログラムが格納
されるメモリと、外部入力信号が与えられる入力回路と
、外部出力信号を送出するための出力回路と、ユーザプ
ログラムの各命令を解読実行すると共に前記入力回路を
介して得られる入力データに基づき所定の演算処理を行
ってその処理結果で前記出力回路の出力データを書き換
える演算処理部とを含み、 前記メモリのユーザプログラムには、前記画像入力処理
部より特徴パラメータにかかる視覚計測データを取り込
んで、前記演算処理部に対し所定の演算処理を実行させ
るための命令を含ませて成るプログラマブル・コントロ
ーラ。
(1) It consists of an image input processing section that takes in video signals and constantly executes visual measurement calculations to generate characteristic parameters of the input image, and a control section that is directly connected to this image input processing section via a bus. The control unit includes a memory in which a user program is stored, an input circuit to which an external input signal is applied, an output circuit to send an external output signal, and each instruction of the user program. the user program in the memory includes an arithmetic processing unit that decodes and executes predetermined arithmetic processing based on input data obtained through the input circuit, and rewrites output data of the output circuit with the processing result; A programmable controller comprising instructions for importing visual measurement data related to feature parameters from the image input processing section and causing the arithmetic processing section to execute predetermined arithmetic processing.
(2)前記画像入力処理部は、ビデオ信号をビデオレー
トで処理して特徴パラメータを生成する手段を含む特許
請求の範囲第1項記載のプログラマブル・コントローラ
(2) The programmable controller according to claim 1, wherein the image input processing section includes means for processing a video signal at a video rate to generate characteristic parameters.
(3)前記画像入力処理部は、撮像対象である物体の位
置ずれ量および回転ずれ量を特徴パラメータとして生成
する手段を含む特許請求の範囲第1項または第2項記載
のプログラマブル・コントローラ。
(3) The programmable controller according to claim 1 or 2, wherein the image input processing section includes means for generating the amount of positional deviation and rotational deviation of the object to be imaged as characteristic parameters.
JP12971886A 1986-06-03 1986-06-03 Programmable controller Pending JPS62285108A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12971886A JPS62285108A (en) 1986-06-03 1986-06-03 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12971886A JPS62285108A (en) 1986-06-03 1986-06-03 Programmable controller

Publications (1)

Publication Number Publication Date
JPS62285108A true JPS62285108A (en) 1987-12-11

Family

ID=15016486

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12971886A Pending JPS62285108A (en) 1986-06-03 1986-06-03 Programmable controller

Country Status (1)

Country Link
JP (1) JPS62285108A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59165108A (en) * 1983-03-09 1984-09-18 Datsuku Eng Kk Industrial robot
JPS60120408A (en) * 1983-12-05 1985-06-27 Nissan Motor Co Ltd Position correcting device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59165108A (en) * 1983-03-09 1984-09-18 Datsuku Eng Kk Industrial robot
JPS60120408A (en) * 1983-12-05 1985-06-27 Nissan Motor Co Ltd Position correcting device

Similar Documents

Publication Publication Date Title
US8648808B2 (en) Three-dimensional human-computer interaction system that supports mouse operations through the motion of a finger and an operation method thereof
JPH07200774A (en) Image processing method and device
JPS60167069A (en) Pattern recognizer
CN104990518A (en) FPGA-based three-dimension scanning control device and method
JPS628072B2 (en)
JPH0644292B2 (en) Two-dimensional visual recognition device
KR910000203B1 (en) Picture processing apparatus
CN114155288A (en) AR space visual three-dimensional reconstruction method controlled through gestures
JPS62285108A (en) Programmable controller
JPH08272973A (en) Image process for face feature extraction
JPH0353668B2 (en)
JPH0498367A (en) Three-dimensional shape generation system
JPS62286189A (en) High speed visual recognizing device
JPH0346045B2 (en)
JPS60182977A (en) Electronic game apparatus
JPS60157681A (en) Detection system of ruggedness of picture graphic form
WO2023013499A1 (en) Information processing device, measurement system, robot system, data processing method, and computer program
WO2024029411A1 (en) Work feature amount display device, work feature amount display method, and work feature amount display program
US20230149095A1 (en) Surgical robotic arm control system and control method thereof
JPS62111368A (en) Main axial angle detector
JPS624588A (en) Centroid and main axial angle detector
KR960001753B1 (en) Directionally characteristic recognition system by binary image
JPS623309A (en) Spindle angle detector
JP2002366294A (en) Data input device and program thereof
JPH0225704A (en) Detecting device for rotational position and direction of object