JPH10222680A - Method for recognizing position - Google Patents

Method for recognizing position

Info

Publication number
JPH10222680A
JPH10222680A JP9020204A JP2020497A JPH10222680A JP H10222680 A JPH10222680 A JP H10222680A JP 9020204 A JP9020204 A JP 9020204A JP 2020497 A JP2020497 A JP 2020497A JP H10222680 A JPH10222680 A JP H10222680A
Authority
JP
Japan
Prior art keywords
distance
points
contour
angle
line segment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP9020204A
Other languages
Japanese (ja)
Inventor
Misuzu Yokomae
みすゞ 横前
Akira Kobayashi
彰 小林
Yuichiro Matsumura
雄一郎 松村
Yutaka Matsuzaki
豊 松崎
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP9020204A priority Critical patent/JPH10222680A/en
Publication of JPH10222680A publication Critical patent/JPH10222680A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To exactly attain position confirmation without depending on the variation or attitude of an objective shape by calculating the distance of a line segment connecting two points at a constant distance position along an outline, and detecting a place where two points whose line segment distance is less than the threshold value of the constant distance are present on the outline as an object angle changing part. SOLUTION: An image pickup means 1 image picks-up an object, and outputs a video signal, and a concentration storing means 2 stores the video signal as concentration picture data. A binarizing means 3 converts the concentration picture data into black and white binary picture data by a constant threshold value, and an outline detecting means 4 scans the binary picture data, and detects the outline part of the object. A two point straight distance calculating means 5 calculates the distance of a segment connecting two points with a constant distance along the outline, and a candidate point calculating means 6 detects a place where two points whose line segment length is less than a constant distance are present on the outline as the candidate point of an angle changing part.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、ロボット用視覚認
識装置における位置認識方法に関し、特に、撮像手段で
撮像された画像から認識対象物の位置を検出する位置認
識方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a position recognition method for a visual recognition device for a robot, and more particularly to a position recognition method for detecting a position of a recognition target from an image captured by an image capturing means.

【0002】[0002]

【従来の技術】近年、撮像装置で撮像された画像から対
象物の位置を検出する位置認識装置が各種生産設備にお
けるロボットの視覚認識装置に広く利用されている。
2. Description of the Related Art In recent years, a position recognition device for detecting the position of an object from an image picked up by an image pickup device has been widely used as a visual recognition device for a robot in various production facilities.

【0003】上記位置認識装置により対象物の位置を認
識する場合の位置認識方法の従来例を図11〜図12に
基づいて説明する。
A conventional example of a position recognizing method for recognizing the position of an object by the position recognizing device will be described with reference to FIGS.

【0004】図11は、従来例の位置認識装置の基本構
成を示す。従来例の基本構成は、対象物の撮像手段43
と撮像された濃淡画像記憶手段44と濃淡画像の2値化
手段45と2値化画像のラベリング処理手段46とラベ
リングされた対象物の重心を検出する重心検出手段47
と重心位置から円弧状に対象物のエッジを検出するエッ
ジ検出手段48からなりエッジ検出手段48で得られた
座標をロボットの座標系に変換してロボットの把持位置
としていた。
FIG. 11 shows a basic configuration of a conventional position recognition device. The basic configuration of the conventional example is a
The grayscale image storage means 44, the grayscale image binarization means 45, the binarized image labeling processing means 46, and the center of gravity detection means 47 for detecting the center of gravity of the labeled object
And edge detecting means 48 for detecting the edge of the object in an arc shape from the position of the center of gravity, and the coordinates obtained by the edge detecting means 48 are converted into the coordinate system of the robot and used as the gripping position of the robot.

【0005】[0005]

【発明が解決しようとする課題】しかし、上記の従来例
では、図12のように重心50の位置が検出された後、
エッジ検出をする円弧51上に対象物が複数存在した場
合(例えばエッジ52とエッジ53)本来ロボットがエ
ッジ53をつかむべきところ、誤検出したエッジ52を
ロボットがつかんでしまうということや、また対象物の
重心位置を元に円弧51の中心位置が決定されるため対
象物の姿勢やノイズの影響を受けて安定した位置検出が
行えないという問題点があった。
However, in the above conventional example, after the position of the center of gravity 50 is detected as shown in FIG.
When there are a plurality of objects on the arc 51 for edge detection (for example, the edge 52 and the edge 53), the robot should grab the edge 53 when the robot should originally grab the edge 53, Since the center position of the arc 51 is determined based on the position of the center of gravity of the object, there has been a problem that stable position detection cannot be performed due to the influence of the posture and noise of the object.

【0006】本発明は、上記の問題点を解決し、対象物
の特徴ある形状について、対象形状のばらつきや姿勢に
依存しなく正確にその位置を認識できる位置認識方法を
提供することを課題としている。
SUMMARY OF THE INVENTION It is an object of the present invention to solve the above problems and to provide a position recognizing method capable of accurately recognizing the position of a characteristic shape of an object without depending on the variation or posture of the object shape. I have.

【0007】[0007]

【課題を解決するための手段】本発明の位置認識方法
は、上記の課題を解決するために、輪郭に、一定の長さ
を有しかつ相互に一定の間隔を有する2本の略直線部を
含み前記2本の直線部の間に、相互に輪郭に沿って略1
80°の角度変化を生ぜしめる角度変化を含む対象物を
撮像手段で撮像して濃淡画像を得、この濃淡画像を2値
化して前記対象物の輪郭を検出し、前記輪郭に沿って一
定距離位置にある2点間を結ぶ線分の距離を順次算出
し、前記線分の距離が一定距離のしきい値以下となる前
記輪郭上の2点の存在する場所を前記対象物角度変化部
として検出することを特徴とする。
In order to solve the above-mentioned problems, a position recognition method according to the present invention has two substantially linear portions each having a fixed length on a contour and a constant interval from each other. And between the two straight portions, approximately 1
An object including an angle change that causes an angle change of 80 ° is imaged by an imaging unit to obtain a grayscale image, the grayscale image is binarized, a contour of the object is detected, and a constant distance is set along the contour. The distance of a line segment connecting two points at a position is sequentially calculated, and the location where two points on the contour where the distance of the line segment is equal to or smaller than a threshold of a certain distance exists as the object angle changing unit. It is characterized by detecting.

