JPH096969A - Contour extraction method - Google Patents

Contour extraction method

Info

Publication number
JPH096969A
JPH096969A JP7154363A JP15436395A JPH096969A JP H096969 A JPH096969 A JP H096969A JP 7154363 A JP7154363 A JP 7154363A JP 15436395 A JP15436395 A JP 15436395A JP H096969 A JPH096969 A JP H096969A
Authority
JP
Japan
Prior art keywords
energy
value
contour
control point
processing
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.)
Withdrawn
Application number
JP7154363A
Other languages
Japanese (ja)
Inventor
Mikio Ikuta
幹雄 生田
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.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing 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 Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP7154363A priority Critical patent/JPH096969A/en
Publication of JPH096969A publication Critical patent/JPH096969A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE: To extract an accurate contour in a short time by carrying out the 1st processing of small calculation cost and then switchin the 1st processing to the 2nd processing that can extract the accurate contour when the energy approximates to the convergence value. CONSTITUTION: An initial contour is set around an object matter by 'SNAKES' (S1). In the 1st processing, the energy E (C) is minimized by differentiation (S2). Then the energy E (C) is calculated every time the position coordinates of all control points are updated, and present energy Ej (C) is compared with the preceding energy Ej-1 (C) (S3). When the energy Ej (C) is larger than or coincident with the energy Ej-1 (C), the reduction of energy ceases and approximates to the convergence value. Therefore, the 1st processing is switched to the 2nd processing. Then the energy E (C) is minimized by the DP method in the 2nd processing (S5).

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、“SNAKES”と呼
ばれるエネルギ最小化原理による動的輪郭モデル(Acti
ve Contour Model)を用いた輪郭抽出方法に関し、特
に、短い処理時間で正確に画像から輪郭を抽出するため
の改良に関する。
The present invention relates to an active contour model (Acti) called "SNAKES" based on the energy minimization principle.
ve Contour Model), and more particularly, to an improvement for accurately extracting a contour from an image in a short processing time.

【0002】[0002]

【従来の技術】画像処理による形状や文字の認識等に必
要な画像の構造化の前処理として、従来、物体の輪郭を
画像から抽出する種々の方法が提案されている。
2. Description of the Related Art Conventionally, various methods for extracting the contour of an object from an image have been proposed as preprocessing for structuring an image necessary for recognizing shapes and characters by image processing.

【0003】<エッジトレース方法>輪郭抽出方法の一
つにエッジトレース方法があげられる。エッジトレース
方法では、画像の濃度勾配を適当なしきい値により2値
化してエッジ画像を形成し、エッジ画像中の画素を順次
追跡することにより、輪郭を抽出する。
<Edge Tracing Method> One of the contour extracting methods is an edge tracing method. In the edge tracing method, the density gradient of an image is binarized by an appropriate threshold value to form an edge image, and pixels in the edge image are sequentially traced to extract a contour.

【0004】しかし、エッジトレース方法には、輪郭線
が閉曲線にならない場合に輪郭抽出が失敗になるという
欠点がある。また、輪郭線が分岐している場合は輪郭抽
出を行うことが難しいという欠点もある。
However, the edge tracing method has a drawback that the contour extraction fails when the contour line does not become a closed curve. Further, there is a drawback that it is difficult to extract the contour when the contour line is branched.

【0005】<SNAKESによる輪郭抽出方法>これ
に対し、エネルギ最小化原理による動的輪郭モデルが
“SNAKES”と呼ばれて提案され、輪郭抽出に利用
されている。以下、これについて説明する。
<Contour Extraction Method by SNAKES> On the other hand, an active contour model based on the principle of energy minimization is called “SNAKES”, which has been proposed and used for contour extraction. Hereinafter, this will be described.

