JPH0816931B2 - Contour extraction method - Google Patents

Contour extraction method

Info

Publication number
JPH0816931B2
JPH0816931B2 JP62025711A JP2571187A JPH0816931B2 JP H0816931 B2 JPH0816931 B2 JP H0816931B2 JP 62025711 A JP62025711 A JP 62025711A JP 2571187 A JP2571187 A JP 2571187A JP H0816931 B2 JPH0816931 B2 JP H0816931B2
Authority
JP
Japan
Prior art keywords
pixel
gradient
image
pixels
density gradient
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.)
Expired - Lifetime
Application number
JP62025711A
Other languages
Japanese (ja)
Other versions
JPS63193282A (en
Inventor
隆 烏生
洋道 岩瀬
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP62025711A priority Critical patent/JPH0816931B2/en
Priority to AU11276/88A priority patent/AU583202B2/en
Priority to EP88101696A priority patent/EP0279297B1/en
Priority to US07/153,426 priority patent/US4908872A/en
Priority to DE88101696T priority patent/DE3886560T2/en
Publication of JPS63193282A publication Critical patent/JPS63193282A/en
Publication of JPH0816931B2 publication Critical patent/JPH0816931B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Description

【発明の詳細な説明】 〔概要〕 本発明は画像データ処理の方式に関し、特に入力画像
データの外形判断に必要な輪郭線を正確、且つ高速に抽
出処理する方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Outline] The present invention relates to a method of image data processing, and more particularly to a method of accurately and rapidly extracting a contour line necessary for determining an outer shape of input image data.

〔産業上の利用分野〕[Industrial applications]

画像処理技術の進歩に伴ってその応用面も拡大し、TV
カメラにより読み取った画像入力よりその外形を判別
し、ハンドリング、検査等に使用し、あるいは文字の読
み取りを行う等の用途が拡大している。このような用途
に対して、画像の輪郭線の抽出をリアルタイムで実行す
る手段として、より高速で、ハードウエア化の容易な輪
郭線抽出方式が要求されている。
With the progress of image processing technology, its application side has expanded and TV
Applications such as discriminating the outer shape from an image input by a camera, using it for handling, inspection, or reading characters are expanding. For such applications, a higher speed and easier hardware-based outline extraction method is required as a means for executing the extraction of the outline of an image in real time.

〔従来の技術〕[Conventional technology]

画像処理は公知のように画像を画素、或いはPIXEL等
と呼ばれる単位の点に分解し、これを直交座標アドレス
を持つ記憶装置の各語に対応して蓄積し、通常1語に対
応する画素単位でアドレスして処理を実行する。各画素
は通常多値の濃度(或いは輝度)レベルを示す3〜8ビ
ット、カラー画像においてはその構成原色を示すR,G,B
の各々についての情報が付加された1語により構成され
る。本発明は濃度についての処理の技術であるため白黒
の画像について説明する。また、濃度レベルとして2値
(白と黒のみ)だけの画像についての輪郭抽出は極めて
容易であるため言及せず、ここでは数10値以上の濃度レ
ベルを持つ画像を例にとる。
In the image processing, as is well known, the image is decomposed into pixels, or points of a unit called PIXEL, etc., and these are accumulated corresponding to each word of a storage device having an orthogonal coordinate address, and usually a pixel unit corresponding to one word. Address and execute the process. Each pixel is usually 3 to 8 bits indicating a multi-valued density (or luminance) level, and R, G, B indicating the constituent primary colors in a color image.
It is composed of one word to which information about each of is added. Since the present invention is a technique for processing density, a black and white image will be described. Further, since the contour extraction of an image having only binary values (only white and black) as the density level is extremely easy, it is not mentioned here, and an image having a density level of several tens of values or more is taken as an example here.

従来、画像の輪郭線の抽出はそのアルゴリズムの複雑
さから、主としてソフトウエアによる処理方式が使用さ
れてきた。以下にその一例を示しその処理のアルゴリズ
ムについて簡単に説明する。
Conventionally, a method of processing by software has been mainly used for extracting the contour line of an image because of the complexity of the algorithm. An example of that will be shown below, and the algorithm of the processing will be briefly described.

第6図に記憶装置内の画素の分布の例を示す。 FIG. 6 shows an example of the distribution of pixels in the storage device.