【0008】また、本発明の位置認識方法は、角度変化
部の候補を決定する際に、輪郭上の2点を結ぶ線分が対
象物の輪郭内部にあれば角度変化部の候補とすることが
好適である。
According to the position recognition method of the present invention, when determining a candidate for an angle changing portion, if a line segment connecting two points on the contour is inside the contour of the object, it is determined as a candidate for the angle changing portion. Is preferred.

【0009】また、本発明の位置認識方法は、角度変化
部の候補が複数箇所検出された際に、前記各箇所の前後
における輪郭上の2点間を結ぶ複数の線分の距離が一定
であることを確認することにより前記候補の中から角度
変化部を決定することが好適である。
According to the position recognition method of the present invention, when a plurality of candidates for the angle change portion are detected, the distance between a plurality of line segments connecting two points on the contour before and after each of the positions is constant. It is preferable to determine the angle changing part from the candidates by confirming that there is.

【0010】また、本発明の位置認識方法は、角度変化
部の候補が複数箇所検出された際に候補となった前記各
箇所を検出する際の線分の距離のしきい値とは別の他の
しきい値に基づき線分が一定距離以下を示す他の箇所と
前記各箇所とが対象物の重心位置を中心にしてそれぞれ
形成する中心角の大きさによって角度変化部を決定する
ことが好適である。
Further, in the position recognition method of the present invention, when a plurality of candidates for the angle changing portion are detected, the threshold value of the distance of a line segment for detecting each of the candidate portions is detected. Based on another threshold value, the angle change portion may be determined based on the magnitude of the central angle formed by each of the other portions whose line segments are equal to or less than a predetermined distance and each of the portions with the center of gravity of the object as a center. It is suitable.

【0011】また、本発明の位置認識方法は、角度変化
部の候補が複数箇所検出された際に、前記複数箇所にお
ける2本の直線間の間隔を算出し、前記間隔が前記直線
に沿う複数の位置において連続して一定長さを有してい
るという間隔の連続性を確認することにより前記複数箇
所の候補より角度変化部を決定することが好適である。
Further, in the position recognition method according to the present invention, when a plurality of candidates for the angle changing portion are detected, a distance between two straight lines at the plurality of positions is calculated, and the plurality of distances along the straight line are calculated. It is preferable to determine the angle change portion from the plurality of candidates by confirming the continuity of the interval having a constant length continuously at the position.

【0012】また、本発明の位置認識方法は、2本の直
線間の間隔の連続性を算出する際に、対象物の位置と線
分の中心を結んで得られる近似直線から2本の直線の傾
斜角度を算出し、前記近似直線と直交し、前記2本の直
線と交わる第2の線分の長さを算出することが好適であ
る。
Further, according to the position recognition method of the present invention, when calculating the continuity of the interval between two straight lines, two straight lines are calculated from an approximate straight line obtained by connecting the position of the object and the center of the line segment. It is preferable to calculate the inclination angle of the second straight line, and calculate the length of a second line segment that is orthogonal to the approximate straight line and intersects the two straight lines.

【0013】本発明の位置認識方法は、対象物の形状の
ばらつきや姿勢に依存しなく、正確に対象物の位置を認
識できるもので次の作用を有する。
The position recognizing method of the present invention is capable of accurately recognizing the position of an object without depending on the variation in the shape or posture of the object, and has the following operation.

【0014】本発明の位置認識方法では、2本の直線で
構成されていてそれらに急な角度変化があり一定の幅と
長さを有する対象物に対して、対象物の輪郭を検出し、
輪郭に沿って一定距離位置にある2点間を結ぶ線分の距
離を算出すると凹凸のある輪郭部分における線分の距離
は短くなり、直線状の輪郭部分における線分の距離は長
くなるため、急な角度変化部は距離波形のピークとして
検出することができる。
According to the position recognition method of the present invention, an outline of an object is detected for an object which is composed of two straight lines, has a steep angle change, and has a constant width and length.
When calculating the distance of a line segment connecting two points located at a certain distance along the contour, the distance of the line segment in the contoured portion with irregularities becomes shorter, and the distance of the line segment in the linear contour portion becomes longer. A sharp angle change part can be detected as a peak of a distance waveform.

【0015】また、本発明の位置認識方法は、距離波形
のピークを検出するだけでは急な角度変化部が対象物の
凹部分が凸部分か判断できず、凸部分を検出したい場
合、線分を検出し、この線分が対象物内であれば凸部分
と認識できる。
In addition, the position recognition method of the present invention can be used to detect a steep angle change portion only by detecting a peak of a distance waveform to determine whether a concave portion of an object is a convex portion. Is detected, and if this line segment is within the object, it can be recognized as a convex portion.

【0016】また、本発明の位置認識方法は対象物の形
状が2本の直線で構成されていることに着目し、角度変
化部前後の線分の距離が一定であることから角度変化部
を検出することができる。
The position recognizing method of the present invention focuses on the fact that the shape of the object is composed of two straight lines, and since the distance of the line segment before and after the angle changing portion is constant, the position of the angle changing portion is determined. Can be detected.