【0006】SNAKESなる動的輪郭モデルは図4に
示すようにn個の制御点(頂点)CP1 〜CPn を持つ
多角形1で定義される。つまり、各制御点CPi (i=
1〜n)の位置座標を(Xi ,Yi )で表わすと、それ
らの集合S={(Xi ,Yi),i=1,2,…,n}
が一つの輪郭モデルとなり、この輪郭モデルの各制御点
の間隔が或る程度密ならば、物体の輪郭としての閉曲線
を表わすことができる。
The active contour model SNAKES is defined by a polygon 1 having n control points (vertices) CP 1 to CP n as shown in FIG. That is, each control point CP i (i =
If the position coordinates of (1 to n) are represented by (X i , Y i ), their set S = {(X i , Y i ), i = 1, 2, ..., N}
Becomes one contour model, and if the intervals between the control points of this contour model are close to some extent, a closed curve as the contour of the object can be represented.

【0007】そこで図5に示すように、まず輪郭抽出の
対象となる物体2の周囲に多角形の初期輪郭Cini を設
定し、次いで各制御点CPi の位置座標(Xi ,Yi
を更新して最適化することにより物体2の輪郭に輪郭線
fin を張り付ける。この輪郭線Cini が抽出結果であ
る。
Therefore, as shown in FIG. 5, first, an initial polygonal contour C ini is set around the object 2 to be contour-extracted, and then the position coordinates (X i , Y i ) of each control point CP i are set.
Is updated and optimized to attach the contour line C fin to the contour of the object 2. This contour line C ini is the extraction result.

【0008】<評価関数>制御点の位置座標の最適化に
は、一般に次式(1)の評価関数で与えられるエネルギ
E(C) を用いて、エネルギE(C) を最小化(厳密には極
小化)するように制御点の位置座標を更新する。
<Evaluation function> In order to optimize the position coordinates of the control point, the energy E (C) generally given by the evaluation function of the following equation (1) is used to minimize the energy E (C). Position coordinates of the control points are updated so as to minimize.

【数1】 E(C) =α・Eint (C) −β・Eext (C) …式(1)[Equation 1] E (C) = α · E int (C) −β · E ext (C) (1)

【0009】式(1)中で、αとβは定数、「・」は乗
算記号、Eint (C) は輪郭モデルCの幾何学的拘束条件
のエネルギ(内部エネルギ)、Eext (C) は輪郭モデル
Cの画像エネルギ(外部エネルギ)をそれぞれ表わして
いる。
In the equation (1), α and β are constants, “·” is a multiplication symbol, E int (C) is energy (internal energy) of the geometric constraint condition of the contour model C, and E ext (C). Represents the image energy (external energy) of the contour model C, respectively.

【0010】幾何学的拘束条件としては隣接する制御点
間の距離と、滑らかさが用いられ、そのエネルギEint
(C) は次式(2)で与えられる。なお、式(2)の右辺
第1項が距離に関する成分、同第2項が滑らかさに関す
る成分である。従って、制御点間で距離が短いほど、ま
た滑らかであるほど、エネルギE(C) が小さくなる。
As a geometric constraint condition, the distance between adjacent control points and smoothness are used, and its energy E int is used.
(C) is given by the following equation (2). The first term on the right side of the equation (2) is a component related to distance, and the second term is a component related to smoothness. Therefore, the energy E (C) becomes smaller as the distance between the control points becomes shorter and smoother.

【数2】 α・Eint (C) =α1 ・Σ{(Xi −Xi-1)2 +(Yi −Yi-1)2 }+ α2 ・Σ{(2Xi −Xi-1 −Xi+1)2 + (2Yi −Yi-1 +Yi+1)2 } …式(2)[Equation 2] α · E int (C) = α 1 · Σ {(X i −X i-1 ) 2 + (Y i −Y i-1 ) 2 } + α 2 · Σ {(2X i −X i-1 −X i + 1 ) 2 + (2Y i −Y i-1 + Y i + 1 ) 2 } Equation (2)

【0011】画像エネルギEext (C) としては、画像中
における輪郭モデルC上の平均エッジ強度が用いられ、
微分画像における各制御点CPi (Xi ,Yi )での画
素値をG(Xi ,Yi )とすると、次式(3)で与えら
れる。従って、各制御点が物体2の輪郭に近いほど、エ
ネルギE(C) が小さくなる。
The average edge strength on the contour model C in the image is used as the image energy E ext (C),
When the pixel value at each control point CP i (X i , Y i ) in the differential image is G (X i , Y i ), it is given by the following expression (3). Therefore, the energy E (C) becomes smaller as each control point is closer to the contour of the object 2.

【数3】 Eext (C) =ΣG(Xi ,Yi ) …式(3)[Equation 3] E ext (C) = ΣG (X i , Y i ) ... Formula (3)

【0012】評価関数E(C) を用いたエネルギの極小化
には、下記2つの処理手法がある。
There are the following two processing methods for minimizing the energy using the evaluation function E (C).

【0013】<第1の処理:微分によるエネルギ極小化
手法>通常、各制御点CPi (Xi ,Yi )でエネルギ
E(C) の微分値Δvi =(ΔXi ,ΔYi )を計算し、
この微分値に基づいて制御点CPi の位置座標を
(X i ,Yi )から(Xi ′,Yi ′)=(Xi +ΔX
i ,Yi +ΔYi )に更新することにより、エネルギE
(C) が極小になる輪郭線Cfin を求める。この手法を第
1の処理と呼ぶ。次式(4)に制御点での微分及び位置
座標更新の式を示す。
<First processing: Energy minimization by differentiation
Method> Normally, each control point CPi(Xi, Yi) With energy
Differential value Δv of E (C)i= (ΔXi, ΔYi),
Control point CP based on this differential valueiPosition coordinates of
(X i, Yi) To (Xi′, Yi′) = (Xi+ ΔX
i, Yi+ ΔYi), The energy E
Contour line C that minimizes (C)finAsk for. This technique
This is referred to as process No. 1. Differentiate and position at the control point in the following equation (4)
The formula for updating coordinates is shown below.

【0014】[0014]

【数4】 (Equation 4)

【0015】<第2の処理:DP法によるエネルギ極小
化手法>別の手法として、DP法(Dynamic Programin
g:動的計画法)を用いてエネルギを極小化する手法が
提案されている。この手法を第2の処理と呼び、以下に
説明する。
<Second Process: Energy Minimization Method by DP Method> As another method, DP method (Dynamic Program
g: Dynamic programming) has been proposed to minimize energy. This method is called the second processing and will be described below.

【0016】式(1)と式(2)を見ると、i番目の制
御点CPi のエネルギは、i−1番目の制御点CPi-1
の位置座標(Xi-1 ,Yi-1 )とi+1番目の制御点C
i+ 1 の位置座標(Xi+1 ,Yi+1 )との関数になって
いる。そこで、i番目の制御点CPi のエネルギをEi
として次式(5)で表わす。
[0016] The formula (1) and looking at the equation (2), the energy of the i-th control point CP i can, i-1-th control point CP i-1
Position coordinates (X i-1 , Y i-1 ) and the i + 1th control point C
It is a function of the position coordinates of P i + 1 (X i + 1 , Y i + 1 ). Therefore, the energy of the i-th control point CP i is set to E i
Is expressed by the following equation (5).

【数5】 Ei =α1 ・{(Xi −Xi-1)2 +(Yi −Yi-1)2 } +α2 ・{(2Xi −Xi-1 −Xi+1)2 + +(2Yi −Yi-1 −Yi+1)2 } −β・G(Xi ,Yi ) …式(5)[Equation 5] E i = α 1 · {(X i −X i-1 ) 2 + (Y i −Y i-1 ) 2 } + α 2 · {(2X i −X i-1 −X i + 1 ) 2 + + (2Y i -Y i-1 -Y i + 1) 2} -β · G (X i, Y i) ... (5)

【0017】但し、G(Xi ,Yi )は原画像を微分し
て得られた画像の、位置座標(Xi,Yi )における画
素値である。
However, G (X i , Y i ) is a pixel value at position coordinates (X i , Y i ) of the image obtained by differentiating the original image.

【0018】次に、1番目からi−2番目の制御点の位
置座標が既に決定しているものと仮定して、i−1番目
の制御点の位置座標を更新する場合の手順を説明する。
Next, assuming that the position coordinates of the 1st to i−2nd control points have already been determined, the procedure for updating the position coordinates of the i−1th control point will be described. .

【0019】まず、図6に示すように9行9列のテーブ
ル3を作成する。このテーブル3には、i−1番目の制
御点のエネルギを計算する際、i−1番目の制御点を図
7(A)に示すように更新前の位置座標(Xi-1 ,Y
i-1 )の8近傍動かし、且つ、i番目の制御点を図7
(B)に示すように更新前の位置座標(Xi ,Yi )の
8近傍動かすことによってそれらの全ての組合せに対し
て計算されるi−1番目の制御点のエネルギの値が入っ
ている。ここで、i−i番目の制御点の8近傍の各位置
をp(1≦p≦9)、i番目の制御点の8近傍の各位置
をq(1≦q≦9)で表わし、テーブル3の該当する位
置(p,q)の各エネルギ値をT[p][q]とする。
First, as shown in FIG. 6, a table 3 having 9 rows and 9 columns is created. In this table 3, when calculating the energy of the i−1th control point, the i−1th control point is moved to the position coordinates (X i−1 , Y) before updating as shown in FIG. 7A.
i-1 ) moved in the vicinity of 8 and the i-th control point is shown in FIG.
As shown in (B), by moving the position coordinates (X i , Y i ) before updating 8 neighborhoods, the energy value of the i−1th control point calculated for all the combinations is entered. There is. Here, each position in the 8 neighborhoods of the i-i-th control point is represented by p (1 ≦ p ≦ 9), and each position in the 8 neighborhoods of the i-th control point is represented by q (1 ≦ q ≦ 9). Let each energy value of the corresponding position (p, q) of 3 be T [p] [q].

【0020】続いて、図8に示すように、9行9列の同
様なテーブル4を作成する。但し、このテーブル4に
は、i番目の制御点を図9(A)に示すように更新前の
位置座標(Xi ,Yi )の8近傍動かし、且つi+1番
目の制御点を図9(B)に示すように更新前の位置座標
(Xi+1 ,Yi+1 )の8近傍動かすことによってそれら
の全ての組合せに対して計算されるi番目の制御点のエ
ネルギの値が入っている。ここでは、i番目の制御点の
8近傍の各位置をq(1≦q≦9)、i+1番目の制御
点の8近傍の各位置をr(1≦r≦9)で表わし、テー
ブル4の該当する位置(q,r)の各エネルギ値を便宜
上Tn [q][r]とする。
Subsequently, as shown in FIG. 8, a similar table 4 having 9 rows and 9 columns is created. However, in this table 4, the i-th control point is moved in the vicinity of the position coordinates (X i , Y i ) before update as shown in FIG. 9A, and the i + 1-th control point is moved to the position shown in FIG. As shown in B), by moving the position coordinates (X i + 1 , Y i + 1 ) before updating 8 neighborhoods, the energy value of the i-th control point calculated for all combinations is entered. ing. Here, each position in the 8 vicinity of the i-th control point is represented by q (1 ≦ q ≦ 9), and each position in the 8 vicinity of the i + 1-th control point is represented by r (1 ≦ r ≦ 9). For convenience, each energy value at the corresponding position (q, r) is T n [q] [r].

