JP3048718B2 - Vertex detector - Google Patents

Vertex detector

Info

Publication number
JP3048718B2
JP3048718B2 JP3330026A JP33002691A JP3048718B2 JP 3048718 B2 JP3048718 B2 JP 3048718B2 JP 3330026 A JP3330026 A JP 3330026A JP 33002691 A JP33002691 A JP 33002691A JP 3048718 B2 JP3048718 B2 JP 3048718B2
Authority
JP
Japan
Prior art keywords
vertex
value
edge
pixel
grayscale image
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 - Fee Related
Application number
JP3330026A
Other languages
Japanese (ja)
Other versions
JPH05143735A (en
Inventor
隆 野口
功 今里
孝久 安東
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP3330026A priority Critical patent/JP3048718B2/en
Publication of JPH05143735A publication Critical patent/JPH05143735A/en
Application granted granted Critical
Publication of JP3048718B2 publication Critical patent/JP3048718B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】この発明は、例えば工場自動化技
術(FA)の分野における部品検査装置、3次元位置装
置に利用できる頂点検出装置に係り、特に入力された濃
淡画像の図形の頂点を検出できるようにした頂点検出装
置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a vertex detecting device which can be used for a component inspection device and a three-dimensional position device in the field of, for example, factory automation technology (FA). The present invention relates to a vertex detection device that can be used.

【0002】[0002]

【従来の技術】図6は従来の頂点検出装置のブロック図
であり、この従来例(以下、従来例1という)は、濃淡
画像入力部101、近傍分散値計算部102及び頂点検
出部103とを備え、濃淡画像の図形の頂点である画素
の近傍領域においては画素間での明るさ(濃度値)の分
散値が大きくなることを利用して図形の頂点の検出を行
うように構成されている。
2. Description of the Related Art FIG. 6 is a block diagram of a conventional vertex detecting device. In this conventional example (hereinafter referred to as Conventional Example 1), a grayscale image input unit 101, a neighborhood variance value calculating unit 102, and a vertex detecting unit 103 are provided. And in a region near a pixel that is a vertex of a figure in a grayscale image, the vertex of the figure is detected by utilizing the fact that the variance of the brightness (density value) between the pixels is large. I have.

【0003】すなわち、上記濃淡画像入力部101は、
例えばカメラ、フレームメモリなどで構成され、読み取
った濃淡画像の各画素の濃度値を表す濃度値信号を近傍
分散値計算部102に出力するように構成される。
That is, the gray-scale image input unit 101
For example, it is configured by a camera, a frame memory, or the like, and is configured to output a density value signal representing the density value of each pixel of the read grayscale image to the neighborhood variance value calculation unit 102.

【0004】また、近傍分散値計算部102は、濃淡画
像入力部101から入力した各画素の濃淡値信号に基づ
き、対象とする画素の近傍領域における画素間での明る
さの分散値を計算するように構成される。
A neighborhood variance value calculation unit 102 calculates a variance value of brightness between pixels in a region near a target pixel based on a tone value signal of each pixel input from the grayscale image input unit 101. It is configured as follows.

【0005】すなわち、近傍分散値計算部102は、例
えば「Hannahのインタレストオペレータ」と呼ば
れるオペレータを用い、画像内の各画素ごとに上下左右
の4方向の方向分散値を求め、更に(4方向の方向分散
の比の最小値)×(分散値)を求めるように構成され
る。
[0005] That is, the neighborhood variance value calculation unit 102 uses, for example, an operator called "Hannah's interest operator" to obtain directional variance values in four directions, up, down, left, and right for each pixel in the image, and further calculates It is configured to obtain (minimum value of ratio of directional dispersion) × (variance value).

【0006】上記近傍分散値計算部102で得られた値
は頂点検出部103に出力され、頂点検出部103は近
傍分散値計算部102から入力した値から近傍領域内で
極大値を持つ画素を頂点画素とし頂点を検出するように
構成される。
The value obtained by the neighborhood variance value calculation unit 102 is output to a vertex detection unit 103, and the vertex detection unit 103 determines a pixel having a local maximum value in a neighborhood area from the value input from the neighborhood variance value calculation unit 102. It is configured to detect a vertex as a vertex pixel.

【0007】図7は他の従来の頂点検出装置のブロック
図であり、この従来例(以下、入来例2という)は、濃
淡画像入力部201、エッジ検出部202、エッジ延長
部203及び頂点検出部204を備え、濃淡画像の図形
の頂点を対象物体のエッジ線を検出し、そのエッジ線を
追跡し、エッジ線が屈曲する点を頂点として検出するよ
うに構成されている。
FIG. 7 is a block diagram of another conventional vertex detecting apparatus. This conventional example (hereinafter referred to as a second incoming example) includes a grayscale image input section 201, an edge detecting section 202, an edge extending section 203, and a vertex. The detection unit 204 is configured to detect the vertex of the figure in the grayscale image as an edge line of the target object, track the edge line, and detect a point where the edge line is bent as the vertex.

【0008】すなわち、従来例1の濃淡画像入力部10
1と同様に構成された濃淡画像入力部201で読み取っ
た濃淡画像の各画素の濃度値に対応する濃度値信号を濃
淡画像入力部201からエッジ検出部202に出力し、
エッジ検出部202は濃淡画像からその対象図形のエッ
ジ線を検出するように構成される。
That is, the gray-scale image input unit 10 of the conventional example 1
A density value signal corresponding to the density value of each pixel of the grayscale image read by the grayscale image input unit 201 having the same configuration as that of 1 is output from the grayscale image input unit 201 to the edge detection unit 202,
The edge detection unit 202 is configured to detect an edge line of the target graphic from the grayscale image.

【0009】このエッジ検出部202は、例えば「So
belのオペレータ」とよばれる1次微分オペレータを
用いエッジ強度の値を算出し、2値化処理を行い、エッ
ジ線の軸線を求めるためにエッジ線の細線化処理を行
う。
[0009] The edge detecting unit 202 is provided with, for example, “So
The value of the edge strength is calculated using a first-order differential operator called a “bel operator”, binarization processing is performed, and edge line thinning processing is performed to determine the axis of the edge line.

【0010】エッジ延長部203は、エッジ検出部20
2で行われた2値化処理において分断されたエッジ線に
対して分断された端点で延長処理を行い、連結されたエ
ッジ線を再現する。
[0010] The edge extension unit 203 is
The extension processing is performed on the divided edge line in the binarization processing performed in step 2 at the divided end point, and the connected edge line is reproduced.

【0011】また、上記頂点検出部204はエッジ延長
部203で得られたエッジ線を追跡し、その屈曲点を探
し、その屈曲点を図形の頂点として検出するように構成
されている。
The vertex detecting section 204 is configured to track the edge line obtained by the edge extending section 203, search for a bending point, and detect the bending point as a vertex of a figure.

【0012】[0012]

【発明が解決しようとする課題】図6に示した従来例1
では、分散値算出後のデータにおいて頂点画素のデータ
がその近傍領域で極大値を持ってはいるものの、1つの
頂点に隣接する他の頂点を誤りなく検出するためには、
1つの極大値を探す極大値検出領域の大きさをその領域
内に隣接する頂点が存在し得ない程度の大きさにする必
要がある。
The prior art 1 shown in FIG.
In the data after the variance value calculation, although the data of the vertex pixel has a local maximum value in the neighboring area, in order to detect another vertex adjacent to one vertex without error,
It is necessary to make the size of the local maximum value detection area for searching for one local maximum value such that adjacent vertices cannot exist in that area.

【0013】このため、1つの極大値検出領域内に頂点
が存在しないのにもかかわらず、頂点検出部103にお
いて、例えば頂点間のエッジ線上の点に対応する画素が
その極大値検出領域内での極大値を有する画素であると
判定され、そのエッジ線上の点が頂点であると誤検出さ
れることがある。
For this reason, even though no vertex exists in one maximum value detection area, the vertex detection unit 103 detects, for example, a pixel corresponding to a point on the edge line between the vertices in the maximum value detection area. Is determined to be a pixel having the maximum value of, and a point on the edge line may be erroneously detected as a vertex.

【0014】また、画像上で暗い領域に存在する頂点と
明るい領域に存在するエッジ線上の点とが同時に1つの
極大値検出領域内に存在する場合にはエッジ線上の点の
ほうがデータ値が大きくなってしまうことがあり、2値
化処理の段階で頂点とエッジ線上の点とを区別すること
が困難になる。
When a vertex existing in a dark area and a point on an edge line present in a bright area on an image are simultaneously present in one local maximum detection area, the data value of the point on the edge line is larger. This may make it difficult to distinguish between a vertex and a point on an edge line in the binarization process.

【0015】一方、図7に示した従来例2では、複数の
エッジ線が集まる頂点付近において複数のエッジ線の情
報が混在してしまい、正しくエッジ線の検出、延長を行
うことが困難になる。
On the other hand, in the conventional example 2 shown in FIG. 7, information on a plurality of edge lines is mixed near a vertex where a plurality of edge lines are gathered, which makes it difficult to correctly detect and extend the edge lines. .

【0016】この発明は上述の点を鑑み、エッジ線上の
点を頂点として誤検出することがなく、また、複数のエ
ッジ線が集まる頂点を簡単な処理で検出できるようにし
た頂点検出装置を提供することを目的とする。
In view of the above points, the present invention provides a vertex detecting apparatus which does not erroneously detect a point on an edge line as a vertex and can detect a vertex in which a plurality of edge lines are gathered by a simple process. The purpose is to do.

【0017】[0017]

【課題を解決するための手段】この発明は、濃淡画像を
読み取り、各画素の濃度値信号を出力する濃淡画像入力
部と、濃淡画像入力部から濃度値信号を入力し、この濃
度値信号に基づいて濃淡画像の各画素の近傍領域におけ
る画素間の濃度の分散値を算出する近傍分散値計算部
と、その分散値に基づいて頂点候補点を検出する頂点候
補検出部と、濃淡画像入力部から濃度値信号を入力し、
この濃度値信号に基づいてエッジ線の強度及び方向を検
出するエッジ検出部と、エッジ検出部で得たエッジ線の
強度及び方向のデータから細線化されたエッジ方向画像
を生成する細線化エッジ方向画像生成部と、上記頂点候
補点に対する細線化されたエッジ方向画像上の画素の近
傍領域内における任意の2つのエッジ方向値の差の余弦
値が予め設定した値の余弦値より小さい時、該頂点候補
点を頂点として検出する頂点検出部とを備えることを特
徴とする。
According to the present invention, a gray-scale image input section for reading a gray-scale image and outputting a density value signal for each pixel, a density value signal from the gray-scale image input section, and inputting the density value signal to the density image signal. A neighborhood variance value calculation unit that calculates a variance value of the density between pixels in a neighborhood area of each pixel of the grayscale image based on the grayscale image, a vertex candidate detection unit that detects a vertex candidate point based on the variance value, and a grayscale image input unit Input the density signal from
An edge detection unit that detects the intensity and direction of the edge line based on the density value signal; and a thinned edge direction that generates a thinned edge direction image from the edge line intensity and direction data obtained by the edge detection unit. When the cosine value of the difference between any two edge direction values in the neighborhood of the pixel on the thinned edge direction image with respect to the vertex candidate point is smaller than the cosine value of a preset value, A vertex detection unit that detects a vertex candidate point as a vertex.

【0018】[0018]

【作用】濃淡画像入力装置は読み取った濃淡画像の各画
素に対応する濃度値信号を近傍分散値計算部と、エッジ
検出部とに出力する。
The grayscale image input device outputs a density value signal corresponding to each pixel of the read grayscale image to the neighborhood variance value calculator and the edge detector.

【0019】画素の近傍分散値計算部に出力される濃度
値信号からは、例えば従来例1の頂点検出と同様の手順
で頂点候補点が検出される。すなわち、近傍分散値計算
部は、濃淡画像入力部から入力した各画素の濃淡値信号
に基づき、対象とする画素の近傍領域における画素間で
の明るさの分散値を計算し、この分散値に基づき頂点候
補検出部が近傍領域内で極大値を持つ画素を頂点候補画
素として頂点候補点を検出する。したがって、この頂点
候補点には、頂点及び頂点と誤って検出されたエッジ線
上の点とが含まれる。
A vertex candidate point is detected from the density value signal output to the pixel neighborhood variance value calculation unit by, for example, the same procedure as that of the vertex detection of the first conventional example. That is, the neighborhood variance value calculation unit calculates a variance value of brightness between pixels in a region near the target pixel based on the gray value signal of each pixel input from the gray image input unit, and calculates the variance value. The vertex candidate detection unit detects a vertex candidate point using a pixel having a local maximum value in the neighboring area as a vertex candidate pixel. Therefore, the vertex candidate points include the vertices and the vertices and the points on the edge line that are erroneously detected.

【0020】エッジ検出部に出力される濃度信号から
は、エッジ検出部でエッジ線の強度及び方向が検出さ
れ、更に、これらの検出データから細線化エッジ方向画
像生成部で細線化されたエッジ方向画像が生成される。
The intensity and direction of the edge line are detected from the density signal output to the edge detecting section, and further, the edge direction thinned by the thinning edge direction image generating section is detected from the detected data. An image is generated.

【0021】細線化されたエッジ方向画像においては、
あるしきい値以上のエッジ強度値を持つ画素のみが対応
するエッジ方向値(−180°〜179°)を持ち、そ
れ以外の画素は意味のない値(例えば1000など)を
持つ。したがって、エッジ方向値を持つ画素は必ずエッ
ジ線上の画素であることが保証され、細線化されたエッ
ジ方向画像において、実際の頂点に対応する画素は、そ
の近傍領域内に予め設定した値θtの余弦値よりも差の
余弦値が小さくなるエッジ方向値をもつ2つの画素を持
つようになる。
In the thinned edge direction image,
Only pixels having an edge intensity value equal to or greater than a certain threshold have a corresponding edge direction value (-180 ° to 179 °), and the other pixels have meaningless values (for example, 1000). Therefore, it is guaranteed that the pixel having the edge direction value is always a pixel on the edge line, and in the thinned edge direction image, the pixel corresponding to the actual vertex is defined by the value θt set in advance in the vicinity thereof. It has two pixels with edge direction values where the cosine value of the difference is smaller than the cosine value.

【0022】頂点検出部においては、各頂点候補点につ
いて近傍領域内に予め設定した値θtの余弦値よりも差
の余弦値が小さくなるエッジ方向値をもつ2つの画素を
持つか否かによって各頂点候補点が頂点であるか否かが
判定され、頂点が検出される。すなわち、ある頂点候補
点に対応する細線化されたエッジ方向画像上の画素を中
心とする例えばM×N画素の領域内のデータが調べら
れ、領域内に存在する時意味のない値以外のデータ、す
なわち、エッジ方向値が1つしか存在しない場合、また
は、M×N画素の領域内のエッジ方向値のうちで任意の
2つのエッジ方向値θ、θ’の差の余弦値が予め設定し
た値θtの余弦値以上である場合には当該頂点候補点は
頂点ではないと判定され、それ以外の場合、すなわち、
頂点候補点を中心とするM×N画素の領域内のエッジ方
向値のうちで任意の2つのエッジ方向値θ、θ’の差の
余弦値が予め設定した値θtの余弦値よりも小さい場合
に、当該頂点候補点を頂点として検出する。
The vertex detecting section determines whether each vertex candidate point has two pixels having an edge direction value in which the cosine value of the difference is smaller than the cosine value of the preset value θt in the neighboring area. It is determined whether or not the vertex candidate point is a vertex, and the vertex is detected. That is, data in an area of, for example, M × N pixels centered on a pixel on the thinned edge direction image corresponding to a certain vertex candidate point is examined, and data other than a value that is insignificant when present in the area is examined. That is, when there is only one edge direction value, or the cosine value of the difference between any two edge direction values θ and θ ′ among the edge direction values in the M × N pixel area is set in advance. If the value is equal to or greater than the cosine value of the value θt, it is determined that the candidate vertex point is not a vertex. In other cases, that is,
When the cosine value of the difference between any two edge direction values θ and θ ′ among the edge direction values in the area of M × N pixels centered on the vertex candidate point is smaller than the cosine value of the preset value θt. Then, the vertex candidate point is detected as a vertex.

【0023】[0023]

【実施例】以下、この発明の一実施例を図1ないし図5
に基づき具体的に説明する。
1 to 5 show an embodiment of the present invention.
A specific description will be given based on FIG.

【0024】図1はこの発明の一実施例に係る頂点検出
装置のブロック図であり、この装置は、濃淡画像入力部
1、エッジ検出部2、細線化エッジ方向画像生成部3、
近傍分散値計算部4、頂点候補点検出部5及び頂点検出
部6とを備える。
FIG. 1 is a block diagram of a vertex detecting apparatus according to an embodiment of the present invention. The apparatus includes a grayscale image input section 1, an edge detecting section 2, a thinned edge direction image generating section 3,
The apparatus includes a neighborhood variance value calculation unit 4, a vertex candidate point detection unit 5, and a vertex detection unit 6.

【0025】濃淡画像入力部1は、例えば図2(a)ま
たは図3(a)に示すような濃淡を有する対象物体を撮
像し、その濃淡のある画像、即ち、濃淡画像を多数の画
素に分割して各画素の濃淡に対応する濃度値信号を所定
の順序で出力するように構成されておればよく、例えば
ビデオカメラ、フレームメモリなどで構成される。
The gray-scale image input unit 1 captures a target object having a gray scale as shown in FIG. 2A or 3A, for example, and converts the gray-scale image, that is, the gray-scale image into a large number of pixels. What is necessary is just to be configured to output the density value signals corresponding to the shading of each pixel in a predetermined order, for example, a video camera, a frame memory and the like.

【0026】濃淡画像入力部1から出力される濃度値信
号は、エッジ検出部2と近傍分散値計算部4とに同時に
入力される。
The density value signal output from the grayscale image input unit 1 is simultaneously input to the edge detection unit 2 and the neighborhood variance value calculation unit 4.

【0027】濃度値信号を入力するエッジ検出部2は濃
度信号値に基づき対象図形のエッジ線を検出するように
構成され、例えば「Sobelのオペレータ」と呼ばれ
る1次微分オペレータが用いられる。このオペレータ
は、座標(x,y)の画素の濃度をf(x,y)とした
場合に、エッジ強度を、
The edge detecting section 2 for inputting the density value signal is configured to detect the edge line of the target figure based on the density signal value. For example, a primary differential operator called "Sobel operator" is used. When the density of a pixel at coordinates (x, y) is f (x, y), this operator

【0028】[0028]

【数1】 (Equation 1)

【0029】に従って、また、エッジ方向値(−180
°〜179°)を、
And the edge direction value (−180
° to 179 °)

【0030】[0030]

【数2】 (Equation 2)

【0031】に従って求めるように構成されている。It is configured to be determined according to the following.

【0032】エッジ検出部2で得られたエッジ強度から
は、例えば図3(b)に示すように、検出されたエッジ
線はある程度の幅を有し、また、背景などのノイズ部分
も値を有している画像を得ることができる。なお、エッ
ジ方向値についても同様な画像を得ることかできる。)
From the edge intensities obtained by the edge detection unit 2, the detected edge line has a certain width, for example, as shown in FIG. You can get the image you have. A similar image can be obtained for the edge direction value. )