【0017】また、本発明の位置認識方法は角度変化部
として候補点が複数検出された際に輪郭点の重心位置を
中心に前記候補点とは別に距離波形がピークをもつ他の
候補点との角度によって角度変化部を決定することがで
きる。
Further, in the position recognition method of the present invention, when a plurality of candidate points are detected as an angle changing part, the distance waveform is centered on the center of gravity of the contour point and other candidate points having a distance waveform peak separately from the candidate points. The angle change part can be determined by the angle.

【0018】また、本発明の位置認識方法は対象物の形
状が一定の幅と長さの直線部を有することに着目して2
本の直線間の間隔を算出し、前記間隔が連続して一定長
さを有しているか否かで角度変化部を決定することがで
きる。
Further, the position recognition method of the present invention focuses on the fact that the shape of the object has a linear portion having a constant width and length.
The angle changing unit can be determined by calculating the interval between the straight lines of the book and determining whether the interval has a constant length continuously.

【0019】また、本発明の位置認識方法は対象物の直
線部の幅を算出する際に、対象物の位置と線分の中点か
らなる近似直線から直線部の傾斜角度を検出し、近似直
線と直交し、2本の直線と交わる線分の長さを算出する
ことでノイズによる影響による誤差を受けずに幅の連続
性を検出することができ、対象物の形状のばらつきに強
い位置認識を行うことができる。
Further, in the position recognition method of the present invention, when calculating the width of the straight line portion of the object, the inclination angle of the straight line portion is detected from an approximate straight line consisting of the position of the object and the midpoint of the line segment, and the approximate angle is calculated. By calculating the length of a line segment that is orthogonal to the straight line and intersects the two straight lines, it is possible to detect the continuity of the width without receiving an error due to the influence of noise, and a position that is strong against variations in the shape of the target object Recognition can be performed.

【0020】[0020]

【発明の実施の形態】本発明の一実施の形態を図1〜図
10に基づいて説明する。本実施形態では形状のばらつ
きがある菊の挿し穂を対象物とし、この挿し穂において
直線部からなる主茎位置を検出するものである。対象物
である挿し穂は検出すべき形状を複数ではなく一部分の
み有していることを仮定している。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described with reference to FIGS. In the present embodiment, a chrysanthemum cutting having a variation in shape is set as an object, and a main stem position consisting of a straight line portion in the cutting is detected. It is assumed that the cutting which is the object has not a plurality of shapes to be detected but only a part thereof.

【0021】図1は、本実施形態における位置認識装置
の主要部を示すブロック図である。図1において、撮像
手段1が対象物を撮像して映像信号を出し、濃淡記憶手
段2が前記映像信号を濃淡画像データにして記憶し、2
値化手段3により前記濃淡画像データを一定のしきい値
で黒と白の2値画像データに変換し、輪郭検出手段4に
よりこの2値画像データを走査して対象物の輪郭部分を
検出する。2点直線距離算出手段5で輪郭に沿って一定
距離位置にある2点を結ぶ線分の距離を算出し、候補点
算出手段6で線分長さが一定距離以下となる2点が輪郭
上に存在する場所を角度変化部の候補点として検出す
る。すなわち、挿し穂の主茎部が対向するほぼ平行の2
直角からなり、これらが輪郭に沿って略180°の急激
な角度変化をしていることから、これを角度変化部とし
て検出するのである。角度変化部として検出された場所
の前後の輪郭に沿った直線距離を算出する直線距離算出
手段7で一定の長さの直線が存在するかを判断し、一定
の長さの直線が存在する角度変化部が一つしかない場
合、その位置が菊の主茎位置の候補点とする。候補点角
度算出手段8で角度変化部の候補点の前後に存在する輪
郭に沿った2点間を結ぶ直線の中点列から主茎の傾斜角
度を算出し、候補点幅算出手段9で角度変化部の前後に
存在する輪郭上の2点を結ぶ距離を主茎の幅とし、所定
の幅が一定長さ以上存在するかで最終的な主茎位置とし
て決定し、角度変化部のX、Y座標と候補点角度算出手
段8で得られた対象物の主茎の傾斜角度θが検出され
る。
FIG. 1 is a block diagram showing a main part of the position recognition apparatus according to this embodiment. In FIG. 1, an imaging means 1 captures an image of an object and outputs a video signal, and a density storage means 2 stores the video signal as density image data and stores the image signal.
The grayscale image data is converted into black and white binary image data by a constant threshold value by a value converting means 3, and the outline image detecting means 4 scans the binary image data to detect a contour portion of an object. . The two-point straight-line distance calculating means 5 calculates the distance of a line segment connecting two points located at a certain distance along the contour, and the candidate point calculating means 6 determines two points whose line segment length is equal to or less than the certain distance on the contour. Is detected as a candidate point of the angle changing unit. In other words, the main stems of the cuttings are almost parallel 2
Since they form a right angle, and these change a sharp angle of about 180 ° along the contour, this is detected as an angle change portion. The straight-line distance calculating means 7 for calculating a straight-line distance along the contour before and after the location detected as the angle change portion determines whether a straight line of a certain length exists, and determines the angle at which a straight line of a certain length exists. When there is only one changing part, the position is set as a candidate point of the main stem position of chrysanthemum. The candidate point angle calculating means 8 calculates the inclination angle of the main stem from the middle point sequence of a straight line connecting two points along the contour existing before and after the candidate point of the angle changing portion, and the candidate point width calculating means 9 calculates the angle of the main stem. The distance connecting the two points on the contour existing before and after the changing portion is defined as the width of the main stem, and the predetermined main width is determined as the final main stem position depending on the existence of a predetermined length or more. The Y coordinate and the inclination angle θ of the main stem of the object obtained by the candidate point angle calculation means 8 are detected.

