JPH0346045B2 - - Google Patents

Info

Publication number
JPH0346045B2
JPH0346045B2 JP59242756A JP24275684A JPH0346045B2 JP H0346045 B2 JPH0346045 B2 JP H0346045B2 JP 59242756 A JP59242756 A JP 59242756A JP 24275684 A JP24275684 A JP 24275684A JP H0346045 B2 JPH0346045 B2 JP H0346045B2
Authority
JP
Japan
Prior art keywords
point
brightness gradient
edge
corner
absolute value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP59242756A
Other languages
Japanese (ja)
Other versions
JPS61120002A (en
Inventor
Hiroshi Moribe
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.)
Toyota Central R&D Labs Inc
Original Assignee
Toyota Central R&D Labs Inc
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 Toyota Central R&D Labs Inc filed Critical Toyota Central R&D Labs Inc
Priority to JP24275684A priority Critical patent/JPS61120002A/en
Publication of JPS61120002A publication Critical patent/JPS61120002A/en
Publication of JPH0346045B2 publication Critical patent/JPH0346045B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • G01B11/028Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness by measuring lateral position of a boundary of the object

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は濃淡画像で表わされた被測定物のコー
ナ点の位置座標と、その姿勢の傾きを高速で検出
できる方法及びその装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method and an apparatus for detecting the positional coordinates of corner points of an object to be measured represented by a grayscale image and the inclination of its posture at high speed.

本発明方法及び装置は、例えばロボツトの作業
対象となる被測定物の教示点からの位置ずれや、
その姿勢のずれを高速に測定し、ロボツトの教示
点をリアルタイムで補正して、正常に作業を継続
できるようにするための装置に応用できる。
The method and device of the present invention can be applied to, for example, a positional deviation of a workpiece to be worked on by a robot from a teaching point,
It can be applied to a device that can quickly measure posture deviations, correct the robot's teaching points in real time, and allow the robot to continue working normally.

[従来の技術] ロボツトの作業対象物である機械部品などの大
部分はコーナ点を持つている。このコーナ点の位
置座標と、コーナ点に接続される縁線の傾きを検
出することにより、対象物全体の位置ずれや姿勢
のずれを計算することができる。
[Prior Art] Most of the mechanical parts that robots work on have corner points. By detecting the positional coordinates of this corner point and the inclination of the edge line connected to the corner point, it is possible to calculate the positional deviation and posture deviation of the entire object.

コーナ点の検出の一方法として、従来、1画面
を256×256画素で構成し、各画素での濃淡レベル
を256階級(8ビツトデータ)にデイジタル化し
た濃淡画像を大型計算機を用いて画像処理する方
法が考案されている。たとえば、1次微分、2次
微分による縁線の抽出、マスクオペレータ、テン
プレートマツチングによる縁線、角の抽出が行な
われている。
One method for detecting corner points has traditionally been to use a large-scale computer to process a gradation image in which one screen consists of 256 x 256 pixels and the gradation level of each pixel is digitized into 256 classes (8-bit data). A method has been devised to do so. For example, edge lines are extracted by first-order differentiation and second-order differentiation, and edge lines and corners are extracted by mask operators and template matching.

しかし、大型計算機を用いれば、複雑高度な画
像処理ができる反面、本質的に逐次演算処理方式
であるため多大な時間を要しまたコスト高となる
欠点がある。
However, although the use of a large-scale computer allows complex and sophisticated image processing, it is essentially a sequential arithmetic processing method, which has the disadvantage of requiring a large amount of time and increasing costs.

又これを補うため、テレビカメラからの映像信
号を、適当なしきい値を設けて2値化し、データ
圧縮した後、輪郭線を追跡し、コーナ点を探索す
る方式も考えられている。しかし、この方式は2
値化するためのしきい値の設定が難しく、照明や
背景などを相当工夫しても、種々のノイズに撹乱
されてデータの処理が、不可能になる場合が多
い。
In order to compensate for this, a method has also been considered in which the video signal from the television camera is binarized by setting an appropriate threshold, the data is compressed, and then the contour is traced to search for corner points. However, this method uses 2
It is difficult to set a threshold for converting data into values, and even if you make great efforts to adjust lighting, backgrounds, etc., it is often impossible to process the data due to disturbances caused by various noises.

この様な理由から、従来、特にロボツト制御な
どの制御分野においては、リアルタイム制御、低
コスト化、高信頼性が要求されるため、上記方式
は、応用できなかつた。
For these reasons, the above-mentioned method has not been applicable to the field of control, such as robot control, which requires real-time control, low cost, and high reliability.

[発明の解決しようとする問題点] 制御の分野に対応し得る高速性、高信頼性を満
たすに十分な、物体のコーナ点の位置、姿勢等を
検出するための方法及び装置は存在しない。
[Problems to be Solved by the Invention] There is no method or device for detecting the position, orientation, etc. of a corner point of an object that is sufficient to satisfy the high speed and high reliability applicable to the field of control.

本発明は、上記の欠点を改良するためになされ
たものであり、簡便なステツプで、高速かつ高精
度に、被測定物のコーナ点の位置、姿勢を検出す
ることを目的とする。
The present invention has been made to improve the above-mentioned drawbacks, and an object of the present invention is to detect the position and orientation of a corner point of an object to be measured at high speed and with high precision using simple steps.

[問題点を解決するための手段] 本第1発明は、コーナ点検出方法に関するもの
であり、その発明の構成は次の通りである。
[Means for Solving the Problems] The first invention relates to a corner point detection method, and the structure of the invention is as follows.

被測定物の画像を光電変換器の受光面上に投影
し、該受光面の平面座標に対応して、映像信号の
濃淡レベルをサンプリングして得られた被測定物
の濃淡画像の処理方法に於て、 前記濃淡画像上に仮想線を設定し、該仮想線上
の点における前記濃淡画像の明度勾配を該仮想線
に沿つて演算し、前記明度勾配の絶対値が、所定
値以上である点を、前記被測定物の縁線上のエツ
ジ点として検出し、 該エツジ点から出発し、前記縁線上の点の前記
明度勾配からその点における前記縁線の方向を求
め、該縁線に沿う微小間隔だけへだてた縁線上の
次の点を算出する処理を遂次実行して、前記縁線
に沿つて移動し、 前記明度勾配の絶対値が所定値以上で、明度勾
配の方向が所定値以上変化する点を前記被測定物
の縁線のコーナ点として検出することを特徴とす
る画像のコーナ点検出方法である。
A method for processing a grayscale image of a workpiece obtained by projecting an image of the workpiece onto a light-receiving surface of a photoelectric converter and sampling the grayscale level of a video signal in accordance with the plane coordinates of the light-receiving surface. In this step, a virtual line is set on the grayscale image, a brightness gradient of the grayscale image at a point on the virtual line is calculated along the virtual line, and a point where the absolute value of the brightness gradient is greater than or equal to a predetermined value is determined. is detected as an edge point on the edge line of the object to be measured, and starting from the edge point, the direction of the edge line at that point is determined from the brightness gradient of the point on the edge line, and the direction of the edge line along the edge line is determined. Sequentially executes a process of calculating the next point on the edge line separated by an interval, moves along the edge line, and determines that the absolute value of the brightness gradient is greater than or equal to a predetermined value, and the direction of the brightness gradient is greater than or equal to a predetermined value. A method for detecting a corner point of an image is characterized in that a changing point is detected as a corner point of an edge line of the object to be measured.

第2図は、被測定物の濃淡画像1を模式的に示
したものである。濃淡画像1は、光電変換器から
出力される映像信号を、受光面上の平面座標に対
応してサンプリングして濃淡レベルをデイジタル
化して得られた画像である。
FIG. 2 schematically shows a grayscale image 1 of the object to be measured. The grayscale image 1 is an image obtained by sampling the video signal output from the photoelectric converter corresponding to the plane coordinates on the light receiving surface and digitizing the grayscale level.

2は、被測定物の画像(以下単に「被測定物」
という)である。本発明は、この被測定物2のコ
ーナ点Aの座標を検出するものである。濃淡画像
1上に被装定物2を横切る仮想線Lを設定する。
仮想線Lは、被測定物2の縁線21とエツジ点B
で交わつている。
2 is an image of the object to be measured (hereinafter simply "object to be measured")
). The present invention detects the coordinates of the corner point A of the object to be measured 2. A virtual line L that crosses the fixed object 2 is set on the grayscale image 1.
The virtual line L connects the edge line 21 of the object to be measured 2 and the edge point B.
are intersecting.

まず、仮想点L上の動点Pを仮想線Lに沿つて
移動させながら、動点Pにおける濃淡画像1の明
度勾配を求める。ここで、明度勾配は、ベクトル
量であり、平面座標に関する画像の明度のグラデ
イエントである。その明度勾配を演算する方法
は、任意であるが、たとえば動点Pを含み、2×
2、3×3、4×4、等のメツシユ状に分割され
た各画素のデータを用いて、ロバートのオペレー
タ、ソーベルのオペレータ等によつて算出するこ
とができる。
First, while moving the moving point P on the virtual point L along the virtual line L, the brightness gradient of the grayscale image 1 at the moving point P is determined. Here, the brightness gradient is a vector quantity, and is a gradient of brightness of an image with respect to plane coordinates. The method of calculating the brightness gradient is arbitrary, but for example, including the moving point P, 2×
It can be calculated by Robert's operator, Sobel's operator, etc. using the data of each pixel divided into a mesh of 2, 3×3, 4×4, etc.

