JP2000209431A - Method for extracting contour and storage medium - Google Patents

Method for extracting contour and storage medium

Info

Publication number
JP2000209431A
JP2000209431A JP11008607A JP860799A JP2000209431A JP 2000209431 A JP2000209431 A JP 2000209431A JP 11008607 A JP11008607 A JP 11008607A JP 860799 A JP860799 A JP 860799A JP 2000209431 A JP2000209431 A JP 2000209431A
Authority
JP
Japan
Prior art keywords
edge
pixel
contour
edge strength
corrected
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
JP11008607A
Other languages
Japanese (ja)
Inventor
Toshiaki Kondo
俊明 近藤
Masakazu Matsugi
優和 真継
Fumiaki Takahashi
史明 高橋
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP11008607A priority Critical patent/JP2000209431A/en
Publication of JP2000209431A publication Critical patent/JP2000209431A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To accurately extract a contour of a thin and long object by detecting an edge strength from a received image, correcting the edge strength in response to a magnitude of a predetermined weight coefficient, setting a first target point of tracing the contour and selecting a vicinity pixel with a largest value of the corrected edge strength for a succeeding contour point. SOLUTION: First image data being a processing object are loaded to an image memory or the like, and an edge component is detected from the image data loaded in this image memory. Then pixels to start and to complete contour tracing are designated. The tracing start pixel is a first target pixel. A homogeneity coefficient decided depending on the distribution of a direction θ of the edge is multiplied with the edge strength E to calculated a corrected edge strength E'. After calculating the corrected strength E', a pixel whose corrected edge strength E' is maximum is retrieved for pixels in the vicinity of the target pixel. The retrieval can efficiently be conducted by employing a mask to limit the retrieval range.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、輪郭線抽出方法及
び記憶媒体に関し、より具体的には、画像から対象物を
抽出し、移動、反転、回転、変倍及び変形などの幾何学
的な処理を施す画像編集・加工ツール、他の画像へのは
め込み合成を行う画像合成ツール、特定された領域に限
定して、例えば色変換やフィルタリング処理のような画
像処理を施す画像処理ツール、並びに、画像を領域分割
してシーンの理解を行うコンピュータ・ビジョン等に使
用される輪郭線抽出方法及び記憶媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a contour line extracting method and a storage medium, and more particularly, to extracting an object from an image and performing geometrical operations such as moving, inverting, rotating, scaling and deformation. Image editing and processing tools to perform processing, image synthesis tools to perform inset synthesis to other images, image processing tools to perform image processing such as color conversion and filtering, for example, limited to specified areas, and The present invention relates to a contour line extraction method and a storage medium used for computer vision or the like that divides an image into regions to understand a scene.

【0002】[0002]

【従来の技術】従来、エッジ強度を追跡するタイプの輪
郭線抽出法には、(1)多値のエッジ画像を用いて、過
去のトレース方向を参照しながら局所的な最大エッジ画
素を追跡するエッジ画素追跡法と、(2)予め定められ
た領域内で対象物と背景の境界点を検出し、検出した境
界点を接続する境界点接続法がある。
2. Description of the Related Art Conventionally, a contour extraction method of the type for tracking the edge strength is as follows: (1) A local maximum edge pixel is tracked using a multi-valued edge image while referring to a past trace direction. There are an edge pixel tracking method and (2) a boundary point connection method of detecting a boundary point between an object and a background within a predetermined area and connecting the detected boundary points.

【0003】エッジ画素追跡法は、上述の通り、多値の
エッジ画像を用いて注目画素の近傍画素でエッジ強度が
最大の画素を輪郭画素として選択する。特公昭63−5
3587号公報には、次の輪郭点候補を探索する領域を
直前の輪郭追跡方向に対して180度の範囲に制限し
て、追跡を効率化する構成が記載されている。また、特
許第2645995号公報には、過去の追跡方向と同じ
方向に次の追跡を行うことが自然であるとの前提に立っ
て、過去の追跡方向に沿う方向の画素エッジ強度ほど重
み付けを強くしてエッジをトレースする方法が記載され
ている。
As described above, the edge pixel tracking method uses a multi-valued edge image to select a pixel having a maximum edge intensity in a pixel adjacent to a target pixel as a contour pixel. Tokiko 63-5
Japanese Patent No. 3587 discloses a configuration in which the area for searching for the next contour point candidate is limited to a range of 180 degrees with respect to the immediately preceding contour tracking direction to improve tracking efficiency. Japanese Patent No. 2,645,995 discloses that, based on the premise that it is natural to perform the next tracking in the same direction as the past tracking direction, the weighting becomes stronger as the pixel edge strength in the direction along the past tracking direction increases. A method of tracing an edge is described.

【0004】境界点接続法は、上述の通り、輪郭線を含
むように設定された帯状領域に限定して輪郭線を抽出す
る。特公昭63−55101号公報に記載の方法では、
オペレータがまず輪郭線に沿って粗く対象画像をトレー
スする。そのトレースの軌跡に所定幅を持たせた帯状の
領域が選択され、その帯状領域内において色調値の差か
ら画像の輪郭を決定する。一方、米国特許561748
7号公報(特開平7−92650号公報)に記載の方法
では、輪郭線上に指定された少なくとも2点を結んで帯
状領域を形成し、その帯状領域の幅方向に輪郭点を検出
する処理を、帯状領域の長手方向に移動しながら繰り返
すことにより、輪郭を抽出する。
In the boundary point connection method, as described above, a contour line is extracted only for a band-like region set to include the contour line. In the method described in JP-B-63-55101,
The operator first traces the target image roughly along the contour. A band-like region having a predetermined width in the trace of the trace is selected, and the outline of the image is determined from the difference in the color tone value in the band-like region. On the other hand, US Pat.
In the method described in Japanese Patent Application Laid-Open No. 7-92650, a process of forming a band-like region by connecting at least two designated points on a contour and detecting a contour point in the width direction of the band-like region is performed. The contour is extracted by repeating while moving in the longitudinal direction of the band-shaped region.

【0005】[0005]

【発明が解決しようとする課題】従来例では、画像デー
タ値の変化の大きさ、すなわちエッジ強度にのみ基づい
て輪郭線を抽出するので、輪郭線のエッジ強度が輪郭線
近傍にあるエッジ強度と比べて十分に大きくないと、輪
郭を正確に抽出できないという欠点がある。
In the prior art, since the contour is extracted only based on the magnitude of the change in the image data value, that is, the edge strength, the edge strength of the contour is equal to the edge strength near the contour. If it is not sufficiently large, there is a disadvantage that the contour cannot be extracted accurately.

【0006】具体的には、第1に、輪郭線の近傍にエッ
ジ強度の大きい画素が存在する場合、輪郭線近傍の画素
が輪郭点として選択されてしまう。第2に、輪郭線のコ
ントラストが極めて低い場合、エッジ強度の情報だけで
は輪郭追跡の進路が定まらない。その結果、細かな迷走
を繰り返すので、正確な輪郭線を抽出できない。第3
に、細長い形状の物体を抽出する場合、その物体の両側
の輪郭線が接近しており、エッジ強度の小さい方の輪郭
を追跡できない。
Specifically, first, when there is a pixel having a large edge strength near a contour, a pixel near the contour is selected as a contour point. Second, when the contrast of the contour line is extremely low, the path of the contour tracking cannot be determined only by the edge strength information. As a result, a fine stray is repeated, so that an accurate contour cannot be extracted. Third
On the other hand, when an object having an elongated shape is extracted, the outlines on both sides of the object are close to each other, and the outline having the smaller edge strength cannot be tracked.