【0022】図2は、対象物の輪郭点の一部を8近傍の
チェインコードで示した図であり、前後左右方向のチェ
インコード10の距離を1としたとき斜め方向11の距
離は1.4として計算するとAから一定距離間隔6での
点はBとなり、チェインコードラベルAの算出距離はA
−B間の直線距離となる。
FIG. 2 is a view showing a part of the contour points of the object by using chain codes in the vicinity of 8, where the distance in the oblique direction 11 is 1. When calculated as 4, the point at a fixed distance interval 6 from A becomes B, and the calculated distance of the chain code label A is A
-B is the straight line distance.

【0023】図3は、対象物の輪郭点であるチェインコ
ードラベル番号と輪郭に沿って一定距離となる2点間の
直線距離の関係をグラフ化した図である。一定距離しき
い値14より低いグラフ上の点Cを角度変化部とする。
FIG. 3 is a graph showing a relationship between a chain code label number, which is a contour point of an object, and a linear distance between two points which are at a fixed distance along the contour. A point C on the graph lower than the fixed distance threshold value 14 is defined as an angle changing part.

【0024】図4は、図3のグラフ13の一部で角度変
化部15から前後一定ラベル分を不感帯16として算出
せず、さらに前後17a、17bで示す区間のラベル分
の距離の長さで直線性の存在を判断する。
FIG. 4 shows a part of the graph 13 in FIG. 3 in which the fixed front and rear labels from the angle changing unit 15 are not calculated as the dead zone 16, and the distances between the labels in the sections indicated by front and rear 17a and 17b are used. Determine the presence of linearity.

【0025】図5は、本実施形態で使用する菊挿し穂外
形Dの一例で角度変化部として検出された部分18は対
象物の凸部に相当し、18a、18bは部分18の前後
チェインコードラベル番号の位置で19は位置18a、
位置18bを結ぶ直線である。20は凹部に相当し、2
0a、20bは凹部20の前後チェインコードラベル番
号の位置で21は位置20a、位置20bを結ぶ直線で
ある。
FIG. 5 shows an example of the chrysanthemum cutting outer shape D used in the present embodiment. The portion 18 detected as an angle changing portion corresponds to the convex portion of the object, and 18a and 18b are chain codes before and after the portion 18. In the position of the label number 19 is position 18a,
This is a straight line connecting the positions 18b. 20 corresponds to a concave portion, 2
0a and 20b are the positions of the chain code label numbers before and after the concave portion 20, and 21 is a straight line connecting the positions 20a and 20b.

【0026】図6は、本実施形態で使用する対象物輪郭
のチェインコードラベル番号と輪郭上の2点間の直線距
離の関係を示すグラフであるがグラフの変化点との差2
2、23が一定しきい値以上であれば菊挿し穂の葉柄位
置として検出する。
FIG. 6 is a graph showing the relationship between the chain code label number of the object contour used in the present embodiment and the linear distance between two points on the contour.
If 2, 23 is equal to or more than a certain threshold value, it is detected as the petiole position of the chrysanthemum cutting ear.

【0027】図7は、本実施形態で使用する対象物外形
の角度変化点位置である主茎候補26、27と葉柄位置
28、29、30との角度関係を示すもので、対象物の
外接矩形24の重心25を中心に主茎候補26と重心2
5を結ぶ線分と主茎候補26の前後葉柄あるいは主茎候
補点30、28と重心25とを結ぶ線分とのなす角度θ
1、θ2がそれぞれ算出される。同様にして主茎候補2
7の前後葉柄あるいは主茎候補点28、29との角度θ
3、θ4がそれぞれ算出される。
FIG. 7 shows the angular relationship between the main stem candidates 26 and 27, which are the angle change points of the outer shape of the object used in the present embodiment, and the petiole positions 28, 29 and 30. Main stem candidate 26 and center of gravity 2 centered on center of gravity 25 of rectangle 24
5 and the line segment connecting the center of gravity 25 with the front and rear petiole of the main stem candidate 26 or the main stem candidate points 30, 28 and the center of gravity 25.
1, and θ2 are calculated. Similarly, main stem candidate 2
7 between the front and rear petiole or main stem candidate points 28 and 29
3, and θ4 are calculated.

【0028】図8は、本実施形態で使用する対象物の主
茎部分であり、角度変化部31から前後一定間隔チェイ
ンコードラベル番号の位置32a〜34a及び32b〜
34bをそれぞれ直線で結んだ際の直線の中点32c〜
34cを連ねて得られる近似直線の傾き35を主茎の傾
きとし、この近似直線35に最近接するチェインコード
ラベル番号の位置36を主茎の検出点とする。
FIG. 8 shows the main stem portion of the object used in the present embodiment.
The middle point 32c of the straight line when each of 34b is connected by a straight line
The inclination 35 of the approximate straight line obtained by connecting 34c is the inclination of the main stem, and the position 36 of the chain code label number closest to the approximate straight line 35 is the detection point of the main stem.

【0029】図9は、本実施形態で使用する対象物の主
茎部分であり、主茎の検出点36からの前後一定間隔チ
ェインコードラベル番号の位置37a〜39a及び37
b〜39bをそれぞれ結んだ距離37〜39を主茎部分
の幅とし、所定範囲内の幅が所定数以上存在するか判断
する。
FIG. 9 shows a main stem portion of an object used in the present embodiment, and positions 37a to 39a and 37 of chain code label numbers at predetermined intervals in front and rear from a detection point 36 of the main stem.
The distances 37 to 39 obtained by connecting b to 39b are defined as the width of the main stem portion, and it is determined whether or not the width within a predetermined range is equal to or more than a predetermined number.