【0033】エッジ検出部2で得られたエッジ強度及び
エッジ方向値のデータは細線化エッジ方向画像生成部3
に入力され、細線化エッジ方向画像生成部3は、まず、
あるしきい値以上のエッジ強度値を持つ画素に1を与
え、それ以外の背景のノイズ領域などのしきい値以下の
値を持つ画素は0を与える2値化処理を行う。
The data of the edge strength and the edge direction value obtained by the edge detection unit 2 are used for thinning edge direction image generation unit 3
, And the thinned edge direction image generation unit 3
A pixel having an edge strength value equal to or higher than a certain threshold value is given a 1 and other pixels having a value equal to or less than the threshold value, such as a background noise region, are given a 0, thereby performing a binarization process.

【0034】この後、細線化エッジ方向画像生成部3
は、1の値を持つ部分に対して不必要に幅を持って検出
されたエッジ線の細線化処理を行ってエッジ線の芯線を
抽出する。
Thereafter, the thinning edge direction image generation unit 3
Performs thinning processing of an edge line detected with an unnecessary width for a portion having a value of 1, and extracts a core line of the edge line.

【0035】更にこの後、細線化エッジ方向画像生成部
3は、1の値を持つ画素には、エッジ検出部2で得られ
たその画素に対応するエッジ方向値が与えられ、0の値
を持つ画素には意味のない値(例えば1000)を与え
て、例えば図3(c)に示すような細線化されたエッジ
方向画像を生成する。
Thereafter, the thinned edge direction image generating section 3 gives the pixel having a value of 1 an edge direction value corresponding to the pixel obtained by the edge detecting section 2 and assigns a value of 0 to the pixel. An insignificant value (for example, 1000) is given to the possessed pixel, and a thinned edge direction image as shown in FIG. 3C is generated, for example.