縁線21上では、明度勾配の絶対値が大きくな
ることが知られており、動点Pにおける明度勾配
の絶対値が所定値よりも大きくなつたことを検出
して、その動点が縁線21上のエツジ点Bである
ことを判別できる。
It is known that the absolute value of the brightness gradient becomes large on the edge line 21, and by detecting that the absolute value of the brightness gradient at the moving point P has become larger than a predetermined value, the moving point is moved to the edge line. It can be determined that it is edge point B on 21.

この様にして、エツジ点Bの位置座標が検出さ
れると、そのエツジ点Bにおける明度勾配の方向
から、縁線21の存在する方向を推定できる。即
ち縁線21は、明度勾配(ベクトル)に対し垂直
方向に伸びているので、明度勾配を±90゜回転し
たベクトルの方向に縁線21は存在することにな
る。この様にエツジ点Bにおける縁線21の方向
を決定し、その方向に、エツジ点Bから微小間隔
だけへだてた点Q1を選定し、その点Q1での明
度勾配を求める。その明度勾配の絶対値が所定値
以上ならば、次に、その点Q1での明度勾配から
縁線21の方向を推定し、さらに、縁線21上に
ある次の微小間隔だけへだてた点Q2を選定す
る。
When the position coordinates of edge point B are detected in this manner, the direction in which edge line 21 exists can be estimated from the direction of the brightness gradient at edge point B. That is, since the edge line 21 extends in a direction perpendicular to the brightness gradient (vector), the edge line 21 exists in the direction of the vector obtained by rotating the brightness gradient by ±90 degrees. In this manner, the direction of the edge line 21 at edge point B is determined, and in that direction, a point Q1 set apart from edge point B by a minute distance is selected, and the brightness gradient at that point Q1 is determined. If the absolute value of the brightness gradient is greater than or equal to a predetermined value, then the direction of the edge line 21 is estimated from the brightness gradient at that point Q1, and furthermore, the direction of the edge line 21 is estimated at a point Q2 located at the next minute interval on the edge line 21. Select.

この様にして、順次、点Q1,Q2,…,Qn
を選定することによつて縁線21に沿つて移動す
ることができる。この様な操作を順次くり返す
と、コーナ点Aに致る。コーナ点近傍では、縁線
21上の点Qnにおける明度勾配Vnから推定した
方向と、点Qn+1における明度勾配Vn+1から推
定した方向とが大きく異なる。即ち、明度勾配が
大きく変化したことを検出して、そのときの縁線
21上の点を被測定物2のコーナ点Aと判別する
ことができる。
In this way, points Q1, Q2, ..., Qn
It is possible to move along the edge line 21 by selecting . By repeating these operations one after another, corner point A is reached. In the vicinity of the corner point, the direction estimated from the brightness gradient Vn at point Qn on the edge line 21 and the direction estimated from the brightness gradient Vn+ 1 at point Qn+ 1 are significantly different. That is, it is possible to detect a large change in the brightness gradient and determine the point on the edge line 21 at that time to be the corner point A of the object to be measured 2.

以上の操作によつて、被測定物2のコーナ点A
の位置座標を検出することができる。したがつ
て、前記エツジ点Bとコーナ点Aの位置座標から
縁線21の傾きが求まり、縁線21の傾きから被
測定物の姿勢を求めることができる。
By the above operations, the corner point A of the object to be measured 2 is
The position coordinates of can be detected. Therefore, the inclination of the edge line 21 can be determined from the position coordinates of the edge point B and the corner point A, and the attitude of the object to be measured can be determined from the inclination of the edge line 21.

次に、第2発明について説明する。 Next, the second invention will be explained.

第1図は、同発明装置の概念を示したブロツク
ダイヤグラムである。
FIG. 1 is a block diagram showing the concept of the device of the invention.

本発明装置の構成は次の通りである。 The configuration of the device of the present invention is as follows.

被測定物の画像を光電変換器の受光面上に投影
し、該受光面の平面座標に対応して、映像信号の
濃淡レベルをサンプリングして得られた被測定物
の平面座標に関する濃淡画像を記憶する画像入力
装置と、 前記画像入力装置からデータを入力し、前記濃
淡画像上の任意の点における明度勾配を求める微
分装置と、 前記微分装置の出力を入力して前記明度勾配の
絶対値を求める絶対値演算装置と、 前記微分装置の出力を入力して前記明度勾配の
方向を求める方向演算装置と、 前記濃淡画像上の任意に設定された直線に沿う
点の平面座標を順次、前記微分装置に与え、前記
絶対値演算装置の出力が所定の値よりも大きくな
る点を前記被測定物の縁線上のエツジ点として検
出するエツジ点検出装置と、 前記エツジ点の検出後、該エツジ点から出発
し、前記縁線上の点の前記明度勾配より、その点
における前記縁線の方向を求め、該縁線に沿う微
小間隔だけへだてた次の点の平面座標を、前記微
分装置に与えるサイクルを逐次実行して縁線上を
移動し、前記絶対値演算装置の出力が所定値以上
で、前記方向演算装置の出力が所定値以上変化し
たとき、その点を前記縁線のコーナ点として検出
するコーナ検出装置と、から成るコーナ点検出装
置である。
The image of the object to be measured is projected onto the light-receiving surface of the photoelectric converter, and the gray level image of the object to be measured is obtained by sampling the gray level of the video signal in accordance with the plane coordinates of the light-receiving surface. an image input device for storing; a differentiator that inputs data from the image input device and calculates a brightness gradient at an arbitrary point on the grayscale image; and a differentiator that inputs the output of the differentiator to calculate the absolute value of the brightness gradient. an absolute value calculating device for calculating the direction of the brightness gradient by inputting the output of the differentiating device; and a direction calculating device for calculating the direction of the brightness gradient by inputting the output of the differentiating device; an edge point detection device that detects a point at which the output of the absolute value calculation device is larger than a predetermined value as an edge point on the edge line of the object to be measured; A cycle in which the direction of the edge line at that point is determined from the brightness gradient of a point on the edge line, and the plane coordinates of the next point separated by a minute interval along the edge line are given to the differentiator. are executed sequentially to move on the edge line, and when the output of the absolute value calculation device is greater than a predetermined value and the output of the direction calculation device changes by more than a predetermined value, that point is detected as a corner point of the edge line. A corner point detection device includes a corner detection device.

画像入力装置3は、平面座標に関する濃淡画像
1を記憶する装置である。たとえば、テレビカメ
ラ等の電子管撮像装置、CCD、BBD等の固体撮
像装置を用いて映像信号を取出し、該映像信号を
平面座標に対応してサンプリングし、デイジタル
化して濃淡画像1として記憶する装置である。即
ち画像入力装置3は、テレビカメラ等の映像検出
手段を備えていても、他の装置によつて検出され
た濃淡画像1のデータを入力しこれをアクセス可
能に記憶する装置であつても良い。要は、少なく
とも濃淡画像1を記憶できる装置である。
The image input device 3 is a device that stores a grayscale image 1 regarding plane coordinates. For example, a device that extracts a video signal using an electron tube imaging device such as a television camera, or a solid-state imaging device such as a CCD or BBD, samples the video signal in accordance with plane coordinates, digitizes it, and stores it as a grayscale image 1. be. That is, the image input device 3 may be equipped with video detection means such as a television camera, or may be a device that inputs data of the grayscale image 1 detected by another device and stores it in an accessible manner. . The point is that the device is capable of storing at least the grayscale image 1.

画像入力装置3には、微分装置4が接続されて
おり、微分装置4はエツジ点検出装置からの信号
S1によつて、画像入力装置3から濃淡画像1の
データを取込み、信号S1によつて特定された点
における明度勾配を求める。この微分装置4の構
成は、その点における明度勾配が求まれば任意で
よく、たとえば、前記方法発明において説明した
様に、微分オペレータを用いるのであれば、その
演算を実行する積和演算器で構成することができ
る。
A differentiator 4 is connected to the image input device 3, and the differentiator 4 takes in the data of the grayscale image 1 from the image input device 3 using the signal S1 from the edge point detection device, and uses the signal S1 to input the data of the grayscale image 1. Find the brightness gradient at the identified point. The configuration of this differentiator 4 may be arbitrary as long as the brightness gradient at that point can be determined. For example, if a differential operator is used as explained in the method invention, a product-sum calculator that executes the operation may be used. Can be configured.

絶対値演算装置5、方向演算装置6は、微分装
置4に接続されており、それぞれ微分装置4で求
められた明度勾配の絶対値と方向とを演算する装
置である。
The absolute value calculation device 5 and the direction calculation device 6 are connected to the differentiator 4, and are devices that calculate the absolute value and direction of the brightness gradient determined by the differentiator 4, respectively.