【0030】図10は、本実施形態で使用する対象物の
主茎部分であり、43のようなノイズが存在した場合、
主茎の近似直線41において主茎位置40から一定距離
にする点42において近似直線41と直交し、対象物の
輪郭と点42a、42bにおいて交わる線分の長さを主
茎部分の幅として検出することによりノイズ周囲の輪郭
点にもとづく線分長さの誤差を許容して幅を検出するこ
とができる。
FIG. 10 shows the main stem portion of the object used in the present embodiment.
The approximate straight line 41 is orthogonal to the approximate straight line 41 at a point 42 at a predetermined distance from the main stem position 40 in the approximate straight line 41 of the main stem, and the length of a line segment intersecting the outline of the object at the points 42a and 42b is detected as the width of the main stem portion. By doing so, the width can be detected while allowing an error in the length of the line segment based on the contour points around the noise.

【0031】次に、本実施形態における位置認識動作を
図1〜図10に基づいて説明する。先ず、図1に示す撮
像手段1で対象物を撮像した映像信号を、濃淡記憶手段
2で濃淡画像データとした記憶し、2値化手段3で前記
濃淡画像データを対象物を背景から切り出せる一定の閾
値で黒と白の2値画像データに変換する。この2値画像
データに対して、背景が黒のときは対象物である白画像
データが最初に発見された位置を中心に8近傍を右回り
に順次走査し、次に白画像データが発見された位置の方
向をチェインコードでラベル付けしていく。次に2点直
線距離算出手段で輪郭上一定距離間隔にある2点間の直
線距離を順次算出するが図2の場合、前後左右方向のチ
ェインコードを1、斜め方向のチェインコードを1.4
として輪郭上の一定距離を6で設定するとA点からチェ
インコードの距離が6以上になる点B(1+1+1.4
+1.4+1.4=6.2)の直線距離12を計算する
ことになる。これを対象物の輪郭上の点すべてについて
行いグラフ化すると図3の状態になり、ここで所定しき
い値14以下の輪郭上の2点間の位置Cが角度変化部と
なる。対象物の検出すべき位置は2本の直線で構成され
ていることから、この角度変化部から前後不感帯部分を
除く一定ラベル分の直線距離は長い距離にわたって検出
されるはずである。そのため図4の区間17a、17b
の直線距離が一定長さ存在しない場合は誤認識を防ぐた
め主茎候補位置が存在しないと判断したほうがよい。
Next, the position recognition operation in the present embodiment will be described with reference to FIGS. First, a video signal obtained by imaging an object by the imaging means 1 shown in FIG. 1 is stored as grayscale image data by the grayscale storage means 2, and the grayscale image data can be cut out from the background by the binarization means 3. The image data is converted into binary image data of black and white with a fixed threshold value. With respect to the binary image data, when the background is black, the object is sequentially scanned clockwise in the vicinity of 8 around the position where the white image data as the object is first found, and then the white image data is found. Label the direction of the position with the chain code. Next, the two-point straight-line distance calculation means sequentially calculates the straight-line distance between two points at a constant distance on the contour. In the case of FIG. 2, the chain code in the front-rear, left-right direction is 1, and the chain code in the oblique direction is 1.4.
When the constant distance on the contour is set as 6, the point B (1 + 1 + 1.4) where the distance of the chain code from the point A becomes 6 or more.
The linear distance 12 of (+ 1.4 + 1.4 = 6.2) is calculated. When this is performed for all points on the contour of the object and graphed, the state shown in FIG. 3 is obtained. Here, the position C between two points on the contour having a predetermined threshold value 14 or less becomes an angle changing portion. Since the position at which the object is to be detected is composed of two straight lines, the straight line distance for a certain label excluding the front and rear dead zones from this angle change portion should be detected over a long distance. Therefore, sections 17a and 17b in FIG.
If the straight line distance does not exist for a certain length, it is better to judge that the main stem candidate position does not exist in order to prevent erroneous recognition.

【0032】仮に角度変化部から図4の区間17a、1
7bの直線距離が一定長さ存在しても、図5の20のよ
うに対象物の凹部にあたる部分が存在するため角度変化
部から前後一定ラベル分位置の20a、20bを結ぶ線
分21が2値画像データの背景部分か対象物の輪郭内部
の部分かによって凹部か凸部の判断が可能である。
It is assumed that sections 17a and 1a of FIG.
Even if the straight line distance of 7b is a certain length, there is a part corresponding to the concave part of the object as shown at 20 in FIG. 5, so that a line segment 21 connecting the angle changing part and the front and rear fixed label positions 20a and 20b is two. It is possible to determine a concave portion or a convex portion according to the background portion of the value image data or the portion inside the contour of the object.

【0033】以上の処理で主茎候補としての角度変化部
が一つだけ検出されれば主茎部分の幅を評価する処理に
移ることができるが、ここで複数の主茎候補が検出され
た場合、主茎候補以外の他の葉柄位置を検出して主茎候
補位置を基準に前後の葉柄位置あるいは他の主茎候補位
置との角度関係から主茎候補を一つに決定する。図6の
グラフから直線距離波形のピークからピークまでの幅2
2、23が一定以上の長さを有していた場合、葉柄部分
として検出し、同時に対象物の凹部が凸部かを前記方法
で判断する。図7の26、27が主茎候補として検出さ
れた場合、葉柄位置28、29、30を前記方法で検出
し、対象物の外接矩形の重心25を中心として角度θ
1、θ2、θ3、θ4を算出する。ここで主茎候補26
を基準とした角度θ1+θ2と27を基準とした角度θ
3+θ4が一定閾値以上か否かで最終候補を決定する。
複数の候補点のうち一つのみ角度が一定しきい以上であ
ればそれが候補点であるし、すべて角度が一定閾値未満
であれば候補点が存在しないと判断したほうがよい。あ
るいは複数の候補が一定閾値以上であれば次処理の幅評
価で判別することが可能である。
If only one angle change portion as a main stem candidate is detected in the above process, the process can proceed to the process of evaluating the width of the main stem portion. Here, a plurality of main stem candidates are detected. In this case, a petiole position other than the main stem candidate is detected, and one main stem candidate is determined from the petiole positions before and after or the angular relationship with other main stem candidate positions with reference to the main stem candidate position. From the graph of FIG. 6, the width 2 from peak to peak of the linear distance waveform
If the lengths 2 and 23 have a certain length or more, they are detected as petiole portions, and at the same time, whether the concave portion of the object is a convex portion is determined by the above method. When 26 and 27 in FIG. 7 are detected as main stem candidates, the petiole positions 28, 29 and 30 are detected by the above-described method, and the angle θ is set around the center of gravity 25 of the circumscribed rectangle of the object.
1, θ2, θ3, and θ4 are calculated. Here main stem candidate 26
Θ1 + θ2 with reference to angle θ and angle θ with reference to 27
The final candidate is determined based on whether 3 + θ4 is equal to or greater than a certain threshold.
If only one of a plurality of candidate points has an angle equal to or greater than a certain threshold, it is a candidate point. If all angles are less than a certain threshold, it is better to determine that no candidate point exists. Alternatively, if a plurality of candidates are equal to or more than a certain threshold, it is possible to determine by a width evaluation of the next processing.

