JPH0624020B2 - Method for detecting filled area in digital image - Google Patents

Method for detecting filled area in digital image

Info

Publication number
JPH0624020B2
JPH0624020B2 JP62145517A JP14551787A JPH0624020B2 JP H0624020 B2 JPH0624020 B2 JP H0624020B2 JP 62145517 A JP62145517 A JP 62145517A JP 14551787 A JP14551787 A JP 14551787A JP H0624020 B2 JPH0624020 B2 JP H0624020B2
Authority
JP
Japan
Prior art keywords
pixel
pixels
pattern
filled area
point
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
JP62145517A
Other languages
Japanese (ja)
Other versions
JPS63310090A (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.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP62145517A priority Critical patent/JPH0624020B2/en
Publication of JPS63310090A publication Critical patent/JPS63310090A/en
Publication of JPH0624020B2 publication Critical patent/JPH0624020B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)
  • Image Generation (AREA)

Description

【発明の詳細な説明】 <産業上の利用分野> 本発明は、与えられたディジタル画像データより画像内
の塗り潰し部分を効率良く抽出するディジタル画像の塗
り潰し領域検出方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION <Industrial field of application> The present invention relates to a digital image filled area detection method for efficiently extracting a filled portion in an image from given digital image data.

<従来の技術> OA(Office Automation)、CAD(Computer Aide
d Design)等の普及により図面の自動読み取りを目的
とした図面認識に対する研究、開発が最近盛んに行なわ
れている。
<Conventional technology> OA (Office Automation), CAD (Computer Aide)
Due to the spread of d Design) etc., research and development for drawing recognition for the purpose of automatic reading of drawings have been actively conducted recently.

図面認織では、ディジタル画像としての図面データをベ
クトル構造等の数値データに一旦変換してから解析する
ことが一般的である。この際、電気回路図に代表される
ような図面では、第13図に示すように、通常の線図形部
の分岐点を示す黒丸a、ダイオードの一部を形成する三
角形部b等の黒画素塗り潰し部分が混在しているため、
予め両者を効率良く分離し、抽出する必要がある。
In the drawing recognition, it is general that the drawing data as a digital image is once converted into numerical data such as a vector structure and then analyzed. At this time, in a drawing typified by an electric circuit diagram, as shown in FIG. 13, black pixels such as a black circle a indicating a branch point of a normal line figure portion and a triangle portion b forming a part of a diode are displayed. Since the filled parts are mixed,
It is necessary to efficiently separate and extract both in advance.

従来のディジタル画像の塗り潰し部分の抽出方法は、細
線化処理を伴うものとして次に説明するような処理手順
によるものが知られている。即ち、 第14(a)に示すような原ディジタル画像に対し
て、例えば「細線化法についての諸考察」(田村;電子
通信学会技術研究報告,PRL75−66,1975)等の文献
に記載されているHildithの細線化法を用いて標準の線
幅が1画素の図形になるまで細線化を行ない、第14図
(b)に示す線図形部と塗り潰し領域が混在した細線化
画像を得る。
It is known that a conventional method of extracting a filled-in portion of a digital image is based on a processing procedure as described below as a method involving thinning processing. That is, with respect to the original digital image as shown in 14 (a), it is described in documents such as "Considerations regarding thinning method"(Tamura; IEICE technical research report, PRL75-66, 1975). Using the Hildith thinning method, the thinning is performed until the standard line width becomes a figure of 1 pixel, and the thinned image shown in FIG. 14B in which the line figure part and the filled area are mixed is obtained.

得られた細線化画像に対して、3画素×3画素のマ
スク・パターンを用いて、輪郭点抽出処理を施し、第14
図(c)に示す輪郭点抽出画像を細線化画像とは別に生
成する。
Contour point extraction processing is performed on the obtained thinned image using a mask pattern of 3 pixels × 3 pixels,
The contour point extraction image shown in FIG. 7C is generated separately from the thinned image.

得られた輪郭点抽出画像上で線分追跡を行ない、ベ
クトル・データを作成する。
A line segment is traced on the obtained contour point extraction image to create vector data.

ベクトル相互間の位置関係からベクトルを辿ること
により、全てのループl〜lを検出する。
All the loops l 1 to l 5 are detected by tracing the vectors from the positional relationship between the vectors.

輪郭点抽出画像上で検出された全てのループl
について、第14図(b)に示す細線化画像上の対応
する位置の各ループ内の黒画素の有無を調べ、塗り潰し
領域か否かを判別する。
All loops l 1 to detected on the contour point extraction image
For l 5 , the presence or absence of black pixels in each loop at the corresponding position on the thinned image shown in FIG. 14 (b) is checked to determine whether it is a filled area.

以上の処理手順に従って、原ディジタル画像における塗
り潰し領域を抽出する。
In accordance with the above processing procedure, the filled area in the original digital image is extracted.

<発明が解決しようとする問題点> しかしながら、上記した従来の方法では、画像上の全て
のループについてループ内の黒画素の有無を調べる必要
があるため、ゲート、フリップ・フロップ等のループを
構成するシンボルが塗り潰し領域に比較して数多く含ま
れる電気回路図のような図面に対しては、手間がかか
り、塗り潰し領域を効率良く抽出することができない。
<Problems to be Solved by the Invention> However, in the above-described conventional method, it is necessary to check the presence or absence of black pixels in the loop for all loops on the image. Therefore, loops such as gates and flip-flops are configured. It is troublesome for a drawing such as an electric circuit diagram in which a large number of symbols to be filled are included compared to the filled area, and the filled area cannot be efficiently extracted.

また、従来の方法では、細線化画像を保持するための、
既存の画像メモリの他に輪郭点抽出画像を一時格納する
ための画像メモリをもう1枚別に設ける必要があり、こ
の分ハードウェアが増加するため好ましくない。
Further, in the conventional method, for holding the thinned image,
In addition to the existing image memory, it is necessary to provide another image memory for temporarily storing the contour point extraction image, which is not preferable because the hardware increases accordingly.

本発明は以上の不都合な点を考慮してなされたものであ
り、原画像に適度な細線化処理を行なって得られる、線
図形部と塗り潰し領域が混在する細線化図形において、
ループを検出することなく直接的に効率良く塗り潰し領
域を抽出できるような方法を実現することを目的とす
る。
The present invention has been made in consideration of the above disadvantages, and in the thinned figure in which the line figure part and the filled area are mixed, which is obtained by performing an appropriate thinning process on the original image,
An object of the present invention is to realize a method capable of directly and efficiently extracting a filled area without detecting a loop.

<問題を解決するための手段> 以上の問題を解決した本発明は、3画素×3画素の塗り
潰し領域検出用パターンを保持し、このパターンと現在
のマスク・パターンとを比較して塗り潰し領域を検出す
るものであり、その方法は次の通りである。
<Means for Solving the Problem> In the present invention, which solves the above problem, a pattern for detecting a filled area of 3 pixels × 3 pixels is held, and this pattern is compared with the current mask pattern to determine the filled area. The detection method is as follows.