【0036】そして、このエッジ検出部2及び細線化エ
ッジ方向画像生成部3で行われる一連の処理によってエ
ッジ方向値を持つ画素は必ずエッジ線上の画素であるこ
とが保証される画像が得られる。
A series of processes performed by the edge detecting section 2 and the thinned edge direction image generating section 3 provide an image in which pixels having edge direction values are guaranteed to be pixels on the edge line.

【0037】なお、この細線化されたエッジ方向画像は
2値化処理の段階でエッジ線であるにもかかわらず0の
値を持つ画素が発生し、図3(c)に示すようにエッジ
線上で意味のあるエッジ方向値のデータを持つ画素が途
切れ途切れになるのが一般的である。
In the thinned edge direction image, at the stage of the binarization processing, pixels having a value of 0 are generated although they are edge lines, and as shown in FIG. In general, pixels having meaningful edge direction value data are interrupted.

【0038】濃淡画像入力部1から各画素の濃度値信号
を入力する近傍分散値計算部4は、濃淡画像入力部1か
ら入力した濃淡画像に対し、従来技術と同様な方法で対
象とする画素の近傍領域における画素間での明るさの分
散値を計算するように構成され、例えば「Hannah
のインタレストオペレータ」と呼ばれるオペレータが用
いられる。
The neighborhood variance value calculation unit 4 which inputs the density value signal of each pixel from the grayscale image input unit 1 outputs the target pixel to the grayscale image input from the grayscale image input unit 1 in the same manner as in the prior art. Is calculated so as to calculate a variance value of brightness between pixels in a neighborhood area of “Hannah”.
An operator called “interest operator” is used.

