JPS6016671B2 - Preprocessing method for shapes with closed loops - Google Patents

Preprocessing method for shapes with closed loops

Info

Publication number
JPS6016671B2
JPS6016671B2 JP53071342A JP7134278A JPS6016671B2 JP S6016671 B2 JPS6016671 B2 JP S6016671B2 JP 53071342 A JP53071342 A JP 53071342A JP 7134278 A JP7134278 A JP 7134278A JP S6016671 B2 JPS6016671 B2 JP S6016671B2
Authority
JP
Japan
Prior art keywords
frame
mask
closed
labeled
area
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
Application number
JP53071342A
Other languages
Japanese (ja)
Other versions
JPS54161845A (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 JP53071342A priority Critical patent/JPS6016671B2/en
Publication of JPS54161845A publication Critical patent/JPS54161845A/en
Publication of JPS6016671B2 publication Critical patent/JPS6016671B2/en
Expired legal-status Critical Current

Links

Landscapes

  • Character Input (AREA)
  • Image Processing (AREA)
  • Image Generation (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】 本発明は、閉ループ特にくぼみをもつ閉ループを論都と
する図形の内部領域に簡単にラベル付けすることを可能
にする。
DETAILED DESCRIPTION OF THE INVENTION The present invention makes it possible to easily label internal regions of figures that feature closed loops, especially closed loops with depressions.

閉ループをもつ図形の前処理方式に関する。開ループで
表わされる図形(以下閉図形という)には第1図aのよ
うに三角図形教,のようにくぼみのない凸図形と、同図
bのように任意の開曲線図形らのようにくぼみのある凹
図形とがある。
Concerning preprocessing methods for figures with closed loops. Figures represented by open loops (hereinafter referred to as closed figures) include convex figures with no depressions, such as triangular figures shown in Figure 1a, and arbitrary open curved figures, as shown in Figure 1B. There are concave shapes with depressions.

図形認識などでは、これらの図形の内部Aiに外部Ao
とは異なるラベル付けつまりデータ付与を行ない、その
ラベルをもとに論理判断または演算をする必要が生じる
ことがある。ところで第1図aの如き凸図形では単純な
マスク操作により内部領域Aiにラベル付けをすること
ができるが、同図bに示す如き凹図形ではくぼんだ部分
にもラベル付けをしてしまい、これを防ぐにはマスク論
理が相当複雑になる。本発明はかかる問題を解決し、単
純なマスク操作により凸図形の内部領域にもまた複雑な
凹図形の内部領域にも簡単にラベル付けすることができ
0る方法を提供しようとするものである。
In shape recognition, etc., the internal Ai and external Ao of these shapes are
It may be necessary to perform a different labeling or data assignment, and to perform logical judgments or operations based on the labels. By the way, in the case of a convex figure as shown in Figure 1a, the internal area Ai can be labeled by a simple mask operation, but in the case of a concave figure as shown in Figure 1b, the concave part is also labeled. To prevent this, the mask logic becomes quite complex. The present invention aims to solve this problem and provide a method that can easily label internal regions of convex shapes as well as complex concave shapes by simple mask operations. .

本発明は開ループで表わされる図形の内部領域にラベル
付けを行なう図形の前処理方式において、該図形を包囲
するフレームを作成し、次いでマスク操作により該フレ
ームと該図形との間に挟まれた領域をタ談フレームを表
わすデータと同じデータにするラベル付けを行ない、そ
の後データの反転操作を行なって該図形の内部領域を該
フレームと同じデータにしてラベル付けを行なうことを
特徴とするが、以下図面を参照しながらこれを詳細に説
明す○る。本発明では第2図aおよびbに示すように先
ずラベル付けする朗図形らの外部白領域Aoに、該閉図
形を囲むフレームFを作成する。
In a figure preprocessing method that labels the internal area of a figure expressed in an open loop, the present invention creates a frame that surrounds the figure, and then performs a mask operation to create a frame that is sandwiched between the frame and the figure. The method is characterized in that the area is labeled with the same data as the data representing the data frame, and then the data is inverted to make the internal area of the figure the same data as the frame. This will be explained in detail below with reference to the drawings. In the present invention, as shown in FIGS. 2a and 2b, first, a frame F surrounding the closed figure is created in the outer white area Ao of the closed figure to be labeled.

これには適宜の方法を用いてよいが、例えば光電式に走
査して輪部線f3を黒「1ぃ その外部および内部を白
「0」とするビデオ信号を得、これをメモリに警込み、
次いで該メモリを議出し、行、列(×,Y軸)方向にお
ける閉図形の最先端座標値を求め、該座標値にマージン
を加えてフレームFのX,Y方向の四辺を決定し、この
四辺に該当するアドレスのメモリ記憶値を閉ループの黒
「1ハ地の白「0」でもない他の色例えば灰色「2」に
すればよい。勿論フレームFは必ずしも同図aに示すよ
うに四辺形である必要はなく、同図bに示すように閉図
形f,を囲むものであればどのような形状のものでもよ
い。こうして第2図aに示すように閉図形を囲むフレー
ム作成が終了したら、次には該フレーム内にマスク操作
を施こす。
Any suitable method may be used for this, but for example, a video signal is obtained by photoelectrically scanning the limbal line f3 with black "1" and white "0" outside and inside, and this is stored in the memory. ,
Next, the memory is retrieved, the cutting edge coordinate values of the closed figure in the row and column (x, Y axes) directions are determined, a margin is added to the coordinate values, the four sides of the frame F in the X and Y directions are determined, and this The memory storage value of the address corresponding to the four sides may be set to another color, for example, gray "2", instead of closed loop black "1" and white "0". Of course, the frame F does not necessarily have to be quadrilateral as shown in figure a, but may have any shape as long as it surrounds the closed figure f, as shown in figure b. Once the frame surrounding the closed figure has been created as shown in FIG. 2a, a mask operation is then performed within the frame.

この際使用するマスクは第3図a〜dに示す如き3行×
3列の4種類のマスクM,〜Mであり、これらのマスク
で白い部分Wは白又はフレームと同じ灰色の部分、網目
で示す部分Bは閉ループ図形の輪部線に対応する黒「1
」の部分、斜線で示す部分LはフレームFに対応する灰
色「2」の部分、「×」印で示す部分はラベル付けして
はならない領域を示す部分である。かかるマスクM・〜
地を用いてフレームF内のマスク操作を行なう。
The mask used at this time is 3 lines × as shown in Figure 3 a to d.
There are 4 types of masks M, ~M in 3 columns, and in these masks, the white part W is white or the same gray part as the frame, and the part B shown by mesh is the black "1" corresponding to the limbal line of the closed loop figure.
'', the hatched portion L is the gray "2" portion corresponding to frame F, and the portion marked with an "x" is a region that should not be labeled. Such a mask M・~
A mask operation within frame F is performed using the ground.

即ち前記のメモリを3行×3列ずつ、かつ1列ずつ逐次
ずらし、行終端に達すればまた行始端に戻りかつ1行ず
らし、という如き要領でマスク走査を行なう。走査は第
2図aの左上方例えばP点あたりから右へ水平走査しか
つ下方へ垂直走査して行なうとすると、最初マスク内は
すべて白つまり「0」であるが、まだフレームFが検出
されないのでラベル付け(例えばメモリ内容の変更)は
行なわない。やがてフレームFがマスクの中央に達する
とマスクの中央のデータ「2」とフレームFに対応する
メモリ記憶値の「2」とが一致し、これによりフレーム
Fの検出がなされる。フレームFの検出後、ラベル付け
操作に入る。即ち第2図aの図形ではフレーム検出後の
次の水平走査ではフレ−ムFの上辺がマスクの第1行に
来ることになり、そしてこの部分ではデータはフレーム
の「2」かその周囲の白「0」かであるから、第3図a
〜dに示したマスクのし、ずれにも該当せず、この様な
場合にはマスク中央位置に対応する位置のメモリのデー
タ「0」を「2」に変更する。つまりラベル付けを行な
う。か)る操作を行ないながら水平走査を繰り返すとフ
レームF内の白部分は次第にフレームの色に切換えられ
て行く。換言すればフレームFが拡大し始める。やがて
マスクMは第2図aに示す如く位置にくる。このときマ
スクの一部に閉図形f3の輪郭線がか)り、該輪郭線近
傍のフレーム内かつ閉図形外領域公oはラベル付けされ
ており、従ってマスクM部分の図形領域は第3図aに示
すマスクM,のパターンと同じ状態にある。こうして図
形データがマスクと一致したら該マスクが指定する×部
分、本例では第3行第3列に相当する位置のラベル付け
を禁止する。以下同様な操作を各走査に対し、マスクM
,〜Mにより行ない、かつ必要に応じて議出し方向を変
えたりして同様操作を数回行なうと、第4図に示すよう
にフレームFと開図形公3との間の領域Aoがすべてラ
ベル付けされ、閉図形f3内の領域のみが白「0」のま
)残される。この点を更に説明すると、第3図a〜dを
みれば明らかなようにマスクM,の黒部分は円曲線の第
4象限、マスクM2は第3象限、マスクM3は同第2象
限、マスクM4は同第1象限部分を現わしていると見倣
すことができ、任意の曲線の一部分をこれらのマスクの
いずれかの黒部分と一致させることができ、そしてマス
ク中央部はラベル付けされた部分に対応しかつフレーム
内白領域は上述の如く逐次ラベル付けされてゆくから、
結局これらのマスクのいずれかに等しい図形データが得
られたということは閉図形教3を検出したということで
あり、この開図形教3の内側に相当するマスク×部分の
ラベル付けは行なわないとすれば、閉ループ内を残して
その外方かつフレームF内の領域をすべてラベル付けす
ることができる。
That is, mask scanning is performed in such a manner that the memory is sequentially shifted by 3 rows x 3 columns and 1 column at a time, and when the end of the row is reached, it returns to the beginning of the row and shifts by 1 row. If scanning is performed by horizontally scanning from the upper left of Figure 2a, for example around point P, to the right and vertically scanning downward, at first everything in the mask is white, or "0", but frame F has not been detected yet. Therefore, labeling (for example, changing the memory contents) is not performed. When frame F eventually reaches the center of the mask, the data "2" at the center of the mask and the memory stored value "2" corresponding to frame F match, and thus frame F is detected. After detecting frame F, a labeling operation is entered. That is, in the figure shown in Fig. 2a, in the next horizontal scan after frame detection, the upper edge of frame F will be in the first row of the mask, and in this part, the data will be in frame ``2'' or around it. Since it is white “0”, Figure 3a
Neither the mask deviation nor the mask deviation shown in d. to d applies, and in such a case, the data "0" in the memory at the position corresponding to the mask center position is changed to "2". In other words, label it. When horizontal scanning is repeated while performing the above operations, the white portion in frame F is gradually switched to the color of the frame. In other words, frame F begins to expand. Eventually, the mask M comes to the position shown in FIG. 2a. At this time, the outline of the closed figure f3 appears in a part of the mask, and the area o within the frame and outside the closed figure near the outline is labeled, so the figure area of the mask M part is shown in FIG. It is in the same state as the pattern of mask M shown in a. In this way, if the graphic data matches the mask, labeling of the x portion designated by the mask, which in this example corresponds to the third row and third column, is prohibited. Below, the same operation is performed for each scan, and the mask M
, ~M, and repeating the same operation several times by changing the presentation direction as necessary, the area Ao between the frame F and the open figure 3 is all labeled as shown in Fig. 4. Only the area within the closed figure f3 is left as white "0". To further explain this point, as is clear from FIGS. 3a to 3d, the black part of the mask M is in the fourth quadrant of the circular curve, the mask M2 is in the third quadrant, and the mask M3 is in the second quadrant of the circular curve. M4 can be seen as representing the same first quadrant, any part of the curve can be matched with the black part of any of these masks, and the central part of the mask is labeled The white areas within the frame that correspond to the parts that have been labeled are sequentially labeled as described above.
In the end, the fact that figure data equal to one of these masks was obtained means that closed figure 3 has been detected, and the mask × part corresponding to the inside of this open figure 3 must be labeled. Then, all areas outside the closed loop and within frame F can be labeled, leaving only the inside of the closed loop.