図において格子状の画素の分布は画像記憶装置の一部
を切り出し、拡大したもので、便宜上その座標位置をX1
〜X6、Y1〜Y5とし、各画素に記入してある数字がその画
素の濃度を示す。このように分布している画素からその
画像の輪郭を検出するには、従来、第7図にそのフロー
を示すような処理手順によっていた。これは微分により
濃度の勾配のベクトルを求め、その方向と大きさに従っ
て各画素毎にその近傍の画素との間に演算操作を行い、
濃度勾配の方向に沿って、濃度勾配が最大になる画素ア
ドレスを検出して輪郭線の判定を行う方法である。
In the figure, the distribution of the pixels in the grid pattern is an enlarged view of a part of the image storage device.
~ X6, Y1 to Y5, and the number written on each pixel indicates the density of that pixel. In order to detect the contour of the image from the pixels distributed in this way, conventionally, a processing procedure whose flow is shown in FIG. 7 has been used. This is to obtain the density gradient vector by differentiation, and perform an arithmetic operation between each pixel and its neighboring pixels according to its direction and size,
This is a method of determining a contour line by detecting a pixel address having the maximum density gradient along the direction of the density gradient.

ここで画像の微分について第8図により説明する。微
分係数を求める点をPとすると、図上の点Pに隣接する
8個の画素00〜22に着目し、各点の濃度をL00〜L22の記
号により示し、P点におけるX,Y方向に対しての微分係
数をDx,Dyとし、以下のように定義する。
Here, the image differentiation will be described with reference to FIG. Assuming that the point for which the differential coefficient is obtained is P, attention is paid to eight pixels 00 to 22 adjacent to the point P on the diagram, the densities of the respective points are indicated by the symbols L 00 to L 22 , and X and Y at the point P are shown. The differential coefficient with respect to the direction is defined as Dx and Dy, and is defined as follows.

Dx=(L22+L12+L02−L20−L10−L00)/3 Dy=(L22+L21+L20−L02−L01−L00)/3 この演算は隣接する6画素についての平均値を使用し
て微分係数を求めることに相当し、第7図に示す微分演
算部(X,Y方向各部)において行われる。
Dx = (L 22 + L 12 + L 02 -L 20 -L 10 -L 00) / 3 Dy = (L 22 + L 21 + L 20 -L 02 -L 01 -L 00) / 3 for 6 pixels This operation adjacent This is equivalent to obtaining the differential coefficient using the average value of, and is performed in the differential operation section (each section in the X and Y directions) shown in FIG.

次にその結果であるDx,Dyの値を使用し、濃度勾配計
算部において、濃度勾配の絶対値(以下Fpと略する)と
して Fp=(Dx2+Dy2)1/2 を求める。また、勾配方向計算部において、濃度勾配
の方向(以下Gpと略する)としてFpが所定値より大きい
画素に対して Gp=COS-1(Dx/Fp) (Dy≧0) Gp=−COS-1(Dx/Fp) (Dy<0) を求める。また、濃度勾配の大きさが該所定の値以下
である時は999等の特別の値を出力する。
Next, using the resulting values of Dx and Dy, Fp = (Dx 2 + Dy 2 ) 1/2 is obtained as the absolute value of the concentration gradient (hereinafter abbreviated as Fp) in the concentration gradient calculation unit. Further, in the gradient direction calculation unit, Gp = COS −1 (Dx / Fp) (Dy ≧ 0) Gp = −COS for pixels whose Fp is greater than a predetermined value as the direction of the density gradient (hereinafter abbreviated as Gp) Calculate 1 (Dx / Fp) (Dy <0). Further, when the magnitude of the density gradient is less than the predetermined value, a special value such as 999 is output.

以上の演算を第6図に示す画像記憶装置上の各画素に
ついて順次行い、その結果各画素毎にFp,Gpが求められ
る。
The above calculation is sequentially performed for each pixel on the image storage device shown in FIG. 6, and as a result, Fp and Gp are obtained for each pixel.

次に各画素毎に求められたFp,Gpを基にして輪郭線抽
出部において輪郭の決定を行うには以下のようなアルゴ
リズムを使用する。
Next, the following algorithm is used to determine the contour in the contour extraction unit based on Fp and Gp obtained for each pixel.

第9図に示すように円周を8個のセクターに等分
し、各々にa〜dの記号を付ける。各セクターの範囲
は、X軸の正方向を0として次のようにとっておく。
As shown in FIG. 9, the circumference is equally divided into eight sectors, each of which is labeled with a to d. The range of each sector is set as follows, where the positive direction of the X axis is 0.