【0007】本発明は、このような不都合を生じない輪
郭線抽出方法及び記憶媒体を提示することを目的とす
る。
An object of the present invention is to provide a contour extraction method and a storage medium which do not cause such inconvenience.

【0008】すなわち、本発明は、輪郭線近傍に方向性
がランダムな粒状ノイズがあっても、その粒状ノイズに
惑わされずに輪郭線を抽出できる輪郭線抽出方法及び記
憶媒体を提示することを目的とする。
That is, an object of the present invention is to provide a contour line extracting method and a storage medium capable of extracting a contour line without being disturbed by the granular noise even if there is a granular noise having random direction in the vicinity of the contour line. And

【0009】本発明はまた、細長い形状の物体の輪郭線
を正確に抽出できる輪郭線抽出方法及び記憶媒体を提示
することを目的とする。
Another object of the present invention is to provide a contour extraction method and a storage medium which can accurately extract the contour of an elongated object.

【0010】[0010]

【課題を解決するための手段】本発明に係る輪郭線抽出
方法は、入力画像からエッジ強度を検出するエッジ検出
ステップと、所定情報に基づいて定められる重み係数の
大きさに応じて当該エッジ強度を補正した補正エッジ強
度を算出する補正エッジ強度算出ステップと、輪郭追跡
の最初の注目点を設定する開始点設定ステップと、当該
補正エッジ強度の値が最も大きい近傍画素を次の輪郭点
として選択する輪郭追跡を繰り返すことにより輪郭線を
抽出する抽出ステップとからなることを特徴とする。
A contour line extracting method according to the present invention includes an edge detecting step of detecting an edge intensity from an input image, and an edge intensity detecting method for detecting the edge intensity according to a magnitude of a weight coefficient determined based on predetermined information. And calculating a corrected edge strength, calculating a corrected edge strength, a starting point setting step for setting a first point of interest for contour tracking, and selecting a neighboring pixel having the largest corrected edge strength value as a next contour point. An extraction step of extracting a contour line by repeating contour tracing.

【0011】本発明に係る記憶媒体には、上述の輪郭線
抽出方法のプログラム・ソフトウエアが格納される。
[0011] The storage medium according to the present invention stores the program software of the above-described contour line extraction method.

【0012】[0012]

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

【0013】図1は、本発明に一実施例のフローチャー
トを示す。先ず、処理対象の画像データが画像メモリな
どにロードされる(S1)。その画像メモリにロードさ
れた画像データからエッジ成分が検出される(S2)。
エッジ検出方法としては、例えば、図2に図示されるゾ
ーベル・オペレータのような1次微分オペレータを使用
する。図2(a)は3×3画素から成る小画像領域を示
し、A〜Iは各画素における画像値である。図2(b)
は水平方向のエッジ成分Gxを検出するマスク、図2
(c)は垂直方向のエッジ成分Gyを検出するマスクを
それぞれ示す。エッジ成分Gx,Gyはそれぞれ、下記
式に従って算出される。すなわち、 Gx=(A+2B+C)十(G+2H+I) (1) Gy=(A+2D+G)十(C+2F+I) (2) 式(1),(2)の積和演算は、画像全体又は輪郭線を
抽出する領域に限定して実行される。エッジ強度Eとエ
ッジの向きθは、エッジ成分Gx,Gyを用いて下記式
により定義される。すなわち、 E=(Gx×Gx+Gy×Gy)1/2 (3) θ=arctan(Gy/Gx) (4) 式(3)は以下のように簡略化してもよい。すなわち、 E=|Gx|+|Gy| (5) 式(4)の演算は、読み出し専用メモリ(ROM)を活
用することにより高速化できる。
FIG. 1 shows a flowchart of one embodiment of the present invention. First, image data to be processed is loaded into an image memory or the like (S1). An edge component is detected from the image data loaded in the image memory (S2).
As an edge detection method, for example, a first derivative operator such as a Sobel operator shown in FIG. 2 is used. FIG. 2A shows a small image area composed of 3 × 3 pixels, and A to I are image values at each pixel. FIG. 2 (b)
2 is a mask for detecting a horizontal edge component Gx, FIG.
(C) shows a mask for detecting a vertical edge component Gy. The edge components Gx and Gy are respectively calculated according to the following equations. That is, Gx = (A + 2B + C) tens (G + 2H + I) (1) Gy = (A + 2D + G) tens (C + 2F + I) (2) The product-sum operation of the equations (1) and (2) is performed on the entire image or the area where the contour line is extracted. Limited execution. The edge strength E and the edge direction θ are defined by the following equations using the edge components Gx and Gy. That is, E = (Gx × Gx + Gy × Gy) 1/2 (3) θ = arctan (Gy / Gx) (4) Equation (3) may be simplified as follows. That is, E = | Gx | + | Gy | (5) The operation of Expression (4) can be accelerated by utilizing a read-only memory (ROM).

【0014】図3に示すように、上述の1次微分オペレ
ータの係数を回転して得られるマスク群を用いてエッジ
を検出しても良い。図3(a)〜(h)に示す8つのマ
スク(ロビンソン・オペレータ)は、それぞれ45度づ
つ異なる指向性を持ってエッジを検出する。これら8つ
のマスクを等しく画像データにコンボリューション演算
し、最も出力値の大きいマスクから得たエッジ強度とそ
のマスクの示すエッジの向きを、注目画素のエッジ強度
及び方向とする。この場合には、式(4)の演算を省略
できる。
As shown in FIG. 3, an edge may be detected by using a mask group obtained by rotating the coefficient of the first-order differential operator. The eight masks (Robinson operators) shown in FIGS. 3A to 3H detect edges with different directivities of 45 degrees each. These eight masks are equally convolved with image data, and the edge strength obtained from the mask having the largest output value and the direction of the edge indicated by the mask are defined as the edge strength and direction of the pixel of interest. In this case, the calculation of Expression (4) can be omitted.

【0015】次に、輪郭線追跡を開始及び終了する画素
(制御点)を指定する(S3)。開始画素が最初の注目
画素となる。開始画素から終了画素まで輪郭が追跡され
る。開始画素と終了画素が一致している場合には、輪郭
線は閉曲線として求められる。輪郭追跡の開始画素及び
終了画素は、通常、オペレータがマニュアルで指定する
が、2値画像の輪郭追跡のような単純なタスクでは開始
画素及び終了画素の指定を自動化できる。
Next, a pixel (control point) for starting and ending contour line tracking is designated (S3). The start pixel is the first target pixel. The contour is tracked from the start pixel to the end pixel. If the start pixel and the end pixel match, the contour is determined as a closed curve. The start and end pixels for contour tracing are usually specified manually by the operator, but for simple tasks such as contour tracing of binary images, the designation of start and end pixels can be automated.

【0016】エッジ強度Eに、エッジの方向θの分布に
基づいて定められるホモジニティ係数を掛けて、補正エ
ッジ強度を算出する(S4)。ステップS4の詳細なフ
ローチャートを図4に示す。
A corrected edge intensity is calculated by multiplying the edge intensity E by a homogeneity coefficient determined based on the distribution of the edge direction θ (S4). FIG. 4 shows a detailed flowchart of step S4.