エツジ点検出装置7は、濃淡画像1上にとられ
た仮想線Lに沿つて、仮想線L上の点の平面座標
を信号S1として微分装置4に与え、絶対値演算
装置5からの信号S2を入力し、明度勾配の絶対
値が所定値よりも大きくなつたときの点の平面座
標を記憶し、エツジ点Bを検出する装置である。
The edge point detection device 7 supplies the plane coordinates of a point on the virtual line L to the differentiator 4 as a signal S1 along the virtual line L taken on the grayscale image 1, and sends a signal S2 from the absolute value calculation device 5. is input, the plane coordinates of the point when the absolute value of the brightness gradient becomes larger than a predetermined value are stored, and the edge point B is detected.

コーナ検出装置8は、絶対値演算装置5、方向
演算装置6からの信号S2,S3をそれぞれ入力
すると共に、微分装置4で求められた明度勾配を
示す信号S4を入力して、信号S3の変化量を検
出しつつ、変化量が大きくなるまで、エツジ点B
から出発して順次縁線上の点の座標を信号S5と
して微分装置4に与え、コーナ点Aを検出する装
置である。図中信号S4は微分装置4から入力し
ているが、信号S2,S3は、明度勾配の情報を
含んでいるので、信号S2,S3から縁線21の
方向を算定しても良い。コーナ検出装置8は、逐
次、算定された方向、即ち縁線21の方向におけ
る次の点の座標を信号S5として微分装置4に与
える。方向演算装置6からの信号S3の値の変化
が所定値よりも大きいときは、その点の座標を記
憶し、この点を被測定物2のコーナ点Aとして検
出する。
The corner detection device 8 inputs the signals S2 and S3 from the absolute value calculation device 5 and the direction calculation device 6, respectively, and also inputs the signal S4 indicating the brightness gradient determined by the differentiator 4, and changes the signal S3. edge point B while detecting the amount of change until the amount of change becomes large.
This device detects the corner point A by sequentially applying the coordinates of points on the edge line as a signal S5 to the differentiator 4 starting from . Although the signal S4 in the figure is input from the differentiator 4, since the signals S2 and S3 include information on the brightness gradient, the direction of the edge line 21 may be calculated from the signals S2 and S3. The corner detection device 8 sequentially supplies the coordinates of the next point in the calculated direction, that is, in the direction of the edge line 21, to the differentiator 4 as a signal S5. When the change in the value of the signal S3 from the direction calculating device 6 is larger than a predetermined value, the coordinates of that point are stored and this point is detected as the corner point A of the object to be measured 2.

信号S3の変化の大きさ判定は、縁線21が直
線である場合には、エツジ点における明度勾配の
方向を基準として行つても良い。又、隣接した2
点における明度勾配の方向の変化の大きさで行つ
ても良い。
If the edge line 21 is a straight line, the magnitude of change in the signal S3 may be determined based on the direction of the brightness gradient at the edge point. Also, adjacent 2
The determination may be made based on the magnitude of the change in direction of brightness gradient at a point.

上記方法及び装置は、コンピユータ、デイジタ
ル回路、アナログ回路、それらの組合せによつて
達成できるが、上記各装置は、コーナ点の検出速
度を向上させるため、上記機能装置をパイプライ
ン構造に接続するのが望ましい。特に微分装置4
において、明度勾配の各成分を同時に求めるた
め、微分装置4の各成分演算部は並列処理される
のが良い。又微分装置4によつて求められた明度
勾配は、絶対値演算装置5、方向演算装置6に同
時並列に入力し、明度勾配の絶対値と方向が並列
に求められるのが望ましい。
The above methods and devices can be accomplished by computers, digital circuits, analog circuits, and combinations thereof, but each of the above devices may include connecting the above functional devices in a pipeline structure to improve the speed of corner point detection. is desirable. Especially differentiator 4
In order to obtain each component of the brightness gradient at the same time, it is preferable that each component calculation section of the differentiator 4 is processed in parallel. Further, it is preferable that the brightness gradient determined by the differentiator 4 is simultaneously input in parallel to an absolute value calculation device 5 and a direction calculation device 6, so that the absolute value and direction of the brightness gradient can be calculated in parallel.

この場合には、各演算装置の間にバツフア・レ
ジスタなどを設けて、逐次データを一時ストアす
る様なことをしていないため、画像データが各演
算装置の中をシステム・クロツクに同期して流れ
て行くにつれて処理加工されるので、1演算サイ
クル内の高速画像処理が可能となる。
In this case, since a buffer register or the like is not provided between each processing unit to temporarily store sequential data, the image data is not synchronized with the system clock within each processing unit. Since the image is processed as it flows, high-speed image processing within one calculation cycle is possible.

さらに、微分装置4と絶対値演算装置5又は方
向演算装置6との間で、並列処理を行うために
は、微分装置4が画像入力装置3からプリフエツ
チするように、エツジ点検出装置7又はコーナ検
出装置8からの信号S1,S5を、前データから
予測して、先行して出力しても良い。
Furthermore, in order to perform parallel processing between the differentiator 4 and the absolute value arithmetic device 5 or the direction arithmetic device 6, it is necessary to The signals S1 and S5 from the detection device 8 may be predicted from previous data and output in advance.

本発明においては、画像中にあるノイズや照明
むらなどによりコーナ探索が撹乱されるのを防ぐ
ため、濃淡画像の空間に1次微分を導入し、照明
むらなどの影響を除去している。又その空間1次
微分オペレータの規模は、3×3、4×4、5×
5などに任意に変化させても良く、画像中のノイ
ズを平滑できる微分オペレータを採用することが
できる。
In the present invention, in order to prevent the corner search from being disturbed by noise, uneven illumination, etc. in the image, a first-order differential is introduced into the space of the grayscale image to remove the effects of uneven illumination. Also, the scale of the spatial first-order differential operator is 3×3, 4×4, 5×
5 or the like, and a differential operator capable of smoothing noise in the image can be employed.

[実施例] 以下、本発明を具体的な実施例に基づいて、詳
細に説明する。
[Examples] Hereinafter, the present invention will be described in detail based on specific examples.

本実施例の検出原理を第3図に従つて説明す
る。第2図と同一の部分は、同一の番号が付され
ている。コーナ点Aを含む被測定物2を撮像した
濃淡画像全体をf(x、y)とし、この画像中に
任意の2点P1とP2が設定されている。探索は
P1点から、P1とP2を結ぶ直線Lに沿つてベ
クトルrの方向に開始される。各点において濃淡
画像f(x、y)に対する空間1次微分値fxとfy
とから成る明度勾配が算出される。ここで空間1
次微分値fx、fyとは、明度勾配のx成分、y成分
のことである。それからベクトル絶対値√2
fy2を演算し、それをしきい値THと、比較して
ベクトル絶対値√22の方が大きければエツ
ジ点Bと判定し、その座標値をエツジ点座標
(xe、ye)として検出する。
The detection principle of this embodiment will be explained with reference to FIG. The same parts as in FIG. 2 are given the same numbers. The entire gray scale image of the object 2 including the corner point A is taken as f(x, y), and two arbitrary points P1 and P2 are set in this image. The search starts from point P1 along the straight line L connecting P1 and P2 in the direction of vector r. Spatial first-order differential values fx and fy for the grayscale image f(x, y) at each point
A brightness gradient consisting of is calculated. Here space 1
The order differential values fx and fy are the x and y components of the brightness gradient. Then vector absolute value √ 2 +
Calculate fy 2 and compare it with the threshold TH. If the vector absolute value √ 2 + 2 is larger, it is determined to be edge point B, and its coordinates are detected as edge point coordinates (xe, ye). do.