セクターa: π/8>Gp≧−π/8および、これをπ丈回
転した方向 セクターb: 3π/8>Gp≧π/8および、これをπ丈回転
した方向 セクターc: 5π/8>Gp≧3π/8および、これをπ丈回
転した方向 セクターd: 7π/8>Gp≧5π/8および、これをπ丈回
転した方向 Gpがどのセクターに含まれるかにより、以下のような
条件を満たす画素が輪郭を形成する画素であると判定す
る。
Sector a: π / 8> Gp ≧ −π / 8 and the direction where this is rotated π length Sector b: 3π / 8> Gp ≧ π / 8 and the direction where this is rotated π length Sector c: 5π / 8> Gp ≧ 3π / 8 and the direction in which it is rotated π length Sector d: 7π / 8> Gp ≧ 5π / 8 and the direction in which this is rotated π length Depending on which sector Gp is included, the following conditions It is determined that the pixels satisfying the above are pixels forming the contour.

Gpがセクターaに含まれる時 Fp(x,y)≧Fp(x−1,y)であり、且つ Fp(x,y)≧Fp(x+1,y)である。 When Gp is included in sector a, Fp (x, y) ≧ Fp (x−1, y) and Fp (x, y) ≧ Fp (x + 1, y).

Gpがセクターbに含まれる時 Fp(x,y)≧Fp(x+1,y+1)であり、且つ Fp(x,y)≧Fp(x−1,y−1)である。 When Gp is included in sector b, Fp (x, y) ≧ Fp (x + 1, y + 1), and Fp (x, y) ≧ Fp (x−1, y−1).

Gpがセクターcに含まれる時 Fp(x,y)≧Fp(x,y+1)であり、且つ Fp(x,y)≧Fp(x,y−1)である。 When Gp is included in sector c, Fp (x, y) ≧ Fp (x, y + 1) and Fp (x, y) ≧ Fp (x, y−1).

Gpがセクターdに含まれる時 Fp(x,y)≧Fp(x+1,y−1)であり、且つ Fp(x,y)≧Fp(x−1,y+1)である。 When Gp is included in sector d, Fp (x, y) ≧ Fp (x + 1, y−1), and Fp (x, y) ≧ Fp (x−1, y + 1).

以上の操作はGpの方向をπ/4毎の8方向に区切り、第
8図に示す画素Pと、8方向に対応する00〜22の各画素
を比較し、Gpの方向でFpが最大になっている画素を抽出
する操作である。例えば、第5図において、X3,Y3の位
置の画素について求めたGpが図の矢印の方向であったと
すると、上記の論理よりこの画素は輪郭線を形成する画
素であると判定される。
The above operation divides the direction of Gp into eight directions of π / 4, compares the pixel P shown in FIG. 8 with each pixel of 00 to 22 corresponding to the eight directions, and finds that Fp is maximized in the direction of Gp. This is an operation to extract the pixels that have become. For example, in FIG. 5, if Gp obtained for the pixel at the position of X3, Y3 is in the direction of the arrow in the figure, it is determined from the above logic that this pixel is a pixel forming a contour line.

このようにして輪郭を形成する画素が抽出されるが、
特に輪郭線抽出の演算は通常その複雑さのためプログラ
ム制御により実行される。
In this way, the pixels forming the contour are extracted,
In particular, the contour extraction operation is usually performed by program control because of its complexity.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

以上の如く従来方式による画像処理方式においては、
輪郭線抽出のため、画像を構成する全画素について前項
にて説明したアルゴリズムに従って演算を行う必要があ
り、通常プログラム制御により実行される。このため処
理時間が著しく大きくなり、リアルタイムで輪郭の抽出
を行うために、これをハードウエア化、高速化する手段
が要求されている。
As described above, in the conventional image processing method,
In order to extract the contour line, it is necessary to perform the calculation according to the algorithm described in the previous section for all the pixels forming the image, which is usually executed by program control. For this reason, the processing time becomes remarkably long, and in order to extract the contour in real time, hardware and a means for speeding up this are required.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は上記のような問題点を解決するために第1図
にその原理を示す輪郭線抽出方式を使用する。
The present invention uses a contour line extraction method whose principle is shown in FIG. 1 in order to solve the above problems.

濃度勾配ベクトル計算部2は画素入力部1より入力す
る画像情報より、各画像アドレスにおけるFp3とGp4を求
め出力する。
The density gradient vector calculation unit 2 obtains and outputs Fp3 and Gp4 at each image address from the image information input from the pixel input unit 1.