こうして第4図の如きラベル付けを行なったら反転処理
を行ない、ラベル付けを行なった部分を白「0ハラベル
付けを行なわなかった部分を灰色「2」とすれば、第5
図に示す如く閉図形内領域Nにラベル付けを行なうこと
ができる。
After labeling as shown in Figure 4, inversion processing is performed to make the labeled part white "0" and the unlabeled part gray "2".
As shown in the figure, the area N within the closed figure can be labeled.

第6図は上記のラベル付け操作の手順を示すブロック図
である。
FIG. 6 is a block diagram showing the procedure of the above labeling operation.

この図に示すように、入力図形に対しては先ずフレーム
作成および白領域の検出を行ない、マスク操作を行なっ
てフレームと閉図形との間の領域にラベル付けを行ない
、然るのち反転パターンを生成して目的とする埋め合せ
パターンを得る。以上詳細に説明したように本発明によ
れば簡単なマスク操作で閉ループ図形、特にくぼみのあ
る閉ループ図形のラベル付けを行ない、図形認識などに
極めて有効である。
As shown in this figure, for the input shape, we first create a frame and detect the white area, perform a mask operation to label the area between the frame and the closed shape, and then create an inverted pattern. Generate the desired filler pattern. As described in detail above, according to the present invention, closed-loop figures, especially closed-loop figures with depressions, can be labeled with a simple mask operation, and this is extremely effective for figure recognition.

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