【0039】すなわち、近傍分散値計算部4は、画像内
の各画素ごとに上下左右の4方向の方向分散値を求め、
更に(4方向の方向分散の比の最小値)×(分散値)を
求めるように構成される。この処理の結果、近傍領域の
画素間の濃度値の変化が大きい頂点、エッジ上の点等で
大きな値が得られ、これらのデータから例えば図2
(b)に示すような画像を得られる。
That is, the neighborhood variance value calculation unit 4 calculates directional variance values in four directions of up, down, left, and right for each pixel in the image.
Further, it is configured to obtain (minimum value of ratio of directional dispersion in four directions) × (dispersion value). As a result of this processing, a large value is obtained at a vertex, a point on an edge, or the like where a change in the density value between pixels in the vicinity area is large.
An image as shown in FIG.

【0040】近傍分散値計算部4で得られた値は頂点候
補検出部5に出力され、頂点検出部5は分散値計算部4
から入力した値から近傍領域内で極大値を持つ画素を頂
点候補画素とし頂点候補点を検出するように構成され
る。
The value obtained by the neighborhood variance value calculation unit 4 is output to the vertex candidate detection unit 5, and the vertex detection unit 5
A pixel having a local maximum value in a neighboring area from a value input from the above is set as a vertex candidate pixel, and a vertex candidate point is detected.