【0017】図5は、カーペットにカメラが置かれてい
る構図の入力画像である。図5中の矩形枠内のエッジの
強度Eの分布を図6に示す。図6で、縦軸はエッジ強
度、横軸は矩形枠内の横方向位置をそれぞれ示す。図6
では、ゾーベル・オペレータを用いてエッジ強度を検出
している。背景部のエッジ強度が大きく、カメラの輪郭
線が背景エッジに紛れてしまっている。図7は、図5中
の矩形枠内のエッジ方向θの分布を示す。図7では、エ
ッジ方向θの分布を一定長のベクトルで表示している。
背景部のベクトルはまとまりに欠け不均質であるが、輪
郭線部でのベクトルは一定の方向に揃っており、均質性
が高い。
FIG. 5 is an input image of a composition in which a camera is placed on a carpet. FIG. 6 shows the distribution of the intensity E of the edge in the rectangular frame in FIG. In FIG. 6, the vertical axis indicates the edge strength, and the horizontal axis indicates the horizontal position in the rectangular frame. FIG.
In US Pat. No. 6,073,072, the edge strength is detected using a Sobel operator. The edge strength of the background portion is large, and the outline of the camera is lost in the background edge. FIG. 7 shows the distribution of the edge direction θ in the rectangular frame in FIG. In FIG. 7, the distribution in the edge direction θ is represented by a vector having a constant length.
The vectors in the background are lacking in unity and are inhomogeneous, but the vectors in the outline are aligned in a certain direction, and the homogeneity is high.

【0018】図4では先ず、エッジ方向θの分布を平滑
化する(S11)。エッジ方向θの値は存在定義範囲
(0〜2π又は−π〜+πなど)の両端で不連続なの
で、平滑化の際には、θの余弦値cosθ及び正弦値sinθ
をまず求め、その余弦値及び正弦値それぞれに対して、
例えば均等な重み係数を持つ3×3画素のマスクのコン
ボリューション演算を行う。図8は、平滑化処理結果例
を示す。エッジ方向θがバラバラであった背景部では、
余弦値及び正弦値共に、周囲の余弦値及び正弦値と互い
にキャンセルしあって小さい値となる。逆にエッジの向
きが揃っている輪郭部では、単純な加算処理と等価にな
り、結果は相対的に大きな値となる。
In FIG. 4, first, the distribution in the edge direction θ is smoothed (S11). Since the value of the edge direction θ is discontinuous at both ends of the existence definition range (0 to 2π or −π to + π, etc.), the cosine value cos θ and the sine value sin θ of θ are used during smoothing.
First, for each of the cosine and sine values,
For example, a convolution operation of a mask of 3 × 3 pixels having an equal weighting coefficient is performed. FIG. 8 shows an example of the result of the smoothing process. In the background part where the edge direction θ was different,
Both the cosine value and the sine value cancel each other out with the surrounding cosine value and the sine value and become small values. Conversely, in a contour portion in which the directions of edges are aligned, this is equivalent to a simple addition process, and the result is a relatively large value.

【0019】次に、画素ごとにそのエッジと近傍画素の
エッジの方向の揃い具合、すなわちエッジ方向の均質性
(ホモジニティ)を、平滑化処理後の余弦値(近傍画素
の平均値)及び正弦値(近傍画素の平均値)の大きさに
基づいて評価し、ホモジニティ係数を決定する(S1
2)。最も基本的なホモジニティ係数hは、次式で求め
られる。すなわち、 h=(cosθの平均値)+(sinθの平均値) (6) ホモジニティ係数hは、図8に示す平滑化処理後のベク
トル長を示す。
Next, for each pixel, the degree of uniformity of the direction of the edge and the edge of the neighboring pixel, that is, the homogeneity of the edge direction is determined by a cosine value (average value of neighboring pixels) and a sine value after the smoothing process. Evaluation is performed based on the magnitude of (average value of neighboring pixels), and the homogeneity coefficient is determined (S1).
2). The most basic homogeneity coefficient h is obtained by the following equation. That is, h = (average value of cos θ) 2 + (average value of sin θ) 2 (6) The homogeneity coefficient h indicates the vector length after the smoothing process shown in FIG.

【0020】図9は、ホモジニティ係数hを0〜255
の範囲にスケーリングし、グラフ化したものである。縦
軸はホモジニティ係数を、横軸は横方向の位置をそれぞ
れ示す。エッジ方向の均質性が高い画素ほどホモジニテ
ィ係数が大きく、不均質な画素ほどホモジニティ係数が
小さくなる。
FIG. 9 shows that the homogeneity coefficient h is 0 to 255.
Is scaled to the range of and graphed. The vertical axis indicates the homogeneity coefficient, and the horizontal axis indicates the position in the horizontal direction. A pixel having higher homogeneity in the edge direction has a larger homogeneity coefficient, and a non-uniform pixel has a smaller homogeneity coefficient.

【0021】得られたホモジニティ係数hを少なくとも
1回、先に求まっているエッジ強度Eに掛けて、補正エ
ッジ強度Eを求める(S13)。本実施例では、ホモジ
ニティ係数hの3乗をエッジ強度Eに掛けて、補正エッ
ジ強度E’としている。すなわち、 E’=h×E (7) 補正エッジ強度E’の一例を図10に示す。縦軸は補正
エッジ強度E’、横軸は横方向の位置をそれぞれ示す。
図10では、輪郭線が鮮明に浮き出ている。
The corrected edge strength E is obtained by multiplying the obtained homogeneity coefficient h at least once by the previously obtained edge strength E (S13). In this embodiment, the edge strength E is multiplied by the cube of the homogeneity coefficient h to obtain a corrected edge strength E ′. That is, E ′ = h 3 × E (7) An example of the corrected edge strength E ′ is shown in FIG. The vertical axis indicates the corrected edge intensity E ′, and the horizontal axis indicates the position in the horizontal direction.
In FIG. 10, the contour lines clearly stand out.

【0022】同様の処理例を図11〜図14に示す。図
11は、白い壁を背景に人が立っている構図の低コント
ラストの入力画像である。図12は、図11中の矩形枠
内のエッジ強度分布を示す。図13はホモジニティ係数
の分布を示す。図14は、ホモジニティ係数により補正
されたエッジ強度分布を示す。図12、図13及び図1
4は、それぞれ、図6、図9及び図10に対応してい
る。図14では、低コントラストの輪郭線が浮き出てい
る。
Similar processing examples are shown in FIGS. FIG. 11 is a low-contrast input image of a composition in which a person stands against a white wall. FIG. 12 shows an edge intensity distribution in the rectangular frame in FIG. FIG. 13 shows the distribution of the homogeneity coefficient. FIG. 14 shows an edge intensity distribution corrected by the homogeneity coefficient. 12, 13, and 1
4 corresponds to FIGS. 6, 9 and 10, respectively. In FIG. 14, a low-contrast outline is prominent.

【0023】ホモジニテイ係数hは、勿論、掛け算に限
らず、足し算、又はhの大きさに応じた非線形変換にも
利用できる。
The homogeneity coefficient h can of course be used not only for multiplication but also for addition or non-linear conversion according to the magnitude of h.

【0024】図1に戻る。このように補正エッジ強度
E’を算出した後、注目画素の近傍で補正エッジ強度
E’が最大になる画素を探索する(S5)。探索範囲を
限定するマスクを適用することで、探索を効率化でき
る。補正エッジ強度E’が最大の画素を次の注目画素と
してセットする(S6)。新しい注目画素が輪郭追跡の
終了条件を満たすかどうかを評価し(S7)、終了条件
が満たされなければ、輪郭追跡を継続し(S5)、終了
条件が満たされれば、輪郭追跡を終了する。
Returning to FIG. After calculating the corrected edge strength E 'in this way, a search is made for a pixel having the maximum corrected edge strength E' near the pixel of interest (S5). The search can be made more efficient by applying a mask that limits the search range. A pixel having the maximum corrected edge intensity E 'is set as the next target pixel (S6). It is evaluated whether or not the new target pixel satisfies the contour ending condition (S7). If the ending condition is not satisfied, the contour tracing is continued (S5). If the ending condition is satisfied, the contour tracing is terminated.

