JPH10162143A - Similarity calculating device - Google Patents

Similarity calculating device

Info

Publication number
JPH10162143A
JPH10162143A JP8323808A JP32380896A JPH10162143A JP H10162143 A JPH10162143 A JP H10162143A JP 8323808 A JP8323808 A JP 8323808A JP 32380896 A JP32380896 A JP 32380896A JP H10162143 A JPH10162143 A JP H10162143A
Authority
JP
Japan
Prior art keywords
similarity
density gradient
addition
model image
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.)
Pending
Application number
JP8323808A
Other languages
Japanese (ja)
Inventor
Yoshihiko Hisamori
芳彦 久森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP8323808A priority Critical patent/JPH10162143A/en
Publication of JPH10162143A publication Critical patent/JPH10162143A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To calculate the similarity of images at a high speed by adding an evaluated value, which has been weighted at the time of similarity calculation, to a corresponding pixel in the decreasing order of the density gradient of a model image, and then discontinuing the adding process in its early stage. SOLUTION: A similarity calculation part 7 calculates the similarity by using the density gradient intensity and density gradient direction of the model image, which are previously calculated by a density gradient intensity calculation part 6 and density gradient direction calculation part 5 and stored in a memory 4 and the density gradient direction of an input image. In this case, a value that evaluates a difference in density gradient direction is found, the evaluation value is weighted by the density gradient intensity value of a pixel obtained from the model image, and the weighted evaluation values is added other corresponding pixel in the decreasing order of the density gradient intensity of the model image to calculate halfway similarity. According to the result obtained by comparing the halfway similarity in the middle of the addition with a previously set threshold value, the addition is discontinued and on the basis of the current halfway similarity, similarity is calculated.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、モデル画像に対し
て入力画像の類似度を算出する類似度算出装置に関す
る。
[0001] 1. Field of the Invention [0002] The present invention relates to a similarity calculating apparatus for calculating the similarity of an input image to a model image.

【0002】[0002]

【従来の技術】従来、照明変動に対して影響の少ない濃
淡画像同士の類似度を算出する方法として、正規化相互
相関が知られており、この正規化相互相関を用いた画像
処理装置がある。この正規化相互相関を求める手法は、
濃度階調の移動や伸縮の下で不変なマッチング方法であ
る。しかし、シェーディングや背景変化等、モデル画像
と入力画像との間に線形変換関係が成り立たない場合に
おいては、モデル画像と入力画像の共分散に対する各標
準偏差の積の比が大きくなることにより、類似度が小さ
くなり、安定したパターン認識ができないという問題点
がある。
2. Description of the Related Art Conventionally, a normalized cross-correlation has been known as a method of calculating the similarity between gray-scale images having little effect on illumination fluctuations. . The technique for finding this normalized cross-correlation is
This is a matching method that does not change under the movement or expansion and contraction of the density gradation. However, when a linear transformation relationship is not established between the model image and the input image due to shading, background change, or the like, the similarity is increased by increasing the ratio of the product of each standard deviation to the covariance of the model image and the input image. However, there is a problem that the degree of reduction is small and stable pattern recognition cannot be performed.

【0003】このような問題点を解決するために、本願
出願人は先に類似度算出装置を発明した(特願平8−1
20278号)。この類似度算出装置は、図12に示す
ように、アドレス/データバス1、CPU2、画像メモ
リ3、メモリ4、濃度勾配方向算出部5、濃度勾配強度
算出部6、類似度算出部7、加算打ち切りしきい値算出
部8を備える。
In order to solve such a problem, the present applicant has previously invented a similarity calculating apparatus (Japanese Patent Application No. Hei 8-1).
No. 20278). As shown in FIG. 12, the similarity calculating device includes an address / data bus 1, a CPU 2, an image memory 3, a memory 4, a density gradient direction calculator 5, a density gradient intensity calculator 6, a similarity calculator 7, an addition It includes a termination threshold calculation unit 8.

【0004】この装置における類似度Rは、モデル画像
の各画素における濃度勾配方向Mθ(x,y)、モデル
画像の各画素おける濃度勾配強度MW (x,y)、及び
入力画像の各画素における濃度勾配方向Iθ(x,y)
の大きさをmx×myとすると(図13参照)、次の数
式1により算出される。
[0004] The similarity R in this device is determined by the density gradient direction Mθ (x, y) at each pixel of the model image, the density gradient intensity M W (x, y) at each pixel of the model image, and each pixel of the input image. Gradient direction Iθ (x, y) at
Is mx × my (see FIG. 13), it is calculated by the following equation 1.

【0005】[0005]

【数1】 (Equation 1)

【0006】又、モデル画像と入力画像の各々の濃度勾
配方向の方向差を評価する関数としては、以下の数式
2,3がある。
The following expressions 2 and 3 are provided as functions for evaluating the difference in the direction of the density gradient between the model image and the input image.

【0007】[0007]

【数2】 (Equation 2)

【0008】[0008]

【数3】 (Equation 3)

【0009】実際の類似度の算出に当たっては、上記数
式1を数式4のように変形する。
In calculating the actual similarity, the above equation (1) is modified as shown in equation (4).

【0010】[0010]

【数4】 (Equation 4)