このアドレスにおけるGp4がX軸の正負方向に対し正
負所定の角度(例えば±45°)の範囲に有る時はX方向
濃度勾配抽出部5Xが、Y軸の正負方向に対し正負所定の
角度(例えば±45°)の範囲に有る時はY方向濃度勾配
抽出部5Yが、Fp3を出力する。上記条件に合致しない場
合はそれぞれ数値“0"を出力する。
When Gp4 at this address is within a range of a positive / negative predetermined angle (for example, ± 45 °) with respect to the positive / negative direction of the X axis, the X-direction concentration gradient extraction unit 5X determines a positive / negative predetermined angle with respect to the positive / negative direction of the Y axis (for example, When it is within the range of ± 45 °, the Y-direction density gradient extraction unit 5Y outputs Fp3. When the above conditions are not met, the numerical value "0" is output.

最大値フイルタ6X,6YはX,Y方向濃度勾配抽出部算部5
X,5Yの出力の各画素のFpについて、X,Y軸方向の一定数
前後のアドレスに含まれる画素のFpの中の最大の値を代
替して出力する。
Maximum value filter 6 X, 6Y is the concentration gradient extraction unit X, Y direction calculation unit 5
Regarding the Fp of each pixel of the X, 5Y outputs, the maximum value in the Fp of the pixels contained in the addresses before and after a certain number of constants in the X and Y axis directions is substituted and output.

最大値フイルタ6X,6Yの出力は、同一アドレスの画素
のFp3と比較演算部7X,7Yにおいて比較され、一致する場
合はその画素アドレスに論理“1"を、不一致の場合は論
理“0"を出力する。
The outputs of the maximum value filters 6X and 6Y are compared with the Fp3 of the pixel at the same address in the comparison operation units 7X and 7Y. If they match, the pixel address is given a logical "1", and if they are not the same, a logical "0" is given. Output.

論理和部8において、2系統の比較演算部7X,7Yの出
力の論理和を作成し、これが輪郭線出力9として得られ
る。
The logical sum unit 8 creates the logical sum of the outputs of the two systems of the comparison operation units 7X and 7Y, and this is obtained as the contour line output 9.

〔作用〕[Action]

輪郭線として濃度の微分ベクトルより、微分値の最大
になる画素を抽出するために、微分ベクトルの方向がX,
Yの各方向に近い2群に分類し、最大値フイルタにより
処理した画像と原画像の比較を行い、再び2群を論理和
により結合することにより輪郭線を抽出する。
To extract the pixel with the maximum differential value from the density differential vector as the contour line, the direction of the differential vector is X,
The image is classified into two groups close to each direction of Y, the image processed by the maximum value filter is compared with the original image, and the two groups are again combined by the logical sum to extract the contour line.

〔実施例〕〔Example〕

第2図に本発明による輪郭線抽出方式の実施例を示
す。本図における画像入力部1、X,Y方向微分演算部21
X,21Y、その出力Dx,Dy、濃度勾配計算部22、勾配方向計
算部23の各部の動作については、従来例において説明し
たのと同一内容であるため説明は省略する。
FIG. 2 shows an embodiment of the contour line extraction method according to the present invention. The image input unit 1 and the X- and Y-direction differential calculation unit 21 in this figure
The operations of X, 21Y, their outputs Dx, Dy, the concentration gradient calculation unit 22, and the gradient direction calculation unit 23 are the same as those described in the conventional example, and thus the description thereof is omitted.

第3図Aに示した円形の対象物を含む画像を処理して
Fp,Gpを求め、その結果として記憶装置の面上には第3
図B,Cに示すような分布が得られたものとする。第3図
Bで線の太さをFpの値と考えると、当然輪郭の場所では
Fpの値が大きくなっている。また、第3図CではGpの方
向を矢印で示すが、原画像が円形であるので中心から放
射状に分布することは明らかである。図では輪郭の部分
についてのみGpを概念的に示してある。
Processing the image containing the circular object shown in FIG. 3A
Fp and Gp are obtained, and as a result, the third
It is assumed that the distributions shown in Figures B and C are obtained. Considering the thickness of the line in Fig. 3B as the value of Fp, naturally at the location of the contour
The value of Fp is large. Further, in FIG. 3C, the direction of Gp is indicated by an arrow, but it is clear that the original image is circular and therefore radially distributed from the center. In the figure, Gp is conceptually shown only for the contour portion.

Gpは先ず閾値処理部51X,51Yに入力し、X軸に近い方
向とY軸に近い方向に分類される。即ちX軸の正負方向
に対し±45°の範囲に有る時は閾値処理部51Xが、Y軸
の正負方向に対し±45°の範囲に有る時は閾値処理部51
Yが“1"を出力する。
Gp is first input to the threshold processing units 51X and 51Y and is classified into a direction close to the X axis and a direction close to the Y axis. That is, the threshold value processing unit 51X is in the range of ± 45 ° with respect to the positive / negative direction of the X axis, and the threshold value processing unit 51X is in the range of ± 45 ° with respect to the positive / negative direction of the Y axis.
Y outputs “1”.

ここで閾値処理部51X,51Yの出力は第3図D,Eに示すよ
うになる。
Here, the outputs of the threshold value processing units 51X and 51Y are as shown in FIGS. 3D and 3E.

閾値処理部51X,51Yの出力は何れか一方が論理“1"を
示すので、これを積演算部52X,52Yに入力しFpとの積を
とると、結果としてFpはGpの方向に従って分類される。
閾値処理部51Xの出力が“1"であるような領域にあるFp
は積演算部52Xより出力され(第3図F)、閾値処理部5
1Yの出力が“1"であるような領域にあるFpは積演算部52
Yより出力される(第3図G)。
One of the outputs of the threshold value processing units 51X and 51Y indicates a logical "1", and when this is input to the product calculation units 52X and 52Y and the product with Fp is taken, as a result, Fp is classified according to the direction of Gp. It
Fp in the area where the output of the threshold processing unit 51X is "1"
Is output from the product calculation unit 52X (FIG. 3F), and the threshold value processing unit 5
Fp in the area where the output of 1Y is “1” is the product operation unit 52
It is output from Y (Fig. 3G).

閾値処理部の意義は、次に行われる最大値フイルタリ
ングが有効に実行されるために、処理されるX,Yの各軸
方向に対して平行に近い方向のGpをもつ画素を選り分け
ることにある。また、X,Yの2軸方向に沿って処理する
のは、画像記憶装置のアドレスがX,Yアドレスであるた
め、走査するのが簡単でハードウエア化が容易であるこ
とにもよる。
The significance of the threshold value processing unit is that, in order to effectively execute the maximum value filtering to be performed next, it is necessary to select pixels having Gp in a direction close to parallel to each X, Y axis direction to be processed. It is in. Further, the processing along the two axes of X and Y is also because the address of the image storage device is the X and Y address, so scanning is simple and hardware implementation is easy.

最大値フイルタ6Xの動作を第4図により説明する。図
の上段(A)は処理が行われる前の記憶装置上のFpの分
布を示す。ここではX軸方向に図のように分布している
と仮定する。フイルタ演算のためX軸方向に、図のよう
に“ウインド”を設定する。これは処理する画素アドレ
スを中心としてX軸方向に5〜9程度連続したアドレス
で、このウインド内の画素を順次読み出し、その中で最
大のFpの値を出力とする。図ののウインドでは、ウイ
ンド内のFpで最大値は5であるので、中心であるのア
ドレスに、点線で示すように5を記入する。これは図の
下段(B)に処理後の画素の分布として示してある。次
にウインドを1アドレスずらして図ののウインドに移
動し、同様に最大値のFpを(B)ののアドレスに記入
する。こうして図では〜迄の処理を示してあり、最
大値フイルタリングの結果、(A)の内容はフイルタ演
算により(B)のように変化する。
The operation of the maximum value filter 6X will be described with reference to FIG. The upper part (A) of the figure shows the distribution of Fp on the storage device before the processing. Here, it is assumed that the X-axis direction is distributed as shown in the figure. Set "Window" in the X-axis direction as shown in the figure for filter calculation. This is an address continuous about 5 to 9 in the X-axis direction around the pixel address to be processed, and the pixels in this window are sequentially read out, and the maximum Fp value among them is output. In the window shown in the figure, the maximum value of Fp in the window is 5, so 5 is written in the center address as shown by the dotted line. This is shown as the distribution of pixels after processing in the lower part (B) of the figure. Next, shift the window by one address and move to the window in the figure, and similarly enter the maximum value Fp in the address in (B). Thus, in the figure, the processes up to are shown. As a result of the maximum value filtering, the contents of (A) are changed to (B) by the filter calculation.

この演算は最大値フイルタ6YについてはY軸方向にウ
インドを設定し、Y軸方向に処理を進める以外は最大値
フイルタ6Xと全く同じ動作をする。この結果、処理前に
Fpの最大値を示す画素は1個であったのが、処理の結
果、5個の幅に広がり、この幅はウインドの幅に等しい
ことは容易に理解できる。第3図H,Iに最大値フイルタ6
X,6Yの出力の画素の分布を示す。図中黒線で幅があるの
部分がFpの最大値が分布している領域であり、他の部分
はFpの値が元の値と変わっていることを概念的に示して
ある。
This operation is exactly the same as that of the maximum value filter 6X except that the window is set in the Y axis direction for the maximum value filter 6Y and the processing is advanced in the Y axis direction. As a result, before processing
Although the number of pixels showing the maximum value of Fp was one, as a result of the processing, it is spread to five widths, and it is easy to understand that this width is equal to the width of the window. Fig. 3 H and I have maximum value filter 6
The pixel distribution of the X and 6Y outputs is shown. In the figure, a black line with a width is a region in which the maximum value of Fp is distributed, and other parts conceptually show that the value of Fp is different from the original value.

この操作の意義は輪郭線の位置を決定するためにFpが
最大値をとる点を抽出する手段として、従来例のように
その周辺近傍の画素のFpとの間で比較、判定を繰り返す
代わりに、次に説明する比較演算のみでFpが最大値をと
る点を抽出するための前処理である。そのため、Fpの最
大値の分布を拡大強調する目的で行われる。
The significance of this operation is to extract the point where Fp takes the maximum value in order to determine the position of the contour line, instead of repeating comparison and determination with Fp of pixels in the vicinity of it as in the conventional example, instead of repeating it. This is a preprocessing for extracting the point where Fp has the maximum value only by the comparison operation described below. Therefore, it is performed for the purpose of expanding and emphasizing the distribution of the maximum value of Fp.

比較演算部7X,7Yは第5図に示すように、最大値フイ
ルタによる処理の前後のFpの値を画素単位で比較し、等
しい値を持つ部分に論理値“1"を記入し、これを輪郭線
として抽出する操作である。これは第5図より明らかな
ように最大値フイルタリングによりFpの最大値は元のま
まで、分布の幅をひろげることにより強調され、最大値
以外の部分はFpの値が変化しているので、簡単な比較に
より第3図J,Kのように輪郭線が抽出される。
As shown in FIG. 5, the comparison operation units 7X and 7Y compare the values of Fp before and after the processing by the maximum value filter pixel by pixel, and write a logical value “1” in the portion having the same value. This is an operation for extracting the contour line. This is emphasized by expanding the width of the distribution while the maximum value of Fp remains unchanged from the maximum value filtering as is clear from FIG. 5, and the Fp value changes in the parts other than the maximum value. By simple comparison, contour lines are extracted as shown in FIGS.

閾値処理部51X,51Yより比較演算部7X,7Yの間の処理
は、Gpの方向別に実行され、且つ、各画素はX,Yの何れ
か一方の列で処理されているので、最後にこれを論理和
により加算し、纏めることにより第3図Lのように輪郭
線の出力として完成する。
Since the processing between the threshold value processing units 51X and 51Y and the comparison operation units 7X and 7Y is executed for each direction of Gp, and each pixel is processed in one of the columns X and Y, this is finally performed. Are added by a logical sum and put together to complete a contour line output as shown in FIG. 3L.

以上の動作と従来例を比較すると、Fpが最大値をとる
点の検出を従来は当該画素と隣接画素のFpの間の大小関
係を演算して行っていたが、本発明の方式では最大値フ
イルタを利用したことにより画像記憶装置を走査する形
で単純な演算の繰り返しで実行可能である。また閾値処
理部51X,51Yより比較演算部7X,7Yの間の処理はX,Y軸の
みが異なり、他は全く同一の処理がおこなわれるので、
同一の回路が使用出来る。これはハードウエア化に適し
た方式であり、特にパイプライン方式等を適用すると高
速化も容易に実現出来る。
Comparing the above operation with the conventional example, detection of the point where Fp has the maximum value was conventionally performed by calculating the magnitude relationship between the pixel and Fp of the adjacent pixel, but in the method of the present invention, the maximum value is calculated. By using the filter, it is possible to execute it by repeating a simple operation in the form of scanning the image storage device. Further, the processing between the threshold value processing units 51X and 51Y between the comparison operation units 7X and 7Y is different only in the X and Y axes, and the other processes are exactly the same.
The same circuit can be used. This is a method suitable for hardware implementation, and particularly when a pipeline method or the like is applied, speedup can be easily realized.

〔発明の効果〕〔The invention's effect〕

本発明の実施により、単純なアルゴリズムによる輪郭
線の抽出が可能になり、そのハードウエア化、それに伴
う高速化が容易になる。
By implementing the present invention, it becomes possible to extract a contour line by a simple algorithm, which facilitates hardware implementation and accompanying speeding up.

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

第1図は本発明による輪郭線抽出方式の原理図を、 第2図は本発明による輪郭線抽出方式の実施例を、 第3図(A〜L)は本発明による処理の具体例、 第4図は最大値フイルタの説明、 第5図は比較演算の説明、 第6図は画像記憶装置内の画素の分布、 第7図は従来方式による輪郭抽出のフロー、 第8図は画像の微分方法の例、 第9図は輪郭線抽出の例を示す。 第1、2図において、 1は画像入力部、2は濃度勾配ベクトル計算部、21X,Y
はX,Y方向微分演算部、22は濃度勾配計算部、23は勾配
方向計算部、3は濃度勾配、4は勾配方向、5X,YはX,Y
方向濃度勾配抽出部、51X,Yは閾値処理部X,Y、52X,Yは
積演算部X,Y、6X,Yは最大値フイルタX,Y、7X,Yは比較演
算部X,Y、8は論理和部、9は輪郭線出力である。
FIG. 1 is a principle diagram of the contour line extraction method according to the present invention, FIG. 2 is an embodiment of the contour line extraction method according to the present invention, and FIG. 3 (A to L) are specific examples of the processing according to the present invention. FIG. 4 is a description of the maximum value filter, FIG. 5 is a description of comparison operation, FIG. 6 is a pixel distribution in the image storage device, FIG. 7 is a flow of contour extraction by a conventional method, and FIG. 8 is image differentiation. Example Method, FIG. 9 shows an example of contour extraction. In FIGS. 1 and 2, 1 is an image input unit, 2 is a density gradient vector calculation unit, 21X, Y
Is an X, Y direction differential calculation unit, 22 is a concentration gradient calculation unit, 23 is a gradient direction calculation unit, 3 is a concentration gradient, 4 is a gradient direction, and 5X, Y is X, Y.
Directional concentration gradient extraction unit, 51X, Y is a threshold processing unit X, Y, 52X, Y is a product operation unit X, Y, 6X, Y is a maximum value filter X, Y, 7X, Y is a comparison operation unit X, Y, Reference numeral 8 is a logical sum unit, and 9 is a contour line output.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】直交軸アドレスによりアドレス指定され、
多値の濃度レベルを有する画素の集合よりなる画像を処
理して該画像の輪郭線を抽出する画像処理装置であっ
て、 画像入力部(1)より入力する画素を処理して、各画素
アドレスにおける濃度勾配(3)と勾配方向(4)を出
力する濃度勾配ベクトル計算部(2)と、 該勾配方向(4)がX軸の正負方向より正負所定の角度
以内の方向を持つ画素に対しては該濃度勾配(3)を、
上記範囲以外の方向を持つ画素については数値“0"を出
力するX方向濃度勾配抽出部(5X)と、 該勾配方向(4)がY軸の正負方向より正負所定の角度
以内の方向を持つ画素に対しては該濃度勾配(3)を、
上記範囲以外の方向を持つ画素については数値“0"を出
力するY方向濃度勾配抽出部(5Y)と、 該X方向濃度勾配抽出部(5X)の出力についてはX軸方
向、該Y方向濃度勾配抽出部(5Y)の出力についてはY
軸方向の、入力画素アドレスを中心とした所定の近傍区
間内に含まれる画素中での濃度勾配(3)の最大値を選
択出力する、最大値フイルタX,Y(6X,6Y)と、 該最大値フイルタX,Y(6X,6Y)の出力と、同一アドレス
の該濃度勾配(3)を比較し、一致する場合のみ論理値
“1"を出力する比較演算部X,Y(7X,7Y)と、 一対の該比較演算部X,Y(7X,7Y)の出力の論理和を輪郭
線出力(9)として生成する論理和部(8)よりなるこ
とを特徴とする輪郭線抽出方式。
1. Addressing with an orthogonal axis address,
An image processing apparatus for processing an image composed of a set of pixels having multi-valued density levels to extract contour lines of the image, processing pixels input from an image input unit (1), A density gradient vector calculation unit (2) for outputting the density gradient (3) and the gradient direction (4) in the pixel, and the gradient direction (4) for a pixel having a direction within a predetermined angle between the positive and negative directions of the X axis. The concentration gradient (3)
For a pixel having a direction other than the above range, an X-direction density gradient extraction unit (5X) that outputs a numerical value “0”, and the gradient direction (4) has a direction within a predetermined angle between the positive and negative directions of the Y axis. For the pixel, the density gradient (3)
For pixels having directions other than the above range, a Y-direction density gradient extraction unit (5Y) that outputs the numerical value “0”, and for the output of the X-direction density gradient extraction unit (5X), the X-axis direction and the Y-direction density Y for the output of the gradient extractor (5Y)
A maximum value filter X, Y (6X, 6Y) for selectively outputting the maximum value of the density gradient (3) in the pixels included in a predetermined neighborhood section centered on the input pixel address in the axial direction; A comparison operation unit X, Y (7X, 7Y) that compares the output of the maximum value filter X, Y (6X, 6Y) with the density gradient (3) at the same address and outputs a logical value "1" only when they match. ) And a pair of comparison operation units X, Y (7X, 7Y) output as a contour line output (9).
JP62025711A 1987-02-06 1987-02-06 Contour extraction method Expired - Lifetime JPH0816931B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP62025711A JPH0816931B2 (en) 1987-02-06 1987-02-06 Contour extraction method
AU11276/88A AU583202B2 (en) 1987-02-06 1988-02-04 Method and apparatus for extracting pattern contours in image processing
EP88101696A EP0279297B1 (en) 1987-02-06 1988-02-05 Pattern contours in image processing
US07/153,426 US4908872A (en) 1987-02-06 1988-02-05 Method and apparatus for extracting pattern contours in image processing
DE88101696T DE3886560T2 (en) 1987-02-06 1988-02-05 Pattern contours in image processing.

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62025711A JPH0816931B2 (en) 1987-02-06 1987-02-06 Contour extraction method