【0041】すなわち、頂点検出部5は近傍分散値計算
部4で得られたデータの値に対して背景のノイズ部分の
データ値が0になるように2値化処理を行い、更に対象
画素を中心としたM×N画素の領域内で極大値であるか
どうか判断して極大値であればその値を残し、極大値で
なければ値を0に置き替える処理(非極大値仰制処理)
を行い頂点候補点を検出する。
That is, the vertex detection unit 5 performs a binarization process on the data value obtained by the neighborhood variance value calculation unit 4 so that the data value of the noise portion in the background becomes 0, and further sets the target pixel to A process of determining whether or not the value is a local maximum value in a region of M × N pixels at the center and leaving the value if the local maximum value, and replacing the value with 0 if the local value is not the local maximum value (non-local maximum value suppression process)
And vertex candidate points are detected.

【0042】なお、この場合M×N画素の領域は、隣接
する頂点を漏れなく検出するため、どの頂点を中心とす
る場合でもそのM×N画素領域内に他の頂点が存在しな
いような大きさに設定する必要がある。また、ここで、
頂点候補点として検出される点には、図2(c)に示す
ように、頂点及び従来例1において頂点と誤って検出さ
れたエッジ線上の点とが含まれることは容易に理解され
よう。
In this case, since the area of M × N pixels detects adjacent vertices without omission, the size is such that no other vertex exists in the M × N pixel area regardless of the center of any vertex. Need to be set. Also, where
It can be easily understood that the points detected as the vertex candidate points include the vertex and the vertex in the first conventional example and the point on the edge line that is erroneously detected, as shown in FIG.