【0021】次に、テーブル3のエネルギ値T[p]
[q]とテーブル4のエネルギ値Tn[q][r]との
和T[p][r]+Tn [q][r]を、全ての8近傍
位置p,q,rの組合せについて計算し、そのうち最小
となる組合せにおけるi−1番目の制御点の8近傍の位
置pを、新たなi−1番目の制御点の位置座標とする。
Next, the energy value T [p] of Table 3
The sum T [p] [r] + T n [q] [r] of [q] and the energy value T n [q] [r] of the table 4 is calculated for all combinations of the eight neighboring positions p, q, r. The position p in the vicinity of the i−1th control point in the smallest combination is calculated as the position coordinate of the new i−1th control point.

【0022】再びi番目の制御点に着目して、i+1番
の制御点の8近傍移動とi+2番目の制御点の8近傍移
動から順次テーブルを2つ作成し、上記と同じ手順を繰
り返してi番目の制御点の位置座標を決定し、これを全
制御点について行う。
Paying attention to the i-th control point again, two tables are sequentially created from the 8-neighbor movement of the i + 1th control point and the 8-neighbor movement of the i + 2nd control point, and the same procedure is repeated to repeat i. The position coordinates of the th control point are determined and this is done for all control points.

【0023】このような制御点の位置座標更新を、エネ
ルギE(C) が極小値に達するまで繰り返す。
Such updating of the position coordinates of the control point is repeated until the energy E (C) reaches the minimum value.

【0024】[0024]

【発明が解決しようとする課題】第1の処理即ち、微分
によるエネルギ極小化手法では、i番目の制御点のエネ
ルギはi−1番目の制御点の位置とi+1番目の制御点
の位置に依存しているにも拘らず、これら2つの点を固
定したままエネルギの極小化を行っているので収束性が
悪く、エネルギが振動する等の欠点がある。そのため、
輪郭の抽出結果が悪い。図10,図11に実験結果を示
す。図10の楕円5が抽出対象となる物体であり、図1
1の外側の閉曲線Cini が初期輪郭であり、内側の閉曲
線Cfin が抽出結果である。
In the first process, that is, the energy minimization method by differentiation, the energy of the i-th control point depends on the positions of the (i-1) th control point and the (i + 1) th control point. However, since the energy is minimized while fixing these two points, the convergence is poor and the energy oscillates. for that reason,
The contour extraction result is poor. Experimental results are shown in FIGS. The ellipse 5 in FIG. 10 is the object to be extracted, and
The closed curve C ini outside 1 is the initial contour, and the closed curve C fin inside 1 is the extraction result.