Publications (2)

Publication Number Publication Date
JPS63193282A JPS63193282A (en) 1988-08-10
JPH0816931B2 true JPH0816931B2 (en) 1996-02-21

Family

ID=12173375

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62025711A Expired - Lifetime JPH0816931B2 (en) 1987-02-06 1987-02-06 Contour extraction method

Country Status (1)

Country Link
JP (1) JPH0816931B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
USRE42794E1 (en) 1999-12-27 2011-10-04 Smart Technologies Ulc Information-inputting device inputting contact point of object on recording surfaces as information
USRE43084E1 (en) 1999-10-29 2012-01-10 Smart Technologies Ulc Method and apparatus for inputting information including coordinate data
US8692768B2 (en) 2009-07-10 2014-04-08 Smart Technologies Ulc Interactive input system
US8902193B2 (en) 2008-05-09 2014-12-02 Smart Technologies Ulc Interactive input system and bezel therefor
US9442607B2 (en) 2006-12-04 2016-09-13 Smart Technologies Inc. Interactive input system and method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007018248A (en) * 2005-07-07 2007-01-25 Sony Corp Image processor, image processing method, and program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
USRE43084E1 (en) 1999-10-29 2012-01-10 Smart Technologies Ulc Method and apparatus for inputting information including coordinate data
USRE42794E1 (en) 1999-12-27 2011-10-04 Smart Technologies Ulc Information-inputting device inputting contact point of object on recording surfaces as information
US9442607B2 (en) 2006-12-04 2016-09-13 Smart Technologies Inc. Interactive input system and method
US8902193B2 (en) 2008-05-09 2014-12-02 Smart Technologies Ulc Interactive input system and bezel therefor
US8692768B2 (en) 2009-07-10 2014-04-08 Smart Technologies Ulc Interactive input system