【0043】頂点検出部6は、細線化エッジ方向画像生
成部3で得られた細線化されたエッジ方向画像と頂点候
補検出部5で得られた頂点候補点から頂点のみ検出する
ように構成される。
The vertex detector 6 is configured to detect only vertices from the thinned edge direction image obtained by the thinned edge direction image generator 3 and the vertex candidate points obtained by the vertex candidate detector 5. You.

【0044】ここでは、各頂点候補点について近傍領域
内に予め設定した値θtの余弦値よりも差の余弦値が小
さくなるエッジ方向値をもつ2つの画素を持つか否かに
よって各頂点候補点が頂点であるか否かが判定され、頂
点が検出される。この判定式を数式で表せば、
Here, each vertex candidate point is determined by whether or not it has two pixels having an edge direction value in which the cosine value of the difference is smaller than the cosine value of the preset value θt in the vicinity area for each vertex candidate point. Is a vertex, and the vertex is detected. If this judgment formula is expressed by a mathematical formula,

【0045】[0045]

【数3】cos(θ−θ’)≧cos(θt)Cos (θ−θ ′) ≧ cos (θt)

【0046】となる。Is as follows.

【0047】すなわち、ある頂点候補点に対応する細線
化されたエッジ方向画像上の画素を中心として、他の頂
点候補点が例えばM×N画素の領域内のデータが調べら
れ、領域内に存在する時意味のない値以外のデータ、す
なわち、エッジ方向値が1つしか存在しない場合、また
は、M×N画素の領域内のエッジ方向値のうちで任意の
2つのエッジ方向値θ、θ’の差の余弦値が予め設定し
た値θtの余弦値以上である場合には当該頂点候補点は
頂点ではないと判定され、それ以外の場合、すなわち、
頂点候補点を中心とするM×N画素の領域内のエッジ方
向値のうちで任意の2つのエッジ方向値θ、θ’の差の
余弦値が予め設定した値θtの余弦値よりも小さい場合
に、当該頂点候補点を頂点として検出する。
That is, the data in the area of M × N pixels, for example, in which the other vertex candidate points are located around the pixel on the thinned edge direction image corresponding to a certain vertex candidate point, are examined. When there is only one edge direction value, or any two edge direction values θ and θ ′ among the edge direction values in the area of M × N pixels. If the cosine value of the difference is equal to or greater than the cosine value of the preset value θt, it is determined that the candidate vertex point is not a vertex. In other cases, that is,
When the cosine value of the difference between any two edge direction values θ and θ ′ among the edge direction values in the area of M × N pixels centered on the vertex candidate point is smaller than the cosine value of the preset value θt. Then, the vertex candidate point is detected as a vertex.

【0048】例えば図2(c)に示す領域Aの中心にあ
る頂点候補点が頂点であることを検出する場合について
図4に基づき説明すると、以下の通りである。
For example, the case where the vertex candidate point at the center of the area A shown in FIG. 2C is detected as the vertex will be described with reference to FIG.

【0049】図4(a)に示すように頂点候補点(ハッ
チングで示す)を中心として、太線で囲まれる、M×N
=7×7画素の領域Aが設定され、該領域A内の細線化
されたエッジ方向画像には図4(b)に示すように当該
画素のエッジ方向値が与えられた画素と、意味のない値
(例えば1000)が与えられた空白で示される画素と
がある。
As shown in FIG. 4A, an M × N surrounded by a bold line around a vertex candidate point (indicated by hatching)
= 7 × 7 pixels are set in the area A, and the thinned edge direction image in the area A includes a pixel to which the edge direction value of the pixel is given as shown in FIG. There are pixels indicated by blanks given no value (for example, 1000).

【0050】領域A内の画素を調べ、1000と言った
意味のない値以外の値をあらかじめ用意した配列内に格
納する。格納されたデータの値を順次調べ、意味のない
値以外の値が2つ以上あることを確認した上で、あらか
じめ設定した値θt(例えば、この場合は20)と、そ
れらの中の任意の2つの値θ、θ’(例えば114と8
9)の差の余弦値との大小関係を比較評価する。
The pixels in the area A are examined, and a value other than a meaningless value such as 1000 is stored in an array prepared in advance. The values of the stored data are sequentially examined, and after confirming that there are two or more values other than meaningless values, a preset value θt (for example, 20 in this case) and an arbitrary value among them are set. Two values θ, θ ′ (eg, 114 and 8)
9) Compare and evaluate the magnitude relationship between the difference and the cosine value.

【0051】この例では、 cos(114−89)=0.9063<cos(2
0)=0.9397 であるので、領域Aの頂点候補点が頂点と判定され、検
出される。
In this example, cos (114-89) = 0.9063 <cos (2
0) = 0.9397, so that the vertex candidate point in the area A is determined as a vertex and detected.

【0052】また、例えば図2(c)に示す領域Bの中
心にある頂点候補点が頂点ではないと判定される場合に
ついて図5に基づき説明すると、以下の通りである。
A case where it is determined that the candidate vertex at the center of the area B shown in FIG. 2C is not a vertex will be described with reference to FIG. 5 as follows.