第1図a,bは閉図形の例を示す説明図、第2図a,b
は閉図形を囲むフレームの作成要領を示す説明図、第3
図a〜dは本発明で用いる4種のマスクの例を示す図、
第4図はフレームと閉図形との間の領域にラベル付けを
した状態を示す図、第5図はそねを反転して得た埋め合
せパターンを示す図、第6図は本発明の図形の前処理方
式の要領を示すブロック図である。 図面でf,〜f3‘ま開ループで表わされる図形、Ai
はその内部領域、Aoはその外部領域、Fはフレームで
ある。 第1図 第2図 第3図 第4図 第5図 第6図
Figure 1 a, b is an explanatory diagram showing an example of a closed figure, Figure 2 a, b
is an explanatory diagram showing how to create a frame surrounding a closed figure, the third
Figures a to d are diagrams showing examples of four types of masks used in the present invention,
Fig. 4 shows a state in which the area between the frame and the closed figure is labeled, Fig. 5 shows a fill-in pattern obtained by reversing the ribs, and Fig. 6 shows the figure of the present invention. FIG. 2 is a block diagram showing the outline of a preprocessing method. A figure represented by an open loop f, ~ f3' in the drawing, Ai
is its internal area, Ao is its external area, and F is its frame. Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6

Claims (1)