即ち、対象図面に細線化を行うことにより得られた線図
形部と塗り潰し領域とが混在するディジタル画像データ
を格納する画像メモリと、前記画像メモリ上の注目画素
の画素値及びその近傍8画素の値を読み出すリード・ア
クセスと指定された注目画素に画素値を書き込むライト
・アクセスとを行うアドレス制御部と、前記画像メモリ
から読み出された前記注目画素の画素値及びその近傍8
画素の値である3画素×3画素のマスク・パターンに対
応する直列データを順次取り込みアドレス信号列に変換
する直並列変換回路と、前記アドレス信号列に従って1
ビット・データ信号を発生するデータ・テーブル・メモ
リと、複数個のレジスタ及び演算器を有し前記直並列変
換回路及び前記データ・テーブル・メモリを参照して次
に追跡すべき注目画素の座標の決定及び塗り潰し領域の
境界線の座標を生成する境界線追跡部とを備え、前記デ
ィジタル画像の塗り潰し領域を検出するディジタル画像
の塗り潰し領域検出方法において、このディジタル画像
データを3画素×3画素のマスク・パターンを用いて順
次ラスタ操作してこのマスク・パターンの内容が予め定
めた塗り潰し領域検出用パターンと一致した場合に、 (イ)前記マスク・パターンにおける注目画素を塗り潰
し境界出発点とするとともにこの注目画素の左隣の画素
を探索開始点として反時計回りまたは時計回りに画素値
を調べ最初の黒画素を追跡画素とする手順と、 (ロ)前記追跡画素を中心に3画素×3画素のマスク・
パターンを設定してこのマスク・パターンが前記塗り潰
し領域検出用パターンと一致した場合にこの追跡画素を
塗り潰し境界点とするとともに1つ前の塗り潰し境界点
を探索開始点とする手順と、 (ハ)前記マスク・パターンと前記塗り潰し領域検出用
パターンと一致しない場合は前記追跡画素を探索開始点
とするとともに1つ前の塗り潰し境界点を追跡画素とし
て手順(ロ)を繰り返す手順と、 を有することを特徴とするディジタル画素の塗り潰し領
域検出方法である。
That is, an image memory for storing digital image data in which a line figure portion and a filled area obtained by thinning the target drawing are mixed, a pixel value of a target pixel on the image memory, and 8 pixels in the vicinity thereof. An address control unit that performs a read access for reading a value and a write access for writing a pixel value to a specified target pixel, and a pixel value of the target pixel read from the image memory and its vicinity 8
A serial-parallel conversion circuit that sequentially takes in serial data corresponding to a mask pattern of 3 pixels × 3 pixels, which is a pixel value, and converts the serial data into an address signal string, and 1 according to the address signal string.
A data table memory for generating a bit data signal, a plurality of registers and an arithmetic unit are provided to refer to the serial-parallel conversion circuit and the data table memory, and the coordinates of the pixel of interest to be tracked next. In a digital image filled area detecting method for detecting a filled area of a digital image, the digital image data is a mask of 3 pixels × 3 pixels. When the contents of this mask pattern match a predetermined fill area detection pattern by sequentially performing raster operations using the pattern, (a) the pixel of interest in the mask pattern is set as the fill boundary starting point, and The first black pixel is checked by checking the pixel value counterclockwise or clockwise with the pixel to the left of the pixel of interest as the search start point. A step of tracking pixel, (b) a mask of 3 × 3 pixels around the tracking pixel
When a pattern is set and the mask pattern coincides with the pattern for detecting the filled area, the tracing pixel is set as the filled boundary point and the previous filled boundary point is set as the search start point, and (c) When the mask pattern does not match the filled area detection pattern, the tracking pixel is used as a search start point, and the procedure (b) is repeated using the previous filled boundary point as a tracking pixel. This is a method for detecting a filled area of a characteristic digital pixel.

ここで、前記塗り潰し領域検出用パターンは、中心画素
が黒画素である256通りの3画素×3画素のマスク・
パターンから、(前記中心画素の周辺画素数が2以下か
つこの周辺画素数と8連結画素数が同じ値であるマスク
・パターン)を除いたマスク・パターンとする。
Here, the filled area detection pattern is a mask of 256 types of 3 pixels × 3 pixels in which the central pixel is a black pixel.
A mask pattern is obtained by excluding (a mask pattern in which the number of peripheral pixels of the central pixel is 2 or less and the number of peripheral pixels is the same as the number of 8-connected pixels) from the pattern.

<作用> 本発明のディジタル画像の塗り潰し領域検出方法は、細
線化画像を有する画像メモリを3画素×3画素のマスク
・パターンでラスタ走査し、予め設定した塗り潰し領域
検出用パターンと等しくなった場合に境界追跡操作を開
始する。そして、このマスク・パターン内に探索開始点
を設定し、反時計回りまたは時計回りにマスター・パタ
ーンを調べ、黒画素を追跡画素として抽出する。この追
跡画素を中心に3画素×3画素のマスク・パターンを設
定して塗り潰し領域検出用パターンと一致するか否かを
みて、一致していればこの追跡画素を塗り潰し境界点と
する。一致していない時は現在の追跡画素を探索開始
点、直前の塗り潰し境界点を追跡画素として処理を続行
する。
<Operation> In the method for detecting a filled area of a digital image according to the present invention, when an image memory having a thinned image is raster-scanned with a mask pattern of 3 pixels × 3 pixels and a preset filled area detection pattern is obtained. The boundary tracking operation is started. Then, a search start point is set in this mask pattern, the master pattern is examined counterclockwise or clockwise, and black pixels are extracted as tracking pixels. A mask pattern of 3 pixels × 3 pixels is set with the tracking pixel at the center, and it is checked whether or not the pattern matches the pattern for detecting the filled area. If they match, the tracking pixel is set as the filled boundary point. If they do not match, the processing is continued with the current tracking pixel as the search start point and the immediately preceding filled boundary point as the tracking pixel.

<実施例> 第1図は本発明の方法を具体的に実施する一例を示す構
成ブロック図である。
<Embodiment> FIG. 1 is a structural block diagram showing an example for specifically carrying out the method of the present invention.

この図はディジタル画像処理装置の一般的な構成であ
り、画像メモリ1、アドレス制御部2、直並列変換回路
3、データ・テーブル・メモリ4、境界線追跡部5、バ
ッファ・メモリ6の主要部分より構成される。本発明の
方法は境界線追跡部5内の処理アルゴリズムとして格納
される。
This figure shows a general configuration of a digital image processing apparatus, which is a main part of an image memory 1, an address control unit 2, a serial / parallel conversion circuit 3, a data table memory 4, a boundary line tracing unit 5, and a buffer memory 6. It is composed of The method of the present invention is stored as a processing algorithm in the boundary tracking unit 5.

ここで、この画像処理装置における各部の動作を簡単に
説明する。
Here, the operation of each unit in this image processing apparatus will be briefly described.

画像メモリ1はディジタル画像データを格納する画素メ
モリであり、対象図面に適度な細線化を行なうことによ
り得られた、線図形部を塗り潰し領域が混在するディジ
タル画像データが予め格納されている。
The image memory 1 is a pixel memory for storing digital image data, and prestores digital image data obtained by performing appropriate thinning on a target drawing and in which line drawing parts are mixed with regions.

アドレス制御部2は、境界線追跡部5からの指示により
画像メモリ1へのリード/ライト・アクを高速に行なう
ブロックである。また、画像メモリ1上の注目画素の
X,Y座標が境界線追跡部5から与えられた場合に、リ
ード・アクセスでは、第3図(a)に示すように、X,
Y座標で指定される注目画素Rの画素値(黒または白、
“1”または“0”)と第3図(b)に示す画素Rの近
傍8画素の値を画素R,R,R,R,R,R
,R,Rの順に画像メモリ1より連続して読み出
し、ライト・アクセスでは、X,Y座標で指定される注
目画素Rに画素値“0”または“1”を書き込むもので
ある。
The address control unit 2 is a block that performs read / write access to the image memory 1 at high speed according to an instruction from the boundary line tracking unit 5. Further, when the X and Y coordinates of the pixel of interest on the image memory 1 are given from the boundary line tracking section 5, in the read access, as shown in FIG.
The pixel value of the target pixel R specified by the Y coordinate (black or white,
“1” or “0”) and the values of 8 pixels in the vicinity of the pixel R shown in FIG. 3B are set to the pixels R 0 , R 1 , R 2 , R 3 , R 4 , R.
5 , 5 , R 6 , and R 7 are successively read from the image memory 1 in order, and in the write access, the pixel value “0” or “1” is written to the target pixel R designated by the X and Y coordinates.