【0025】第2の処理即ち、DP法によるエネルギ極
小化手法では、第1の処理の欠点が解決して図12に示
す閉曲線Cfin のように良好な抽出結果が得られる。し
かし、第2の処理では計算量が非常に多くなり、収束に
非常に時間がかかってしまう。因みに、制御点数がnの
場合の計算コストは、第1の処理ではnに比例するが、
第2の処理ではnの3乗に比例する。
The second process, that is, the energy minimization method by the DP method solves the drawback of the first process and obtains a good extraction result as a closed curve C fin shown in FIG. However, in the second processing, the amount of calculation is very large, and it takes a very long time to converge. Incidentally, the calculation cost when the number of control points is n is proportional to n in the first processing,
In the second processing, it is proportional to the cube of n.

【0026】そこで本発明の課題は、第2の処理よりも
短い処理時間で且つ第1の処理よりも正確に、画像から
物体の輪郭を抽出することができる方法を提供すること
である。
Therefore, an object of the present invention is to provide a method capable of extracting the contour of an object from an image in a processing time shorter than that of the second processing and more accurately than the first processing.

【0027】[0027]

【課題を解決するための手段】上記課題を解決する本発
明の輪郭抽出方法は、複数の制御点からなる動的輪郭モ
デルを用い、制御点の位置座標の関数として与えられる
エネルギが極小となるように制御点の位置座標を更新す
ることにより画像から物体の輪郭を抽出する輪郭抽出方
法において、(1)各制御点でエネルギの微分値を計算
し、微分値に基づいて各制御点の位置座標を更新する第
1の処理を、エネルギが収束値に近づくまで行うこと、
(2)第1の処理でエネルギが収束値に近づいた後は、
動的計画法によりエネルギが極小となる制御点の位置座
標を決定する第2の処理を行うこと、を特徴とするもの
である。
The contour extraction method of the present invention which solves the above-mentioned problems uses an active contour model consisting of a plurality of control points, and the energy given as a function of the position coordinates of the control points is minimized. In the contour extraction method for extracting the contour of the object from the image by updating the position coordinates of the control points as described above, (1) the differential value of energy is calculated at each control point, and the position of each control point is calculated based on the differential value. Performing the first process of updating the coordinates until the energy approaches the convergence value,
(2) After the energy approaches the convergence value in the first process,
It is characterized by performing a second process of determining the position coordinates of the control point where the energy becomes a minimum by the dynamic programming method.

【0028】あるいは、本発明の輪郭抽出方法は、上記
に加えて、第1の処理を繰り返して行い今回のエネルギ
が前回のエネルギよりも増大した時にエネルギが収束値
に近づいたと判定し、前記第2の処理は制御点の位置座
標をエネルギ増加直前の状態に戻してから開始すること
を特徴とし、あるいは、第1の処理を繰り返して行い今
回のエネルギが前回のエネルギに一致した時にエネルギ
が収束値に近づいたと判定し、直ちに前記第2の処理を
開始することを特徴とし、あるいは、第1の処理を繰り
返して行いエネルギの傾きが予め定めたしきい値を越え
た時にエネルギが収束値に近づいたと判定することを特
徴とし、あるいは前記しきい値はゼロ近傍の負の値であ
ることを特徴とするものである。
Alternatively, in addition to the above, the contour extraction method of the present invention repeats the first process to determine that the energy has approached the convergent value when the current energy is higher than the previous energy, and The process of 2 is characterized by starting after returning the position coordinates of the control point to the state immediately before the energy increase, or by repeating the first process, the energy converges when the current energy matches the previous energy. It is characterized in that it is determined that the value has approached, and the second process is immediately started, or the first process is repeated, and when the energy gradient exceeds a predetermined threshold value, the energy reaches a convergent value. It is characterized in that it is determined to be approaching, or the threshold value is a negative value near zero.

【0029】[0029]

【作用】第1の処理は微分によるエネルギ極小化手法で
あり、前述の如く、計算コストは小さいが、エネルギが
極小値に近づくと振動して収束性が悪く輪郭抽出結果が
良くない。これに対して第2の処理はDP法によるエネ
ルギ極小化手法であり、前述の如く、輪郭抽出結果は正
確であるが、計算コストが高い。
The first process is the energy minimization method by differentiation, and as described above, the calculation cost is small, but when the energy approaches the minimum value, it vibrates and the convergence is poor and the contour extraction result is not good. On the other hand, the second processing is the energy minimization method by the DP method, and as described above, the contour extraction result is accurate, but the calculation cost is high.

【0030】そこで本発明では、SNAKESにより輪
郭抽出を行う際に、エネルギが収束値に近づくまでは微
分によるエネルギ極小化手法により制御点の位置座標更
新を行い、その後はDP法によるエネルギ極小化に切り
替える。これにより、全体として比較的小さい計算コス
ト即ち短い処理時間で、正確に輪郭を抽出することがで
きる。
Therefore, in the present invention, when the contour is extracted by SNAKES, the position coordinate of the control point is updated by the energy minimization method by differentiation until the energy approaches the convergence value, and then the energy minimization by the DP method is performed. Switch. As a result, the contour can be accurately extracted with a relatively small calculation cost, that is, a short processing time as a whole.

【0031】エネルギが収束値に近づいたか否かの判定
方法は基本的には任意で良いが、第1の処理を繰り返す
場合にその都度得られる今回のエネルギを前回のエネル
ギと比較し、今回のエネルギが前回のエネルギより増大
した時、あるいは今回のエネルギが前回のエネルギに一
致した時に、エネルギが収束値に近づいたと判定する方
法が簡単である。但し、今回のエネルギが前回よりも増
大した時は、エネルギ増加直前の状態に制御点の位置座
標を戻してから第2の処理を開始すると、計算コストが
一層短かくなる。
The method of determining whether or not the energy has approached the convergent value may be basically arbitrary, but the current energy obtained each time when the first process is repeated is compared with the previous energy, and the current energy is compared. A simple method is to determine that the energy is close to the converged value when the energy increases from the previous energy or when the current energy matches the previous energy. However, when the energy of this time is larger than that of the previous time, if the position coordinates of the control point are returned to the state immediately before the energy increase and then the second process is started, the calculation cost becomes further shorter.

