JPH0737085A - Reference pattern preparation device - Google Patents

Reference pattern preparation device

Info

Publication number
JPH0737085A
JPH0737085A JP15776293A JP15776293A JPH0737085A JP H0737085 A JPH0737085 A JP H0737085A JP 15776293 A JP15776293 A JP 15776293A JP 15776293 A JP15776293 A JP 15776293A JP H0737085 A JPH0737085 A JP H0737085A
Authority
JP
Japan
Prior art keywords
reference pattern
matching
pattern
image
pictures
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
JP15776293A
Other languages
Japanese (ja)
Inventor
Kenji Suzuki
健司 鈴木
Yoshiharu Morinaka
芳治 森中
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.)
JFE Steel Corp
Original Assignee
Kawasaki Steel Corp
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 Kawasaki Steel Corp filed Critical Kawasaki Steel Corp
Priority to JP15776293A priority Critical patent/JPH0737085A/en
Publication of JPH0737085A publication Critical patent/JPH0737085A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To eliminate the need of alignment among plural patterns by supplying a typical initial reference pattern first and adding correction by the pattern matched with it. CONSTITUTION:Pictures are inputted to a picture storage part 12 by a camera 10 and matching with the initial reference pattern stored in a reference pattern storage part 24 is performed by a matching part 26. The matching part 26 matches an initial storage pattern and the partial pictures of a size and a shape same as the initial reference pattern at respective positions in the pictures and sends the position data of the partial pictures whose matching degree is equal to or more than a threshold value stored in a threshold value storage part 28 to a picture segmenting part 18. Thus, the patterns similar to the initial reference pattern of equal to or more than a fixed matching degree can be segmented from the pictures for learning. The patterns are provided with the variation of density to a degree approximately the same as the pictures at the time of detecting the patterns, the reference pattern close to the patterns in the actual pictures can be obtained by averaging them and the appropriate threshold value of the matching degree can be recognized.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、工業用テレビカメラ
(ITV)等の画像入力手段により得られた画像中に、
特定のパターンを検出することにより、画像内の物体の
同定、位置決め等を行うパターンマッチングに用いる基
準パターンを作成する基準パターン作成装置に関する。
BACKGROUND OF THE INVENTION The present invention relates to an image obtained by image input means such as an industrial television camera (ITV).
The present invention relates to a reference pattern creation device that creates a reference pattern used for pattern matching for identifying and positioning an object in an image by detecting a specific pattern.

【0002】[0002]

【従来の技術】従来、検出すべきパターンの形状が予め
知られている場合でも、それが特定の光学条件で、カメ
ラ等を通して入力される画像において、どのようなパタ
ーンとなるかを予測するのは困難であり、基準パターン
は実際の検出対象と同一条件で入力された画像から切り
出すのが一般的である。
2. Description of the Related Art Conventionally, even when the shape of a pattern to be detected is known in advance, it is possible to predict what kind of pattern it will be in an image input through a camera or the like under specific optical conditions. Is difficult, and it is common to cut out the reference pattern from the image input under the same conditions as the actual detection target.

【0003】この際、複数のパターンを平均化したりす
るために切り出すには、複数のパターン間で位置を合せ
る必要がある。
At this time, in order to cut out a plurality of patterns for averaging, it is necessary to align the positions of the plurality of patterns.

【0004】パターンの位置を定義する方法としては、
例えば特開昭62−200252、特開平4−1134
87に開示されているように、重心による方法が知られ
ている。
As a method of defining the position of the pattern,
For example, JP-A-62-200252 and JP-A-4-1134
As disclosed in 87, a method based on the center of gravity is known.

【0005】この重心によりパターン位置を定義する方
法は、パターン各部の画素値が常に一定であって初めて
正確な位置の特定が可能であり、2値画像に適用される
のが一般的である。
The method of defining the pattern position by the center of gravity can accurately specify the position only when the pixel value of each part of the pattern is always constant, and is generally applied to a binary image.