直並列変換回路3は画像メモリ1から読み出された3画
素×3画素のマスク・パターンに対応する9ビットの直
列データを順次取り込み、9ビットのアドレス信号列に
変換する。
The serial-parallel conversion circuit 3 sequentially takes in 9-bit serial data corresponding to the mask pattern of 3 pixels × 3 pixels read from the image memory 1 and converts it into a 9-bit address signal sequence.

データ・テーブル・メモリ4は直並列変換回路3の9ビ
ット・アドレス出力AD(#000〜#1FF;#は1
6進表示)に従って予め定められている“0”または
“1”の1ビツト・データ信号Cを発生する。
The data table memory 4 is a 9-bit address output AD (# 000 to # 1FF; # is 1) of the serial-parallel conversion circuit 3.
A one-bit data signal C of "0" or "1" which is predetermined according to the hexadecimal notation is generated.

境界線追跡部5は複数個のレジスタRP,RF,RP
,RPi−1,RP,RQ及び演算器等を有し、
全体の制御及び塗り潰し部分の抽出アルゴリズムを実行
するブロックである。また、直並列変換回路3及びデー
タ・テーブル・メモリ4からのデータを参照して、次に
追跡すべき注目画素のX,Y座標の決定及び塗り潰し領
域の境界線の座標を生成する。
A plurality of registers border following section 5 RP S, RF, RP
E , RP i-1 , RP i , RQ j, and an arithmetic unit,
This is a block that executes the overall control and the extraction algorithm of the filled portion. Further, it refers to the data from the serial-parallel conversion circuit 3 and the data table memory 4 to determine the X and Y coordinates of the pixel of interest to be tracked next and generate the coordinates of the boundary line of the filled area.

バッファ・メモリ6は境界線追跡部5で塗り潰し部分の
抽出処理に必要な一時点なデータ及び順次抽出される塗
り潰し領域の境界線の座標点列を格納する。
The buffer memory 6 stores temporary point data necessary for the extraction processing of the filled portion in the boundary line tracing section 5 and the coordinate point sequence of the boundary line of the filled area sequentially extracted.

さて、本発明が対象とする図形は、原画像の線部分が線
図形になるまでの適度な細線化処理が予め行なわれた8
連結の線図形部(画素を注目画素から上下左右斜めの8
方向に連ねていくもの)と塗り潰し領域が混在した第4
図に示すようなディジタル画像データである。この図で
網線で示す領域が塗り潰し領域である。
By the way, for the graphic object of the present invention, an appropriate thinning process is performed in advance until the line part of the original image becomes a line graphic.
Connected line figure part (Pixel 8
4) in which filled areas are mixed.
The digital image data is as shown in the figure. In this figure, the area indicated by the mesh line is the filled area.

次に本発明の方法を具体的に述べる前に、本発明方法の
原理を説明する。
Next, before specifically describing the method of the present invention, the principle of the method of the present invention will be described.

本発明方法の概要は、<問題を解決するための手段>及
び<作用>の項にも述べたように、8連結の線図形部と
塗り潰し領域が混在する細線化画像を格納した画像メモ
リ1を3画素×3画素のマスク・パターンを用いて順次
ラスタ走査し、このマスク・パターンの内容が予め定め
られた塗り潰し領域検出用パターンに一致した場合にこ
のマスクの中心画素を出発点として、例えば「コンピュ
ータ画像処理」(安居院,中嶋;産報出版,1979)等の
文献に記載されている3画素×3画素のマスクを用いた
8連結による境界線追跡を1画素ずつ行ない、その都度
塗り潰し領域検出用パターンの内容と一致した追跡画素
のみを塗り潰し領域の境界点として順次抽出する。
The outline of the method of the present invention is, as described in <Measures for solving problems> and <Operation>, as described above, the image memory 1 storing the thinned image in which the 8-connected line figure portion and the filled area are mixed. Is sequentially raster-scanned using a mask pattern of 3 pixels × 3 pixels, and when the content of this mask pattern matches a predetermined filled area detection pattern, the center pixel of this mask is used as a starting point, for example, Boundary line tracking is performed pixel by pixel using 8-connection using a mask of 3 pixels x 3 pixels described in documents such as "Computer Image Processing" (Yasuin, Nakajima; Sangyo Shuppan, 1979), and a filled area is displayed each time. Only the tracking pixels that match the content of the detection pattern are sequentially extracted as the boundary points of the filled area.

ここで、塗り潰し領域検出用パターンの内容を定義す
る。
Here, the contents of the filled area detection pattern are defined.

はじめに、第3図(b)に示すような3画素×3画素の
マスク・パターンの内、中心画素Rが黒画素(R=
“1”)であるものについて、「標本化された二値図形
のトポロジカルな性質について」(横井,島脇,福村;
電子通信学会論文誌D,56−D,11,1973)に記載され
る条件に従って次の値N,Nを算出する。
First, in the mask pattern of 3 pixels × 3 pixels as shown in FIG. 3B, the central pixel R is a black pixel (R =
"1"), "On topological properties of sampled binary figures" (Yokoi, Shimawaki, Fukumura;
The following values N s and N c are calculated according to the conditions described in IEICE Transactions D, 56-D, 11, 1973).

中心画素Rの周辺にある総黒画素数、即ち周辺画素数N
とし、更に、中心画素Rの消去によって生じる3画素×
3画素のマスク内にある、連結する黒画素成分の数、即
ち8連結数Nとして算出する。但し、R=R,▲▼=1−R
とする。
The total number of black pixels around the central pixel R, that is, the number of peripheral pixels N
S And further, 3 pixels generated by erasing the center pixel R ×
The number of connected black pixel components in the mask of 3 pixels, that is, the number of connected 8 N c Calculate as However, R 8 = R 0 , ▲ ▼ = 1-R
Let k .

そして、3画素×3画素のマスク・パターンの内、中心
画素Rが黒画素(R=“1”)であるものを次のように
分類する。
Then, among the mask patterns of 3 pixels × 3 pixels, those in which the central pixel R is a black pixel (R = “1”) are classified as follows.

(A)周辺画素数Nと8連結数Nが同じ値であるも
の(N=N) (B)周辺画素数Nと8連結数Nが異なる値である
もの(N≠N) 条件(A)は、第5図(a)〜(e)に示す例のよう
に、8連結数N=0,1,2,3,4の5通りに分類
される。即ち、8連結数N=0の時(a)は中心画素
Rは弧立点、8連結数N=1の時(b)は中心画素R
は端点、8連結数N=2の時(c)は中心画素Rは連
結点、8連結数N=3の時(d)は中心画素Rは分岐
点、8連結数N=4の時(e)は中心画素Rは交差点
となる。8連結数N=0,1,2の場合、中心画素は
塗り潰し領域を構成し得ず、8連結数N=3,4の場
合、領域が一点に集中したものとみなし、塗り潰し領域
として扱うものとする。
(A) The number of peripheral pixels N s and the number of 8-connections N c are the same value (N s = N c ) (B) The number of peripheral pixels N s and the number of 8-connection N c are different values (N s ≠ N c ) The condition (A) is classified into five ways of eight connection numbers N c = 0,1,2,3,4 as in the example shown in FIGS. 5 (a) to (e). That is, when the number of 8-connections N c = 0 (a), the central pixel R is the arc starting point, and when the number of 8-connections N c = 1 (b), the central pixel R.
Is an end point, when the number of 8 connections N c = 2 (c), the central pixel R is a connection point, when the number of 8 connections N c = 3 (d) is a center pixel R is a branch point, and the number of 8 connections N c = 4 In the case of (e), the central pixel R becomes an intersection. When the number of 8-connections N c = 0,1,2, the central pixel cannot form a filled area, and when the number of 8-connections N c = 3,4, it is considered that the areas are concentrated at one point, and it is regarded as a filled area. Shall be treated.

条件(B)は、第6図(a)〜(c)に示す例のよう
に、(a)8連結数N=1(2≦N≦7)、(b)
8連結数N=2(3≦N≦6)(c)8連結数N
=3(4≦N≦5)の3通りに分類される。即ち、こ
れらは中心画素の周囲に黒画素連結成分が1つ以上ある
状態を意味し、中心画素が塗り潰し領域または分岐点の
一部を構成するものとみなす。
The condition (B) is, as in the example shown in FIGS. 6A to 6C, (a) 8 number of connections N c = 1 (2 ≦ N s ≦ 7), (b).
8 number of connections N c = 2 (3 ≦ N s ≦ 6) (c) 8 number of connections N c
= 3 (4 ≤ N s ≤ 5). That is, these means a state in which there is one or more black pixel connected components around the central pixel, and it is considered that the central pixel constitutes a part of the filled area or the branch point.

以上の考察より、塗り潰し領域検出用パターンを次のよ
うに定義する。
From the above consideration, the pattern for detecting the filled area is defined as follows.

即ち、塗り潰し領域検出用パターンを、中心画素Rが黒
画素である256通りの3×3のマスク・パターンか
ら、条結(C)「周辺画素数Nが2以下かつ周辺画素
数Nと8連結数Nが同じ値であるもの」を満たすパ
ターンを除いたもの、とする。
That is, the filled area detection pattern is defined as 256 (3 × 3) mask patterns in which the central pixel R is a black pixel, and the pattern (C) “the peripheral pixel number N s is 2 or less and the peripheral pixel number N c” is set. 8 that have the same number of connected N c ”.

詳しくは、条件(C)を満たすマスク・パターンは、第
7図に示すように、全部で25通りであり、従って、塗
り潰し領域検出用パターンは256−25=231通り
となる。
Specifically, as shown in FIG. 7, there are a total of 25 mask patterns that satisfy the condition (C), and therefore there are 256-25 = 231 patterns for the filled area detection.

次に、画像メモリ1を3画素×3画素のマスク・パター
ンを用いて順次ラスタ走査し、このマスク・パターンの
内容が塗り潰し領域検出用パターンに一致し、塗り潰し
境界点Qが抽出された時、次の塗り潰し境界点Q
m+1を抽出する方法手順を第8図及び第9図を用いて
説明する。
Next, when the image memory 1 is sequentially raster-scanned using a mask pattern of 3 pixels × 3 pixels, and the contents of this mask pattern match the pattern for detecting the filled area and the filled boundary point Q m is extracted. , Next filled boundary point Q
A method procedure for extracting m + 1 will be described with reference to FIGS. 8 and 9.

(イ)第8図(a)に示すように、境界点Qを中心画
素として3画素×3画素のマスクを設定する。
(A) As shown in FIG. 8A, a mask of 3 pixels × 3 pixels is set with the boundary point Q m as the central pixel.

(ロ)次に、境界点Qの1つ前の境界点Qm−1から
反時計回りに,,…の順に黒画素か白画素かを調
べ、最初の黒画素を検出し、この点を追跡点Pとす
る。
(B) Next, it is checked whether the black pixels or white pixels ,, ... sequentially from the previous boundary point Q m-1 in the counter-clockwise boundary point Q m, finds the first black pixel, the point Be a tracking point P n .

(ハ)第8図(b)に示すように、追跡点Pを中心に
3画素×3画素のマスクを設定し、このマスク・パター
ンが塗り潰し領域検出用パターンと一致するか否かを調
べる。
(C) As shown in FIG. 8 (b), a mask of 3 pixels × 3 pixels is set around the tracking point P n, and it is checked whether or not this mask pattern matches the filled area detection pattern. .

(ニ)追跡点Pを中心とするマスク・パターンが塗り
潰し領域検出用パターンの内容に一致した場合は、第8
図(c)に示すように、追跡点Pを次の境界点Q
m+1とする。
(D) If the mask pattern centered on the tracking point P n matches the content of the filled area detection pattern, the eighth
As shown in FIG. 6C, the tracking point P n is set to the next boundary point Q.
Let m + 1 .

(ホ)一方、第9図(a)に示す追跡点Pの場合のよ
うに、この追跡点Pを中心とするマスクが塗り潰し領
域検出用パターンの内容に一致しない場合は、再び境界
点Qを中心とするマスクに戻り、第9図(b)に示す
ように、今度は追跡点Pから反時計方向に,,…
の順に黒画素か白画素かを調べ、最初に検出した黒画素
を次の追跡点Pn+1とする。
(E) On the other hand, as in the case of the tracking point P n shown in FIG. 9A, when the mask centering on the tracking point P n does not match the content of the filled area detection pattern, the boundary point is again detected. Returning to the mask centered on Q m , this time, as shown in FIG. 9B, this time from the tracking point P n in the counterclockwise direction, ...
The black pixel or the white pixel is checked in this order, and the first detected black pixel is set as the next tracking point P n + 1 .

(ヘ)次に第9図(c)に示すように、追跡点Pn+1
を中心に3画素×3画素のマスクを設定し、このマスク
・パターンが塗り潰し領域検出用パターンに一致した場
合は、第9図(d)に示すように、追跡点Pn+1を次
の境界点Qm+1とする。
(F) Next, as shown in FIG. 9 (c), the tracking point P n + 1
When a mask of 3 pixels × 3 pixels is set centering on, and the mask pattern matches the pattern for detecting the filled area, as shown in FIG. 9 (d), the tracking point P n + 1 is set to the next boundary point. Let Q m + 1 .

(ト)追跡点Pn+1を中心とするマスク・パターンが
塗り潰し領域検出用パターンと一致しない場合は、境界
点Qを中心とするマスク・パターンに再び戻り、追跡
点Pn+1から反時計回りに黒画素か白画素かを調べ、
最初の黒画素を次の追跡点とし、以下上述と同様の操作
を繰り返す。
(G) When the mask pattern centered on the tracking point P n + 1 does not match the pattern for detecting the filled area, the mask pattern centered on the boundary point Q m is returned again, and counterclockwise from the tracking point P n + 1. Check whether it is a black pixel or a white pixel,
The first black pixel is set as the next tracking point, and the same operation as described above is repeated.

このようにして、順次塗り潰し境界点を抽出する。In this way, the filled boundary points are sequentially extracted.

上記の操作は塗り潰し領域の境界点を反時計方向に抽出
した場合を述べたが、時計方向に境界点を抽出する場合
は、第10図示すように、点Qを中心とするマスクにお
いて、1つ前の境界点Qm−1から時計方向に,,
…の順に黒画素、白画素を調べ、最初の黒画素を追跡
点Pとする。
The above operation has described the case where the boundary points of the filled area are extracted in the counterclockwise direction. However, when extracting the boundary points in the clockwise direction, as shown in FIG. 10, in the mask centered on the point Q m , Clockwise from the previous boundary point Q m-1 ,
The black pixels and the white pixels are examined in this order, and the first black pixel is set as the tracking point P n .

以上が本発明の方法の原理であり、次に、第4図に示す
ディジタル画像データを対象とし、第1図に示す装置を
用い、第2図のフローチャート、第11図の手順説明図を
参照として本発明の方法を具体的に説明する。
The above is the principle of the method of the present invention. Next, using the apparatus shown in FIG. 1 for the digital image data shown in FIG. 4, refer to the flowchart of FIG. 2 and the procedure explanatory diagram of FIG. The method of the present invention will be specifically described.

尚、第1図におけるデータ・テーブル・メモリ4には
ン、第12図に示すように、画像メモリ1から読み出され
た3×3のマスク・パターン(第12図(a))を入力デ
ータとして直並列変換回路3で変換された9ビット・ア
ドレス“R(MSB),R,…,R(LSB)”
(第12図(b))に対応したデータ“0”または“1”
が格納される。この時、“1”は対応するマスク・パタ
ーンが塗り潰し領域検出用パターンと一致したことを表
わし、“0”は一致しないことを表わす(第12図
(c))。
In the data table memory 4 shown in FIG. 1, as shown in FIG. 12, the 3 × 3 mask pattern (FIG. 12 (a)) read from the image memory 1 is input data. 9-bit address “R (MSB), R 0 , ..., R 7 (LSB)” converted by the serial-parallel conversion circuit 3 as
Data "0" or "1" corresponding to (Fig. 12 (b))
Is stored. At this time, "1" indicates that the corresponding mask pattern matches the pattern for detecting the filled area, and "0" indicates that it does not match (FIG. 12 (c)).

また、値“0”に対応するアドレスは、3×3のマスク
・パターンの内、中心画素Rが白画素(R=“0”)の
ものを含み、アドレス#000〜#0FFの256通り
と第7図に示すマスク・パターン25通りの計281通
りのアドレスである。従って、内容が“1”のアドレス
は残りの231通りのアドレスである。
In addition, the address corresponding to the value “0” includes the one in which the central pixel R is the white pixel (R = “0”) in the 3 × 3 mask pattern, and has 256 kinds of addresses # 000 to # 0FF. There are a total of 281 addresses including 25 mask patterns shown in FIG. Therefore, the address having the content “1” is the remaining 231 addresses.

さて、第2図に示すフローチャートに従って本発明の方
法手順を説明する。
Now, the method procedure of the present invention will be described with reference to the flowchart shown in FIG.

(1)境界線追跡部5は、第4図に示すようなディジタ
ル図形における画素の座標を順次アドレス制御部2に与
えてリード・アクセスし、画素メモリ1を3×3のマス
クを用いてラスタ走査する。画像メモリ1から読み出さ
れた3×3のマスク・パターンの9ビット直列データ
“R,R,…,R”は一旦直並列変換回路3に取り
込まれ、順次、データ・テーブル・メモリ4へのアドレ
スとなる。そして、データ・テーブル・メモリ4からの
出力データCによりその都度マスク・パターンの内容を
調べる。
(1) The boundary line tracking unit 5 sequentially gives pixel coordinates in a digital figure as shown in FIG. 4 to the address control unit 2 for read access, and rasterizes the pixel memory 1 using a 3 × 3 mask. To scan. The 9-bit serial data “R, R 0 , ..., R 7 ” of the 3 × 3 mask pattern read out from the image memory 1 is once taken into the serial-parallel conversion circuit 3 and sequentially stored in the data table memory 4. Will be the address to. Then, the content of the mask pattern is checked each time with the output data C from the data table memory 4.

(2)出力データC=“0”、即ちマスク・パターンが
塗り潰し領域検出用パターンに一致していない場合には
手順(1)を繰り返す。
(2) If the output data C = “0”, that is, the mask pattern does not match the pattern for detecting the filled area, the procedure (1) is repeated.

(3)第11図(a)に示すように、出力データC=
“1”、即ちマスク・パターンMが塗り潰し領域検出
用パターンに一致した場合にはマスクMの中心画素R
を塗り潰し領域の境界出発点Pとし、その座標を境界
線追跡部5のレジスタRP及びバッフア・メモリ6に
格納する。
(3) As shown in FIG. 11 (a), output data C =
“1”, that is, when the mask pattern M 1 matches the pattern for detecting the filled area, the central pixel R of the mask M 1
Is set as the boundary starting point P s of the filled area, and its coordinates are stored in the register RP s and the buffer memory 6 of the boundary line tracing unit 5.

(4)境界線追跡部5は、出発点P(=中心画素R)
の左隣の画素Rを探索開始点Pとし、この座標をレ
ジスタRFに格納し、直並列変換回路3の出力データ
より黒画素“1”か白画素“0”かを調べる。
(4) The boundary line tracking unit 5 uses the starting point P s (= center pixel R)
The pixel R 4 adjacent to the left of is the search start point P F , this coordinate is stored in the register RF F, and it is checked from the output data of the serial-parallel conversion circuit 3 whether it is a black pixel “1” or a white pixel “0”.

(5)画素Rが黒画素の場合は、この画素Rを終了
検出点Pとしてその座標をレジスタRPに格納し、
手順(7)に移る。
(5) When the pixel R 4 is a black pixel, the pixel R 4 is set as the end detection point P E and its coordinates are stored in the register RP E ,
Move to step (7).

(6)画素Rが白画素の場合(第11図(a)の場合)
は、出発点Pを中心とする3画素×3画素のマスクに
おいてレジスタRPで指定される探索開始点P(画
素R)から時計回り(反時計回りとする場合、下の手
順(8)において反時計回りを時計回りとする)に画素
を調べ、最初の黒画素を終了検出点Pとし、その座標
をレジスタRPに格納する。
(6) When pixel R 4 is a white pixel (in the case of FIG. 11 (a))
Is clockwise (counterclockwise from the search start point P F (pixel R 4 ) specified by the register RP F in the mask of 3 pixels × 3 pixels centered on the starting point P s. In 8), the pixel is checked in the counterclockwise direction as the clockwise direction), the first black pixel is set as the end detection point P E, and its coordinates are stored in the register RP E.