Also Published As

Publication number Publication date
JPS63193282A (en) 1988-08-10

Similar Documents

Publication Publication Date Title
US4908872A (en) Method and apparatus for extracting pattern contours in image processing
KR101506060B1 (en) Feature-based signatures for image identification
Capson An improved algorithm for the sequential extraction of boundaries from a raster scan
JPS62125481A (en) Pattern recognition equipment
GB2244886A (en) Apparatus for extracting a text region in a document image
JP5854802B2 (en) Image processing apparatus, image processing method, and computer program
CN105069754B (en) System and method based on unmarked augmented reality on the image
CN111539238B (en) Two-dimensional code image restoration method and device, computer equipment and storage medium
JP3066599B2 (en) Method for clipping polygons for display on a computer output display
JPH0816931B2 (en) Contour extraction method
US5020002A (en) Method and apparatus for decomposing a quadrilateral figure for display and manipulation by a computer system
US5014331A (en) Method of detecting an internal point within a closed area
CN111444834A (en) Image text line detection method, device, equipment and storage medium
Hande Image edge detection by mean difference thresholding
JPS6055474A (en) Detector for difference between images
Tursun et al. A Joint Approach of Harris Corners Detection and Baseline Searching for Localization of Uyghur Text Lines in Image Sequences.
JP2890307B2 (en) Table space separation device
JP2000187730A (en) Method and device for processing picture data of construction drawing and computer readable recording medium storing control program for the method
JPH0812695B2 (en) Area extraction device
JPH04125792A (en) Mark inspecting method
CN113971770A (en) Video copy detection method and device for frame
JPH03269689A (en) Document reading device
Wójcik Method of contour recognition
JPS5927374A (en) Boundary line tracking circuit
CN115760788A (en) Defect generation method for deep learning task