【0025】本実施例では、次のような効果がある。す
なわち、輪郭線の近傍にあって、方向性がランダムな強
いエッジ成分を効果的に抑制できる。平坦な背景に溶け
込むような極めて低いコントラストの輪郭線を強調でき
る。輪郭線の追跡ステップ(ステップS5以降)の前
に、全補正エッジ強度が算出されているので、効率的で
高速な輪郭抽出を実現できる。
This embodiment has the following effects. That is, it is possible to effectively suppress a strong edge component having randomness in the vicinity of the contour. Extremely low-contrast outlines that blend into a flat background can be enhanced. Since all the corrected edge intensities have been calculated before the contour tracking step (from step S5), efficient and high-speed contour extraction can be realized.

【0026】上記実施例では、エッジ方向の均質性(ホ
モジニティ)に注目して、輪郭線をその近傍領域から分
離した。第2の実施例では、各画素におけるエッジ方向
の情報をより直接的に活用する。具体的には、注目画素
の近傍にあって、エッジ強度が大きく且つエッジ方向が
注目画素におけるエッジ方向と同方向の画素を次の注目
点として、輪郭を追跡する。
In the above embodiment, the contour line is separated from its neighboring region, paying attention to the homogeneity in the edge direction. In the second embodiment, information on the edge direction in each pixel is more directly utilized. Specifically, the contour is tracked with a pixel in the vicinity of the target pixel, which has a high edge strength and whose edge direction is the same as the edge direction of the target pixel, as the next target point.

【0027】図15は、3×3画素からなる小画像領域
を示す。この小画像領域中、斜線が書き込まれている5
画素は視野制限されており、輪郭追跡の進入禁止領域と
なっている。残りの4画素に描かれているベクトル
,v,v,vは、式(1)で示される水平方
向のエッジ成分Gx、すなわち垂直方向の1次微分値
と、式(2)で示される垂直方向のエッジ成分Gy、す
なわち水平方向の1次微分値とによって定まるグラディ
エント・ベクトルである。グラディエント・ベクトルの
方向とエッジの方向は直交関係にある。中心のベクトル
は、注目画素におけるグラディエント・ベクトルで
ある。角α,β,γは、注目画素と各近傍画素における
グラディエント・ベクトルのなす角度である。
FIG. 15 shows a small image area composed of 3 × 3 pixels. In this small image area, a hatched line 5 is written.
The pixels are limited in the field of view, and serve as an inaccessible area for contour tracking. The vectors v 0 , v 1 , v 2 , and v 3 drawn on the remaining four pixels are represented by the horizontal edge component Gx shown by the equation (1), that is, the first-order differential value in the vertical direction, and the equation (2) ) Is a gradient vector determined by the vertical edge component Gy, ie, the first-order differential value in the horizontal direction. The direction of the gradient vector and the direction of the edge are orthogonal. The center vector v 0 is a gradient vector at the pixel of interest. The angles α, β, and γ are angles formed by the gradient vector between the target pixel and each of the neighboring pixels.

【0028】この実施例では、下記式(8)で示される
ように、近傍画素におけるグラディエント・ベクトル
の、注目画素におけるグラディエント・ベクトルへの射
影成分が大きい画素を、次の注目点として選択する。す
なわち、 max(|v|cosα,|v|cosβ,|v|cosγ) (8) 式(3)を使用して、式(8)を以下のように変更す
る。すなわち、 max(Ecosα,Ecosβ,Ecosγ) (9) 内積の定義により、式(9)の演算を注目画素のグラデ
ィエント・ベクトルvと近傍画素のグラディエント・
ベクトルv,v,vの内積演算で実現する。その
内積演算は、式(9)の演算の代わりに下記式(10)
の演算を実行していることに等しい。すなわち、 max(Ecosα,Ecosβ,Ecosγ) (10) である。
In this embodiment, as shown by the following equation (8), a pixel having a large projected component of the gradient vector of the neighboring pixel onto the gradient vector of the target pixel is selected as the next target point. That is, max (| v 1 | cos α, | v 2 | cos β, | v 3 | cos γ) (8) Using the equation (3), the equation (8) is changed as follows. That is, max (E 1 cos α, E 2 cos β, E 3 cos γ) (9) According to the definition of the inner product, the operation of equation (9) is performed by using the gradient vector v 0 of the target pixel and the gradient vector of the neighboring pixel.
This is realized by the inner product operation of the vectors v 1 , v 2 , v 3 . The inner product operation is performed by the following expression (10) instead of the operation of the expression (9).
Is equivalent to performing the operation of That is, max (E 0 E 1 cos α, E 0 E 2 cos β, E 0 E 3 cos γ) (10).

【0029】全ての比較対象要素に等しく注目画素のエ
ッジ強度値Eが掛けられているので、大小比較の結果
への影響は無い。
[0029] Since the edge intensity value E 0 equally target pixel in all the compared elements are applied, there is no effect on the result of the magnitude comparison.

【0030】第2実施例の特徴を説明する。図16
(a)は、平坦な背景を持つ1画素幅の細長い物体の断
面を示す。図16(b)は、その1画素幅の物体から1
次微分タイプのオペレータにより検出されるエッジを示
す。画像濃度の立ち上がりで検出されるエッジと画像濃
度の立ち下がりで検出されるエッジは、符号の違いで区
別されている。図16(c)は、検出されたエッジの絶
対値を示す。通常の輪郭追跡はエッジ強度に基づくの
で、図16(c)に示されるような接近した2本の輪郭
線は、追跡中にしばしば混線していた。
The features of the second embodiment will be described. FIG.
(A) shows a cross section of an elongated object of one pixel width having a flat background. FIG. 16B shows that the object having one pixel width is 1
3 shows edges detected by a second derivative type operator. The edge detected at the rising edge of the image density and the edge detected at the falling edge of the image density are distinguished by a difference in sign. FIG. 16C shows the absolute value of the detected edge. Since normal contour tracing is based on edge strength, two close contours as shown in FIG. 16C are often mixed during tracing.

【0031】図17は、5×5画素からなる画像の小領
域で、上述の1画素幅の物体とその周辺のグラディエン
ト・ベクトルを拡大表示した模式図を示す。前述のごと
く、グラディエント・ベクトル同士の内積演算値の大小
比較により輪郭を追跡するので、例えば図17に示され
る1画素幅の物体左側の輪郭を追跡中には、左側の輪郭
のグラディエント・ベクトルと同物体の右側の輪郭のグ
ラディエント・ベクトルは正反対の向きになっており、
2つのベクトル間の余弦値cosθは最小値−1又は−1
に近い値となる。従って、左側の輪郭線を追跡中に誤っ
て右側の輪郭線を追跡し始めるようなことは起こり得な
い。
FIG. 17 is a schematic diagram showing an enlarged view of the above-mentioned one-pixel-width object and its surrounding gradient vectors in a small area of an image composed of 5 × 5 pixels. As described above, since the contour is tracked by comparing the inner product operation values of the gradient vectors with each other, for example, when the contour on the left side of the one-pixel width object shown in FIG. The gradient vector of the right contour of the object is in the opposite direction,
The cosine value cosθ between the two vectors is the minimum value -1 or -1
It is a value close to. Therefore, it is unlikely that the right contour is started to be traced while the left contour is being traced.