【特許請求の範囲】[Claims] 1 閉ループで表わされる図形の内部領域にラベル付け
を行なう図形の前処理方式において、該図形を包囲する
フレームを作成し、次いでマスク操作により該フレーム
と該図形との間に挟まれた領域を該フレームを表わすデ
ータと同じデータにするラベル付けを行ない、その後デ
ータの反転操作を行なつて該図形の内部領域を該フレー
ムと同じデータにしてラベル付けを行なうことを特徴と
する、閉ループをもつ図形の前処理方式。
1 In a figure preprocessing method that labels the internal area of a figure expressed in a closed loop, a frame surrounding the figure is created, and then the area sandwiched between the frame and the figure is labeled using a mask operation. A figure with a closed loop characterized by labeling the figure to be the same data as the data representing the frame, and then performing a data inversion operation to make the internal area of the figure the same data as the frame. pretreatment method.
JP53071342A 1978-06-13 1978-06-13 Preprocessing method for shapes with closed loops Expired JPS6016671B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP53071342A JPS6016671B2 (en) 1978-06-13 1978-06-13 Preprocessing method for shapes with closed loops

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP53071342A JPS6016671B2 (en) 1978-06-13 1978-06-13 Preprocessing method for shapes with closed loops

Publications (2)

Publication Number Publication Date
JPS54161845A JPS54161845A (en) 1979-12-21
JPS6016671B2 true JPS6016671B2 (en) 1985-04-26

Family

ID=13457722

Family Applications (1)

Application Number Title Priority Date Filing Date
JP53071342A Expired JPS6016671B2 (en) 1978-06-13 1978-06-13 Preprocessing method for shapes with closed loops

Country Status (1)

Country Link
JP (1) JPS6016671B2 (en)

Also Published As

Publication number Publication date
JPS54161845A (en) 1979-12-21

Similar Documents

Publication Publication Date Title
US5129014A (en) Image registration
US5619592A (en) Detection of highlighted regions
US5048109A (en) Detection of highlighted regions
JPS6016671B2 (en) Preprocessing method for shapes with closed loops
JPS59135579A (en) Pattern contour tracing method
EP0127249B1 (en) Pattern data processing apparatus
JPH04255080A (en) Image input device
JPS63203341A (en) Enlarged character generation system
JPS6114513B2 (en)
JPH0535872A (en) Contour tracing system for binary image
JPH04163674A (en) Mask picture generating method
JPS6375789A (en) Expanded character generation system
JPH08160935A (en) Character pattern display device
JP3133807B2 (en) Outline extraction method and apparatus
JPH04312183A (en) Picture processor
JP3154343B2 (en) How to fill in polygonal shapes
JP2784591B2 (en) Drawing method
JPS6383881A (en) Image processor
JPS6346473B2 (en)
JPH06325176A (en) Image extracting device
JPH0746388B2 (en) Color painting device
JPH0375795A (en) Character pattern contraction system
JPH03225574A (en) Image filling circuit
JPH04111180A (en) Processing method for color image
JPH0554139A (en) Contour tracking system for binary image