(7)出発点Pを1つ前の追跡中心画素Pi−1とし
てその座標をレジスタRPi−1に格納する。
(7) The starting point P s is set as the previous tracking center pixel P i−1 and its coordinates are stored in the register RP i−1 .

(8)レジスタRPi−1で指定される1つ前の追跡中
心画素Pi−1を中心とする3×3のマスク(第11図
(a)のマスクMに対応する)において、レジスタR
で指定される探索開始点Pから反時計回りに画素
を調べ、最初の黒画素を現在の追跡中心画素P(=P
)とし、その座標をレジスタRPに格納する。
(8) In the 3 × 3 mask (corresponding to the mask M 1 in FIG. 11 (a)) centered on the previous tracking center pixel P i−1 specified by the register RP i−1 , R
Pixels are checked counterclockwise from the search start point P F specified by P F , and the first black pixel is the current tracking center pixel P i (= P
1 ) and store the coordinates in the register RP i .

(9)1つ前の追跡中心画素Pi−1と終了検出点
、現在の追跡中心画素Pと出発点Pが一致した
か否かをレジスタRPi−1とレジスタRP、レジス
タRPとレジスタRPの内容を比較し、追跡処理が
終了したか否かを検出する。
(9) Whether the previous tracking center pixel P i-1 and the end detection point P E , and the current tracking center pixel P i and the starting point P s match, are registered in the registers RP i-1 and RP E , The contents of the register RP i and the register RP s are compared to detect whether or not the tracking process is completed.