【0006】一方、パターンマッチングの方法として
は、2値画像を対象とするばかりではなく、特開平4−
283881に開示されているように、正規化相互相関
による方法も知られている。ここで、正規化は中間濃度
の存在を前提として、同一パターンが照明条件の変動等
により様々な中間濃度で画像中に現れる、ばらつきを補
償する効果を持つ。正規化相互相関法に代表される、中
間濃度を持つ画像を用いたパターンマッチングの方法
は、照明条件の変動等による濃度のばらつきを補償でき
ることが2値画像のパターンマッチングと比べての特徴
であり、対象画像には、濃度の変動があることが前提で
ある。
On the other hand, as a method of pattern matching, not only a binary image is targeted, but also Japanese Patent Laid-Open No.
A method based on normalized cross-correlation is also known, as disclosed in 283881. Here, the normalization has the effect of compensating for variations in which the same pattern appears in an image at various intermediate densities due to variations in illumination conditions, etc., assuming the existence of intermediate densities. The pattern matching method using an image having an intermediate density, which is represented by the normalized cross-correlation method, is capable of compensating for density variations due to variations in illumination conditions and the like, which is a characteristic compared to binary image pattern matching. It is premised that the target image has a variation in density.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、様々に
変動する中間濃度を持つ画像から切り出した、基準パタ
ーンの位置を合せようとする時、重心を用いると、濃度
の変動の影響により、パターン中の重心位置が大きく変
動するという問題があった。
However, when attempting to align the positions of the reference patterns, which are cut out from images having variously varying intermediate densities, the use of the center of gravity causes the influence of the variation in the densities in the patterns. There is a problem that the position of the center of gravity fluctuates greatly.

【0008】このため、複数の基準パターンの平均によ
り、信頼性の高い基準パターンを得ようとする時、複数
のパターン間での位置合せが困難であった。
Therefore, when trying to obtain a highly reliable reference pattern by averaging a plurality of reference patterns, it is difficult to align the plurality of patterns.

【0009】本発明は、前記従来の問題点を解決するべ
くなされたもので、多くのパターンを手作業で切り出す
ことなく、精度の高い基準パターンを作成できる基準パ
ターン作成装置を提供することを目的とする。
The present invention has been made to solve the above-mentioned conventional problems, and an object of the present invention is to provide a reference pattern creating apparatus capable of creating a highly accurate reference pattern without manually cutting out many patterns. And

【0010】[0010]

【課題を解決するための手段】本発明は、画像と基準パ
ターンとのマッチングを行う際に用いる基準パータンを
作成する基準パターン作成装置において、初期基準パタ
ーンを作成する手段と、マッチング処理対象と同一条件
で入力された学習用画像と前記初期基準パターンとのマ
ッチングを行うマッチング手段と、前記マッチングにお
いてマッチ度が一定値を越えた、前記初期基準パターン
と同一寸法、同一形状の部分画像を、全て前記学習用画
像から切り出す画像切り出し手段と、前記切り出された
部分画像群の各画素位置毎に、全ての部分画像の画素値
を平均化する手段とを有し、前記の各画素位置毎に平均
化された画素値を、同一画素位置の画素値とする基準パ
ターンを作成することにより、前記目的を達成したもの
である。
According to the present invention, in a reference pattern creating apparatus for creating a reference pattern used when matching an image and a reference pattern, the means for creating an initial reference pattern is the same as the matching processing target. Matching means for matching the learning image input under the conditions with the initial reference pattern, and all the partial images having the same size and shape as the initial reference pattern, the matching degree of which in the matching exceeds a certain value. An image cutting-out unit that cuts out from the learning image and a unit that averages pixel values of all partial images for each pixel position of the cut-out partial image group, and averages each pixel position The above object is achieved by creating a reference pattern in which the converted pixel values are used as pixel values at the same pixel position.

【0011】[0011]

【作用】本発明は、パターンマッチングのために、初期
基準パターンを設け、基準パターンの切り出しを行う学
習パターンの中での基準パターンの位置を、重心等の手
段によらず、初期基準パターンとのマッチ度がある一定
値以上となる位置として求めるようにしたものである。
According to the present invention, an initial reference pattern is provided for pattern matching, and the position of the reference pattern in the learning pattern for cutting out the reference pattern is set to the initial reference pattern regardless of the means such as the center of gravity. It is designed to find the position where the degree of matching is a certain value or more.

【0012】即ち、最初に、初期基準パターンとマッチ
度を判定する一定値を与えておき、次に、マッチング処
理対象と同一条件で入力された学習用画像に対して、初
期基準パターンとのマッチングを行い、マッチ度が上で
与えた一定値を越えた箇所の、初期基準パターンと同一
寸法、同一形状の部分画像を、全て学習用画像から切り
出し、得られた部分画像群の各画素位置毎に、全ての部
分画像の画素値を平均した値を画素値として持つパター
ンを作成し、これを基準パターンとするものである。
That is, first, a constant value for determining the degree of matching with the initial reference pattern is given, and then the learning image input under the same conditions as the matching processing target is matched with the initial reference pattern. All the partial images of the same size and shape as the initial reference pattern, where the degree of matching exceeds the constant value given above, are cut out from the learning image, and for each pixel position of the obtained partial image group. In addition, a pattern having a pixel value that is the average of the pixel values of all partial images is created, and this is used as the reference pattern.