【0034】幅評価において図8の主茎候補としての角
度変化部31から前後一定間隔チェインコードラベル番
号の位置32a〜34a及び32b〜34bをそれぞれ
結んだ線分の中点32c〜34cを結んだ近似直線35
を主茎の傾きとし、この近似直線35に最近接するチェ
インコードラベル番号の位置36を主茎の検出点とす
る。図9の主茎の検出点36から前後一定間隔に存在す
るチェインコードラベル番号の位置37a〜39a及び
37b〜39bをそれぞれ結んだ線分37〜39を主茎
部分の幅とし、所定範囲内の幅が所定長さ以上にわたっ
て存在するか判断する。また、図10の43のようなノ
イズが存在した場合、主茎の傾斜を示す直線41におい
て主茎位置40から一定距離にある点42において近似
直線41と直交し、対象物の輪郭点と点42a、42b
において交わる線分の長さを主茎部分の幅として検出す
ることによりノイズ周囲の輪郭点にもとづく線分長さの
誤差を許容して幅を検出することが可能となり、主茎候
補としての角度変化部が所定幅をもち、一定の長さを有
しているか判断することにより正確な主茎位置と主茎の
傾斜角度を検出することができる。
In the width evaluation, the midpoints 32c to 34c of the line segments connecting the positions 32a to 34a and 32b to 34b of the chain code label numbers at constant intervals before and after are connected from the angle changing portion 31 as the main stem candidate in FIG. Approximate line 35
Is the inclination of the main stem, and the position 36 of the chain code label number closest to this approximate straight line 35 is the detection point of the main stem. Lines 37 to 39 connecting the positions 37a to 39a and 37b to 39b of the chain code label numbers which are present at a certain distance from the detection point 36 of the main stem in FIG. It is determined whether the width exists over a predetermined length. In addition, when noise such as 43 in FIG. 10 is present, a straight line 41 indicating the inclination of the main stem is orthogonal to the approximate straight line 41 at a point 42 at a certain distance from the main stem position 40, and 42a, 42b
By detecting the length of the line segment that intersects as the width of the main stem, it becomes possible to detect the width by allowing the error of the line segment length based on the contour points around the noise, and to determine the angle as the main stem candidate. By judging whether or not the changing portion has a predetermined width and a fixed length, it is possible to accurately detect the main stem position and the inclination angle of the main stem.

【0035】[0035]

【発明の効果】本発明の位置認識方法は、2本の直線部
を含み、この2本の直線部の間に相互に輪郭に沿って略
180°の角度変化を生ぜしめる角度変化部を含む対象
物の位置検出に際し、対象物の輪郭点を検出し、輪郭に
沿って一定距離位置にある2点間を結ぶ線分の距離を順
次算出し、前記線分の距離が一定距離以下となる輪郭上
の2点の存在する位置を対象物の位置として検出し、更
に検出された角度変化部から2本の直線の幅とその幅の
連続性をみることによって、対象物のばらつきがある場
合や姿勢が一定でない場合でも、対象物の位置を正確に
認識できるという効果を奏する。
The position recognition method according to the present invention includes two linear portions, and includes an angle changing portion which causes an angle change of approximately 180 ° along the contour between the two linear portions. Upon detecting the position of the object, the contour points of the object are detected, and the distance of a line connecting two points located at a certain distance along the contour is sequentially calculated, and the distance of the line becomes less than a certain distance. When the position where two points on the contour are present is detected as the position of the target, and the width of the two straight lines and the continuity of the width are observed from the detected angle change portion, so that there is a variation in the target. This provides an effect that the position of the object can be accurately recognized even when the posture is not constant.

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

【図1】本発明の一実施形態における位置認識方法の構
成を示すブロック図
FIG. 1 is a block diagram illustrating a configuration of a position recognition method according to an embodiment of the present invention.

【図2】本実施形態における対象物の輪郭点であるチェ
インコードと輪郭に沿って一定距離にある2点間の直線
距離を示す図
FIG. 2 is a diagram illustrating a chain code that is a contour point of an object and a straight-line distance between two points at a fixed distance along the contour according to the present embodiment.

【図3】対象物の輪郭点であるチェインコードラベル番
号と輪郭に沿って一定距離にある2点間の直線距離の関
係をグラフ化した図
FIG. 3 is a graph showing a relationship between a chain code label number, which is a contour point of an object, and a linear distance between two points at a fixed distance along the contour.

【図4】図3のグラフの一部詳細図FIG. 4 is a partially detailed view of the graph of FIG. 3;

【図5】対象物と角度変化部として検出された主茎位置
を示す図
FIG. 5 is a diagram showing an object and a main stem position detected as an angle changing unit.