(10)1つ前の追跡中心画素Pi−1と終了検出点P
現在の追跡中心画素Pと出発点Pが一致した場合は
手順(18)に移る。
(10) The previous tracking center pixel P i−1 and the end detection point P E ,
If the current tracking center pixel P i and the starting point P s match, the procedure moves to step (18).

(11)1つ前の追跡中心画素Pi−1と終了検出点P
現在の追跡中心画素Pと出発点Pが一致しない場
合、境界線追跡部5は、レジスタRPで指定される現
在の追跡中心画素Pの座標をアドレス制御部2に与
え、リード・アクセスを行なう。次に、第11図(b)に
すように、画像メモリ1から点P(=P)を中心と
する3×3のマスク・パターンMを読み出し、直並列
変換回路3に取り込み、データ・テーブル・メモリ4か
らの出力データCの値によりこのマスク・パターンM
の内容を調べる。
(11) Previous tracking center pixel P i−1 and end detection point P E ,
When the current tracking center pixel P i and the starting point P s do not match, the boundary line tracking unit 5 gives the coordinates of the current tracking center pixel P i specified by the register RP i to the address control unit 2 to read. Make access. Next, as shown in FIG. 11B, a 3 × 3 mask pattern M 2 centered on the point P i (= P 1 ) is read out from the image memory 1 and taken into the serial-parallel conversion circuit 3, Depending on the value of the output data C from the data table memory 4, this mask pattern M 2
Examine the contents of.