【0032】図18は、5×5画素からなる画像の小領
域で、左半分に物体が、右半分に背景が写っている画像
に対するグラディエント・ベクトルの一例を示す。物体
と背景の境界に直交して、背景部に強いライン状のエッ
ジがある。いま画素番号1,2,3,4,5の順に輪郭
を追跡することを考える。画素番号2の場所では、進路
が3又は3’の2者択一となる。従来例のようにエッジ
強度にのみ依存して輪郭を追跡すると、よりエッジ強度
の大きい背景エッジに引かれ、画素番号3’へと進んで
しまう。しかし、本実施例では、前述のようにグラディ
エント・ベクトル同士の内積値の大小を比較する。画素
番号2におけるグラディエント・ベクトルと画素番号
3’におけるグラディエント・ベクトルは直交関係にあ
り、余弦値が0又は0に近い値となる。従って、本実施
例では、内積値も小さな値となり、画素番号3’を次の
注目点として誤って選択することはない。
FIG. 18 shows an example of a gradient vector for an image in which a left half shows an object and a right half shows a background in a small area of an image composed of 5 × 5 pixels. There is a strong linear edge in the background, orthogonal to the boundary between the object and the background. Now, consider tracing the contour in the order of pixel numbers 1, 2, 3, 4, and 5. At the location of pixel number 2, the course is either 3 or 3 '. If the contour is traced only depending on the edge strength as in the conventional example, the background edge having a higher edge strength is drawn, and the process proceeds to the pixel number 3 '. However, in the present embodiment, the magnitudes of the inner product values of the gradient vectors are compared as described above. The gradient vector at the pixel number 2 and the gradient vector at the pixel number 3 'have an orthogonal relationship, and the cosine value is 0 or a value close to 0. Therefore, in the present embodiment, the inner product value also becomes a small value, and the pixel number 3 ′ is not erroneously selected as the next point of interest.

【0033】グラディエント・ベクトルの算出方法は、
近隣画素同士の差分に基づく手法であれば何でもよく、
第1の実施例で取り上げているゾーベル・オペレータに
限定されない。
The calculation method of the gradient vector is as follows.
Any method based on the difference between neighboring pixels may be used,
The invention is not limited to the Sobel operator described in the first embodiment.

【0034】第2実施例では、次のような効果がある。
すなわち、グラディエント・ベクトルの方向を考慮して
おり、近接した2本の輪郭線でも明確に区別できるの
で、輪郭線が鋭角に突き出る岬や入り江状の細長い輪郭
も正確に抽出できる。直進的な輪郭追跡特性を有してい
るので、直線的な輪郭線の抽出に強く、輪郭線と交差す
るような強いエッジにも影響されにくい。エッジ強度算
出の過程で求める画像濃度の水平垂直方向の1次微分値
は、グラディエント・ベクトルそのものであるから、付
加的な計算無しで従来のエッジ強度べースの輪郭追跡又
は第1実施例と組み合わせることが容易である。
The second embodiment has the following effects.
That is, the direction of the gradient vector is taken into consideration, and two adjacent contour lines can be clearly distinguished, so that a cape or a cove-like elongated contour whose contour lines protrude at an acute angle can be accurately extracted. Since it has a straight-line contour tracking characteristic, it is strong in extracting a straight contour, and is hardly affected by strong edges that intersect with the contour. Since the first derivative in the horizontal and vertical directions of the image density obtained in the process of calculating the edge strength is the gradient vector itself, the conventional edge strength-based contour tracing or the first embodiment can be performed without additional calculation. It is easy to combine.

【0035】次に、本発明の第3実施例を説明する。第
2実施例では、グラディエント・ベクトルの内積演算を
する時に、注目画素とその近傍画素との位置関係を考慮
しなかったが、第3実施例では、注目画素とその近傍画
素との位置関係をも考慮する。
Next, a third embodiment of the present invention will be described. In the second embodiment, when calculating the inner product of the gradient vector, the positional relationship between the target pixel and its neighboring pixels is not taken into account. However, in the third embodiment, the positional relationship between the target pixel and its neighboring pixels is determined. Also consider.

【0036】図19は、3×3画素から成る小画像領域
である。この小画像領域中で斜線が書き込まれている5
画素を輪郭追跡の進入禁止領域とする。残りの4画素に
破線で描かれているベクトルv,v,v,v
は、各画素におけるグラディエント・ベクトルを示
す。これらのグラディエント・ベクトルv,v,v
,vと直交しているベクトルe,e,e,e
は、式(1)で示される水平方向のエッジ成分Gxと
式(2)で示される垂直方向のエッジ成分Gyによって
定まるエッジ・ベクトルである。グラディエント・ベク
トルとエッジ・ベクトルは、同じ長さで、直交関係にあ
る。
FIG. 19 shows a small image area composed of 3 × 3 pixels. A hatched portion 5 is written in this small image area.
The pixel is defined as an entry prohibited area for contour tracking. Vectors v 0 , v 1 , v 2 , v drawn by broken lines in the remaining four pixels
3 indicates a gradient vector at each pixel. These gradient vectors v 0 , v 1 , v
Vectors e 0 , e 1 , e 2 , e orthogonal to 2 and v 3
Reference numeral 3 denotes an edge vector determined by the horizontal edge component Gx represented by Expression (1) and the vertical edge component Gy represented by Expression (2). The gradient vector and the edge vector have the same length and are orthogonal.

【0037】中心のベクトルeは、注目画素における
エッジ・ベクトルを示す。角α,β,γは注目画素にお
けるエッジ・ベクトルeと、注目画素と各近傍画素の
中心位置を結ぶ変位ベクトルA,B,Cとがなす角度を
示す。変位ベクトルA,B,Cはそれぞれ(0,1)、
(1,1)及び(1,0)と表わせる。図19では、4
つのエッジ・ベクトルe,e,e,eは全てほ
ぼ同じ方向に揃い、且つベクトル長、すなわちエッジ強
度もほぼ等しい。このような場合、従来のエッジ強度ベ
ースの輪郭追跡方法や第2実施例の方法だけでは、確か
な進路を得ることができないので、ここでは、注目画素
におけるエッジ方向eに沿った輪郭追跡がもっとも自
然と考え、エッジベクトルeをエッジベクトルe
と比して優先するような重み付けを施す。
The center vector e 0 indicates an edge vector at the pixel of interest. The angles α, β, and γ indicate the angles formed by the edge vector e 0 of the target pixel and the displacement vectors A, B, and C connecting the target pixel and the center positions of the neighboring pixels. The displacement vectors A, B, and C are (0, 1), respectively.
(1,1) and (1,0). In FIG. 19, 4
The three edge vectors e 0 , e 1 , e 2 , and e 3 are all aligned in substantially the same direction, and the vector lengths, that is, the edge intensities are also approximately equal. In this case, only the method of conventional edge strength based contour tracing method or the second embodiment, it is not possible to obtain a certain course, here, the outline tracing along the edge direction e 0 in the target pixel Considering the most natural, the edge vector e 2 is replaced by the edge vector e 1 ,
compared with e 3 performs weighting such that priority.