【0053】図5(a)に示すように頂点候補点(ハッ
チングで示す)を中心として、太線で囲まれるM×N=
7×7画素の領域Bが設定され、該領域B内の細線化さ
れたエッジ方向画像には図5(b)に示すように当該画
素のエッジ方向値を与えられた画素と、意味のない値
(例えば1000)が与えられた空白で示される画素と
がある。
As shown in FIG. 5 (a), M × N = encircled by a thick line around a vertex candidate point (indicated by hatching)
A region B of 7 × 7 pixels is set, and the thinned edge direction image in the region B has no meaning as the pixel given the edge direction value of the pixel as shown in FIG. There is a pixel indicated by a blank given a value (for example, 1000).

【0054】太線で囲まれた7×7の領域B内の画素を
調べ、1000と言った意味のない値以外の値をあらか
じめ用意した配列内に格納する。格納されたデータの値
を順次調べ、意味のない値以外の値が2つ以上あること
を確認した上で、あらかじめ設定した値θt(例えば、
この場合は20)と、それらの中の任意の2つの値θ、
θ’(例えば71と64)の差の余弦値との大小関係を
比較評価する。
The pixels in the 7 × 7 area B surrounded by the bold line are examined, and a value other than a meaningless value such as 1000 is stored in an array prepared in advance. The stored data values are sequentially examined to confirm that there are two or more values other than meaningless values, and then a preset value θt (for example,
In this case, 20) and any two values θ,
The magnitude relationship between the difference between θ ′ (for example, 71 and 64) and the cosine value is compared and evaluated.

【0055】この例では、 cos(71−64)=0.9932>cos(20)
=0.9397 であるので、また、この場合格納されたデータの全ての
組み合わせに対し同様の関係が成立するので、領域Aの
頂点候補点が頂点ではないと判定される。
In this example, cos (71-64) = 0.9932> cos (20)
= 0.9397, and in this case, a similar relationship holds for all combinations of the stored data, so that it is determined that the vertex candidate point of the area A is not a vertex.

【0056】なお、もし格納されたデータが1つの場合
はその領域の頂点候補点を頂点でないとする。
If the number of stored data is one, it is assumed that the candidate vertex point of the area is not a vertex.

【0057】このようにして、頂点検出部6が、細線化
エッジ方向画像生成部3で得られた細線化されたエッジ
方向画像と頂点候補検出部5で得られた頂点候補点から
頂点のみ検出することにより、エッジ線上の点を頂点と
して誤検出することがなく、また、複数のエッジ線が集
まる頂点を簡単な処理で短時間内に検出できる。
In this way, the vertex detecting section 6 detects only the vertices from the thinned edge direction image obtained by the thinned edge direction image generating section 3 and the vertex candidate points obtained by the vertex candidate detecting section 5. By doing so, it is possible to prevent a point on the edge line from being erroneously detected as a vertex, and to detect a vertex in which a plurality of edge lines are gathered in a short time by a simple process.

【0058】[0058]

【発明の効果】以上説明したように、この発明によれ
ば、エッジ線上の点を頂点として誤検出することがな
く、また、複数のエッジ線が集まる頂点を簡単な処理で
短時間内に検出できる。更に、濃淡のない図形よりも誤
検出が生じ易い濃淡画像の図形の頂点検出においても、
上記の問題がなく頂点を良好に検出することが可能とな
る。
As described above, according to the present invention, a point on an edge line is not erroneously detected as a vertex, and a vertex where a plurality of edge lines are collected can be detected in a short time by a simple process. it can. Furthermore, in the detection of the vertices of a figure of a grayscale image in which erroneous detection is more likely to occur than a graphic without grayscale,
The vertices can be detected satisfactorily without the above problem.

【0059】また、この発明は、平面図形のみならず、
例えば直線から構成される対象物体の3次元形状をステ
レオ法を利用して認識する場合にも適用でき、この場
合、3次元形状の認識のために扱うデータを検出した頂
点の位置のデータだけに処理データ量の削減することが
可能となり、処理速度を高めることができる。
Further, the present invention is not limited to a planar figure,
For example, the present invention can also be applied to a case where a three-dimensional shape of a target object composed of straight lines is recognized using a stereo method. The amount of processing data can be reduced, and the processing speed can be increased.

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

【図1】この発明のブロック図で示したものである。FIG. 1 is a block diagram of the present invention.

【図2】この発明の頂点候補点検出に至るまでの処理結
果を順に示す説明図である。
FIG. 2 is an explanatory diagram sequentially showing processing results up to detection of a vertex candidate point according to the present invention;

【図3】この発明の細線化されたエッジ方向画像生成に
至るまでの処理結果を順に示す説明図である。
FIG. 3 is an explanatory diagram sequentially showing processing results up to the generation of a thinned edge direction image according to the present invention.

【図4】この発明の頂点検出部の処理を説明する図であ
る。
FIG. 4 is a diagram illustrating processing of a vertex detection unit according to the present invention.

【図5】この発明の頂点検出部の処理を説明する図であ
る。
FIG. 5 is a diagram illustrating processing of a vertex detection unit according to the present invention.

【図6】濃淡画像の図形頂点検出方法の従来技術の例を
示す図である。
FIG. 6 is a diagram showing an example of a prior art of a method of detecting a figure vertex of a grayscale image.