(12)出力データC=“0”即ちマスク・パターンM
塗り潰し領域検出用パターンと一致していない場合は手
順(16)に移る。
(12) If the output data C = “0”, that is, the mask pattern M 2 does not match the filled area detection pattern, proceed to step (16).

(13)第12図(b)に示すマスクMの出力データC=
“1”即ちマスク・パターンMが塗り潰し領域検出用
パターンに一致する場合は、レジスタRPで指定され
る、現在の追跡中心画素P(P)を塗り潰し領域の
境界点Qとし、その座標をレジスタRQ及びバッフ
ァ・メモリ6に格納する。
(13) Output data C of mask M 2 shown in FIG.
When “1”, that is, the mask pattern M 2 matches the pattern for detecting the filled area, the current tracking center pixel P i (P 1 ) designated by the register RP i is set as the boundary point Q j of the filled area, The coordinates are stored in the register RQ j and the buffer memory 6.

(14)マスクMにおいて、1つ前の追跡中心画素P
i−1(Pに対応)を探索開始点Pとし、レジスタ
RPi−1の内容をレジスタRPに格納する。
(14) In the mask M 2 , the previous tracking center pixel P
i-1 (corresponding to P s) and the search start point P F, and stores the contents of register RP i-1 to the register RP F.

(15)現在の追跡中心画素P(P)を1つ前の追跡中
心画素Pi−1とし、レジスタRPの内容をレジスタ
RPiー1に格納する。そして、手順(8)に移る。
(15) of the current track center pixel P i a (P 1) and the tracking center pixel P i-1 of the previous stores the contents of register RP i in the register RP i-1. Then, the procedure moves to step (8).

このようにして、手順(8),(9),(11),(13),(1
4),(15)を繰り返し、塗り潰し領域境界点P,P
を抽出する。
In this way, steps (8), (9), (11), (13), (1
4) and (15) are repeated, and the filled area boundary points P 1 , P 2 ,
To extract the P 3.

(16)手順(12)において、点P(=P)を中心とする
3×3のマスク・パターンMに対応する出力データC
が“0”、即ちこのマスク・パターンMが塗り潰し領
域検出用パターンと一致しない場合、このときの追跡中
心画素P(P)を探索開始点Pとし、レジスタR
の内容をレジスタRPに格納する。
(16) In step (12), the output data C corresponding to the 3 × 3 mask pattern M 2 centered on the point P i (= P 1 ).
Is “0”, that is, when the mask pattern M 2 does not match the pattern for detecting the filled area, the tracking center pixel P i (P 1 ) at this time is set as the search start point P F , and the register R
Storing the contents of the P i in the register RP F.

(17)そして、直前の塗り潰し領域の境界点Q(P
を1つ前の追跡中心画素Pi−1とし、レジスタRQ
の内容をレジスタRPi−1に格納する。レジスタRP
i−1で指定される点Pi−1の座標をアドレス制御部
2に与えてリード・アクセスを行ない、画像メモリ1か
ら点Pi−1(P)を中心とする3×3のマスク・パ
ターン(マスクMに対応する)の内容を読み出し、直
並列変換回路3に取り込む。次に手順(8)に戻る。
(17) Then, the boundary point Q j (P s ) of the immediately previous filled area
Be the previous tracking center pixel P i−1, and register RQ j
Store the contents of the register into register RP i-1 . Register RP
The P i-1 of the coordinate point specified by the i-1 is given to the address control unit 2 performs a read access, the point from the image memory 1 P i-1 (P s ) 3 × 3 mask around the The content of the pattern (corresponding to the mask M 1 ) is read out and taken into the serial-parallel conversion circuit 3. Next, the procedure returns to step (8).

ここで、手順(12),(16),(17)ディジタル画像における
線図形部と塗り潰し領域との境界を検出する手順であ
り、その具体的な例を第11図(c),(d)を用いて説
明する。
Here, steps (12), (16), and (17) are steps for detecting the boundary between the line figure portion and the filled area in the digital image, and a specific example thereof is shown in FIGS. Will be explained.

第11図(c)において、画素P,P,Pが塗り潰
し境界であると判定された点であり、現在の追跡中心画
素Pとして黒画素Pが抽出されたとする。
In FIG. 11 (c), it is assumed that the pixels P 1 , P 2 , and P 3 are points determined to be filled boundaries, and the black pixel P 4 is extracted as the current tracking center pixel P i .

画素Pを中心とする3画素×3画素のマスク・パター
ンMを設定すると、このマスク・パターンMは塗り
潰し領域検出用パターンとは一致せず、次に現在の追跡
中心画素Pを探索開始点Pとし、直前の塗り潰し領
域の境界点Pを追跡中心画素Pi−1とするマスク・
パターンMに戻る。探索開始点P(P)より反時
計回りに黒画素を検出すると、画素Pが抽出される。
When a mask pattern M 4 of 3 pixels × 3 pixels centered on the pixel P 4 is set, this mask pattern M 4 does not match the filled area detection pattern, and the current tracking center pixel P 4 is set next. A mask with the search start point P F and the boundary point P 3 of the immediately previous filled area as the tracking center pixel P i−1.
Return to pattern M 3 . When a black pixel is detected counterclockwise from the search start point P F (P 4 ), the pixel P 5 is extracted.

次に、画素Pを追跡中心画素としてマスク・パターン
を設定すると、このマスク・パターンMは塗り潰
し領域検出用パターンと一致せず、第11図(d)に示す
ように、現在の追跡中心画素Pを探索開始点P
し、直前の塗り潰し境界点Pを中心画素とするマスク
・パターンMに戻る。そして、画素Pより反時計回
りに黒画素Pを中心とする。黒画素Pを中心とする
マスク・パターンMは塗り潰し領域検出用パターンと
一致し、画素Pは塗り潰し領域境界点とみなされる。
Next, by setting the mask pattern M 5 as the tracking center pixel pixel P 5, does not match the mask pattern M 5 is filled area detection pattern, as shown in FIG. 11 (d), the current The tracking center pixel P 5 is set as the search start point P F, and the process returns to the mask pattern M 3 in which the immediately preceding filled boundary point P 3 is the center pixel. Then, the black pixel P 6 is centered counterclockwise from the pixel P 5 . The mask pattern M 6 centered on the black pixel P 6 matches the filled area detection pattern, and the pixel P 6 is regarded as the filled area boundary point.

このような手順により、画素Pより画素Pを中心と
するマスク・パターンM及び画素Pを中心画素とす
るマスク・パターンMを設定してその内容を調べ、画
素Pがディジタル画像の線図形部と塗り潰し領域との
境界であることが判別される。
By this sequence, examine its contents by setting the mask pattern M 5 of a central pixel mask pattern M 4 and the pixel P 5 around the pixel P 4 from the pixels P 3, pixel P 3 is a digital It is determined that it is the boundary between the line figure portion of the image and the filled area.

さて、第2図のフローチャートに戻り、手順の説明を続
ける。
Now, returning to the flowchart of FIG. 2, the description of the procedure will be continued.

(18)手順(9)において、1つ前の追跡中心画素P
i−1と終了検出点P、現在の追跡中心画素Pと出
発点Pが一致した場合、例えば第11図(e)におい
て、1つ前の追跡中心画素P14と終了検出点Pが一
致し、かつ現在の追跡中心画素P15と出発点Pが一
致した場合、現在の追跡中心画素P(P15)を塗り
潰し領域の境界点Qとし、レジスタRPで指定され
る現在の追跡中心画素Pを塗り潰し領域の境界点Q
(この場合画素P15の座標は出発点Pに同一)と
し、その座標をバッフア・メモリ6に格納する。
(18) In step (9), the previous tracking center pixel P
When i−1 and the end detection point P E match the current tracking center pixel P i and the starting point P s , for example, in FIG. 11 (e), the previous tracking center pixel P 14 and the end detection point P E When E is the same and the current tracking center pixel P 15 and the starting point P s are the same, the current tracking center pixel P i (P 15 ) is set as the boundary point Q j of the filled area, and is specified by the register RP i. Boundary point Q j of the filled area with the current tracking center pixel P i
(In this case, the coordinates of the pixel P 15 are the same as the starting point P s ) and the coordinates are stored in the buffer memory 6.

第11図(e)は追跡中心画素P(i=1,…,15)
の追跡の様子を表わし、第11図(f)は以上の操作によ
って得られた塗り潰し領域の境界点Q(j=0,…,
9)を表わす。
FIG. 11 (e) shows the tracking center pixel P i (i = 1, ..., 15).
FIG. 11 (f) shows the tracking state of the boundary point Q j (j = 0, ..., B) of the filled area obtained by the above operation.
9) is represented.