【0013】[0013]

【実施例】以下図面を参照し、本発明の実施例を詳細に
説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0014】図1は、本発明の1実施例を示すブロック
線図である。
FIG. 1 is a block diagram showing an embodiment of the present invention.

【0015】図1において、10はカメラ、12は画像
記憶部、14は画像表示部、16は初期パターン作成操
作部、18は画像切り出し部、20はパターン記憶部、
22は平均化演算部、24は基準パターン記憶部、26
はマッチング部、28は閾値記憶部、30はカウンタ、
32は結果出力部である。
In FIG. 1, 10 is a camera, 12 is an image storage unit, 14 is an image display unit, 16 is an initial pattern creation operation unit, 18 is an image cutout unit, 20 is a pattern storage unit,
22 is an averaging calculation unit, 24 is a reference pattern storage unit, 26
Is a matching unit, 28 is a threshold value storage unit, 30 is a counter,
32 is a result output unit.

【0016】以下、本実施例の作用を説明する。The operation of this embodiment will be described below.

【0017】カメラ10により入力された画像は、画像
記憶部12に蓄えられ、画像表示部14に表示される。
The image input by the camera 10 is stored in the image storage unit 12 and displayed on the image display unit 14.

【0018】まず、初期基準パターン作成時は、初期パ
ターン作成操作部16から初期パターンの画像中での座
標データを画像切り出し部18へ送ることにより、初期
基準パターンをパターン記憶部20、平均化演算部22
経由で基準パターン記憶部24へ送る。
First, when the initial reference pattern is created, the initial pattern creation operation unit 16 sends the coordinate data in the image of the initial pattern to the image cutout unit 18, so that the initial reference pattern is stored in the pattern storage unit 20 and the averaging operation. Part 22
It is sent to the reference pattern storage unit 24 via.

【0019】次に、基準パターンの学習を行う。Next, the reference pattern is learned.

【0020】カメラ10により、画像記憶部12へ画像
を入力し、マッチング部26により、基準パターン記憶
部24に蓄えられた初期基準パターンとのマッチングを
行う。マッチング部26は図2に示すように、画像上を
走査しながら、画像中の各位置の初期基準パターンと同
じ大きさ、同じ形状の部分画像と初期記憶パターンのマ
ッチングをとり、閾値記憶部28に蓄えられた閾値以上
のマッチ度となった部分画像の位置データを画像切り出
し部18へ送る。
The camera 10 inputs an image to the image storage unit 12, and the matching unit 26 performs matching with the initial reference pattern stored in the reference pattern storage unit 24. As shown in FIG. 2, the matching unit 26 scans the image while matching a partial image having the same size and shape as the initial reference pattern at each position in the image with the initial storage pattern, and the threshold storage unit 28. The position data of the partial image having the matching degree equal to or higher than the threshold value stored in is sent to the image cutout unit 18.

【0021】マッチングとして画像の各位置で行う処理
は、入力画像をf (x ,y )、基準パターンをg (x ,
y )、基準パターンの位置を(u ,v )、基準パターン
の形状を矩形、寸法を(w ,h )とする時に、例えば正
規化相互相関法ではマッチ度は次の式(1)により与え
られる。
The processing performed at each position of the image as matching is performed by using f (x, y) for the input image and g (x, y) for the reference pattern.
y), the position of the reference pattern is (u, v), the shape of the reference pattern is rectangular, and the dimensions are (w, h). For example, in the normalized cross-correlation method, the matching degree is given by the following equation (1). To be

【0022】[0022]

【数1】 [Equation 1]

【0023】又、SSDA法(Sequential Similarity
Detection Algorithm ・・・残差逐次検定法)によれ
ば、マッチ度の逆数が次の式(2)により計算される。
The SSDA method (Sequential Similarity)
According to the detection algorithm (residual sequential test method), the reciprocal of the matching degree is calculated by the following equation (2).

【0024】[0024]

【数2】 [Equation 2]