【0032】あるいは、エネルギは通常減小する方向に
向っているので、その傾きの符号が負であることに着目
すると、エネルギの傾きが或るしきい値を越えた時に、
エネルギが収束値に近づいたと判定する方法も簡単で良
い。この場合、しきい値は基本的に正負、ゼロいずれで
も良いが、ゼロ近傍の負の値にすると、計算コストが一
層短かくなる。
Alternatively, since the energy is normally directed to decrease, noting that the sign of the slope is negative, when the slope of the energy exceeds a certain threshold value,
The method of determining that the energy is close to the convergence value may be simple. In this case, the threshold value may be either positive or negative or zero, but if the value is a negative value near zero, the calculation cost becomes further shorter.

【0033】[0033]

【実施例】以下、図面を参照して本発明をその実施例と
ともに説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below with reference to the drawings with reference to the accompanying drawings.

【0034】<第1実施例>図1を参照して本発明の第
1実施例に係る輪郭抽出方法を説明する。図1におい
て、“SNAKES”により対象物体の周囲に初期輪郭
を設定し(ステップS1)、まずは第1の処理として、
微分によるエネルギ極小化を行う(ステップS2)。
<First Embodiment> A contour extracting method according to a first embodiment of the present invention will be described with reference to FIG. In FIG. 1, an initial contour is set around the target object by "SNAKES" (step S1). First, as the first processing,
Energy minimization is performed by differentiation (step S2).

【0035】この微分によるエネルギ極小化では、前述
の通り、式(1)で与えられる内部エネルギEint (C)
と外部エネルギEext (C) からなるエネルギE(C) を用
い、全制御点について、式(4)の如く個々の制御点で
のエネルギE(C) の微分値を計算し得られた微分値に基
づいて同制御点の位置座標を更新する。
In the energy minimization by the differentiation, as described above, the internal energy E int (C) given by the equation (1) is used.
Using the energy E (C) consisting of the external energy E ext (C) and the differential value of the energy E (C) calculated at each control point for all control points as shown in equation (4). The position coordinates of the same control point are updated based on the value.

【0036】基本的には、このような全制御点の位置座
標更新を繰り返して行う。
Basically, such positional coordinate updating of all control points is repeatedly performed.

【0037】但し、全制御点の位置座標更新の都度エネ
ルギE(C) を計算し、今回のエネルギと前回のエネルギ
との大小関係を判定する(ステップS3)。
However, the energy E (C) is calculated each time the position coordinates of all control points are updated, and the magnitude relationship between the current energy and the previous energy is determined (step S3).

【0038】ここで今回が第j番目の位置座標更新であ
り更新後のエネルギの値をEj (C)とし、前回が第j−
1回目の位置座標更新であり更新後のエネルギの値をE
j-1(C) とすると、次のように処理を行う。 (1)Ej (C) <Ej-1 (C) の場合、即ち今回のエネル
ギEj (C) が前回のエネルギEj-1 (C) よりも小さい場
合は、エネルギが減少しているので、ステップS2に戻
り、微分によるエネルギ極小化を繰り返す。 (2)Ej (C) >Ej-1 (C) の場合、即ち今回のエネル
ギEj (C) が前回のエネルギEj-1 (C) よりも増大した
場合は、エネルギの減少が止って収束値に近づいたの
で、第1の処理からステップS5の第2の処理に移る。
但し、第2の処理を開始する前に、各制御点の位置座標
を更新前の状態、即ち第j−1回目の位置座標更新の状
態に戻す(ステップS4)。 (3)Ej (C) =Ej-1 (C) の場合、即ち今回のエネル
ギEj (C) が前回のエネルギEj-1 (C) に一致した場合
も、エネルギの減少が止って収束値に近づいたので、第
1の処理から第2の処理に切り替える。この場合、各制
御点の位置座標を更新前の状態に戻してから第2の処理
を開始しても良いが、エネルギが変っていないので、本
実施例では処理の簡単化のために更新後の状態、即ち第
j回目の位置座標更新の状態のままステップS5の第2
の処理に移る。
Here, this time is the j-th position coordinate update, and the updated energy value is E j (C), and the previous time is the j-th position.
This is the first position coordinate update, and the updated energy value is E
If j-1 (C), the process is as follows. (1) When E j (C) <E j-1 (C), that is, when the current energy E j (C) is smaller than the previous energy E j-1 (C), the energy decreases. Therefore, the process returns to step S2, and energy minimization by differentiation is repeated. (2) When E j (C)> E j-1 (C), that is, when the current energy E j (C) is larger than the previous energy E j-1 (C), the decrease in energy is Since the value has stopped and has approached the convergence value, the process moves from the first process to the second process of step S5.
However, before starting the second process, the position coordinates of each control point are returned to the state before updating, that is, the state of the j-1th position coordinate updating (step S4). (3) When E j (C) = E j-1 (C), that is, when the current energy E j (C) matches the previous energy E j-1 (C), the energy reduction stops. Since it has approached the convergent value, the first process is switched to the second process. In this case, the second process may be started after returning the position coordinates of each control point to the state before updating, but since the energy has not changed, the second process is performed after updating for simplification of the process. State, that is, the state of the j-th position coordinate update, the second step of step S5 is performed.
Move on to processing.

【0039】ステップS5では第2の処理として、DP
法によるエネルギ極小化を行う。このDP法によるエネ
ルギ極小化では、前述の通り、式(5)で与えられる制
御点毎のエネルギEi を用いて、i番目の制御点であれ
ば前後のうち未確定の制御点の8近傍移動と当該i番目
の制御点の8近傍移動とからエネルギEi が最小となる
i番目の制御点の位置座標を決定するという処理を全制
御点について行い、全制御点の位置座標を更新する。
In step S5, DP is set as the second process.
Energy minimization by the method. In the energy minimization by the DP method, as described above, the energy E i for each control point given by the equation (5) is used, and in the case of the i-th control point, the vicinity of 8 undetermined control points before and after is determined. The process of determining the position coordinates of the i-th control point that minimizes the energy E i from the movement and the 8-neighbor movement of the i-th control point is performed for all control points, and the position coordinates of all control points are updated. .