【0038】具体的には、エッジ強度ベースの輪郭追跡
には下記式(11)に従い、内積値ベースの輪郭追跡に
は下記式(12)に従って、注目画素の近傍にある画素
それぞれに角度α,β,γに応じた重み付け処理を行な
う。すなわち、 max(|e|cosα,|e|cosβ,|e|cosγ) (11) max(ecosα,ecosβ,ecosγ) (12) とする。
More specifically, according to the following equation (11) for edge intensity-based contour tracing, and to the following equation (12) for inner product value-based contour tracing, angles α, Weighting processing is performed according to β and γ. That is, max (| e 1 | cos α, | e 2 | cos β, | e 3 | cos γ) (11) max (e 0 e 1 cos α, e 0 e 2 cos β, e 0 e 3 cos γ) (12) .

【0039】式(11)及び(12)における余弦値の
演算は、第2実施例と同様に内積演算で実現する。内積
の定義により、式(11)及び(12)における各余弦
値は、下記式(13)のように変更できる。すなわち、 cosα=(A・e)/(|A||e|)=e/|e| cosβ=(B・e)/(|B||e|) =(e+e)/(21/2|e|) cosγ=(C・e)/(|C||e|)=e/|e| (13) 但し、e=(e,e)とする。
The calculation of the cosine value in the equations (11) and (12) is realized by the inner product calculation as in the second embodiment. According to the definition of the inner product, each cosine value in the equations (11) and (12) can be changed as in the following equation (13). That, cosα = (A · e 0 ) / (| A || e 0 |) = e y / | e 0 | cosβ = (B · e 0) / (| B || e 0 |) = (e x + e y) / (2 1/2 | e 0 |) cosγ = (C · e 0) / (| C || e 0 |) = e x / | e 0 | (13) where, e 0 = (e x , ey ).

【0040】全ての比較対象要素は、注目画素のエッジ
強度値|e|で等しく割られているので、エッジ強度
値|e|は大小比較に影響しない。従って、実際の演
算は、注目画素との位置関係に応じて、注目画素におけ
るエッジ・ベクトルの成分e ,eを対応する近傍画
素のエッジ・ベクトルに掛けるだけで良い。これは、注
目画素におけるエッジ・ベクトルの変位ベクトルA,
B,Cへの射影成分量を重み係数としていることに等し
い。例えば、水平方向に強いエッジがある場合、注目画
素のエッジ・ベクトルの水平方向成分eは垂直方向成
分eより大きいから、式(13)により、e/|e
|の値が相対的に大きくなり、エッジ・ベクトルの方
向(水平方向)に沿った右隣の画素が優先されるような
重み付けがなされる。同様に、垂直方向に強いエッジが
ある場合、注目画素のエッジ・ベクトルの垂直方向成分
は水平方向成分eより大きいから、式(13)式
によりe/|e|の値が相対的に大きくなり、エッ
ジ・ベクトルの方向(垂直方向)に沿った上方の画素が
優先されるような重み付けがなされる。斜め方向に強い
エッジがある場合も同様である。輪郭追跡の注目画素に
おけるエッジ方向への敏感度を変えるために、注目画素
の成分e,eを、例えば1/2乗又は2乗などで変
化させてもよい。
All the elements to be compared are the edges of the pixel of interest.
Strength value | e0| Is divided equally, so the edge strength
Value | e0| Does not affect magnitude comparison. Therefore, the actual performance
The calculation is performed at the pixel of interest according to the positional relationship with the pixel of interest.
Component e of the edge vector x, EyThe corresponding neighborhood
Just multiply by the raw edge vector. This is a note
The displacement vector A of the edge vector at the eye pixel,
Equivalent to using the amount of the projected component to B and C as the weighting factor
No. For example, if there is a strong edge in the horizontal direction,
Horizontal component e of the elementary edge vectorxIs vertical
Minute eyFrom equation (13), ex/ | E
0Is relatively large, and the edge vector
Pixel to the right along the direction (horizontal direction)
Weighting is performed. Similarly, strong edges in the vertical direction
If there is, the vertical component of the edge vector of the pixel of interest
eyIs the horizontal component exEquation (13)
By ey/ | E0Becomes relatively large,
The upper pixel along the direction of the vector (vertical direction)
Weighting is performed so that priority is given. Strong in diagonal direction
The same applies when there is an edge. Attention pixel of contour tracking
In order to change the sensitivity to the edge direction in the
Component e ofx, EyIs changed by, for example, 1/2 power or square power.
You may make it.

【0041】このようにすることで、注目画素における
エッジ方向に沿った方向にある画素ほど優先されるの
で、つながりの良いスムーズな輪郭追跡を実現できる。
In this manner, the priority is given to the pixel in the direction along the edge direction in the target pixel, so that smooth contour tracking with good connection can be realized.

【0042】本発明は、複数の機器からなる構成に適用
しても、一つの機器からなる構成に適用してもよい。
The present invention may be applied to a configuration including a plurality of devices, or may be applied to a configuration including a single device.

【0043】また、上述した実施例の機能を実現するよ
うに各種のデバイスを動作させるべく当該各種デバイス
と接続された装置又はシステム内のコンピュータに、上
記実施例の機能を実現するためのソフトウェアのプログ
ラムコードを供給し、その装置又はシステムのコンピュ
ータ(CPU又はMPU)を、格納されたプログラムに
従って前記各種デバイスを動作させることによって実施
したものも、本願発明の範囲に含まれる。
Further, in order to operate various devices so as to realize the functions of the above-described embodiment, software for realizing the functions of the above-described embodiments is installed in a computer in an apparatus or a system connected to the various devices. The present invention also includes a case in which a program (code) is supplied and a computer (CPU or MPU) of the apparatus or system is operated by operating the various devices according to stored programs.

【0044】この場合、前記ソフトウエアのプログラム
コード自体が、前述した実施例の機能を実現することに
なり、そのプログラムコード自体、及びそのプログラム
コードをコンピュータに供給するための手段、例えば、
かかるプログラムコードを格納した記憶媒体は、本発明
を構成する。かかるプログラムコードを格納する記憶媒
体としては、例えば、フロッピーディスク、ハードディ
スク、光ディスク、光磁気ディスク、CD−ROM、磁
気テープ、不揮発性のメモリカード及びROM等を用い
ることが出来る。
In this case, the program code itself of the software realizes the function of the above-described embodiment, and the program code itself and means for supplying the program code to the computer, for example,
A storage medium storing such a program code constitutes the present invention. As a storage medium for storing such a program code, for example, a floppy disk, hard disk, optical disk, magneto-optical disk, CD-ROM, magnetic tape, nonvolatile memory card, ROM, or the like can be used.

【0045】また、コンピュータが供給されたプログラ
ムコードを実行することにより、前述の実施例の機能が
実現されるだけではなく、そのプログラムコードがコン
ピュータにおいて稼働しているOS(オペレーティング
システム)又は他のアプリケーションソフトウエア等と
共同して上述の実施例の機能が実現される場合にも、か
かるプログラムコードが本出願に係る発明の実施例に含
まれることは言うまでもない。
When the computer executes the supplied program code, not only the functions of the above-described embodiment are realized, but also the OS (operating system) or other operating system running on the computer. Even when the functions of the above-described embodiments are realized in cooperation with application software and the like, it goes without saying that such program codes are included in the embodiments of the invention according to the present application.