【0025】但し、計算途中でも、この式のマッチ度
(u ,v )の値が一定の閾値を越えた時点で計算を打ち
切るものとする。
However, even during the calculation, the calculation is terminated when the value of the degree of match (u, v) in this equation exceeds a certain threshold value.

【0026】以上のような処理でマッチングが行われ
る。
Matching is performed by the above processing.

【0027】画像切り出し部18は、このデータに基づ
き画像記憶部12中の画像から部分画像を切り出しパタ
ーン記憶部20へ送ると同時に、カウンタ30を更新す
る。
Based on this data, the image cutout unit 18 sends a partial image from the image in the image storage unit 12 to the cutout pattern storage unit 20 and, at the same time, updates the counter 30.

【0028】パターン記憶部24は複数の部分画像を記
憶し、カウンタ30は部分画像の数を記憶する。部分画
像の切り出しが完了すると、平均化演算部22がパター
ン記憶部20中の部分画像をカウンタ30の値を使って
平均化し、基準パターン記憶部24中に部分画像を各画
素毎に平均したパターンを作る。
The pattern storage unit 24 stores a plurality of partial images, and the counter 30 stores the number of partial images. When the cutout of the partial images is completed, the averaging calculation unit 22 averages the partial images in the pattern storage unit 20 using the value of the counter 30, and the average of the partial images in the reference pattern storage unit 24 is calculated for each pixel. make.

【0029】マッチング部26は、位置データを結果出
力部32へも送るので、これを取り出すことにより、パ
ターン位置検出を行うことができる。又、その間にもパ
ターン記憶部20中の部分画像の数を増やし、基準パタ
ーンの改善を行うことができる。
Since the matching section 26 also sends the position data to the result output section 32, the pattern position can be detected by taking this out. Also, during that time, the number of partial images in the pattern storage unit 20 can be increased to improve the reference pattern.

【0030】従って、本実施例によれば、学習用画像か
ら、一定のマッチ度以上初期基準パターンと類似したパ
ターンを切り出すことができ。これらパターンは実際の
パターン検出時と同一条件で入力された学習用画像から
切り出されたものであるので、パターン検出時の画像と
同程度の濃度のばらつきを含んでおり、これらを平均す
ることにより、実際の画像中のパターンに近い基準パタ
ーンを得ることができると共に、マッチ度の適当な閾値
を知ることができる。
Therefore, according to this embodiment, it is possible to cut out a pattern similar to the initial reference pattern with a certain degree of matching or more from the learning image. Since these patterns are cut out from the learning image input under the same conditions as in the actual pattern detection, they contain the same density variations as in the pattern detection image. A reference pattern close to the pattern in the actual image can be obtained, and an appropriate threshold value of the matching degree can be known.

【0031】[0031]

【発明の効果】以上説明したように、本発明によれば、
パターンマッチングに用いる基準パターンの、実際の画
像から切り出した多くのパターンの平均化による作成
を、一度に行わず、まず最初に、典型的な初期基準パタ
ーンを与え、これとマッチしたパターンにより補正を加
えるようにしたため、複数パターン間の位置合せが不要
となった。
As described above, according to the present invention,
The standard pattern used for pattern matching is not created by averaging many patterns cut out from the actual image at once, but first, a typical initial reference pattern is given and correction is performed using the pattern that matches this. Since it is added, the alignment between a plurality of patterns becomes unnecessary.

【0032】又、基準パターンの作成と実際のマッチン
グが同一処理であるため、実際にマッチングシステムを
運用しながら基準パターンを、より信頼性の高いものへ
改善でき、多くのパターンを手作業で切り出すことな
く、精度の高い基準パターンを作成できるという効果を
有する。
Further, since the creation of the reference pattern and the actual matching are the same processing, the reference pattern can be improved to a more reliable one while actually operating the matching system, and many patterns are cut out manually. This has the effect that a highly accurate reference pattern can be created.

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

【図1】本実施例の基準パターン作成装置の構成例を示
すブロック線図
FIG. 1 is a block diagram showing a configuration example of a reference pattern creating apparatus according to this embodiment.

【図2】本実施例の画像マッチングを示す説明図FIG. 2 is an explanatory diagram showing image matching according to the present embodiment.

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