【図6】対象物に対して主茎候補以外の他の葉柄の検出
方法を示す図
FIG. 6 is a diagram showing a method for detecting a petiole other than the main stem candidate for the object.

【図7】対象物に対して主茎候補が複数検出された場合
他の葉柄との角度関係を示す図
FIG. 7 is a diagram showing an angular relationship with another petiole when a plurality of main stem candidates are detected for an object.

【図8】対象物の主茎部分とその傾きを示す図FIG. 8 is a diagram showing a main stem portion of an object and its inclination.

【図9】対象物の主茎部分とその幅を示す図FIG. 9 is a diagram showing a main stem portion of an object and its width.

【図10】対象物の主茎部分と直線部にノイズが存在し
た場合の検出幅を示す図
FIG. 10 is a diagram showing a detection width when noise is present in a main stem portion and a straight portion of an object.

【図11】従来の位置認識方法の構成を示す図FIG. 11 is a diagram showing a configuration of a conventional position recognition method.

【図12】従来の位置認識方法における対象物の重心位
置とエッジ検出をする円弧を示す図
FIG. 12 is a diagram showing the position of the center of gravity of an object and a circular arc for edge detection in a conventional position recognition method.

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

A,B 輪郭に沿って互いに一定距離位置にある2点 C 角度変化部 D 対象物 10,11 チェインコード 12 一定輪郭点間の直線距離 13 チェインコードラベル番号と直線距離のグラフ 14 一定距離しきい値 16 不感帯幅 17a,17b 直線距離平均幅 18,20 主茎候補位置 18a,18b 主茎候補18の前後輪郭点 20a,20b 主茎候補20の前後輪郭点 22,23 葉柄算出しきい値 24 対象物の外接矩形 25 外接矩形の中心位置 26,27 主茎候補点 28,29,30 葉柄候補点 θ1〜θ4 主茎候補点を軸とした他の葉柄との角度 31 仮主茎候補点 32a〜34a,32b〜34b 主茎候補点から一定
間隔の輪郭点 32c〜34c 主茎候補点前後の輪郭点を結ぶ直線の
中点 35 32c〜34cの点列から検出される近似直線 36 近似直線35に最近接する輪郭点 37〜39 主茎候補点から前後一定間隔の輪郭点を結
ぶ直線 42a,42b 傾き41に直交する幅の端点
A, B Two points located at a fixed distance from each other along the contour C Angle changing part D Object 10, 11 Chain code 12 Linear distance between constant contour points 13 Graph of chain code label number and linear distance 14 Constant distance threshold Value 16 Dead zone width 17a, 17b Average straight line distance 18,20 Main stem candidate position 18a, 18b Front and rear contour points of main stem candidate 18 20a, 20b Front and rear contour points of main stem candidate 20 22,23 Petiole calculation threshold 24 Target Object circumscribed rectangle 25 Center position of circumscribed rectangle 26,27 Main stem candidate point 28,29,30 Petiole candidate point θ1-θ4 Angle with other petiole with main stem candidate point as axis 31 Temporary main stem candidate point 32a- 34a, 32b-34b Contour points at fixed intervals from main stem candidate point 32c-34c Midpoint of straight line connecting outline points before and after main stem candidate point 35 Checked from point sequence of 32c-34c End points of the approximate straight line 36 straight 42a connecting the contour points before and after the predetermined intervals approximate line 35 from the contour points 37 to 39 principal stem candidate points closest, the width perpendicular to 42b slope 41 which is