【0011】ここで、x,yとiとの間にはi=mx×
y+xという関係がある。これは、図13に示すように
モデル画像の左上から右下に向かって順に1行ずつ、モ
デル画像の大きさmx×my回、数式5を加算していく
ことを示している。
Here, i = mx × between x, y and i.
There is a relationship of y + x. This indicates that, as shown in FIG. 13, the equation 5 is added by mx × my times the size of the model image one line at a time from the upper left to the lower right of the model image.

【0012】[0012]

【数5】 (Equation 5)

【0013】ところで、この種の類似度算出装置には、
マークや文字等のパターン認識をリアルタイムで行える
ように類似度の算出を高速に行うことが要求されている
が、それには数式5の加算回数を削減する必要がある。
例えば、類似度が或るしきい値を越えることが確実であ
るならば、或いは越えないことが確実であるならば、正
確な値を算出する必要がない場合に、 (A)類似度Rが予め設定しておいたしきい値θ1 を越
えることが保証された時点で、数式5の加算を打ち切
る。 (B)類似度Rが予め設定しておいたしきい値θ2 を越
えないことが保証された時点で、数式5の加算を打ち切
る。 という手法が考えられる。上記装置は、加算打ち切りし
きい値算出部8を備えるが、この加算打ち切りしきい値
算出部8はそのような手法を採り入れたものである。即
ち、数式5の加算をk回行った時点での途中類似度r
(k)は数式6で表される。
By the way, this kind of similarity calculating device includes:
It is required that the similarity be calculated at high speed so that pattern recognition of marks, characters, and the like can be performed in real time. To this end, it is necessary to reduce the number of times of addition of Expression 5.
For example, if it is certain that the similarity exceeds a certain threshold, or if it is certain that the similarity does not exceed a certain threshold, it is not necessary to calculate an accurate value. Once it has been assured that exceeds the threshold theta 1 set in advance, discontinue the addition of equation 5. (B) at the time that the similarity R does not exceed the threshold theta 2 that has been set in advance is guaranteed, discontinue the addition of Equation 5. There is a method that can be considered. The above-described device includes the addition cutoff threshold value calculation unit 8, and the addition cutoff threshold value calculation unit 8 adopts such a method. That is, the similarity r at the time when the addition of Expression 5 is performed k times.
(K) is represented by Equation 6.

【0014】[0014]

【数6】 (Equation 6)

【0015】この途中類似度r(k)が数式7のΘ
1 (k)より大きい場合、類似度R〔=r(mx×my
+1)〕がしきい値θ1 を越えることが保証される〔上
記(A)の手法〕。同様にして、途中類似度r(k)が
数式8のΘ2 (k)より小さい場合、類似度R〔=r
(mx×my+1)〕がしきい値θ2 を越えないことが
保証される〔上記(B)の手法〕。
The intermediate similarity r (k) is expressed by
1 (k), the similarity R [= r (mx × my
+1)] exceeds the threshold value θ 1 [the method (A)]. Similarly, if the intermediate similarity r (k) is smaller than Θ 2 (k) in Equation 8, the similarity R [= r
(Mx × my + 1)] is guaranteed not to exceed the threshold value θ 2 [the method (B)].

【0016】[0016]

【数7】 (Equation 7)

【0017】[0017]

【数8】 (Equation 8)

【0018】従って、数式5の加算が途中で打ち切られ
れば、加算回数がモデル画像の大きさmx×my回以内
になることが分かる。
Therefore, it can be understood that if the addition of Expression 5 is interrupted in the middle, the number of additions will be within the size mx × my times of the model image.

【0019】[0019]

【発明が解決しようとする課題】上記装置では、加算打
ち切りしきい値算出部8により加算回数を削減できるよ
うになったが、それでも特にモデル画像の大きさmx,
myが大きくなると、類似度の算出が高速で行えないと
いう問題点がある。従って、本発明は、そのような従来
の問題点に着目してなされたもので、類似度の算出を高
速に行うことができる類似度算出装置を提供することを
目的としている。
In the above apparatus, the number of times of addition can be reduced by the addition cutoff threshold value calculating section 8. However, the size of the model image mx,
When my becomes large, there is a problem that similarity cannot be calculated at high speed. Accordingly, the present invention has been made in view of such a conventional problem, and an object of the present invention is to provide a similarity calculating apparatus capable of calculating the similarity at high speed.

【0020】[0020]

【課題を解決するための手段】前記目的を達成するため
に、本発明の請求項1の類似度算出装置は、モデル画像
及び入力画像の各画素における濃度勾配方向を求める濃
度勾配方向算出手段と、モデル画像の各画素における濃
度勾配強度を求める濃度勾配強度算出手段と、モデル画
像の濃度勾配強度を大きい順に抽出する濃度勾配強度抽
出手段と、モデル画像の濃度勾配方向と入力画像の濃度
勾配方向との間で、濃度勾配方向の差異を評価する値を
求める濃度勾配方向評価値算出手段と、この評価値に前
記モデル画像より得られる当該画素の濃度勾配強度値で
重み付けする重み付け手段と、重み付けした評価値を、
前記モデル画像の濃度勾配強度の大きい順に対応画素に
従って加算して途中類似度を算出する加算手段と、加算
途中の途中類似度と予め設定したしきい値とを比較した
結果に基づいて加算を打ち切る加算打ち切り判定手段
と、加算が打ち切られた時点での途中類似度に基づいて
類似度を算出する手段とを備えることを特徴とする。
According to another aspect of the present invention, there is provided a similarity calculating apparatus according to the present invention, comprising: a density gradient direction calculating means for determining a density gradient direction in each pixel of a model image and an input image; Density gradient intensity calculating means for calculating the density gradient intensity at each pixel of the model image; density gradient intensity extracting means for extracting the density gradient intensity of the model image in descending order; the density gradient direction of the model image and the density gradient direction of the input image A density gradient direction evaluation value calculating means for calculating a value for evaluating a difference in a density gradient direction between the image processing apparatus; a weighting means for weighting the evaluation value with a density gradient intensity value of the pixel obtained from the model image; The evaluation value
An adding means for calculating an intermediate similarity by adding in accordance with the corresponding pixels in descending order of the density gradient intensity of the model image, and terminating the addition based on a result of comparing the intermediate similarity during the addition with a preset threshold value It is characterized by comprising an addition discontinuation determining means and a means for calculating a similarity based on an intermediate similarity at the time when the addition is discontinued.