(19)境界線追跡部5は、バッファ・メモリ6に格納され
た塗り潰し領域の境界点列Qの座標を用いて、画像メ
モリ1上の点列Qよりなる境界線及びその内部の画素
を黒から白に全て変換する。
(19) The boundary line tracking unit 5 uses the coordinates of the boundary point sequence Q j of the filled area stored in the buffer memory 6 to define the boundary line of the point sequence Q j on the image memory 1 and the pixels inside the boundary line. Are all converted from black to white.

この黒画素白画素変換処理は、今回の操作によって一旦
得られた塗り潰し領域の境界点Qが次回のラスタ走査
において再び検出されることがないように行なう処理で
あり、具体的には、抽出された塗り潰し領域の境界線を
多角形とみなし、例えば 「Fundamentals of InteractiveComputer Graphiccs」
(J.D.Foley/A.Van Dam;Addison-Wesley,198
2)等の文献に記載されている、コンピュータ・グラフ
ィックスに使用される多角形の塗り潰し手法を用いるこ
とにより実行される。
The black pixel / white pixel conversion process is a process performed so that the boundary point Q j of the filled area once obtained by the current operation is not detected again in the next raster scan. The boundary of the filled area that is drawn is regarded as a polygon, and for example, "Fundamentals of Interactive Computer Graphiccs"
(J. D. Foley / A. Van Dam; Addison-Wesley, 198.
It is performed by using the polygonal filling method used in computer graphics described in the literature such as 2).

(20)境界線追跡部5は、画像メモリ1において3×3の
マスク・パターンのラスタ走査が終了したかどうかをレ
ジスタRPで指定される点Pの座標により調べる。
(20) The boundary line tracking unit 5 checks whether or not the raster scanning of the 3 × 3 mask pattern in the image memory 1 is completed by the coordinates of the point P s designated by the register RP s .

(21)ラスタ走査が終了していない場合は、手順(1)に
戻り、画像メモリ1上の点Pよりラスタ走査を行な
う。
(21) If raster scanning has not ended, the procedure returns to step (1), and raster scanning is performed from the point P s on the image memory 1.

(22)ラスタ走査が終了した場合は、塗り潰し領域の抽出
処理を終了する。
(22) When the raster scanning is completed, the extraction processing of the filled area is completed.

以上のようにして、8連結の線図形部と塗り潰し領域が
混在するディジタル画像データ(細線化図形)を格納し
た画像メモリ1を3画素×3画素のマスクを用いて順次
ラスタ走査し、このマスク・パターンの内容が予め定め
られた塗り潰し領域検出用パターンに一致した場合にこ
のマスクの中心画素を出発点として3画素×3画素のマ
スクを用いて境界線追跡を1画素ずつ行ない、その都度
塗り潰し領域検出用パターンの内容と一致した追跡画素
のみを塗り潰し境界点として順次抽出することができ
る。
As described above, the image memory 1 storing the digital image data (thin line figure) in which the 8-connected line figure part and the filled area are mixed is sequentially raster-scanned using the mask of 3 pixels × 3 pixels, and this mask When the pattern content matches a predetermined pattern for detecting a filled area, the boundary pixel is traced pixel by pixel using the mask of 3 pixels × 3 pixels starting from the center pixel of this mask and filling each time. Only the tracking pixels that match the content of the area detection pattern can be sequentially extracted as the filled boundary points.

<発明の効果> 以上述べたように、本発明のディジタル画像の塗り潰し
領域検出方法によれば、8連結の線図形部と塗り潰し領
域が混在した細線化図形より塗り潰し領域の境界線を直
接的に抽出することができる。
<Effects of the Invention> As described above, according to the method for detecting a filled area of a digital image of the present invention, a boundary line of a filled area can be directly formed from a thinned figure in which eight connected line figure parts and filled areas are mixed. Can be extracted.

また、本発明の方法によれば、8連結の線図形部と塗り
潰し領域が混在したディジタル画像データを保持するた
めの画像メモリのみを準備すれば良く、従来のように、
更に作業用として別の画像メモリを設ける必要がない。
Further, according to the method of the present invention, it is sufficient to prepare only the image memory for holding the digital image data in which the 8-connected line figure portion and the filled area are mixed.
Further, it is not necessary to provide another image memory for work.

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