【0040】このような全制御点の位置座標更新を、式
(1)で与えられるエネルギE(C)が極小値に達するま
で繰り返す。
The updating of the position coordinates of all the control points is repeated until the energy E (C) given by the equation (1) reaches the minimum value.

【0041】本実施例では、位置座標更新の都度エネル
ギE(C) を計算し、今回のエネルギと前回のエネルギと
を比較し、一致した時に極小値に達したものと判定して
いる(ステップS6)。
In this embodiment, the energy E (C) is calculated each time the position coordinate is updated, the current energy is compared with the previous energy, and it is determined that the minimum value is reached when they coincide (step). S6).

【0042】即ち、第1の処理における位置座標更新を
含め、今回が第k番目の位置座標更新でありその更新後
のエネルギの値をEk (C) とし、前回が第k−1番目の
位置座標更新でありその更新後のエネルギの値をEk-1
(C) とすると、Ek (C) =E k-1 (C) となったら第2の
処理を終了し、この時点での全制御点がなす形状を輪郭
の抽出結果とする。
That is, the position coordinate update in the first processing is
Including, this time is the kth position coordinate update, and after that update
Energy value of Ek(C), the last time is the (k-1) th
The position coordinate is updated, and the energy value after the update is Ek-1
(C), Ek(C) = E k-1When it becomes (C), the second
Finish processing and outline the shape made by all control points at this point
As the extraction result of.

【0043】図2に本実施例の実験結果を示す。図2に
おいて、5が対象物体としての楕円、Cini が初期輪
郭、Cfin が輪郭の抽出結果である。図2と図11を比
較すると、第1の処理(微分によるエネルギ極小化手
法)のみを用いた場合に比べ、本実施例による抽出結果
は極めて良好であることが判る。
FIG. 2 shows the experimental result of this embodiment. In FIG. 2, 5 is an ellipse as a target object, C ini is an initial contour, and C fin is a contour extraction result. Comparing FIG. 2 and FIG. 11, it can be seen that the extraction result according to the present embodiment is extremely good as compared with the case where only the first processing (energy minimization method by differentiation) is used.

【0044】また、表1に本実施例の実験で要した計算
時間(計算コスト)を、第2の処理(DP法によるエネ
ルギ極小化手法)のみを用いた図12の場合の計算時間
とともに示す。表1から判るように、本実施例の方が極
めて計算時間が短い。なお、制御点数はいずれも同じで
ある。
Further, Table 1 shows the calculation time (calculation cost) required in the experiment of this embodiment together with the calculation time in the case of FIG. 12 using only the second processing (energy minimization method by the DP method). . As can be seen from Table 1, the calculation time of this embodiment is extremely short. The number of control points is the same.

【0045】[0045]

【表1】 [Table 1]

【0046】<第2実施例>図3を参照して本発明の第
2実施例に係る輪郭抽出方法を説明する。図3におい
て、本実施例でも“SNAKES”により対象物体の周
囲に初期輪郭を設定し(ステップS11)、まずは第1
の処理として、微分によるエネルギ極小化を行う(ステ
ップS12)。
<Second Embodiment> A contour extracting method according to a second embodiment of the present invention will be described with reference to FIG. In FIG. 3, the initial contour is set around the target object by "SNAKES" also in this embodiment (step S11), and first, the first contour is set.
The energy minimization by differentiation is performed as the processing of (step S12).

【0047】この微分によるエネルギ極小化では、第1
実施例と同様、式(1)で与えられる内部エネルギE
int (C) と外部エネルギEext (C) からなるエネルギE
(C) を用い、全制御点について、式(4)の如く個々の
制御点でのエネルギE(C) の微分値を計算し得られた微
分値に基づいて同制御点の位置座標を更新する。基本的
には、このような全制御点の位置座標更新を繰り返して
行う。
In the energy minimization by this differentiation, the first
Similar to the embodiment, the internal energy E given by equation (1)
Energy E consisting of int (C) and external energy E ext (C)
(C) is used to calculate the differential value of energy E (C) at each control point for all control points as shown in equation (4), and the position coordinates of the control point are updated based on the obtained differential value. To do. Basically, such positional coordinate updating of all control points is repeatedly performed.

【0048】但し、全制御点の位置座標更新の都度エネ
ルギE(C) から、エネルギの傾きG i を計算し、しきい
値Gthとの大小関係を判定する(ステップS13,S1
4)。
However, every time the position coordinates of all control points are updated, energy is saved.
Energy gradient G from Rugi E (C) iCalculate the threshold
Value GthIs determined (steps S13 and S1).
4).

【0049】ここで今回が第j番目の位置座標更新であ
り更新後のエネルギの値をEj (C)とし、前回が第j−
1回目の位置座標更新であり更新後のエネルギの値をE
j-1(C) とし、今回の傾きをGj とすると、次式(6)
の計算を行う。
Here, this time is the j-th position coordinate update, the updated energy value is E j (C), and the previous time is the j-th position.
This is the first position coordinate update, and the updated energy value is E
If j-1 (C) and the current gradient is G j , the following equation (6)
Calculate.

【数6】 Gj =Ej (C) −Ej-1 (C) …式(6)G j = E j (C) −E j-1 (C) Equation (6)