【0046】更には、供給されたプログラムコードが、
コンピュータの機能拡張ボード又はコンピュータに接続
された機能拡張ユニットに備わるメモリに格納された
後、そのプログラムコードの指示に基づいて、その機能
拡張ボード又は機能拡張ユニットに備わるCPU等が実
際の処理の一部または全部を行い、その処理によって上
述した実施例の機能が実現される場合も、本出願に係る
発明に含まれることは言うまでもない。
Further, the supplied program code is:
After being stored in the memory provided in the function expansion board of the computer or the function expansion unit connected to the computer, the CPU or the like provided in the function expansion board or the function expansion unit executes one of the actual processing based on the instruction of the program code. It is needless to say that a case where the functions of the above-described embodiments are realized by performing all or part of the processes and executing the processing is also included in the invention according to the present application.

【0047】[0047]

【発明の効果】以上の説明から容易に理解できるよう
に、本発明によれば、画像から検出されるエッジ方向の
情報に基づいて定められる重み係数をエッジ強度に掛け
て補正エッジ強度を算出し、補正エッジ強度の値が最も
大きい近傍画素を次の輪郭点として選択するので、輪郭
線近傍にある輪郭線以外の強いエッジ成分の影響を抑制
でき、結果として雑音や低コントラストに強い輪郭線抽
出を実現できる。
As can be easily understood from the above description, according to the present invention, a corrected edge strength is calculated by multiplying an edge strength by a weight coefficient determined based on information on an edge direction detected from an image. , Because the next pixel with the highest corrected edge strength value is selected as the next contour point, the effect of strong edge components other than the contour near the contour can be suppressed, and as a result, the contour extraction that is strong against noise and low contrast Can be realized.

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

【図1】 本発明の第1実施例のフローチャートであ
る。
FIG. 1 is a flowchart of a first embodiment of the present invention.

【図2】 ゾーベル・オペレータを示す図である。FIG. 2 is a diagram showing a sobel operator.

【図3】 ロビンソン・オペレータを示す図である。FIG. 3 is a diagram showing a Robinson operator.

【図4】 補正エッジ強度算出の手順を示すフローチャ
ートである。
FIG. 4 is a flowchart illustrating a procedure for calculating a corrected edge strength.

【図5】 補正エッジ強度算出の入力画像例である。FIG. 5 is an example of an input image for calculating a corrected edge strength.

【図6】 図5に示す入力画像の矩形枠内での、ゾーベ
ル・オペレータによる横方向のエッジ強度分布例の模式
図である。
6 is a schematic diagram of an example of a lateral edge intensity distribution by a Sobel operator in a rectangular frame of the input image shown in FIG. 5;

【図7】 図5中の矩形枠内のエッジ方向θの分布の模
式図である。
FIG. 7 is a schematic diagram of a distribution of an edge direction θ in a rectangular frame in FIG. 5;

【図8】 平滑化処理結果例である。FIG. 8 is an example of a result of a smoothing process.

【図9】 ホモジニティ係数hの分布例を示す模式図で
ある。
FIG. 9 is a schematic diagram illustrating a distribution example of a homogeneity coefficient h.

【図10】 補正エッジ強度E’の分布例である。FIG. 10 is a distribution example of a corrected edge intensity E ′.

【図11】 別の入力画像例である。FIG. 11 is another example of an input image.

【図12】 図11に示す入力画像の矩形枠内でのエッ
ジ強度分布を示す模式図である。
FIG. 12 is a schematic diagram showing an edge intensity distribution in a rectangular frame of the input image shown in FIG. 11;

【図13】 図11に示す入力画像の矩形枠内でのホモ
ジニティ係数の分布を示す模式図である。
13 is a schematic diagram showing a distribution of homogeneity coefficients in a rectangular frame of the input image shown in FIG.

【図14】 ホモジニティ係数により補正されたエッジ
強度分布を示す模式図である。
FIG. 14 is a schematic diagram showing an edge intensity distribution corrected by a homogeneity coefficient.

【図15】 3×3画素からなる小画像領域を示す模式
図である。
FIG. 15 is a schematic diagram showing a small image area composed of 3 × 3 pixels.

【図16】 第2実施例の説明例である。FIG. 16 is an explanatory example of the second embodiment.

【図17】 5×5画素からなる画像の小領域で1画素
幅の物体とその周辺のグラディエント・ベクトルを拡大
表示した模式図である。
FIG. 17 is an enlarged schematic view of an object having a width of 1 pixel and a gradient vector around the object in a small area of an image composed of 5 × 5 pixels.

【図18】 5×5画素からなる画像の小領域で、左半
分に物体が、右半分に背景が写っている画像に対するグ
ラディエント・ベクトルの一例である。
FIG. 18 is an example of a gradient vector for an image in which a left half shows an object and a right half shows a background in a small area of an image composed of 5 × 5 pixels.