第1図は本発明のディジタル画像の塗り潰し領域検出方
法を具体的に実施する画像処理装置の一例を示す構成ブ
ロック図、第2図は本発明の方法の手順を具体的に表わ
したフローチャート、第3図(a),(b)は画像メモ
リ上の注目画素Rとこの注目画素Rを中心とする3画素
×3画素のマスク・パターンを表わす図、第4図は本発
明が対象とするディジタル画像データを表わす図、第5
図(a)〜(e)は3画素×3画素のマスク・パターン
において周辺画素数Nと8連結数Nが同じ値である
もの(条件A)の例を表わす図、第6図(a)〜(b)
は3画素×3画素のマスク・パターンにおいて周辺画素
数Nと8連結数Nが異なる値であるもの(条件B)
の例を表わす図、第7図は3画素×3画素のマスク・パ
ターンにおいて周辺画素数Nが2以下かつ周辺画素数
と8連結数Nが同じ値であるもの(条件C)の例
を表わす図、第8図(a)〜(c)と第9図(a)〜
(d)と第10図は塗り潰し境界点が抽出された時次の塗
り潰し境界点を抽出する手順を表わす図、第11図(a)
〜(f)は本発明の方法を第4図に表わすディジタル画
像データに施した際の状態遷移を表わす図、第12図
(a)〜(c)は直並列変換回路3及びデータ・テーブ
ル・メモリ4の機能を説明するための図、第13図は本発
明が対象とするような電気回路図の一部を表わす図、第
14図(a)〜(c)は原画像に細線化処理を施す場合を
表わす図である。 1……画像メモリ、2……アドレス制御部、 3……直並列変換回路、 4……データ・テーブル・メモリ、 5……境界線追跡部、6……バッファ・メモリ。
FIG. 1 is a configuration block diagram showing an example of an image processing apparatus for specifically implementing the digital image filled area detecting method of the present invention, and FIG. 2 is a flow chart specifically showing the procedure of the method of the present invention. 3 (a) and 3 (b) are diagrams showing a pixel of interest R on the image memory and a mask pattern of 3 pixels × 3 pixels centered on the pixel of interest R, and FIG. 4 is a digital diagram of the present invention. Figure showing image data, No. 5
FIGS. 6A to 6E are diagrams showing an example of a mask pattern of 3 pixels × 3 pixels in which the number of peripheral pixels N s and the number of 8-connected pixels N c are the same (condition A), FIG. a)-(b)
Is a mask pattern of 3 pixels × 3 pixels in which the number of peripheral pixels N s and the number of 8-connected pixels N c are different values (condition B)
7 is a mask pattern of 3 pixels × 3 pixels in which the number of peripheral pixels N s is 2 or less and the number of peripheral pixels N s and the number of 8-connected N c are the same (condition C). 8A to FIG. 8C and FIG. 9A to FIG.
(D) and FIG. 10 are diagrams showing a procedure for extracting the next filled boundary point when the filled boundary point is extracted, and FIG. 11 (a).
.About. (F) are diagrams showing state transitions when the method of the present invention is applied to the digital image data shown in FIG. 4, and FIGS. 12 (a) to (c) are serial-parallel conversion circuit 3 and data table. FIG. 13 is a diagram for explaining the function of the memory 4, FIG. 13 is a diagram showing a part of an electric circuit diagram as an object of the present invention, FIG.
14 (a) to 14 (c) are diagrams showing a case where the original image is subjected to a thinning process. 1 ... Image memory, 2 ... Address control unit, 3 ... Serial-parallel conversion circuit, 4 ... Data table memory, 5 ... Boundary line tracing unit, 6 ... Buffer memory.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】対象図面に細線化を行うことにより得られ
た線図形部と塗り潰し領域とが混在するディジタル画像
データを格納する画像メモリと、前記画像メモリ上の注
目画素の画素値及びその近傍8画素の値を読み出すリー
ド・アクセスと指定された注目画素に画素値を書き込む
ライト・アクセスとを行うアドレス制御部と、前記画像
メモリから読み出された前記注目画素の画素値及びその
近傍8画素の値である3画素×3画素のマスク・パター
ンに対応する直列データを順次取り込みアドレス信号列
に変換する直並列変換回路と、前記アドレス信号列に従
って1ビット・データ信号を発生するデータ・テーブル
・メモリと、複数個のレジスタ及び演算器を有し前記直
並列変換回路及び前記データ・テーブル・メモリを参照
して次に追跡すべき注目画素の座標の決定及び塗り潰し
領域の境界線の座標を生成する境界線追跡部とを備え、
前記ディジタル画像の塗り潰し領域を検出するディジタ
ル画像の塗り潰し領域検出方法において、 このディジタル画像データを3画素×3画素のマスク・
パターンを用いて順次ラスタ操作してこのマスク・パタ
ーンの内容が予め定めた塗り潰し領域検出用パターンと
一致した場合に、 (イ)前記マスク・パターンにおける注目画素を塗り潰
し境界出発点とするとともにこの注目画素の左隣の画素
を探索開始点として反時計回りまたは時計回りに画素値
を調べ最初の黒画素を追跡画素とする手順と、 (ロ)前記追跡画素を中心に3画素×3画素のマスク・
パターンを設定してこのマスク・パターンが前記塗り潰
し領域検出用パターンと一致した場合にこの追跡画素を
塗り潰し境界点とするとともに1つ前の塗り潰し境界点
を探索開始点とする手順と、 (ハ)前記マスク・パターンと前記塗り潰し領域検出用
パターンと一致しない場合は、前記追跡蛾素を探索開始
点とするとともに1つ前の塗り潰し境界点を追跡画素と
して手順(ロ)を繰り返す手順と を有することを特徴とするディジタル画像の塗り潰し領
域検出方法。
1. An image memory for storing digital image data in which a line drawing portion and a filled area obtained by thinning a target drawing are mixed, and a pixel value of a target pixel on the image memory and its vicinity. An address control unit for performing a read access for reading a value of 8 pixels and a write access for writing a pixel value to a designated pixel of interest, and a pixel value of the pixel of interest read from the image memory and its neighboring 8 pixels Serial-to-parallel conversion circuit that sequentially takes in serial data corresponding to the mask pattern of 3 pixels × 3 pixels, which is the value of, and converts it into an address signal sequence, and a data table that generates a 1-bit data signal according to the address signal sequence. It has a memory, a plurality of registers and an arithmetic unit, and should be traced next with reference to the serial-parallel conversion circuit and the data table memory. And a boundary line tracing unit for generating the coordinates of the boundary lines of the determination and fill regions of the coordinates of the target pixel,
In the method for detecting a filled area of a digital image for detecting a filled area of the digital image, the digital image data is masked with 3 pixels × 3 pixels.
When the contents of this mask pattern match a predetermined fill area detection pattern through sequential raster operations using the pattern, (a) the pixel of interest in the mask pattern is set as the fill boundary starting point and A procedure of checking the pixel value counterclockwise or clockwise with the pixel next to the left of the pixel as a search start point and setting the first black pixel as a tracking pixel, and (b) a mask of 3 pixels × 3 pixels centered on the tracking pixel.・
When a pattern is set and the mask pattern coincides with the pattern for detecting a filled area, the traced pixel is set as a filled boundary point, and the previous filled boundary point is set as a search start point, and (c) If the mask pattern does not match the filled area detection pattern, the tracing moth is used as a search start point and the procedure (b) is repeated using the preceding filled boundary point as a tracing pixel. A method for detecting a filled area in a digital image, characterized by.
【請求項2】前記塗り潰し領域検出用パターンは、中心
画素が黒画素である256通りの3画素×3画素のマス
ク・パターンから、(前記中心画素の周辺画素数が2以
下かつこの周辺画素数と8連結画素数が同じ値であるマ
スク・パターン)を除いたマスタ・パターンとすること
を特徴とする特許請求の範囲第1項記載のディジタル画
像の塗り潰し領域検出方法。
2. The pattern for detecting a filled area is selected from 256 types of mask patterns of 3 pixels × 3 pixels in which a central pixel is a black pixel (the number of peripheral pixels of the central pixel is 2 or less and the number of peripheral pixels is 2. The method for detecting a filled area in a digital image according to claim 1, wherein the master pattern is a master pattern excluding a mask pattern having the same number of 8 connected pixels.
JP62145517A 1987-06-11 1987-06-11 Method for detecting filled area in digital image Expired - Lifetime JPH0624020B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62145517A JPH0624020B2 (en) 1987-06-11 1987-06-11 Method for detecting filled area in digital image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62145517A JPH0624020B2 (en) 1987-06-11 1987-06-11 Method for detecting filled area in digital image

Publications (2)

Publication Number Publication Date
JPS63310090A JPS63310090A (en) 1988-12-19
JPH0624020B2 true JPH0624020B2 (en) 1994-03-30

Family

ID=15387063

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62145517A Expired - Lifetime JPH0624020B2 (en) 1987-06-11 1987-06-11 Method for detecting filled area in digital image

Country Status (1)

Country Link
JP (1) JPH0624020B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR920002928B1 (en) * 1989-11-28 1992-04-10 한국과학기술연구원 Finger print recognition method
JP4416890B2 (en) 1999-12-20 2010-02-17 富士通株式会社 Form identification device

Also Published As

Publication number Publication date
JPS63310090A (en) 1988-12-19

Similar Documents

Publication Publication Date Title
EP0356103B1 (en) Scan-conversion process and processor
JPH0772861B2 (en) Program creation device
US4853971A (en) Method and apparatus for processing image data
Marks Low-level vision using an array processor
JPS60202482A (en) Identification of interfaced area
CA1319996C (en) Method and apparatus for decomposing a quadrilateral figure for display and manipulation by a computer system
JP2000331156A (en) Method for automatically deciding tracker set along outline and storage medium storing program for execution of the method
JPH0624020B2 (en) Method for detecting filled area in digital image
JPH0130180B2 (en)
JP2735197B2 (en) Graphic input device
JP2861105B2 (en) Spoke register generation circuit
JPH04255080A (en) Image input device
JP3072721B2 (en) Image processing method and apparatus, storage medium for storing image processing program
JP2634905B2 (en) How to paint shapes
JP2561521B2 (en) Spoke register generation circuit
JP3037504B2 (en) Image processing method and apparatus
JPH0510709B2 (en)
JP2838556B2 (en) Image processing device
JPS6169096A (en) Graphic processor
JPH01243188A (en) Contour detector
JPH0821059B2 (en) Unnecessary data removal method for character contour generation
JPH04112276A (en) Binary picture contour line chain encoding device
JP2722962B2 (en) Drawing recognition device
Liang A Research on Guided Thinning Algorithm and Its Implementation by Using C#
JPS60232597A (en) Display unit