【0050】しきい値Gthにはゼロ近傍の負の値を設定
してあり、次のように処理を行う。 (1)Gj ≦Gthの場合、即ちエネルギの傾きGi がし
きい値以下である場合は、エネルギが或る程度以上大き
く減少しているので、ステップS12に戻り、DP法に
よるエネルギ極小化を繰り返す。 (2)Gj >Gthの場合、即ちエネルギの傾きGj がし
きい値Gthを越えた場合は、エネルギが殆ど減少しなく
なって収束値に近づいたので、第1の処理からステップ
S15の第2の処理に移る。
The threshold value G th is set to a negative value near zero, and processing is performed as follows. (1) When G j ≦ G th , that is, when the energy gradient G i is less than or equal to the threshold value, the energy is significantly reduced by a certain amount or more, and thus the process returns to step S12 and the energy minimum by the DP method is minimized. Repeat (2) When G j > G th , that is, when the energy gradient G j exceeds the threshold value G th , the energy almost does not decrease and approaches the converged value. Therefore, from the first process to step S15. To the second processing of.

【0051】ステップS15では第2の処理として、D
P法によるエネルギ極小化を行う。このDP法によるエ
ネルギ極小化では、第1実施例と同様、式(5)で与え
られる制御点毎のエネルギEi を用いて、i番目の制御
点であれば前後のうち未確定の制御点の8近傍移動と当
該i番目の制御点の8近傍移動とからエネルギEi が最
小となるi番目の制御点の位置座標を決定するという処
理を全制御点について行い、全制御点の位置座標を更新
する。このような全制御点の位置座標更新を、式(1)
で与えられるエネルギE(C) が極小値に達するまで繰り
返す。
In step S15, as the second processing, D
The energy is minimized by the P method. In the energy minimization by the DP method, as in the first embodiment, the energy E i for each control point given by the equation (5) is used, and if it is the i-th control point, the undetermined control points before and after it are used. The process of determining the position coordinates of the i-th control point that minimizes the energy E i is performed for all control points from the 8-neighbor movement of 8 and the i-th control point's 8-neighbor movement. To update. Such position coordinate updating of all control points is performed by the equation (1).
Repeat until the energy E (C) given by reaches the minimum value.

【0052】本実施例でも、第1実施例と同じく位置座
標更新の都度エネルギE(C) を計算し、今回のエネルギ
と前回のエネルギとを比較し、一致した時に極小値に達
したものと判定している(ステップS16)。即ち、第
1の処理における位置座標更新を含め、今回が第k番目
の位置座標更新でありその更新後のエネルギの値をE k
(C) とし、前回が第k−1番目の位置座標更新でありそ
の更新後のエネルギの値をEk-1 (C) とすると、E
k (C) =Ek-1 (C) となったら第2の処理を終了し、こ
の時点での全制御点がなす形状を輪郭の抽出結果とす
る。
Also in this embodiment, the position seat is the same as in the first embodiment.
The energy E (C) is calculated each time the target is updated, and the energy
And the previous energy are compared, and when they match, the minimum value is reached.
It is determined that it has been done (step S16). That is,
This is the k-th time, including the update of the position coordinates in the processing of 1.
Is the position coordinate update of E and the energy value after the update is E k
(C), and the last time was the k-1th position coordinate update.
The energy value after the update of Ek-1(C), E
k(C) = Ek-1When it becomes (C), the second process is finished and
The shape formed by all control points at
You.

【0053】[0053]

【発明の効果】以上実施例とともに説明したように、本
発明によれば“SNAKES”により画像から物体の輪
郭を抽出する際に、最初は計算コストが小さい第1の処
理を行い、エネルギが収束値に近づいたら正確な輪郭を
抽出できる第2の処理に切り替えるので、全体として従
来よりも短時間で正確に輪郭を抽出することができる。
According to the present invention, as described above with reference to the embodiments, when the contour of an object is extracted from an image by "SNAKES", first, the first processing with a small calculation cost is performed to converge the energy. When the value approaches the value, the process is switched to the second process that can extract an accurate contour, so that the contour can be accurately extracted as a whole in a shorter time than conventional.

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

【図1】本発明の第1実施例に係る輪郭抽出方法の手順
を示す図。
FIG. 1 is a diagram showing a procedure of a contour extracting method according to a first embodiment of the present invention.

【図2】第1実施例の実験結果を示す図。FIG. 2 is a diagram showing an experimental result of the first embodiment.

【図3】本発明の第2実施例に係る輪郭抽出方法の手順
を示す図。
FIG. 3 is a diagram showing a procedure of a contour extracting method according to a second embodiment of the present invention.

【図4】SNAKESの定義を示す図。FIG. 4 is a diagram showing the definition of SNAKES.

【図5】対象物体と初期輪郭と抽出結果との関係を示す
図。
FIG. 5 is a diagram showing a relationship between a target object, an initial contour, and an extraction result.

【図6】DP法におけるi−1番目の制御点のエネルギ
の計算に用いるテーブルの例を示す図。
FIG. 6 is a diagram showing an example of a table used to calculate the energy of the i−1th control point in the DP method.

【図7】図6のテーブルを作成するためのi−1番目の
制御点の8近傍移動とi番目の制御点の8近傍移動を示
す図。
FIG. 7 is a diagram showing an 8-neighbor movement of the i−1th control point and an 8-neighbor movement of the i-th control point for creating the table of FIG. 6;

【図8】DP法におけるi番目の制御点のエネルギの計
算に用いるテーブルの例を示す図。
FIG. 8 is a diagram showing an example of a table used for calculating energy of an i-th control point in the DP method.

【図9】図8のテーブルを作成するためのi番目の制御
点の8近傍移動とi+1番目の制御点の8近傍移動を示
す図。
9A and 9B are diagrams showing the 8-neighbor movement of the i-th control point and the 8-neighbor movement of the i + 1-th control point for creating the table of FIG.

【図10】実験における対象物体の例を示す図。FIG. 10 is a diagram showing an example of a target object in an experiment.

【図11】従来の第1の処理のみによる輪郭抽出方法の
実験結果を示す図。
FIG. 11 is a diagram showing an experimental result of a contour extraction method using only the conventional first processing.