フロントページの続き (72)発明者 松崎 豊 大阪府門真市大字門真1006番地 松下電器 産業株式会社内Continuation of the front page (72) Inventor Yutaka Matsuzaki 1006 Kadoma Kadoma, Osaka Prefecture Matsushita Electric Industrial Co., Ltd.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 輪郭に、一定の長さを有しかつ相互に一
定の間隔を有する2本の略直線部を含み、前記2本の直
線部の間に、相互に輪郭に沿って略180°の角度変化
を生ぜしめる角度変化部を含む対象物を撮像手段で撮像
し、撮像画像を2値化して前記対象物の輪郭を検出し、
前記輪郭に沿って一定距離位置にある2点間を結ぶ線分
の距離を順次算出し、前記線分の距離が一定距離のしき
い値以下となる前記輪郭上の2点の存在する場所を前記
対象物の角度変化部として検出することを特徴とする位
置認識方法。
1. The contour includes two substantially straight portions having a fixed length and a fixed distance from each other, and approximately 180 along the contour between the two straight portions. Imaging an object including an angle changing unit that causes an angle change of ° by an imaging unit, binarizing the captured image and detecting an outline of the object,
A distance of a line segment connecting two points located at a fixed distance position along the contour is sequentially calculated, and a position where two points on the contour where the distance of the line segment is equal to or less than a threshold of the fixed distance is determined. A position recognition method, wherein the position is detected as an angle change part of the object.
【請求項2】 角度変化部の候補を決定する際に、輪郭
上の2点を結ぶ線分が対象物の輪郭内部にあれば角度変
化部の候補とする請求項1記載の位置認識方法。
2. The position recognition method according to claim 1, wherein, when determining a candidate for the angle changing unit, if a line segment connecting two points on the outline is inside the outline of the object, the position is recognized as a candidate for the angle changing unit.
【請求項3】 角度変化部の候補が複数箇所検出された
際に、前記各箇所の前後における輪郭上の2点間を結ぶ
複数の線分の距離が一定であることを確認することによ
り、前記候補の中から角度変化部を決定する請求項1記
載の位置認識方法。
3. When a plurality of angle change portion candidates are detected, by confirming that the distance of a plurality of line segments connecting two points on the contour before and after each of the positions is constant, The position recognition method according to claim 1, wherein an angle changing unit is determined from the candidates.
【請求項4】 角度変化部の候補が複数箇所検出された
際に候補となった前記各箇所を検出する際の線分の距離
のしきい値とは別の他のしきい値に基づき線分が一定距
離以下を示す他の箇所と前記各箇所とが対象物の重心位
置を中心にしてそれぞれ形成する中心角の大きさによっ
て角度変化部を決定する請求項1記載の位置認識方法。
4. A line based on another threshold value different from a threshold value of a distance of a line segment at the time of detecting each of the candidate positions when a plurality of angle change portion candidates are detected. The position recognizing method according to claim 1, wherein the angle change portion is determined by a magnitude of a central angle formed by the other portions each having a distance equal to or less than a predetermined distance and each of the portions centering on the center of gravity of the object.
【請求項5】 角度変化部の候補が複数箇所検出された
際に、前記複数箇所における2本の直線間の間隔を算出
し、前記間隔が前記直線に沿う複数位置において連続し
て一定長さを有しているという間隔の連続性を確認する
ことにより前記複数箇所の候補より角度変化部を決定す
る請求項1記載の位置認識方法。
5. When a plurality of candidates for an angle changing unit are detected at a plurality of locations, an interval between two straight lines at the plurality of locations is calculated, and the interval is a constant length continuously at a plurality of positions along the straight line. The position recognizing method according to claim 1, wherein the angle changing unit is determined from the plurality of candidates by confirming the continuity of the interval having the following.
【請求項6】 2本の直線間の間隔の連続性を算出する
際に対象物の位置と線分の中点を結んで得られる近似直
線から2本の直線の傾斜角度を算出し、前記近似直線と
直交し、前記2本の直線と交わる第2の線分の長さを算
出して前記間隔の連続性を検出する請求項1、又は5記
載の位置認識方法。
6. When calculating the continuity of the interval between two straight lines, an inclination angle of the two straight lines is calculated from an approximate straight line obtained by connecting the position of the object and the midpoint of the line segment, 6. The position recognition method according to claim 1, wherein a continuity of the interval is detected by calculating a length of a second line segment that is orthogonal to the approximate straight line and intersects the two straight lines.
JP9020204A 1997-02-03 1997-02-03 Method for recognizing position Pending JPH10222680A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9020204A JPH10222680A (en) 1997-02-03 1997-02-03 Method for recognizing position

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9020204A JPH10222680A (en) 1997-02-03 1997-02-03 Method for recognizing position

Publications (1)

Publication Number Publication Date
JPH10222680A true JPH10222680A (en) 1998-08-21

Family

ID=12020646

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9020204A Pending JPH10222680A (en) 1997-02-03 1997-02-03 Method for recognizing position

Country Status (1)

Country Link
JP (1) JPH10222680A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100933483B1 (en) 2008-01-28 2009-12-23 국방과학연구소 Target recognition method in the image
WO2011145338A1 (en) * 2010-05-21 2011-11-24 株式会社日立ハイテクノロジーズ Pattern dimension measurement method, pattern dimension measurement device, program for causing computer to execute pattern dimension measurement method, and recording medium having same recorded thereon
KR20160087600A (en) * 2015-01-14 2016-07-22 한화테크윈 주식회사 Apparatus for inspecting defect and method thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100933483B1 (en) 2008-01-28 2009-12-23 국방과학연구소 Target recognition method in the image
WO2011145338A1 (en) * 2010-05-21 2011-11-24 株式会社日立ハイテクノロジーズ Pattern dimension measurement method, pattern dimension measurement device, program for causing computer to execute pattern dimension measurement method, and recording medium having same recorded thereon
JP2011242352A (en) * 2010-05-21 2011-12-01 Hitachi High-Technologies Corp Method and apparatus for measuring pattern dimension, program for making computer execute method for measuring pattern dimension, and recording medium for recording the same
US9191628B2 (en) 2010-05-21 2015-11-17 Hitachi High-Technologies Corporation Pattern dimension measurement method, pattern dimension measurement device, program for causing computer to execute pattern dimension measurement method, and recording medium having same recorded thereon
KR20160087600A (en) * 2015-01-14 2016-07-22 한화테크윈 주식회사 Apparatus for inspecting defect and method thereof

Similar Documents

Publication Publication Date Title
US5515447A (en) Method and apparatus for locating an acquisition target in two-dimensional images by detecting symmetry in two different directions
US5537490A (en) Line image processing method
JPH10222680A (en) Method for recognizing position
US6862370B2 (en) Image detecting method, image detecting system, program, and recording medium for image detection
JP2002207996A (en) Method and device for detecting pattern defect
JPH09189528A (en) Pattern defect detection method and device
JP2647502B2 (en) Pattern comparison inspection method and apparatus
US5881167A (en) Method for position recognition
JP2000194861A (en) Method and device for recognizing image
JPH07324916A (en) Inspection apparatus of external shape of pattern
JP2815263B2 (en) Fine line image shaping method
JPH09101113A (en) Method and device for measuring beveling position and its form
KR0167585B1 (en) Position recognizing method
JP3112537B2 (en) Optical three-dimensional shape measuring method and measuring device
JP2912070B2 (en) Object position recognition method
JPH09147121A (en) Method and device for robot for object recognition
JPH06282684A (en) Character recognizing device
JP3170988B2 (en) Slot position recognition method
JPH10288514A (en) Objective turning angle detecting method
JP2535704Y2 (en) Shading image processing device
JP3631618B2 (en) Discrimination method of circular pattern
JP3005428B2 (en) Optical disk center position detection method
JPH09282453A (en) Position recognizing method
JPH10232932A (en) Method for deciding kind of tire
JPS61129512A (en) Inspecting instrument for curvature of lead