【0021】この装置では、類似度算出時に、重み付け
した評価値をモデル画像の濃度勾配強度の大きい順に対
応画素に従って加算していくので、予め必要な類似度の
範囲(所定のしきい値)を設定しておけば、従来の装置
より加算処理の打ち切りが早い段階で行われ、類似度を
高速に算出できるようになる。
In this apparatus, when calculating the similarity, the weighted evaluation values are added in accordance with the corresponding pixels in descending order of the density gradient strength of the model image, so that the necessary similarity range (predetermined threshold value) is set in advance. If it is set, the addition process is terminated earlier than in the conventional device, and the similarity can be calculated at a higher speed.

【0022】[0022]

【発明の実施の形態】以下、本発明を実施の形態に基づ
いて説明する。一実施形態に係る類似度算出装置の構成
を図1にブロック図で示す。この装置は、図12に示す
従来の装置に濃度勾配強度整列部(濃度勾配強度抽出手
段)15を付加したものである。即ち、この装置は、ア
ドレス/データバス1、CPU2、画像メモリ3、メモ
リ4、濃度勾配方向算出部5、濃度勾配強度算出部6、
類似度算出部7、加算打ち切りしきい値算出部8、濃度
勾配強度整列部15を備え、図1には示していないが、
更に撮像用のカメラ、A/Dコンバータ、D/Aコンバ
ータ、CRTディスプレイ等も備える。濃度勾配強度整
列部15は、モデル画像の濃度勾配強度を大きい順に抽
出するものである。類似度算出部7は、図2に示すよう
に、重み和算出部9、減算部10、方向差評価部11、
積和演算部12、加算打ち切り判定部13、除算部14
を備える。各モジュール間のデータの受渡しは、アドレ
ス/データバス1を通じて行われ、各モジュールの起動
コマンド発行は、CPU2により行われる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below based on embodiments. FIG. 1 is a block diagram showing a configuration of a similarity calculation device according to an embodiment. This device is obtained by adding a concentration gradient intensity aligning section (concentration gradient intensity extraction means) 15 to the conventional device shown in FIG. That is, the apparatus comprises an address / data bus 1, a CPU 2, an image memory 3, a memory 4, a density gradient direction calculator 5, a density gradient intensity calculator 6,
It includes a similarity calculation unit 7, an addition cutoff threshold calculation unit 8, and a density gradient strength alignment unit 15, which are not shown in FIG.
Further, it is provided with an imaging camera, an A / D converter, a D / A converter, a CRT display, and the like. The density gradient strength alignment unit 15 extracts the density gradient strengths of the model images in descending order. As shown in FIG. 2, the similarity calculation unit 7 includes a weight sum calculation unit 9, a subtraction unit 10, a direction difference evaluation unit 11,
Product-sum operation unit 12, addition discontinuation determination unit 13, division unit 14
Is provided. The transfer of data between the modules is performed via the address / data bus 1, and the activation command issuance of each module is performed by the CPU 2.

【0023】この類似度算出装置では、カメラから出力
されたアナログ映像信号はタイミング信号に同期してA
/Dコンバータでデジタル信号に変換された後、画像メ
モリ3に記憶される。画像メモリ3に取り込まれた画像
(図5の入力画像1参照)は、D/Aコンバータを通じ
てアナログ信号に変換された後、CRTディスプレイに
表示される。一方、画像メモリ3に取り込まれた画像
は、濃度勾配方向算出部5において濃度勾配方向に変換
され、メモリ4に記憶される。類似度算出部7におい
て、予め濃度勾配強度算出部6及び濃度勾配方向算出部
5で算出され、メモリ4に記憶されているモデル画像の
濃度勾配強度(図6)及び濃度勾配方向(図7)と入力
画像の濃度勾配方向(図8)とを用いて類似度が算出さ
れる。この類似度の算出は後述する。
In this similarity calculation device, an analog video signal output from a camera is synchronized with a timing signal to generate an analog video signal.
After being converted into a digital signal by the / D converter, it is stored in the image memory 3. The image fetched into the image memory 3 (see input image 1 in FIG. 5) is converted into an analog signal through a D / A converter, and then displayed on a CRT display. On the other hand, the image taken in the image memory 3 is converted in the density gradient direction by the density gradient direction calculation unit 5 and stored in the memory 4. In the similarity calculator 7, the density gradient intensity (FIG. 6) and the density gradient direction (FIG. 7) of the model image previously calculated by the density gradient intensity calculator 6 and the density gradient direction calculator 5 and stored in the memory 4 are stored. And the density gradient direction of the input image (FIG. 8) to calculate the similarity. The calculation of the similarity will be described later.