【図12】従来の第2の処理のみによる輪郭抽出方法の
実験結果を示す図。
FIG. 12 is a diagram showing an experimental result of a contour extraction method using only conventional second processing.

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

ini 初期輪郭 Cfin 抽出結果 1 多角形 2 物体 3,4 テーブル 5 楕円(対象物体)C ini Initial contour C fin Extraction result 1 Polygon 2 Object 3,4 Table 5 Ellipse (target object)

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 複数の制御点からなる動的輪郭モデルを
用い、制御点の位置座標の関数として与えられるエネル
ギが極小となるように制御点の位置座標を更新すること
により画像から物体の輪郭を抽出する輪郭抽出方法にお
いて、 (1)各制御点でエネルギの微分値を計算し、微分値に
基づいて各制御点の位置座標を更新する第1の処理を、
エネルギが収束値に近づくまで行うこと、 (2)第1の処理でエネルギが収束値に近づいた後は、
動的計画法によりエネルギが極小となる制御点の位置座
標を決定する第2の処理を行うこと、を特徴とする輪郭
抽出方法。
1. An active contour model including a plurality of control points is used, and the position coordinates of the control points are updated so that the energy given as a function of the position coordinates of the control points is minimized. In the contour extraction method for extracting, (1) a first process of calculating a differential value of energy at each control point and updating the position coordinates of each control point based on the differential value,
Do it until the energy approaches the convergent value. (2) After the energy approaches the convergent value in the first process,
A contour extracting method characterized by performing a second process of determining a position coordinate of a control point having a minimum energy by a dynamic programming method.
【請求項2】 第1の処理を繰り返して行い、今回のエ
ネルギが前回のエネルギよりも増大した時にエネルギが
収束値に近づいたと判定し、前記第2の処理は制御点の
位置座標をエネルギ増加直前の状態に戻してから開始す
ることを特徴とする請求項1記載の輪郭抽出方法。
2. The first process is repeatedly performed, and when the energy of this time is larger than the energy of the last time, it is determined that the energy is close to the converged value, and the second process increases the energy of the position coordinate of the control point. The contour extracting method according to claim 1, wherein the method is started after returning to the immediately preceding state.
【請求項3】 第1の処理を繰り返して行い、今回のエ
ネルギが前回のエネルギに一致した時にエネルギが収束
値に近づいたと判定し、直ちに前記第2の処理を開始す
ることを特徴とする請求項1記載の輪郭抽出方法。
3. The first process is repeatedly performed, and when the current energy matches the previous energy, it is determined that the energy is close to the converged value, and the second process is immediately started. The contour extraction method according to item 1.
【請求項4】 第1の処理を繰り返して行い、エネルギ
の傾きが予め定めたしきい値を越えた時にエネルギが収
束値に近づいたと判定することを特徴とする請求項1記
載の輪郭抽出方法。
4. The contour extracting method according to claim 1, wherein the first process is repeated to determine that the energy is close to a converged value when the energy gradient exceeds a predetermined threshold value. .
【請求項5】 前記しきい値はゼロ近傍の負の値である
ことを特徴とする請求項4記載の輪郭抽出方法。
5. The contour extraction method according to claim 4, wherein the threshold value is a negative value near zero.
JP7154363A 1995-06-21 1995-06-21 Contour extraction method Withdrawn JPH096969A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7154363A JPH096969A (en) 1995-06-21 1995-06-21 Contour extraction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7154363A JPH096969A (en) 1995-06-21 1995-06-21 Contour extraction method

Publications (1)

Publication Number Publication Date
JPH096969A true JPH096969A (en) 1997-01-10

Family

ID=15582528

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7154363A Withdrawn JPH096969A (en) 1995-06-21 1995-06-21 Contour extraction method

Country Status (1)

Country Link
JP (1) JPH096969A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1061748A2 (en) * 1999-06-10 2000-12-20 University of Washington Video object segmentation using active contour modelling with global relaxation
CN102854765A (en) * 2011-06-27 2013-01-02 富士施乐株式会社 Image forming apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1061748A2 (en) * 1999-06-10 2000-12-20 University of Washington Video object segmentation using active contour modelling with global relaxation
CN102854765A (en) * 2011-06-27 2013-01-02 富士施乐株式会社 Image forming apparatus

Similar Documents

Publication Publication Date Title
Menet et al. Active contour models: Overview, implementation and applications
US7817822B2 (en) Bi-directional tracking using trajectory segment analysis
Li et al. Hopfield neural networks for affine invariant matching
CN106444757B (en) EKF-SLAM method based on linear feature map
US20200193607A1 (en) Object shape regression using wasserstein distance
Tseng et al. Active contour model via multi-population particle swarm optimization
JP4567660B2 (en) A method for determining a segment of an object in an electronic image.
CN111681300A (en) Method for obtaining target area composed of outline sketch lines
CN113608663A (en) Fingertip tracking method based on deep learning and K-curvature method
JPH096969A (en) Contour extraction method
CN111914832A (en) SLAM method of RGB-D camera in dynamic scene
Agouris et al. Dynamic node distribution in adaptive snakes for road extraction
CN113658195B (en) Image segmentation method and device and electronic equipment
CN113343987B (en) Text detection processing method and device, electronic equipment and storage medium
CN108665470A (en) A kind of interactive mode contour extraction method
JPH11134509A (en) Method for drawing recognizing process and method for construction drawing recognizing process
Eua-Anant et al. Boundary detection using simulation of particle motion in a vector image field
Kozek et al. An active contour algorithm for continuous-time cellular neural networks
Venkatesan et al. Advanced classification using genetic algorithm and image segmentation for Improved FD
JPH05288543A (en) Recognizing device integrated with visual information and tactile information
Mosa et al. Driving active contours to concave regions
KR20090087254A (en) Apparatus and method for triangulation of 2d paths
Min et al. Gesture-based editing system for graphic primitives and alphanumeric characters
Liu et al. Fast and robust isotropic scaling probability iterative closest point algorithm
JP2941322B2 (en) Drawing processing equipment

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020903