16…初期パターン作成操作部 18…画像切り出し部 20…パターン記憶部 22…平均化演算部 24…基準パターン記憶部 26…マッチング部 28…閾値記憶部 16 ... Initial pattern creation operation unit 18 ... Image cutout unit 20 ... Pattern storage unit 22 ... Averaging calculation unit 24 ... Reference pattern storage unit 26 ... Matching unit 28 ... Threshold storage unit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】画像と基準パターンとのマッチングを行う
際に用いる基準パータンを作成する基準パターン作成装
置において、 初期基準パターンを作成する手段と、 マッチング処理対象と同一条件で入力された学習用画像
と前記初期基準パターンとのマッチングを行うマッチン
グ手段と、 前記マッチングにおいてマッチ度が一定値を越えた、前
記初期基準パターンと同一寸法、同一形状の部分画像
を、全て前記学習用画像から切り出す画像切り出し手段
と、 前記切り出された部分画像群の各画素位置毎に、全ての
部分画像の画素値を平均化する手段とを有し、 前記の各画素位置毎に平均化された画素値を、同一画素
位置の画素値とする基準パターンを作成することを特徴
とする基準パターン作成装置。
1. A reference pattern creating apparatus for creating a reference pattern used when matching an image with a reference pattern, a means for creating an initial reference pattern, and a learning image input under the same conditions as a matching processing target. And a matching unit for matching the initial reference pattern with the initial reference pattern, and an image cutout that cuts out all partial images having the same size and shape as the initial reference pattern, the matching degree of which exceeds a certain value in the matching, from the learning image. And a means for averaging the pixel values of all the partial images for each pixel position of the clipped partial image group, wherein the pixel values averaged for each pixel position are the same. A reference pattern creating apparatus, which creates a reference pattern having pixel values at pixel positions.
JP15776293A 1993-06-29 1993-06-29 Reference pattern preparation device Pending JPH0737085A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15776293A JPH0737085A (en) 1993-06-29 1993-06-29 Reference pattern preparation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15776293A JPH0737085A (en) 1993-06-29 1993-06-29 Reference pattern preparation device

Publications (1)

Publication Number Publication Date
JPH0737085A true JPH0737085A (en) 1995-02-07

Family

ID=15656766

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15776293A Pending JPH0737085A (en) 1993-06-29 1993-06-29 Reference pattern preparation device

Country Status (1)

Country Link
JP (1) JPH0737085A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102016013274A1 (en) 2015-11-06 2017-05-11 Fanuc Corporation IMAGE PROCESSING DEVICE AND METHOD FOR RECOGNIZING AN IMAGE OF AN OBJECT TO BE DETECTED FROM ENTRY DATA

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102016013274A1 (en) 2015-11-06 2017-05-11 Fanuc Corporation IMAGE PROCESSING DEVICE AND METHOD FOR RECOGNIZING AN IMAGE OF AN OBJECT TO BE DETECTED FROM ENTRY DATA
US11227144B2 (en) 2015-11-06 2022-01-18 Fanuc Corporation Image processing device and method for detecting image of object to be detected from input data

Similar Documents

Publication Publication Date Title
US6819796B2 (en) Method of and apparatus for segmenting a pixellated image
US20030053692A1 (en) Method of and apparatus for segmenting a pixellated image
US6661838B2 (en) Image processing apparatus for detecting changes of an image signal and image processing method therefor
US20040234124A1 (en) Stereo calibration apparatus and stereo image monitoring apparatus using the same
JP2005072888A (en) Image projection method and image projection device
JP2003271971A (en) Method for real-time discrimination and compensation for illuminance change in digital color image signal
JP3814353B2 (en) Image segmentation method and image segmentation apparatus
JPH0877362A (en) Image processor
JP4600019B2 (en) Imaging apparatus, image processing method, and program
CN110769225B (en) Projection area obtaining method based on curtain and projection device
US5825916A (en) Illuminant color detection
JPH08320990A (en) Vehicle number reader
JPH0737085A (en) Reference pattern preparation device
KR20030005276A (en) Method and apparatus for improving object boundaries extracted from stereoscopic images
JPH11306348A (en) Method and device for object detection
JP2501076B2 (en) Fastener-Automatic inspection method and inspection device
US6771804B1 (en) Method and apparatus for signal segmentation
JP2001222683A (en) Method and device for processing picture, device and method for recognizing character and storage medium
JP2957878B2 (en) Image processing device
JPH0592646A (en) Method for inspecting printed matter
EP3007106A1 (en) Method and apparatus for determining a detection of a defective object in an image sequence as a misdetection
JP2006048626A (en) Photography device, image processing method of photographed image and program
JP3548234B2 (en) Character recognition method and device
JP3095029B2 (en) Component positioning method
US7724940B2 (en) Method of accurately determining similarity between target image and reference image