【0024】類似度算出部7では、モデル画像の濃度勾
配方向及び濃度勾配強度と入力画像の濃度勾配方向の大
きさを図13のように(mx,my)とし、モデル画像
の濃度勾配方向をMθ(x,y)、濃度勾配強度をMW
(x,y)、入力画像の濃度勾配方向をIθ(x,y)
とし、前記したように数式1、その変形式の数式4を用
いて類似度Rが算出される。
The similarity calculation unit 7 sets the density gradient direction and density gradient intensity of the model image and the magnitude of the density gradient direction of the input image to (mx, my) as shown in FIG. Mθ (x, y), the intensity of the concentration gradient is M W
(X, y), the direction of the density gradient of the input image is Iθ (x, y)
As described above, the similarity R is calculated using Expression 1 and Expression 4 as a modified expression thereof.

【0025】ここで、入力画像の濃度勾配方向Iθ
(x,y)と、モデル画像の濃度勾配方向Mθ(x,
y)の差値の評価値を濃度勾配方向の差の余弦とすれ
ば、数式2が成立する。又、評価値として、濃度勾配方
向の差が0°を含む±45°までの範囲内であれば1と
し、±(45°〜135°)の場合は0とし、±(13
5°〜180°)の場合は−1とすれば、数式3が成立
する。
Here, the density gradient direction Iθ of the input image
(X, y) and the density gradient direction Mθ (x,
Assuming that the evaluation value of the difference value of y) is the cosine of the difference in the density gradient direction, Expression 2 is satisfied. The evaluation value is set to 1 if the difference in the concentration gradient direction is within a range of ± 45 ° including 0 °, 0 if ± (45 ° to 135 °), and ± (13
In the case of (5 ° to 180 °), if −1 is set, Expression 3 is established.

【0026】画像メモリ3に記憶されている入力画像の
濃度勾配方向Iθ(x,y)と、メモリ4に記憶されて
いるモデル画像の濃度勾配強度MW (x,y)及び濃度
勾配方向Mθ(x,y)とが、アドレス/データバス1
を通じて類似度算出部7に取り込まれる。重み和算出部
9において、モデル画像の濃度勾配強度MW (x,y)
の総和(数式1、数式4の分母式)が算出される。又、
減算部10において、入力画像の濃度勾配方向Iθ
(x,y)とモデル画像の濃度勾配方向Mθ(x,y)
との差〔Iθ(x,y)−Mθ(x,y)〕が算出され
る。方向差評価部11において、f{Iθ(x,y)−
Mθ(x,y)}が算出され、積和演算部12におい
て、数式1や数式4の分子式が算出される。そして、加
算打ち切り判定部13において、加算を打ち切るか否か
の判定が行われ、更に除算部14において、類似度Rが
算出される。
The density gradient direction Iθ (x, y) of the input image stored in the image memory 3, the density gradient intensity M W (x, y) and the density gradient direction Mθ of the model image stored in the memory 4. (X, y) is the address / data bus 1
Is input to the similarity calculation unit 7 through In the weight sum calculation unit 9, the density gradient intensity M W (x, y) of the model image
(The denominator of Expressions 1 and 4) is calculated. or,
In the subtraction unit 10, the density gradient direction Iθ of the input image
(X, y) and the density gradient direction Mθ (x, y) of the model image
(Iθ (x, y) −Mθ (x, y)) is calculated. In the direction difference evaluation unit 11, f {Iθ (x, y) −
Mθ (x, y)} is calculated, and the product-sum operation unit 12 calculates the molecular formulas of Expressions 1 and 4. Then, the addition discontinuation determination unit 13 determines whether or not to terminate the addition, and the division unit 14 calculates the similarity R.

【0027】次に、類似度の算出処理について図3のフ
ロー図を参照して説明する。このフロー図は、前記した
(A)、(B)の手法を採り入れたもので、それぞれS
T3,ST4がその処理に対応する。ここでは、一例と
して類似度Rが0.8より大きいとき、又は0.6より
小さいとき、その正確な値を必要としない場合について
説明する。なお、モデル画像と入力画像の濃度勾配方向
の方向差を評価する関数は、数式3を用い、(A)の場
合のしきい値θ1 は0.8、(B)の場合のしきい値θ
2 は0.6になる。
Next, the process of calculating the similarity will be described with reference to the flowchart of FIG. This flow chart adopts the methods (A) and (B) described above,
T3 and ST4 correspond to the processing. Here, as an example, a case will be described in which when the similarity R is larger than 0.8 or smaller than 0.6, an accurate value is not required. The function for evaluating the difference in the direction of the density gradient between the model image and the input image is represented by Expression 3, where the threshold θ 1 in the case of (A) is 0.8 and the threshold in the case of (B) is 0.8. θ
2 becomes 0.6.

【0028】まず、図4の画像1をモデル画像とし、図
5の画像2を入力画像1とする。この例では、入力画像
1はモデル画像との類似が大きい画像の場合である。こ
れらの画像1,2は画像メモリ3に記憶されている。図
6、図7は、それぞれ画像1(モデル画像)の濃度勾配
強度、濃度勾配方向を示している。濃度勾配方向におけ
るNDは、その箇所(画素)で方向がないことを示して
いる。なお、濃度勾配強度、濃度勾配方向の算出にはソ
ーベル(Sobel)のオペレータを用いた。又、図8
は、画像2(入力画像1)の濃度勾配方向を示してい
る。これらの濃度勾配方向、濃度勾配強度の算出は、そ
れぞれ濃度勾配方向算出部5、濃度勾配強度算出部6で
行われる。
First, let image 1 in FIG. 4 be a model image and image 2 in FIG. In this example, the input image 1 is an image having a large similarity to the model image. These images 1 and 2 are stored in the image memory 3. 6 and 7 show the density gradient intensity and the density gradient direction of the image 1 (model image), respectively. ND in the density gradient direction indicates that there is no direction at that location (pixel). The Sobel operator was used to calculate the density gradient strength and the density gradient direction. FIG.
Indicates the density gradient direction of the image 2 (input image 1). The calculation of the density gradient direction and the density gradient intensity is performed by the density gradient direction calculation unit 5 and the density gradient intensity calculation unit 6, respectively.

【0029】更に、濃度勾配強度整列部15は、濃度勾
配強度算出部6で算出されたモデル画像の濃度勾配強度
(図6)を大きい順に抽出し、その順に0,1,2,
…,63と左上から右下に向かって順番を付ける。その
結果を図11に示す。この順番の対応画素に従って、数
式5による加算が行われる。予め、算出されたモデル画
像の濃度勾配強度の値により、加算打ち切りしきい値算
出部8において、(A)、(B)の加算打ち切りのため
の2種類のしきい値が算出され、メモリ4に記憶されて
いる。実際の類似度算出は、類似度算出部7で行われ
る。まず、ステップ(以下、STと略す)1において、
変数i,rの初期化が行われる。これらの変数i,rは
メモリ4に記憶されている。ST2における数式5の加
算は、減算部10、方向差評価部11、積和演算部12
で、図11の加算順序に従って行われる。
Further, the density gradient intensity aligning section 15 extracts the density gradient intensities (FIG. 6) of the model image calculated by the density gradient intensity calculating section 6 in descending order.
..., 63, and so on, from the upper left to the lower right. The result is shown in FIG. According to the corresponding pixels in this order, the addition according to Expression 5 is performed. Based on the calculated value of the density gradient intensity of the model image, the addition cutoff threshold calculator 8 calculates two types of thresholds for the addition cutoff of (A) and (B), and the memory 4 Is stored in The actual similarity calculation is performed by the similarity calculator 7. First, in step (hereinafter abbreviated as ST) 1,
Initialization of variables i and r is performed. These variables i and r are stored in the memory 4. The addition of Expression 5 in ST2 includes a subtraction unit 10, a direction difference evaluation unit 11, a product-sum operation unit 12
This is performed according to the addition order in FIG.

【0030】ST3では、数式5によって加算した途中
類似度rが予め設定したしきい値θ 1 (ここでは0.
8)以下であるか否かを(しきい値θ1 より大きいかど
うかを)判定し、ST4では、途中類似度rが予め設定
したしきい値θ2 (ここでは0.6)以上であるか否か
を(しきい値θ2 より小さいかどうかを)判定する。S
T3,4の判定が共にYESの場合、即ち0.6<r<
0.8の場合、変数iをi+1とし(ST5)、その変
数iがモデル画像の大きさmx×myより大きいかどう
かを判定し(ST6)、YESならば次のST7の類似
度Rの算出に移り、NOならばST2〜ST6の処理を
繰り返す。
In ST3, the addition is performed in accordance with the equation (5).
The similarity r is set to a predetermined threshold θ 1(Here, 0.
8) It is determined whether or not (threshold value θ)1Greater than
In ST4, the similarity r in the middle is set in advance.
Threshold θTwo(Here 0.6) or not
(Threshold θTwoIs smaller than). S
When the determinations of T3 and T4 are both YES, that is, 0.6 <r <
In the case of 0.8, the variable i is set to i + 1 (ST5),
Whether the number i is greater than the model image size mx × my
(ST6), and if YES, similarity to the next ST7
Move to the calculation of the degree R, and if NO, perform the processing of ST2 to ST6.
repeat.

【0031】ST3又はST4でNOとなれば、即ちr
>0.8又はr<0.6となれば、類似度Rがしきい値
θ1 を越えること、又はしきい値θ2 を越えないことが
保証されたことになるので、その時点で加算を打ち切
り、ST7の類似度Rの算出に移る。この加算の打ち切
り判定は、メモリ4に記憶されたしきい値θ1 ,θ2
より、加算打ち切り判定部13で行われる。
If NO in ST3 or ST4, that is, r
If a> 0.8 or r <0.6, the similarity R exceeds the threshold theta 1, or because it would have been guaranteed not to exceed the threshold theta 2, the addition at which time , And the process proceeds to the calculation of the similarity R in ST7. The addition termination determination is performed by the addition termination determination unit 13 based on the threshold values θ 1 and θ 2 stored in the memory 4.

【0032】ST7では、除算部14において、加算が
打ち切られた時点での途中類似度rを、重み和算出部9
で算出されたモデル画像の濃度勾配強度の総和で除算す
ることにより、類似度Rを算出し、処理を終了する。こ
の類似度算出処理では、具体的には図11の加算順序に
従ってST2の加算を行うと、加算が40回行われた時
点でST3の判定がNOになり、加算の打ち切りが行わ
れる。又、図4の画像1をモデル画像とし、このモデル
画像との類似が小さい図9の画像3を入力画像2とした
場合、画像3の濃度勾配方向は図10のようになり、同
様に図11の加算順序に従ってST2の加算が行われる
と、加算が12回行われた時点でST4の判定がNOに
なり、加算の打ち切りが行われる。
In ST7, the division unit 14 calculates the intermediate similarity r at the point in time when the addition is terminated by the weight sum calculation unit 9.
The similarity R is calculated by dividing by the sum of the density gradient intensities of the model images calculated in the above, and the processing is terminated. In this similarity calculation process, specifically, when ST2 is added in accordance with the addition order in FIG. 11, the determination in ST3 becomes NO when the addition is performed 40 times, and the addition is stopped. When the image 1 in FIG. 4 is a model image and the image 3 in FIG. 9 having a small similarity to the model image is the input image 2, the density gradient direction of the image 3 is as shown in FIG. When the addition of ST2 is performed according to the addition order of 11, the determination of ST4 becomes NO when the addition is performed 12 times, and the addition is stopped.

【0033】これに対して、従来の装置(重み付けした
評価値をモデル画像の濃度勾配強度の大きい順に対応画
素に従って加算しない)の場合、画像1をモデル画像と
し、画像2を入力画像1とすると、ST2の加算が60
回行われた時点でST3の判定がNOになり、加算の打
ち切りが行われる。又、画像1をモデル画像とし、画像
3を入力画像2とすると、ST2の加算が25回行われ
た時点でST4の判定がNOになり、加算の打ち切りが
行われる。
On the other hand, in the case of the conventional apparatus (weighted evaluation values are not added in accordance with the corresponding pixels in the order of increasing density gradient strength of the model image), if image 1 is a model image and image 2 is an input image 1, , ST2 is 60
At this time, the determination in ST3 is NO, and the addition is stopped. If the image 1 is a model image and the image 3 is an input image 2, the determination in ST4 becomes NO when the addition of ST2 is performed 25 times, and the addition is stopped.

【0034】このように、加算順序を決めて加算を行う
ことで、前者の場合は加算回数が60回から40回に減
り、後者の場合は加算回数が25回から12回に減る。
従って、加算の打ち切りが従来の装置より早い段階で行
われるため、それだけ類似度の算出を高速に行うことが
できる。この類似度の算出の高速化は、モデル画像の大
きさmx,myが大きくなるほど顕著となる。
As described above, by performing the addition in a predetermined order, the number of additions is reduced from 60 to 40 in the former case, and the number of additions is reduced from 25 to 12 in the latter case.
Therefore, since the addition is discontinued earlier than in the conventional apparatus, the similarity can be calculated at a higher speed. The speeding up of the similarity calculation becomes more remarkable as the sizes mx and my of the model image become larger.

【0035】上記実施形態では、途中類似度が予め設定
したしきい値を越えること、又は越えないことが保証さ
れた時点で、加算処理を打ち切っているが、予め設定し
たしきい値を越えることのみが保証された時点で、或い
は予め設定したしきい値を越えないことのみが保証され
た時点で、加算処理を打ち切るようにしてもよい。勿
論、実施形態で取り上げたモデル画像及び入力画像は一
例に過ぎず、様々なマーク、文字、図形等をその大小
(画素数)にかかわらず対象とすることができ、それら
のパターンの認識に利用することができる。又、予め設
定しておくしきい値も適宜変更すればよい。
In the above embodiment, the addition process is terminated when the similarity on the way exceeds the preset threshold value or when it is guaranteed that the similarity does not exceed the preset threshold value. The addition process may be terminated at the time when only the value is guaranteed or when only the value that does not exceed the preset threshold value is guaranteed. Of course, the model image and the input image described in the embodiment are merely examples, and various marks, characters, figures, and the like can be targeted regardless of their size (number of pixels), and are used for recognizing those patterns. can do. Also, the preset threshold value may be changed as appropriate.

【0036】[0036]

【発明の効果】以上説明したように、本発明の請求項1
の類似度算出装置は、類似度算出時に、重み付けした評
価値をモデル画像の濃度勾配強度の大きい順に対応画素
に従って加算していくので、予め必要な類似度の範囲を
設定しておけば、従来の装置より加算処理の打ち切りが
早い段階で行われ、類似度を高速に算出できる。特に、
モデル画像が大きいほど、類似度の算出の高速化が顕著
となる。
As described above, according to the first aspect of the present invention,
When calculating the similarity, the similarity calculation device adds the weighted evaluation values in accordance with the corresponding pixels in descending order of the density gradient strength of the model image. The addition processing is discontinued earlier than the apparatus described above, and the similarity can be calculated at high speed. Especially,
The larger the model image is, the more remarkable the calculation of the similarity becomes.

【0037】又、請求項2によれば、類似度が正規化で
きるので、複数のモデルとのマッチングを取るのに類似
度を絶対値として評価できる。
According to the second aspect, since the similarity can be normalized, the similarity can be evaluated as an absolute value for matching with a plurality of models.

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

【図1】一実施形態に係る類似度算出装置の構成を示す
ブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a similarity calculation device according to an embodiment.

【図2】同実施形態の類似度算出装置における類似度算
出部の構成を示すブロック図である。
FIG. 2 is a block diagram showing a configuration of a similarity calculation unit in the similarity calculation device of the embodiment.

【図3】同実施形態の類似度算出装置における類似度算
出処理を説明するフロー図である。
FIG. 3 is a flowchart illustrating a similarity calculation process in the similarity calculation device of the embodiment.

【図4】モデル画像(画像1)の一例を示す図である。FIG. 4 is a diagram illustrating an example of a model image (image 1).

【図5】モデル画像との類似が大きい入力画像1(画像
2)の一例を示す図である。
FIG. 5 is a diagram showing an example of an input image 1 (image 2) having a large similarity to a model image.

【図6】図4のモデル画像の濃度勾配強度を示す図であ
る。
FIG. 6 is a diagram showing a density gradient intensity of the model image of FIG. 4;

【図7】図4のモデル画像の濃度勾配方向を示す図であ
る。
FIG. 7 is a diagram illustrating a density gradient direction of the model image of FIG. 4;

【図8】図5の入力画像1の濃度勾配方向を示す図であ
る。
8 is a diagram showing a density gradient direction of the input image 1 of FIG.

【図9】モデル画像との類似が小さい入力画像2(画像
3)の一例を示す図である。
FIG. 9 is a diagram illustrating an example of an input image 2 (image 3) having a small similarity to a model image.

【図10】図9の入力画像2の濃度勾配方向を示す図で
ある。
FIG. 10 is a diagram illustrating a density gradient direction of the input image 2 of FIG. 9;

【図11】図4のモデル画像の濃度勾配強度を大きい順
に抽出して順番を付けた加算順序を示す図である。
11 is a diagram illustrating an addition order in which the density gradient intensities of the model image in FIG.

【図12】従来例に係る類似度算出装置の構成を示すブ
ロック図である。
FIG. 12 is a block diagram illustrating a configuration of a similarity calculation device according to a conventional example.

【図13】モデル画像の大きさ(mx×my)と同従来
の装置での加算順序を示す図である。
FIG. 13 is a diagram showing the size (mx × my) of a model image and the order of addition in the conventional device.

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

1 アドレス/データバス 2 CPU 3 画像メモリ 4 メモリ 5 濃度勾配方向算出部 6 濃度勾配強度算出部 7 類似度算出部 8 加算打ち切りしきい値算出部 13 加算打ち切り判定部 14 除算部 15 濃度勾配強度整列部(濃度勾配強度抽出手段) DESCRIPTION OF SYMBOLS 1 Address / data bus 2 CPU 3 Image memory 4 Memory 5 Density gradient direction calculation part 6 Density gradient strength calculation part 7 Similarity calculation part 8 Addition cutoff threshold value calculation part 13 Addition cutoff determination part 14 Division part 15 Density gradient strength alignment Part (concentration gradient strength extraction means)

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】モデル画像及び入力画像の各画素における
濃度勾配方向を求める濃度勾配方向算出手段と、モデル
画像の各画素における濃度勾配強度を求める濃度勾配強
度算出手段と、モデル画像の濃度勾配強度を大きい順に
抽出する濃度勾配強度抽出手段と、モデル画像の濃度勾
配方向と入力画像の濃度勾配方向との間で、濃度勾配方
向の差異を評価する値を求める濃度勾配方向評価値算出
手段と、この評価値に前記モデル画像より得られる当該
画素の濃度勾配強度値で重み付けする重み付け手段と、
重み付けした評価値を、前記モデル画像の濃度勾配強度
の大きい順に対応画素に従って加算して途中類似度を算
出する加算手段と、加算途中の途中類似度と予め設定し
たしきい値とを比較した結果に基づいて加算を打ち切る
加算打ち切り判定手段と、加算が打ち切られた時点での
途中類似度に基づいて類似度を算出する手段とを備える
ことを特徴とする類似度算出装置。
1. A density gradient direction calculating means for determining a density gradient direction at each pixel of a model image and an input image; a density gradient intensity calculating means for determining a density gradient intensity at each pixel of a model image; Density gradient intensity extraction means for extracting the density gradient direction of the model image from the density gradient direction of the model image and the density gradient direction of the input image, density gradient direction evaluation value calculation means for obtaining a value for evaluating the difference in the density gradient direction, Weighting means for weighting the evaluation value with a density gradient intensity value of the pixel obtained from the model image;
An adding means for calculating the intermediate similarity by adding the weighted evaluation values in accordance with the corresponding pixels in order of the density gradient intensity of the model image, and comparing the intermediate similarity during the addition with a preset threshold value A similarity calculation device comprising: an addition discontinuation determination unit that terminates the addition based on the similarity; and a unit that calculates the similarity based on the halfway similarity at the time when the addition is terminated.
【請求項2】前記類似度を算出する手段は、加算打ち切
り判定手段により加算が打ち切られた時点での途中類似
度をモデル画像の濃度勾配強度の総和で除算することに
より類似度を算出する除算手段であることを特徴とする
請求項1記載の類似度算出装置。
And means for calculating the similarity by dividing the intermediate similarity at the time when the addition has been discontinued by the addition discontinuation determining means by the sum of the density gradient intensities of the model images. 2. The similarity calculating device according to claim 1, wherein the similarity calculating device is a means.
【請求項3】前記加算打ち切り判定手段は、途中類似度
が予め設定したしきい値を越えることが保証された時点
で加算を打ち切ることを特徴とする請求項1記載の類似
度算出装置。
3. The similarity calculating apparatus according to claim 1, wherein said addition discontinuation judging means terminates the addition at a point in time when it is guaranteed that the intermediate similarity exceeds a preset threshold value.
【請求項4】前記加算打ち切り判定手段は、途中類似度
が予め設定したしきい値を越えないことが保証された時
点で加算を打ち切ることを特徴とする請求項1記載の類
似度算出装置。
4. The similarity calculating apparatus according to claim 1, wherein said addition discontinuation judging means terminates the addition when it is guaranteed that the intermediate similarity does not exceed a preset threshold value.
【請求項5】前記加算打ち切り判定手段は、途中類似度
が予め設定したしきい値を越えるか又は越えないことが
保証された時点で加算を打ち切ることを特徴とする請求
項1記載の類似度算出装置。
5. The similarity degree according to claim 1, wherein said addition termination determination means terminates the addition when it is guaranteed that the halfway similarity exceeds or does not exceed a preset threshold value. Calculation device.
JP8323808A 1996-12-04 1996-12-04 Similarity calculating device Pending JPH10162143A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8323808A JPH10162143A (en) 1996-12-04 1996-12-04 Similarity calculating device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8323808A JPH10162143A (en) 1996-12-04 1996-12-04 Similarity calculating device

Publications (1)

Publication Number Publication Date
JPH10162143A true JPH10162143A (en) 1998-06-19

Family

ID=18158845

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8323808A Pending JPH10162143A (en) 1996-12-04 1996-12-04 Similarity calculating device

Country Status (1)

Country Link
JP (1) JPH10162143A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009218241A (en) * 2008-03-07 2009-09-24 Hitachi High-Technologies Corp Device and method for inspecting circuit pattern
WO2010032297A1 (en) * 2008-09-17 2010-03-25 富士通株式会社 Image processing device, image processing method, and image processing program
WO2013136603A1 (en) * 2012-03-15 2013-09-19 オムロン株式会社 Image matching method and image matching device and program using such method
CN111222567A (en) * 2020-01-03 2020-06-02 长江存储科技有限责任公司 Method and apparatus for similarity analysis of nitride density

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009218241A (en) * 2008-03-07 2009-09-24 Hitachi High-Technologies Corp Device and method for inspecting circuit pattern
WO2010032297A1 (en) * 2008-09-17 2010-03-25 富士通株式会社 Image processing device, image processing method, and image processing program
JP4791598B2 (en) * 2008-09-17 2011-10-12 富士通株式会社 Image processing apparatus and image processing method
US8509539B2 (en) 2008-09-17 2013-08-13 Fujitsu Limited Image processing apparatus and image processing method
US8818104B2 (en) 2008-09-17 2014-08-26 Fujitsu Limited Image processing apparatus and image processing method
WO2013136603A1 (en) * 2012-03-15 2013-09-19 オムロン株式会社 Image matching method and image matching device and program using such method
JP2013191181A (en) * 2012-03-15 2013-09-26 Omron Corp Image matching method, image matching device employing the same and program
CN111222567A (en) * 2020-01-03 2020-06-02 长江存储科技有限责任公司 Method and apparatus for similarity analysis of nitride density
CN111222567B (en) * 2020-01-03 2023-06-23 长江存储科技有限责任公司 Method and apparatus for similarity analysis of nitride density

Similar Documents

Publication Publication Date Title
CN106991689B (en) Target tracking method based on FHOG and color characteristics and GPU acceleration
JPS60167069A (en) Pattern recognizer
WO2002093488A3 (en) Segmentation unit for and method of determining a second segment and image processing apparatus
JP2000105819A (en) Face image area detecting device
JP5048609B2 (en) Object tracking device and program
CN114445853A (en) Visual gesture recognition system recognition method
JP2008288684A (en) Person detection device and program
TW202209175A (en) Image correction method and system based on deep learning
JP2002216113A (en) Object recognizing device
JPH10162143A (en) Similarity calculating device
KR102386930B1 (en) Apparatus for detecting edge of road image and method thereof
JP2010136207A (en) System for detecting and displaying pedestrian
JP5020920B2 (en) Pedestrian detection device and program
CN112837318B (en) Ultrasonic image generation model generation method, ultrasonic image synthesis method, medium and terminal
JP3630569B2 (en) Image area tracking method and apparatus
TWI373961B (en) Fast video enhancement method and computer device using the method
JP3578321B2 (en) Image normalizer
JP3900972B2 (en) Contrast enhancement method
CN110705441B (en) Pedestrian crossing line image post-processing method and system
EP1398688A3 (en) Information processing apparatus, image formation apparatus, drawing processing method
CN115409890B (en) Self-defined mark detection method and system based on MSR and generalized Hough transform
JPH08202877A (en) Picture recognition device
JP3462960B2 (en) Image processing method
JPH07239996A (en) Course recognition device
CN112470165B (en) Image processing apparatus and image processing method