【図19】 第3実施例を説明する3×3画素から成る
小画像例である。
FIG. 19 is an example of a small image composed of 3 × 3 pixels for explaining the third embodiment.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 高橋 史明 東京都大田区下丸子3丁目30番2号キヤノ ン株式会社内 Fターム(参考) 5B057 AA11 BA25 CA08 CA12 CB08 CB12 CD03 CE02 CE03 CE06 CH09 CH11 DA13 DB02 DC16 5C076 AA13 AA24 AA31 BA04 BB04 BB25 5C077 LL02 PP03 PP15 PP22 PP23 PP47 PP54 PQ12 PQ22 SS02 5L096 AA06 BA07 DA02 EA05 EA23 EA39 FA06 FA45 FA54 LA05 ────────────────────────────────────────────────── ─── Continued on the front page (72) Inventor Fumiaki Takahashi 3-30-2 Shimomaruko, Ota-ku, Tokyo F-term (reference) in Canon Inc. 5B057 AA11 BA25 CA08 CA12 CB08 CB12 CD03 CE02 CE03 CE06 CH09 CH11 DA13 DB02 DC16 5C076 AA13 AA24 AA31 BA04 BB04 BB25 5C077 LL02 PP03 PP15 PP22 PP23 PP47 PP54 PQ12 PQ22 SS02 5L096 AA06 BA07 DA02 EA05 EA23 EA39 FA06 FA45 FA54 LA05

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 入力画像からエッジ強度を検出するエッ
ジ検出ステップと、 所定情報に基づいて定められる重み係数の大きさに応じ
て当該エッジ強度を補正した補正エッジ強度を算出する
補正エッジ強度算出ステップと、 輪郭追跡の最初の注目点を設定する開始点設定ステップ
と、 当該補正エッジ強度の値が最も大きい近傍画素を次の輪
郭点として選択する輪郭追跡を繰り返すことにより輪郭
線を抽出する抽出ステップとからなることを特徴とする
輪郭線抽出方法。
An edge detecting step of detecting an edge intensity from an input image; and a corrected edge intensity calculating step of calculating a corrected edge intensity obtained by correcting the edge intensity in accordance with a magnitude of a weight coefficient determined based on predetermined information. An extraction step of extracting a contour line by repeating a contour tracing step of selecting a neighboring pixel having the largest value of the corrected edge strength as a next contour point; And a contour line extracting method.
【請求項2】 更に、当該入力画像からエッジ方向を検
出するエッジ方向検出ステップを具備し、当該補正エッ
ジ強度算出ステップが、当該エッジ方向の分布の均質性
を評価し、当該均質性に基づいて定められる均質性係数
の大きさに応じて当該補正エッジ強度を算出する請求項
1に記載の輪郭線抽出方法。
2. The method according to claim 1, further comprising an edge direction detecting step of detecting an edge direction from the input image, wherein the correcting edge strength calculating step evaluates the homogeneity of the distribution of the edge direction, and based on the homogeneity. 2. The contour line extracting method according to claim 1, wherein the correction edge strength is calculated according to the magnitude of the determined homogeneity coefficient.
【請求項3】 更に、当該入力画像からその濃度勾配分
布を求めるグラディエント・ベクトル検出ステップを具
備し、当該補正エッジ強度算出ステップは、注目画素の
グラディエント・ベクトルと当該注目画素の近傍画素の
各グラディエント・ベクトルとがなす角度θの余弦値co
sθを算出し、得られた余弦値に応じて当該注目画素の
近傍画素の対応するエッジ強度を補正して、補正エッジ
強度を算出する請求項1に記載の輪郭線抽出方法。
3. The method according to claim 1, further comprising a gradient vector detecting step of obtaining a density gradient distribution from the input image, wherein the correcting edge intensity calculating step includes the step of calculating a gradient vector of the pixel of interest and each gradient of pixels in the vicinity of the pixel of interest. Cosine value co of angle θ between vector
2. The contour extraction method according to claim 1, wherein sθ is calculated, and a corresponding edge strength of a pixel adjacent to the pixel of interest is corrected according to the obtained cosine value to calculate a corrected edge strength.
【請求項4】 当該余弦値cosθに応じたエッジ強度の
補正が、当該注目画素のグラディエント・ベクトルと当
該注目画素の近傍画素のグラディエント・ベクトルとの
内積演算で実現される請求項3に記載の輪郭線抽出方
法。
4. The method according to claim 3, wherein the correction of the edge intensity according to the cosine value cosθ is realized by an inner product operation of a gradient vector of the pixel of interest and a gradient vector of a pixel near the pixel of interest. Contour extraction method.
【請求項5】 更に、当該入力画像からエッジ方向を検
出するエッジ方向検出ステップを具備し、当該補正エッ
ジ強度算出ステップが、注目画素における当該エッジ方
向と当該注目画素の近傍画素との位置関係に基づいて定
められる重み係数に応じて当該近傍画素のエッジ強度を
補正し、補正エッジ強度を算出する請求項1に記載の輪
郭線抽出方法。
5. An edge direction detecting step for detecting an edge direction from the input image, wherein the correcting edge strength calculating step includes determining a positional relationship between the edge direction and a neighboring pixel of the target pixel in the target pixel. 2. The contour line extracting method according to claim 1, wherein the edge strength of the neighboring pixel is corrected according to a weight coefficient determined based on the calculated edge strength.
【請求項6】 当該注目画素におけるエッジ方向に沿う
方向に位置する当該注目画素近傍の画素ほど、重み係数
が大きい請求項5に記載の輪郭線抽出方法。
6. The contour line extracting method according to claim 5, wherein a weighting coefficient is larger for a pixel closer to the target pixel located in a direction along the edge direction of the target pixel.
【請求項7】 請求項1に記載の輪郭線抽出方法のプロ
グラム・ソフトウエアを記憶することを特徴とする記憶
媒体。
7. A storage medium storing program software for the contour line extraction method according to claim 1.
JP11008607A 1999-01-18 1999-01-18 Method for extracting contour and storage medium Withdrawn JP2000209431A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11008607A JP2000209431A (en) 1999-01-18 1999-01-18 Method for extracting contour and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11008607A JP2000209431A (en) 1999-01-18 1999-01-18 Method for extracting contour and storage medium

Publications (1)

Publication Number Publication Date
JP2000209431A true JP2000209431A (en) 2000-07-28

Family

ID=11697656

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11008607A Withdrawn JP2000209431A (en) 1999-01-18 1999-01-18 Method for extracting contour and storage medium

Country Status (1)

Country Link
JP (1) JP2000209431A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003118521A (en) * 2001-10-09 2003-04-23 Nissan Motor Co Ltd White line detecting device
US7447377B2 (en) 2003-10-10 2008-11-04 Fujifilm Corporation Image processing method and apparatus, and image processing program
JP2011221862A (en) * 2010-04-12 2011-11-04 Ricoh Co Ltd Method and program for drawing distribution area of data points in coordinate plane
JP2013254490A (en) * 2012-06-07 2013-12-19 Fujitsu Ltd Device, method and electronic apparatus for extracting edge of object in image
JP2017076168A (en) * 2015-10-13 2017-04-20 株式会社キーエンス Image processing sensor, image processing method, and computer program
JP2019120644A (en) * 2018-01-10 2019-07-22 アイシン精機株式会社 Surface inspection device and surface inspection method
CN116684748B (en) * 2023-08-01 2023-09-26 世优(北京)科技有限公司 Photographic composition frame generation method and device and photographic equipment

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003118521A (en) * 2001-10-09 2003-04-23 Nissan Motor Co Ltd White line detecting device
US7447377B2 (en) 2003-10-10 2008-11-04 Fujifilm Corporation Image processing method and apparatus, and image processing program
JP2011221862A (en) * 2010-04-12 2011-11-04 Ricoh Co Ltd Method and program for drawing distribution area of data points in coordinate plane
JP2013254490A (en) * 2012-06-07 2013-12-19 Fujitsu Ltd Device, method and electronic apparatus for extracting edge of object in image
JP2017076168A (en) * 2015-10-13 2017-04-20 株式会社キーエンス Image processing sensor, image processing method, and computer program
JP2019120644A (en) * 2018-01-10 2019-07-22 アイシン精機株式会社 Surface inspection device and surface inspection method
JP7003669B2 (en) 2018-01-10 2022-01-20 株式会社アイシン Surface inspection equipment and surface inspection method
CN116684748B (en) * 2023-08-01 2023-09-26 世优(北京)科技有限公司 Photographic composition frame generation method and device and photographic equipment

Similar Documents

Publication Publication Date Title
US9292928B2 (en) Depth constrained superpixel-based depth map refinement
US9946954B2 (en) Determining distance between an object and a capture device based on captured image data
US6674904B1 (en) Contour tracing and boundary detection for object identification in a digital image
US9424486B2 (en) Method of image processing
USRE43206E1 (en) Apparatus and method for providing panoramic images
US7606439B2 (en) Method for extracting raw data from an image resulting from a camera shot
US10430948B2 (en) Method and system for preparing text images for optical-character recognition
US6993156B1 (en) System and method for statistically comparing and matching plural sets of digital data
US7098998B2 (en) Depth measuring method and depth measuring apparatus
US10019817B2 (en) Example-based edge-aware directional texture painting
US8340433B2 (en) Image processing apparatus, electronic medium, and image processing method
CN107545223B (en) Image recognition method and electronic equipment
US20150186753A1 (en) Image Processing Apparatus, Image Processing Method, and Image Processing Program
JP2000209431A (en) Method for extracting contour and storage medium
US20230334729A1 (en) Image generation method, apparatus, and device, and storage medium
US8238619B2 (en) Method of extracting ridge line and valley line from three-dimensional point data
JP2014507722A (en) Generalized robust multi-channel feature detector
JP3659426B2 (en) Edge detection method and edge detection apparatus
CN114049380A (en) Target object positioning and tracking method and device, computer equipment and storage medium
JPH05174182A (en) Method and device for document tilt angle detection
Wu et al. Image stitching based on ORB feature and RANSAC
Kale et al. A Technical Analysis of Image Stitching Algorithm Using Different Corner Detection Method
Karim et al. Improvement of Harris Algorithm Based on Gaussian Scale Space
Boracchi et al. Estimating camera rotation parameters from a blurred image
JP2006023976A (en) Parameter setting method, image pattern extraction method, parameter setting device, image pattern extraction device, and program for these methods

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: 20060404