次に前記エツジ点Bの空間1次微分値(fxe、
fye)の比から方向勾配θe=ATAN(fye/fxe)
を検出し、右回り探索(第3図の場合)ではθe+
90゜のコーナ点探索方向tを決定する。左回り探
索では、探索方向はθe−90゜となる。探索方向に
沿つて、探索点Qを決定し、その点上での明度勾
配の傾きを求め、又、次の探索点を決定する。こ
のようにして順次探索をして行き、探索点の空間
1次微分値のベクトル絶対値√22がしきい
値TH以上で且つ、探索点の明度勾配の方向θ=
ATAN(fy/fx)を検出して、|θ−θe|がしき
い値TGより大であれば前記探索点をコーナ点A
と判定し、Aの座標値をコーナ位置座標値(xc、
yc)として検出する。またコーナ姿勢は、エツ
ジ点Bの座標値(xe、ye)とコーナ点Aの座標
値(xc、yc)とを結ぶ直線の傾きとして検出す
ることができる。
Next, the spatial first derivative value (fxe,
directional gradient θe = ATAN(fye/fxe)
, and in the clockwise search (in the case of Figure 3), θe+
Determine the 90° corner point search direction t. In counterclockwise search, the search direction is θe−90°. A search point Q is determined along the search direction, the slope of the brightness gradient on that point is determined, and the next search point is determined. In this way, the search is performed sequentially, and the vector absolute value √ 2 + 2 of the spatial first derivative of the search point is greater than or equal to the threshold TH, and the direction of the brightness gradient of the search point θ =
ATAN(fy/fx) is detected, and if |θ−θe| is larger than the threshold TG, the search point is set to corner point A.
The coordinate value of A is determined as the corner position coordinate value (xc,
yc). Further, the corner posture can be detected as the inclination of a straight line connecting the coordinate values (xe, ye) of edge point B and the coordinate values (xc, yc) of corner point A.

第4図は本発明の実施例に係る装置の構成を示
したブロツク図である。
FIG. 4 is a block diagram showing the configuration of an apparatus according to an embodiment of the present invention.

画像入力装置3として、テレビカメラ(図示
略)の映像信号をサンプリングして得られた濃淡
画像1を記憶した画像メモリ31が設けられてい
る。微分装置4は、明度勾配の各成分を求めるた
めの積和演算器41,42とアドレス発生器90
の一部として構成されているアドレス制御部90
0とから成る。絶対値演算装置5、方向演算装置
6は、それぞれ絶対値演算器50、方向演算器6
0で構成されている。エツジ点検出装置7は、エ
ツジ・コーナ判定器91と、アドレス発生器90
と、エツジ位置座標値検出器71、で構成され、
コーナ検出装置8は、エツジ・コーナ判定器9
1、アドレス発生器90、コーナ位置座標値検出
器81とで構成されている。又、エツジ位置座標
値検出器71とコーナ位置座標値検出器81との
出力は、ロボツト制御装置100へ入力し、ロボ
ツト制御装置100は、コーナ点座標及び、縁線
の傾斜から、被測定物体の位置、姿勢のずれを検
出して、ロボツトの教示点を修正する。
As the image input device 3, an image memory 31 is provided that stores a grayscale image 1 obtained by sampling a video signal from a television camera (not shown). The differentiator 4 includes product-sum calculators 41 and 42 and an address generator 90 for determining each component of the brightness gradient.
An address control unit 90 configured as a part of
Consists of 0. The absolute value calculation device 5 and the direction calculation device 6 are an absolute value calculation device 50 and a direction calculation device 6, respectively.
Consists of 0. The edge point detection device 7 includes an edge/corner determiner 91 and an address generator 90.
and an edge position coordinate value detector 71,
The corner detection device 8 includes an edge/corner determiner 9
1, an address generator 90, and a corner position coordinate value detector 81. Further, the outputs of the edge position coordinate value detector 71 and the corner position coordinate value detector 81 are input to the robot control device 100, and the robot control device 100 detects the object to be measured from the corner point coordinates and the slope of the edge line. Detects deviations in the position and posture of the robot and corrects the robot's teaching points.

画像メモリ31には、あらかじめ入力画像信号
fが撮り込まれている。アドレス発生器90に
は、設定点P1,P2の(x、y)座標値と、コ
ーナ探索を縁線21のどちらかの向きに行なうか
を+又は−によつて指定する右、左回り探索指定
信号RLPSが与えられている。このアドレス発生
器90は、例えば積和演算の規模が3×3の場
合、積和演算器41および42を駆動する副走査
アドレス信号S7、(xi、yi)を(−1、−1)
(0、−1)(1、−1)(−1、0)(0、0)(1

0)(−1、1)(0、1)(1、1)の順でくり
返し、また画像メモリ31を駆動する画像メモ
リ・アドレス信号S6、(X、Y)を(x−1、
y−1)、(x、y−1)(x+1、y−1)(x−
1、y)(x、y)(x+1、y)(x−1、y+
1)(x、y−1)(x+1、y+1)の順でくり
返し出力する。この画像メモリ・アドレス信号S
6(X、Y)によりアクセスされ、画像メモリ3
1から出力された画像信号S8、f(X、Y)は
積和演算器41と42により、それぞれx方向と
y方向の空間1次微分値f×とfyに変換され、さ
らに、ベクトル絶対値演算器50により空間1次
微分値のベクトル絶対値信号S2、F=√2
fy2および方向演算器60により空間1次微分値
の方向信号S3、θ=ATAN(fy/fx)に変換さ
れる。
An input image signal f is captured in the image memory 31 in advance. The address generator 90 contains the (x, y) coordinate values of the set points P1 and P2, and a clockwise or counterclockwise search that specifies whether the corner search is to be performed in either direction of the edge line 21 using + or -. A designated signal RLPS is given. For example, when the scale of the product-sum operation is 3×3, this address generator 90 generates sub-scanning address signals S7, (xi, yi) that drive the product-sum calculation units 41 and 42 by (-1, -1).
(0, -1) (1, -1) (-1, 0) (0, 0) (1
,
0) (-1, 1) (0, 1) (1, 1) is repeated in the order of (x-1,
y-1), (x, y-1) (x+1, y-1) (x-
1, y) (x, y) (x+1, y) (x-1, y+
1) Repeatedly output in the order of (x, y-1) (x+1, y+1). This image memory address signal S
6 (X, Y), image memory 3
The image signals S8 and f(X, Y) outputted from 1 are converted by product-sum calculators 41 and 42 into spatial first-order differential values fx and fy in the x direction and y direction, respectively, and are further converted into vector absolute values. The arithmetic unit 50 generates a vector absolute value signal S2 of the first spatial differential value, F=√ 2 +
fy 2 and the direction calculator 60 convert it into a direction signal S3 of spatial first-order differential value, θ=ATAN(fy/fx).

アドレス発生器90は、最初、設定点P1から
設定点P2へ向うエツジ点探索方向rに沿つて、
各画素のデータをアクセスするため、画像メモ
リ・アドレス信号S6、(X、Y)を順次出力し
ている。エツジ・コーナ判定器91は空間1次微
分値のベクトル絶対値信号S2、があらかじめ設
定されているしきい値THより大きくなつた時、
トリガ信号TGEをアドレス発生器90とエツジ
位置座標値検出器71に出力する。アドレス発生
器90は、このトリガ信号TGEにより、設定点
P1とP2とを結ぶ直線上を探索するモードか
ら、コーナ点を探索するモードに切り換わり、エ
ツジ位置座標値検出器71へエツジ・アドレス信
号S9、(x、y)を出力する。エツジ位置座標
検出器71は、このエツジ・アドレス信号S9
(x、y)を、トリガ信号TGEのタイミングでラ
ツチし、エツジ位置座標値(xe、ye)として検
出するとともにロボツト制御装置100へこの値
を出力する。
Initially, the address generator 90 starts along the edge point search direction r from the set point P1 to the set point P2.
In order to access the data of each pixel, image memory address signals S6, (X, Y) are sequentially output. When the vector absolute value signal S2 of the spatial first-order differential value becomes larger than a preset threshold value TH, the edge/corner determiner 91 determines that
A trigger signal TGE is output to the address generator 90 and the edge position coordinate value detector 71. In response to this trigger signal TGE, the address generator 90 switches from a mode of searching on a straight line connecting set points P1 and P2 to a mode of searching for a corner point, and sends an edge address signal to the edge position coordinate value detector 71. S9, output (x, y). The edge position coordinate detector 71 detects this edge address signal S9.
(x, y) are latched at the timing of the trigger signal TGE, detected as edge position coordinate values (xe, ye), and outputted to the robot control device 100.

次に、アドレス発生器90は、x方向とy方向
の空間1次微分値fx、fyおよび右、左回り探索指
定信号RLPSにより、コーナ点探索方向tに沿つ
て画素データを抽出するために画像メモリアドレ
ス信号S6、(X、Y)を出力する。エツジ・コ
ーナ判定器91は、空間1次微分値のベクトル絶
対値信号S2があらかじめ設定されているしき値
THより大きく、且つ、エツジ点Bの明度勾配の
方向θeと現在の点の明度勾配の方向θとの差の絶
対値があらかじめ設定されているしきい値TGよ
り大きくなつた時、トリガ信号TGCを出力する。
コーナ位置座標検出器81は、アドレス発生器9
0からのコーナ・アドレス信号S9、(x、y)
をトリガ信号TGCのタイミングでラツチし、そ
の点をコーナ位置座標値(xc、yc)として検出
するとともに、その値をロボツト制御装置100
へ出力する。
Next, the address generator 90 uses the spatial first-order differential values fx and fy in the x and y directions and the clockwise and counterclockwise search designation signals RLPS to extract pixel data from the image along the corner point search direction t. Outputs memory address signal S6, (X, Y). The edge/corner determiner 91 uses a vector absolute value signal S2 of the first spatial differential value to a preset threshold value.
TH, and when the absolute value of the difference between the brightness gradient direction θe of edge point B and the brightness gradient direction θ of the current point becomes larger than a preset threshold TG, a trigger signal TGC is generated. Output.
The corner position coordinate detector 81 is connected to the address generator 9
Corner address signal S9 from 0 (x, y)
is latched at the timing of the trigger signal TGC, the point is detected as the corner position coordinate value (xc, yc), and the value is sent to the robot controller 100.
Output to.

第4図において、画像メモリ31は通常のラン
ダム・アクセス・メモリで、エツジ位置座標値検
出器71とコーナ位置座標値検出器81は、通常
のラツチ回路で構成することができる。また絶対
値演算器50と方向演算器60は通常のEPROM
メモリで構成できる。即ちx方向とy方向の空間
1次微分値fx、fyによつて特定されるEPROMの
アドレスに、それの明度勾配の絶対値と方向を記
憶させて、それらの対応関数表を作り、fx、fyを
アドレス信号としてアクセスすれば、対応した絶
対値と方向がそのデータ線上に得られる。
In FIG. 4, the image memory 31 is an ordinary random access memory, and the edge position coordinate value detector 71 and the corner position coordinate value detector 81 can be constructed from ordinary latch circuits. Furthermore, the absolute value calculator 50 and the direction calculator 60 are of the ordinary EPROM type.
Can be configured with memory. That is, the absolute value and direction of the brightness gradient are stored in the EPROM address specified by the spatial first-order differential values fx and fy in the x and y directions, and a corresponding function table is created, and fx, If fy is accessed as an address signal, the corresponding absolute value and direction will be obtained on the data line.

第5図は、第4図のアドレス発生器90の詳細
な回路構成を示したブロツク図である。
FIG. 5 is a block diagram showing a detailed circuit configuration of address generator 90 of FIG. 4. Referring to FIG.

アドレス発生器90は、画像メモリ31にアド
レス信号S6を発生するための、アドレス制御部
900と、仮想線L、または、縁線に沿つて線上
の点の座標を順次生成する主走査部910とから
成る。
The address generator 90 includes an address control section 900 for generating an address signal S6 in the image memory 31, and a main scanning section 910 for sequentially generating coordinates of points on the line along the virtual line L or the edge line. Consists of.

アドレス制御部900は、画像メモリ31のア
クセスの同期信号となるクロツク発振器901
と、該クロツク発振器901の出力信号を分周す
る分周器902と、クロツク発振器901の出力
信号に同期して、微分演算のための制御信号を出
力する副走査回路903と、マトリツク状に画素
データを画像メモリ31から取込むアドレス信号
を発生する加算器904とから成る。
The address control unit 900 includes a clock oscillator 901 which serves as a synchronizing signal for accessing the image memory 31.
, a frequency divider 902 that divides the output signal of the clock oscillator 901, a sub-scanning circuit 903 that outputs a control signal for differential operation in synchronization with the output signal of the clock oscillator 901, and The adder 904 generates an address signal for fetching data from the image memory 31.

主走査部910は、両端の2点P1,P2の座
標を入力し、仮想線Lに沿つて、仮想線L上の点
の座標値を出力する直線発生器911と、仮想線
L上の探索と、縁線上の探索モードとを切替える
切換器912と、明度勾配と、探索方向を示す信
号RLPSを入力して、縁線上の次の点の存在方向
を示す信号を出力するコーナ方向発生器915
と、現探索点の座標を記憶したラツチ回路914
と、ラツチ回路914の出力と、コーナ方向発生
器915の出力によつて、縁線上の次の点の座標
を発生する加算器913とから成る。
The main scanning unit 910 inputs the coordinates of two points P1 and P2 at both ends, and outputs the coordinate values of the points on the virtual line L along the virtual line L. and a corner direction generator 915 which inputs the brightness gradient and a signal RLPS indicating the search direction and outputs a signal indicating the direction of existence of the next point on the edge line.
and a latch circuit 914 that stores the coordinates of the current search point.
and an adder 913 which generates the coordinates of the next point on the edge line based on the output of the latch circuit 914 and the output of the corner direction generator 915.

第5図において、クロツク発振器90は、本実
施例における基本クロツク信号CLK1を分周器
902へ出力している。この分周器902は、例
えば積和演算の規模が3×3ならば1/9、4×
4ならば1/16、5×5ならば1/25に、基本ク
ロツク信号CLK1を分周し、積和演算サイク
ル・クロツク信号CLK2を出力する。探索動作
の最初において、設定点P1およびP2によつ
て、主走査部910中の直線発生器911は、エ
ツジ点探索方向に沿つた仮想線上の点のアドレス
信号を発生する。このアドレス信号は切換器91
2を通つて加算器904の入力アドレス信号S
1,S5(x、y)となり、基本クロツク信号
CLK1により駆動される副走査回路903から
出力される副走査アドレス信号S7(xi、yi)と
加算器904により加算されてエツジ点探索モー
ドの画像メモリ・アドレス信号S6(X、Y)に
変換される。
In FIG. 5, a clock oscillator 90 outputs a basic clock signal CLK1 in this embodiment to a frequency divider 902. For example, if the scale of the product-sum operation is 3×3, this frequency divider 902 is 1/9, 4×
The basic clock signal CLK1 is divided by 1/16 if it is 4, or 1/25 if it is 5×5, and the product-sum operation cycle clock signal CLK2 is output. At the beginning of the search operation, the set points P1 and P2 cause the straight line generator 911 in the main scanning section 910 to generate address signals for points on the virtual line along the edge point search direction. This address signal is transmitted to the switch 91.
2 to the input address signal S of the adder 904.
1, S5 (x, y), and the basic clock signal
The sub-scanning address signal S7 (xi, yi) output from the sub-scanning circuit 903 driven by CLK1 is added by an adder 904 and converted into an image memory address signal S6 (X, Y) in edge point search mode. Ru.

次に、エツジ点Bの検出後、トリガ信号TGE
により切換器912が切換わり、これによりアド
レス発生器90は、エツジ探索モードからコーナ
探索モードに切換わる。このコーナ探索モードで
は、ラツチ回路914は、分周器902の出力ク
ロツク信号CLK2のタイミングで加算器904
への入力アドレス信号S1,S5(x、y)をラ
ツチする。その信号は、加算器913の一方の入
力端子へアドレス信号(x、y)として出力され
る。コーナ方向発生器915は、微小な移動量を
示す信号を発し、右回りならばコーナ方向アドレ
ス信号(−Δx、Δy)、左回りならばコーナ方向
アドレス信号(Δx、−Δy)を加算器913の他
方の入力端子へ出力する。従つて、加算器913
により加算された次の点の座標を示すアドレス信
号(x±Δx、y±Δy)が切換器912を通り加
算器904の入力アドレス信号S1,S5(x、
y)となり、この信号は、さらに副走査アドレス
信号(xi、yi)と加算されてコーナ点探索モード
の画像メモリ・アドレス信号S6、(X、Y)と
なる。
Next, after detecting edge point B, the trigger signal TGE
This causes the switch 912 to switch, thereby switching the address generator 90 from the edge search mode to the corner search mode. In this corner search mode, the latch circuit 914 connects the adder 900 to the adder 900 at the timing of the output clock signal CLK2 of the frequency divider 902.
The input address signals S1, S5 (x, y) to the latches are latched. The signal is output to one input terminal of adder 913 as an address signal (x, y). A corner direction generator 915 emits a signal indicating a small amount of movement, and an adder 913 outputs a corner direction address signal (-Δx, Δy) for clockwise rotation, and a corner direction address signal (Δx, -Δy) for counterclockwise rotation. output to the other input terminal. Therefore, adder 913
Address signals (x±Δx, y±Δy) indicating the coordinates of the next point added by are passed through the switch 912 and input address signals S1, S5 (x,
y), and this signal is further added to the sub-scanning address signal (xi, yi) to become the image memory address signal S6, (X, Y) in the corner point search mode.

第6図は、第5図のコーナ方向発生器915の
詳細な回路構成を示したブロツク図である。第6
図において、x方向およびy方向空間1次微分値
fxおよびfyは、EDROMでできた関数表化された
データを記憶したSIN関数演算器930および
COS関数演算器931に入力する。その結果、
それぞれコーナ方向アドレスのx成分Δx(Δx=
fy/F)およびy成分Δy(Δy=fx/F)が得ら
れる。演算器930,931の出力信号は、さら
に、右、左回り探索指定信号RLPSにより、極性
変換器932および933により極性変換され、
右回り探索ならばコーナ方向アドレス信号(−
Δx、Δy)、または左回り探索ならばコーナ方向
アドレス信号(Δx、−Δy)に変換される。
FIG. 6 is a block diagram showing a detailed circuit configuration of corner direction generator 915 of FIG. 5. 6th
In the figure, the spatial first-order differential values in the x and y directions
fx and fy are the SIN function calculator 930 and the
Input to COS function calculator 931. the result,
x component Δx (Δx=
fy/F) and the y component Δy (Δy=fx/F). The output signals of the arithmetic units 930 and 931 are further polarized by polarity converters 932 and 933 according to the clockwise and counterclockwise search designation signals RLPS,
For clockwise search, corner direction address signal (-
Δx, Δy), or corner direction address signals (Δx, −Δy) in the case of a counterclockwise search.

第7図は、第4図の積和演算器41,42の詳
細な回路構成を示したブロツク図である。第7図
において、積和演算係数メモリ410には、あら
かじめx方向の空間1次微分オペレータWが設定
されている。副走査アドレス信号S7、(xi、yi)
により、積和演算係数メモリ410から読み出さ
れた積和演算係数W(xi、yi)は画像メモリ・ア
ドレス信号S6、(X、Y)により画像メモリ3
1から読み出された画像信号f(X、Y)と乗算
器411により乗算され、その出力は加算器41
2の一方の入力端子に入力する。この加算器41
2の出力は、基本クロツク信号CLK1のタイミ
ングでラツチ回路413にラツチされる。その出
力は加算器412の他方の入力端子に入力される
とともに、積和演算サイクル・クロツク信号
CLK2のタイミングでラツチ回路414にラツ
チされる。結局、クロツク信号CLK2の1サイ
クル周期に相当する1演算サイクル後に、1回の
積和演算が完了し、x方向空間1次微分値fxが出
力される。
FIG. 7 is a block diagram showing the detailed circuit configuration of the product-sum calculators 41 and 42 of FIG. 4. In FIG. 7, a spatial first-order differential operator W in the x direction is set in advance in the product-sum calculation coefficient memory 410. Sub-scanning address signal S7, (xi, yi)
Therefore, the product-sum calculation coefficient W (xi, yi) read from the product-sum calculation coefficient memory 410 is transferred to the image memory 3 by the image memory address signal S6, (X, Y).
The image signal f(X, Y) read from 1 is multiplied by the multiplier 411, and its output is sent to the adder 41.
input to one input terminal of 2. This adder 41
The output of 2 is latched by the latch circuit 413 at the timing of the basic clock signal CLK1. Its output is input to the other input terminal of the adder 412, and the product-sum operation cycle clock signal
It is latched by the latch circuit 414 at the timing of CLK2. Eventually, after one calculation cycle corresponding to one cycle period of the clock signal CLK2, one product-sum calculation is completed, and the first-order differential value fx in the x-direction space is output.

第4図のy成分の積和演算器42は、第7図に
おいて、積和演算係数メモリにあらかじめy方向
の空間1次微分オペレータWが設定されているこ
とと、その積和演算出力はy方向空間1次微分値
fyとなることを除けば、積和演算器41と全く同
じ動作をする。
In FIG. 7, the y-component product-sum calculation unit 42 of FIG. Orientation space first derivative
The operation is exactly the same as that of the product-sum calculator 41 except that fy.

第8図は、第4図のエツジ・コーナ判定器91
の詳細な回路構成を示したブロツク図である。
FIG. 8 shows the edge/corner determiner 91 of FIG.
FIG. 2 is a block diagram showing a detailed circuit configuration of the circuit.

エツジ・コーナ判定器91は、絶対値S2の大
きさをしきい値THと比較する比較器950と、
その結果を保持し、トリガ信号を出力するトリガ
回路951と、方向信号S3を入力し、エツジ点
Bでの値を記憶するラツチ回路952と、方向信
号S3を入力し、エツジ点Bでの値との差を求め
る加算器953と、その出力の絶対値を求める絶
対値回路954と、その出力しきい値TGと比較
する比較器955と、その出力を入力するゲート
回路956及びその出力を保持し、トリガ信号を
出力するトリガ回路957とから成る。
The edge/corner determiner 91 includes a comparator 950 that compares the magnitude of the absolute value S2 with a threshold value TH;
A trigger circuit 951 that holds the result and outputs a trigger signal, a latch circuit 952 that inputs the direction signal S3 and stores the value at edge point B, and a latch circuit 952 that inputs the direction signal S3 and stores the value at edge point B. an adder 953 that calculates the difference between the adder 953, an absolute value circuit 954 that calculates the absolute value of its output, a comparator 955 that compares its output with the threshold TG, a gate circuit 956 that inputs its output, and a gate circuit 956 that holds its output. and a trigger circuit 957 that outputs a trigger signal.

第8図において、空間1次微分値のベクトル絶
対値Fとあらかじめ設定されているしきい値TH
とが比較器950により比較され、ベクトル絶対
値Fがしきい値THより大きければ“1”、小さ
ければ、“0”のレベルの比較出力EDGEを得る。
この比較出力はEDGEはDタイプ、フリツプフロ
ツプで構成するトリガ回路951のクロツクCK
端子に入力され、エツジ点Bの座標値(xe、ye)
をラツチ回路するためのトリガ信号TGEが、ト
リガ回路951から出力される。この時、トリガ
信号TGEのタイミングでラツチ回路952に入
力された空間1次微分値の方向信号θがラツチさ
れ、エツジ点Bの方向信号θeとなる。加算器95
3の正入力端子にはコーナ探索時の方向信号θが
入力され、負入力端子にはエツジ点の方向信号θe
が入力されているので、方向差信号θ−θeが得ら
れ、これが絶対値回路954によつて絶対値化さ
れ方向差の絶対値信号|θ−θe|が次段の比較器
955の一方の入力端子に入力される。比較器9
55の他方の入力端子には、あらかじめしきい値
TGが設定されているので、比較器955は方向
差の絶対値信号|θ−θe|がしきい値TGより大
きければ“1”、小さければ“0”のレベルの比
較出力DIFGをANDゲート956の一方の入力
端子に出力する。ANDゲート956は、他の入
力端子に比較出力EDGEが入力されているので、
両方の入力端子のレベルが“1”となつた時、す
なわち空間1次微分値のベクトル絶対値信号S2
があらかじめ設定されているしきい値THより大
きく、且つ、エツジ点の空間1次微分値の方向信
号θeと現在の方向信号θとの差の絶対値信号|θ
−θe|があらかじめ設定されているしきい値TG
より大きくなつた時にANDゲート956の出力
レベルも“1”となる。この“1”のレベル信号
は、次段のDタイプフリツプフロツプで構成する
トリガ回路957のクロツクCK端子に入力して
おり、コーナ点Aの座標値(xc、yc)をラツチ
するためのトリガ信号TGCとなる。動作の初期
状態では、2台のトリガ回路951,957は、
リセツトパルスRESETによりリセツトされてお
り、トリガ信号TGE,TGCは、それぞれ“0”
レベルに保持されている。
In Figure 8, the vector absolute value F of the spatial first derivative value and the preset threshold value TH
are compared by a comparator 950, and if the vector absolute value F is greater than the threshold value TH, a comparison output EDGE of level "1" is obtained, and if it is smaller, a comparison output EDGE of level "0" is obtained.
This comparison output is EDGE of D type and clock CK of trigger circuit 951 consisting of flip-flop.
The coordinate values of edge point B (xe, ye) are input to the terminal.
A trigger signal TGE for latching is output from the trigger circuit 951. At this time, the direction signal θ of the spatial first-order differential value inputted to the latch circuit 952 at the timing of the trigger signal TGE is latched, and becomes the direction signal θe of the edge point B. Adder 95
The direction signal θ at the time of corner search is input to the positive input terminal of No. 3, and the direction signal θe of the edge point is input to the negative input terminal.
is input, the direction difference signal θ-θe is obtained, which is converted into an absolute value by the absolute value circuit 954, and the absolute value signal of the direction difference |θ-θe| is sent to one of the comparators 955 at the next stage. Input to input terminal. Comparator 9
The other input terminal of 55 has a threshold value set in advance.
Since TG is set, the comparator 955 outputs the comparison output DIFG, which has a level of "1" if the direction difference absolute value signal |θ-θe| is greater than the threshold value TG, and "0" if it is smaller, to the AND gate 956. Output to one input terminal of Since the comparison output EDGE is input to the other input terminal of the AND gate 956,
When the level of both input terminals becomes “1”, that is, the vector absolute value signal S2 of the spatial first-order differential value
is larger than a preset threshold TH, and the absolute value signal of the difference between the direction signal θe of the spatial first-order differential value of the edge point and the current direction signal θ |θ
−θe| is the preset threshold TG
When it becomes larger, the output level of AND gate 956 also becomes "1". This "1" level signal is input to the clock CK terminal of a trigger circuit 957 consisting of a D-type flip-flop in the next stage, and is used to latch the coordinate values (xc, yc) of corner point A. This becomes the trigger signal TGC. In the initial state of operation, the two trigger circuits 951 and 957 are
It is reset by the reset pulse RESET, and the trigger signals TGE and TGC are each “0”.
held at the level.

本実施例装置は、以上の構成及び作用から成る
ものである。
The device of this embodiment has the above configuration and operation.

本実施例装置によれば、濃淡画像を処理するこ
とができるので、2値化画像処理を基本とする既
存装置では不可能であつた画像内部のコーナ点を
も検出できる。また、空間1次微分値を計算する
積和演算器2台と空間1次微分値のベクトル絶対
値および方向値を計算する2台の専用演算器をハ
ードウエアとして持ち、各演算ステージをパイプ
ライン接続したことにより、高速で画像処理を行
なうことが可能となつた。さらに、従来、線順次
走査を行ない輪郭線を追跡することで効率の悪い
コーナ点探索をしていたが、本方式では、空間1
次微分値から演算される方向値が次のコーナ探索
方向と90゜ずれた関係にあることを利用して、コ
ーナ探索アドレス計算にフイード・バツクされる
ので、極めて効率的にコーナ点を発見できる。こ
れらのハードウエアは比較的簡単な要素で構成さ
れるので、コンパクトで低価格な画像処理装置に
することができる。
According to the apparatus of this embodiment, since it is possible to process gray scale images, it is also possible to detect corner points inside the image, which was impossible with existing apparatuses based on binarized image processing. In addition, the hardware includes two product-sum calculators that calculate the spatial first-order differential value and two dedicated calculators that calculate the vector absolute value and direction value of the spatial first-order differential value, and each calculation stage is pipelined. The connection made it possible to perform image processing at high speed. Furthermore, in the past, corner points were searched inefficiently by performing line-sequential scanning and tracing contour lines, but with this method,
Using the fact that the direction value calculated from the next differential value is 90 degrees off from the next corner search direction, it is fed back to the corner search address calculation, making it possible to find corner points extremely efficiently. . Since these hardware components are composed of relatively simple elements, the image processing device can be made compact and inexpensive.

第9図は、第4図のエツジ・コーナ判定器91
を計算機で実現した例の構成を示すブロツク図で
あり、第10図は、その処理を示すフローチヤー
トである。本実施例では、コンソール961によ
つてあらかじめ、しきい値THとしきい値TGが
計算機960に設定されている。絶対値演算器5
0から出力される空間1次微分値のベクトル絶対
値信号S2、Fと方向演算器60から出力される
空間1次微分値の方向信号S3、θが、計算機9
60に読み込まれる。エツジ点と判定されればト
リガ信号TGEを、コーナ点と判定されればトリ
ガ信号TGCを出力することを除けば、第4図に
示す実施例と同じである。次に、第10図に示す
計算機960の動作フローについて説明する。
FIG. 9 shows the edge/corner determiner 91 of FIG.
Fig. 10 is a block diagram showing the configuration of an example in which the processing is realized by a computer, and Fig. 10 is a flowchart showing the processing. In this embodiment, the threshold value TH and the threshold value TG are set in advance in the computer 960 by the console 961. Absolute value calculator 5
The vector absolute value signal S2, F of the spatial first-order differential value output from 0 and the direction signal S3, θ of the spatial first-order differential value output from the direction calculator 60 are calculated by the computer 9.
60. The embodiment is the same as the embodiment shown in FIG. 4, except that the trigger signal TGE is output if it is determined to be an edge point, and the trigger signal TGC is output if it is determined to be a corner point. Next, the operation flow of the computer 960 shown in FIG. 10 will be explained.

計算機960は割込みモードで動作し、ハード
側からの割込み信号により、ステツプ200で、
ベクトル絶対値と方向θを読込む。次にステツプ
202でコンソール961により設定されたしき
い値THとベクトル絶対値Fとが比較され、NO
ならば、ただちに動作を終了し、YESならばス
テツプ204に処理が移る。ステツプ204では
割込みが第1回目かどうかを判定し、もしYES
ならばステツプ206でエツジ点を表わすトリガ
信号TGEが出力され、さらにステツプ208で
現在の方向θをエツジ点方向θeとしてストアし動
作を終了する。ステツプ204でNOならば、ス
テツプ210で現在の方向とエツジ点方向θeとの
差の絶対値|θ−θe|がコンソール961により
設定されたしきい値TGと比較され、もしNOな
らばただちに動作を終了し、YESならばステツ
プ211に移り、コーナ点を表わすトリガ信号
TGCを出力して動作を終了する。
The computer 960 operates in interrupt mode, and in response to an interrupt signal from the hardware side, in step 200,
Read the vector absolute value and direction θ. Next, in step 202, the threshold value TH set by the console 961 and the vector absolute value F are compared, and NO
If so, the operation ends immediately, and if YES, the process moves to step 204. In step 204, it is determined whether the interrupt is the first time, and if YES
If so, the trigger signal TGE representing the edge point is outputted in step 206, and the current direction θ is stored as the edge point direction θe in step 208, and the operation ends. If NO in step 204, the absolute value of the difference between the current direction and the edge point direction θe |θ−θe| is compared with the threshold value TG set by the console 961 in step 210, and if NO, the operation is started immediately. If YES, the process moves to step 211 and a trigger signal representing the corner point is output.
Outputs TGC and ends the operation.

以上の計算機の動作により、第4図に示す実施
例と同様にコーナ位置・姿勢の探索を行なうこと
ができる他、本実施例では、エツジおよびコーナ
判定の基準となるしきい値THおよびTGを自在
に変えて最適な判定条件を容易に見つけることが
できる。本発明の対象としている画像は複雑な濃
淡画像であるため、予めしきい値THおよびTG
を固定して設定することができない場合が多い。
本実施例は、上記困難を解決することができる。
With the above-described operation of the computer, corner positions and orientations can be searched in the same way as in the embodiment shown in FIG. You can easily find the optimal judgment conditions by changing them freely. Since the image targeted by the present invention is a complex grayscale image, the threshold value TH and TG are set in advance.
In many cases, it is not possible to set a fixed value.
This embodiment can solve the above-mentioned difficulties.

[発明の効果] 本発明は、濃淡画像で表わされた被測定物の縁
線上の点を明度勾配により検出し、その明度勾配
を利用して縁線上を移動し、その明度勾配の方向
の変化によつてコーナ点を検出する方法及び装置
である。従つて、明度勾配を利用しているため雑
音に強く、明度勾配によつて縁線を逐次推定して
縁線上を移動するという簡単な方法を採用してい
るため、コーナ点の検出速度が高い。さらに、逐
次的に縁線上の点を推定しているので、縁線上の
移動が確実であり、精度の高いコーナ点が検出で
きる。
[Effects of the Invention] The present invention detects points on the edge line of the object to be measured represented by a grayscale image based on the brightness gradient, moves on the edge line using the brightness gradient, and moves in the direction of the brightness gradient. A method and apparatus for detecting corner points by change. Therefore, it is resistant to noise because it uses the brightness gradient, and the corner point detection speed is high because it uses a simple method of sequentially estimating the edge line using the brightness gradient and moving on the edge line. . Furthermore, since points on the edge line are estimated sequentially, movement on the edge line is reliable and corner points can be detected with high accuracy.

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

第1図は、本発明装置の概念を示したブロツク
図である。第2図は、本発明のコーナ点検出原理
を説明した説明図である。第3図は、本発明の具
体的な一実施例に係る装置のコーナ点検出原理を
説明した説明図である。第4図は、同実施例装置
の構成を示したブロツク図である。第5図、第6
図、第7図、第8図はそれぞれ、同装置のアドレ
ス発生器、コーナ方向発生器、積和演算器、エツ
ジコーナ判定器の詳細な構成を示したブロツク図
である。第9図は、同装置のエツジコーナ判定器
をコンピユータにより構成した実施例のその部分
の構成を示すブロツク図であり、第10図は、そ
のコンピユータの処理を示すフローチヤートであ
る。 2…被測定物、21…縁線、B…エツジ点、A
…コーナ点、L…仮想線、V…明度勾配。
FIG. 1 is a block diagram showing the concept of the apparatus of the present invention. FIG. 2 is an explanatory diagram illustrating the corner point detection principle of the present invention. FIG. 3 is an explanatory diagram illustrating the corner point detection principle of a device according to a specific embodiment of the present invention. FIG. 4 is a block diagram showing the configuration of the apparatus of the embodiment. Figures 5 and 6
7 and 8 are block diagrams showing detailed configurations of the address generator, corner direction generator, product-sum calculator, and edge corner determiner, respectively, of the same device. FIG. 9 is a block diagram showing the configuration of a portion of an embodiment in which the edge corner determination device of the same apparatus is configured by a computer, and FIG. 10 is a flowchart showing the processing of the computer. 2...Object to be measured, 21...Edge line, B...Edge point, A
...Corner point, L...Virtual line, V...Brightness gradient.

Claims (1)

【特許請求の範囲】 1 被測定物の画像を光電変換器の受光面上に投
影し、該受光面の平面座標に対応して、映像信号
の濃淡レベルをサンプリングして得られた被測定
物の濃淡画像の処理方法に於て、 前記濃淡画像上に仮想線を設定し、該仮想線上
の点における前記濃淡画像の明度勾配ベクトルを
該仮想線に沿つて演算し、前記明度勾配ベクトル
の絶対値が、所定値以上である点を、前記被測定
物の縁線上のエツジ点として検出し、 該エツジ点から出発し、前記明度勾配ベクトル
の絶対値が所定値以上である点の前記明度勾配ベ
クトルの方向からその点における前記縁線の方向
を推定し、前記点から前記推定方向に微小間隔だ
けへだて、かつ、前記明度勾配ベクトルの絶対値
が所定値以上である次の点を算出する処理を遂次
実行して、前記推定方向に沿つて移動し、 前記明度勾配ベクトルの絶対値が所定値以上
で、かつ明度勾配ベクトルの方向が所定値以上変
化する点を前記被測定物の縁線のコーナ点として
検出することを特徴とする画像のコーナ点検出方
法。 2 被測定物の画像を光電変換器の受光面上に投
影し、該受光面の平面座標に対応して、映像信号
の濃淡レベルをサンプリングして得られた被測定
物の平面座標に関する濃淡画像を記憶する画像入
力装置と、 前記画像入力装置からデータを入力し、前記濃
淡画像上の任意の点における明度勾配ベクトルを
求める微分装置と、 前記微分装置の出力を入力して前記明度勾配ベ
クトルの絶対値を求める絶対値演算装置と、 前記微分装置の出力を入力して前記明度勾配ベ
クトルの方向を求める方向演算装置と、 前記濃淡画像上の任意に設定された直線に沿う
点の平面座標を順次、前記微分装置に与え、前記
絶対値演算装置の出力が所定の値よりも大きくな
る点を前記被測定物の縁線上のエツジ点として検
出するエツジ点検出装置と、 前記エツジ点の検出後、該エツジ点から出発
し、前記縁線上の点の前記明度勾配ベクトルよ
り、その点における前記縁線の方向を推定し、そ
の点における前記点から前記推定方向に沿う微小
間隔だけへだて、かつ、前記絶対値演算装置の出
力が所定の値よりも大きくなる次の点の平面座標
を、前記微分装置に与えるサイクルを逐次実行し
て前記推定方向に沿つて移動し、前記絶対値演算
装置の出力が所定値以上で、前記方向演算装置の
出力が所定値以上変化したとき、その点を前記縁
線のコーナ点として検出するコーナ点検出装置
と、 から成る画像のコーナ点検出装置。 3 前記微分装置は、入力される前記点の座標を
含み、メツシユ状にとられた平面座標の前記濃淡
画像のデータを前記入力装置から順次取り込むア
ドレス制御部と、前記明度勾配の各成分を求める
ため、該データを所定のオペレータに従つて、積
和演算する積和演算器と、から成ることを特徴と
する特許請求の範囲第2項記載のコーナ点検出装
置。 4 前記微分装置、前記絶対値演算装置、前記方
向演算装置、はパイプライン接続されており、前
記点の座標を前記微分装置へ与えるサイクル内で
演算処理することを特徴とする特許請求の範囲第
2項記載のコーナ点検出装置。 5 前記積和演算器は、前記明度勾配のx成分と
y成分とを独立に求める演算器を有し、各成分演
算器は、並列に前記画像入力装置に接続されてお
り、並列同時に各成分を求めることを特徴とする
特許請求の範囲第3項記載のコーナ点検出装置。 6 前記絶対値演算器、前記方向演算器は、前記
明度勾配の各成分をアドレス信号として入力し、
各成分に対応した絶対値、方向をデータとして記
憶し、前記アドレス信号によつてアクセスされる
記憶装置で構成されていることを特徴とする特許
請求の範囲第2項記載のコーナ点検出装置。
[Claims] 1. A measured object obtained by projecting an image of the measured object onto the light-receiving surface of a photoelectric converter and sampling the gray level of the video signal in accordance with the plane coordinates of the light-receiving surface. In the grayscale image processing method, a virtual line is set on the grayscale image, a brightness gradient vector of the grayscale image at a point on the virtual line is calculated along the virtual line, and the absolute value of the brightness gradient vector is calculated. Detecting a point whose value is a predetermined value or more as an edge point on the edge line of the object to be measured, and starting from the edge point, detecting the brightness gradient at a point where the absolute value of the brightness gradient vector is a predetermined value or more. A process of estimating the direction of the edge line at that point from the direction of the vector, and calculating the next point that is spaced from the point in the estimated direction by a minute interval and where the absolute value of the brightness gradient vector is greater than or equal to a predetermined value. are sequentially executed to move along the estimated direction, and locate a point at which the absolute value of the brightness gradient vector is a predetermined value or more and the direction of the brightness gradient vector changes by a predetermined value or more as an edge line of the object to be measured. A method for detecting a corner point of an image, characterized in that the corner point is detected as a corner point of an image. 2 A grayscale image regarding the plane coordinates of the measured object obtained by projecting the image of the measured object onto the light-receiving surface of the photoelectric converter and sampling the gray level of the video signal corresponding to the plane coordinates of the light-receiving surface. an image input device that stores data, a differentiator that inputs data from the image input device and calculates a brightness gradient vector at an arbitrary point on the grayscale image, and a differentiator that inputs the output of the differentiator to calculate the brightness gradient vector. an absolute value calculation device that calculates an absolute value; a direction calculation device that inputs the output of the differentiator to calculate the direction of the brightness gradient vector; and a direction calculation device that calculates the plane coordinates of a point along an arbitrarily set straight line on the grayscale image. an edge point detection device that sequentially supplies the information to the differentiator to detect a point at which the output of the absolute value calculation device is larger than a predetermined value as an edge point on the edge line of the object to be measured; and after detecting the edge point. , starting from the edge point, estimating the direction of the edge line at that point from the brightness gradient vector of the point on the edge line, and moving away from the point at that point by a minute interval along the estimated direction, and The output of the absolute value calculation device is moved along the estimated direction by sequentially executing a cycle of giving the plane coordinates of the next point at which the output of the absolute value calculation device is larger than a predetermined value to the differentiator. is a predetermined value or more, and when the output of the direction calculation device changes by a predetermined value or more, a corner point detecting device detects that point as a corner point of the edge line. 3. The differentiator includes an address control unit that sequentially takes in data of the grayscale image of plane coordinates taken in a mesh shape from the input device, including the input coordinates of the point, and calculates each component of the brightness gradient. 3. The corner point detection device according to claim 2, further comprising a product-sum calculator that performs a product-sum calculation on the data according to a predetermined operator. 4. The differentiator, the absolute value arithmetic device, and the direction arithmetic device are connected in a pipeline, and the arithmetic processing is performed within a cycle in which the coordinates of the point are provided to the differentiator. The corner point detection device according to item 2. 5. The product-sum calculator has a calculator that independently calculates the x component and y component of the brightness gradient, and each component calculator is connected to the image input device in parallel, and simultaneously calculates each component in parallel. The corner point detection device according to claim 3, characterized in that the corner point detection device calculates the following. 6. The absolute value calculator and the direction calculator input each component of the brightness gradient as an address signal,
3. The corner point detection device according to claim 2, further comprising a storage device that stores absolute values and directions corresponding to each component as data and is accessed by the address signal.
JP24275684A 1984-11-16 1984-11-16 Method and device for detecting corner point of image Granted JPS61120002A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24275684A JPS61120002A (en) 1984-11-16 1984-11-16 Method and device for detecting corner point of image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24275684A JPS61120002A (en) 1984-11-16 1984-11-16 Method and device for detecting corner point of image

Publications (2)

Publication Number Publication Date
JPS61120002A JPS61120002A (en) 1986-06-07
JPH0346045B2 true JPH0346045B2 (en) 1991-07-15

Family

ID=17093795

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24275684A Granted JPS61120002A (en) 1984-11-16 1984-11-16 Method and device for detecting corner point of image

Country Status (1)

Country Link
JP (1) JPS61120002A (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6252690A (en) * 1985-08-31 1987-03-07 Kawasaki Heavy Ind Ltd Method for detecting vertex of object and method for polygon approximation of profile line
DE102016120775A1 (en) 2015-11-02 2017-05-04 Cognex Corporation System and method for detecting lines in an image with a vision system
JP6463593B2 (en) * 2015-11-02 2019-02-06 コグネックス・コーポレイション System and method for detecting lines in a vision system
US10937168B2 (en) 2015-11-02 2021-03-02 Cognex Corporation System and method for finding and classifying lines in an image with a vision system
CN110728285B (en) * 2019-08-23 2022-06-24 北京正安维视科技股份有限公司 Rapid corner detection method based on dynamic frequency conversion

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57163807A (en) * 1981-04-01 1982-10-08 Mitsubishi Electric Corp Shape detector

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57163807A (en) * 1981-04-01 1982-10-08 Mitsubishi Electric Corp Shape detector

Also Published As

Publication number Publication date
JPS61120002A (en) 1986-06-07

Similar Documents

Publication Publication Date Title
US5379353A (en) Apparatus and method for controlling a moving vehicle utilizing a digital differential analysis circuit
US4486775A (en) Object recognition
JPH03294976A (en) Reference mark pattern detecting device
US5621825A (en) Image processor, image processing method and apparatus applying same
JP2021190083A (en) Indoor positioning method, device, apparatus, and storage medium
JPH0644292B2 (en) Two-dimensional visual recognition device
Gupta et al. Implementation of an automated single camera object tracking system using frame differencing and dynamic template matching
JPH0346045B2 (en)
JPH05196437A (en) Input device for three-dimensional information
JP2020071739A (en) Image processing apparatus
Chang et al. On recursive calibration of cameras for robot hand-eye systems
JPS61193004A (en) Extracting device for image feature
GB2085629A (en) Object recognition
JP3074292B2 (en) Template matching processing method
JPS59211167A (en) Pattern position detector
Wang et al. A new method for circular grid analysis in the sheet metal forming test
JPH0410074A (en) Picture pattern inclination detecting method
JP2841866B2 (en) Image processing apparatus and method and its application
JP2000348186A (en) Device and method for object tracking
KR100187207B1 (en) Window signal generating apparatus
JPH056431A (en) Detector for feature point of contour line
JP2024021467A (en) Work feature amount display device, work feature amount display method, and work feature amount display program
JPH0731733B2 (en) Rectangle detector
KR950005662B1 (en) Measuring window generating method
JPS6055479A (en) Object recognizing device