【図7】濃淡画像の図形頂点検出方法の従来技術の例を
示す図である。
FIG. 7 is a diagram illustrating an example of a conventional technique of a figure vertex detection method of a grayscale image.

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

1 濃淡画像入力部 2 エッジ検出部 3 細線化エッジ方向画像生成部 4 近傍分散値計算部 5 頂点候補点検出部 6 頂点検出部 Reference Signs List 1 Shading image input unit 2 Edge detection unit 3 Thinned edge direction image generation unit 4 Neighborhood variance value calculation unit 5 Vertex candidate point detection unit 6 Vertex detection unit

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平2−18681(JP,A) 特開 平3−40183(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06T 7/60 ────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP-A-2-18681 (JP, A) JP-A-3-40183 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G06T 7/60

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 濃淡画像を読み取り、濃淡画像の直線か
ら構成される図形の頂点を検出する頂点検出装置であっ
て、濃淡画像を読み取り、各画素の濃度値信号を出力す
る濃淡画像入力部と、濃淡画像入力部から入力した濃度
値信号に基づいて濃淡画像の各画素の近傍領域における
画素間の濃度の分散値を算出する近傍分散値計算部と、
その分散値に基づいて頂点候補点を検出する頂点候補検
出部と、濃淡画像入力部から濃度値信号を入力し、この
濃度値信号に基づきエッジ線の強度及び方向を検出する
エッジ検出部と、エッジ検出部で得たエッジ線の強度及
び方向のデータから細線化されたエッジ方向画像を生成
する細線化エッジ方向画像生成部と、上記頂点候補点に
対する細線化されたエッジ方向画像上の画素の近傍領域
内における任意の2つのエッジ方向値の差の余弦値が予
め設定した値の余弦値より小さい時、該頂点候補点を頂
点として検出する頂点検出部と、を備えることを特徴と
する頂点検出装置。
1. A vertex detecting device for reading a grayscale image and detecting vertices of a figure composed of straight lines of the grayscale image, comprising: a grayscale image input unit for reading a grayscale image and outputting a density value signal of each pixel; A neighborhood variance value calculation unit that calculates a variance value of density between pixels in a neighborhood area of each pixel of the grayscale image based on a density value signal input from the grayscale image input unit,
A vertex candidate detection unit that detects a vertex candidate point based on the variance value, an edge detection unit that inputs a density value signal from a grayscale image input unit, and detects the intensity and direction of an edge line based on the density value signal, A thinned edge direction image generation unit that generates a thinned edge direction image from the edge line intensity and direction data obtained by the edge detection unit; and a pixel on the thinned edge direction image for the vertex candidate point. A vertex detector that detects the candidate vertex point as a vertex when a cosine value of a difference between any two edge direction values in the vicinity area is smaller than a cosine value of a preset value. Detection device.
JP3330026A 1991-11-18 1991-11-18 Vertex detector Expired - Fee Related JP3048718B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3330026A JP3048718B2 (en) 1991-11-18 1991-11-18 Vertex detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3330026A JP3048718B2 (en) 1991-11-18 1991-11-18 Vertex detector

Publications (2)

Publication Number Publication Date
JPH05143735A JPH05143735A (en) 1993-06-11
JP3048718B2 true JP3048718B2 (en) 2000-06-05

Family

ID=18227951

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3330026A Expired - Fee Related JP3048718B2 (en) 1991-11-18 1991-11-18 Vertex detector

Country Status (1)

Country Link
JP (1) JP3048718B2 (en)

Also Published As

Publication number Publication date
JPH05143735A (en) 1993-06-11

Similar Documents

Publication Publication Date Title
US5398292A (en) Edge detecting apparatus
KR20010013521A (en) Image processing device and method, medium on which program for image processing is stored, and inspecting device
CN111444834A (en) Image text line detection method, device, equipment and storage medium
JP3048718B2 (en) Vertex detector
CN114581472A (en) Image edge detection method and device, electronic equipment and storage medium
JP3460356B2 (en) Method and apparatus for detecting circle or ellipse
JP3698867B2 (en) Circular pattern determination method, apparatus and recording medium
JPH10208066A (en) Method for extracting edge line of check object and appearance check method using this method
JP2858530B2 (en) Edge enhancement device
JP3919505B2 (en) Pattern inspection apparatus and method
JPH0624014B2 (en) Gray image processing method
JPS6055474A (en) Detector for difference between images
JPH09265540A (en) Processor and method for image processing
JP2000182056A (en) Picture processor
JPH08226961A (en) Automatic target identifying apparatus
JPH0560147B2 (en)
JPS61126437A (en) Video processor
JP2000283725A (en) Hollow yarn measuring device and method
CN117011596A (en) Circle identification and circle center positioning method and device for visual measurement of structural movement
JP2001357401A (en) Picture processing method
CN115393337A (en) Industrial defect detection method, device, equipment and computer readable storage medium
JP2998518B2 (en) Pattern inspection equipment
JP2870640B2 (en) Figure recognition method
CN114596242A (en) Defect detection method, defect detection device, electronic equipment and computer readable storage medium
JPS63182780A (en) Picture processing method for drawing reading device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees