JPH0338624B2 - - Google Patents
Info
- Publication number
- JPH0338624B2 JPH0338624B2 JP15791885A JP15791885A JPH0338624B2 JP H0338624 B2 JPH0338624 B2 JP H0338624B2 JP 15791885 A JP15791885 A JP 15791885A JP 15791885 A JP15791885 A JP 15791885A JP H0338624 B2 JPH0338624 B2 JP H0338624B2
- Authority
- JP
- Japan
- Prior art keywords
- point
- bending
- contour
- pattern
- straight line
- 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
Links
Landscapes
- Image Processing (AREA)
Description
【発明の詳細な説明】
〔概要〕
パターンの輪郭線を折線近似することにより情
報量を圧縮する方式において、2点間に直線を発
生する直線発生部と、原パターンの輪郭から抽出
される2点間の直線とその間の輪郭線とが一致す
るか否かを検出して輪郭線の屈曲点情報を抽出す
る輪郭線切出部と、抽出された屈曲点が直角かつ
所定の位置に存在するか否かに基づいて屈曲点の
位置を補正する屈曲点位置補正部とを備え、この
補正された屈曲点情報を用いて前記輪郭線情報を
表現している。[Detailed Description of the Invention] [Summary] In a method for compressing the amount of information by approximating the outline of a pattern with a broken line, a straight line generation part that generates a straight line between two points, and a straight line generated from the outline of the original pattern are used. a contour cutting section that detects whether a straight line between points matches a contour line therebetween and extracts information on a bending point of the contour; and whether the extracted bending point is at a right angle and at a predetermined position. The contour line information is expressed using the corrected bending point information.
本発明は、例えば文字形の如きパターン情報の
輪郭線情報から屈曲点情報を抽出した後、この屈
曲点情報のうち、相互に直角かつ所定の位置に存
在するか否かに基づいて屈曲点の位置を補正して
原パターンの直角部分での屈曲点の出過ぎを防止
して原パターン情報を圧縮するよう構成したパタ
ーン情報量圧縮方式に関するものである。
The present invention extracts bending point information from outline information of pattern information such as character shapes, and then extracts bending point information based on whether or not the bending points are at right angles to each other and at predetermined positions. The present invention relates to a pattern information amount compression method configured to compress original pattern information by correcting the position to prevent excessive bending points at right angle portions of the original pattern.
従来、パターン情報を圧縮する方式として例え
ば昭和60年3月12日特許出願(発明の名称「パタ
ーン情報量圧縮方式」)に記載されているように、
パターンの輪郭情報の屈曲点を算出し、この屈曲
点を用いて原パターンを表現することにより、情
報量を圧縮することが行われている。以下第10
図図示従来のパターン情報量圧縮方式の原理説明
を用いて説明する。
Conventionally, as a method for compressing pattern information, for example, as described in a patent application filed on March 12, 1985 (title of invention "Pattern information amount compression method"),
The amount of information is compressed by calculating an inflection point of contour information of a pattern and expressing the original pattern using this inflection point. 10th below
A description will be given of the principle of a conventional pattern information amount compression method shown in the drawings.
第10図aにおいて、原パターンの輪郭情報で
あるパターンPi(i=1〜12)を求めた後、例え
ばパターンP12をスタート点とし終点をパターン
P1と定めると共に、パターンP12(スタート点)を
屈曲点として抽出する。そして、終点のパターン
P1とスタート点のパターンP12とを結ぶ直線点列
L(P1,P12)を求める。次に、終点のパターン
P1から左廻り方向に、つまりスタート点方向に
この輪郭情報であるパターンPiを順次追跡した追
跡輪郭座標列T(P1,P2……P12)を得る。この
場合、直線点列L(P1,P12)と、追跡輪郭座標列
T(P1,P2,……P12)とが一致しないので、パ
ターンP1の次のパターンP2と、スタート点のパ
ターンP12との直線点列L(P2,P1,P12)を求め
ると共に、パターンP2から左廻り方向に輪郭情
報であるPiを順次追跡して追跡輪郭座標列T(P2,
P3……P12)を得る。この場合も両者が一致しな
いので、以下同様な処理を行う。そして、パター
ンP9では、直線点列L(P9ないしP12)と、追跡
輪郭座標列T(P9ないしP12)とが一致するので、
このパターンP9が屈曲点として検出される(第
10図b図中斜線を施したP9)。 In FIG. 10a, after determining the pattern P i (i=1 to 12), which is the contour information of the original pattern, for example, the pattern P 12 is set as the starting point and the ending point is set as the pattern.
P 1 is determined, and pattern P 12 (starting point) is extracted as a bending point. And the ending pattern
A straight line point sequence L (P 1 , P 12 ) connecting P 1 and the starting point pattern P 12 is determined. Next, the pattern at the end point
A tracked contour coordinate string T (P 1 , P 2 . . . P 12 ) is obtained by sequentially tracing the pattern P i that is the contour information in the counterclockwise direction from P 1 , that is, in the direction of the starting point. In this case, since the straight line point sequence L (P 1 , P 12 ) and the tracking contour coordinate sequence T (P 1 , P 2 , ...P 12 ) do not match, the pattern P 2 next to the pattern P 1 , A straight line point sequence L (P 2 , P 1 , P 12 ) with the starting point pattern P 12 is determined, and the contour information P i is sequentially traced in the counterclockwise direction from the pattern P 2 to obtain the traced contour coordinate sequence T. ( P2 ,
P 3 ...P 12 ) is obtained. In this case as well, since the two do not match, the same process is performed thereafter. In pattern P 9 , the straight line point sequence L (P 9 to P 12 ) matches the tracking contour coordinate sequence T (P 9 to P 12 ), so
This pattern P 9 is detected as a bending point (P 9 shaded in FIG. 10b).
次に、第10図cに示すように、屈曲点として
検出されたパターンP9をスタート点として同様
の処理を行うと、今度はパターンP6が屈曲点と
して検出される。そして、パターンP6をスター
ト点として同様な処理を行えばパターンP3が屈
曲点として検出される。ここで、直線点列L
(P3,P12)と右廻りの追跡輪郭座標列T(P3,
P2,P1,P12)とが一致するので抽出処理を終了
する。以上のようにして算出した屈曲点(P12,
P9,P6,P3)を用いて原パターンの輪郭を圧縮
した態様で表現することができる。 Next, as shown in FIG. 10c, when similar processing is performed using pattern P 9 detected as a bending point as a starting point, pattern P 6 is detected as a bending point this time. Then, if similar processing is performed using pattern P6 as a starting point, pattern P3 will be detected as a bending point. Here, the straight line point sequence L
(P 3 , P 12 ) and clockwise tracking contour coordinate string T (P 3 ,
P 2 , P 1 , P 12 ) match, so the extraction process ends. The bending point (P 12 ,
P 9 , P 6 , P 3 ) can be used to express the outline of the original pattern in a compressed manner.
同様に、第11図aに示す原パターンの輪郭線
(図中“白丸”を用いて表す線)について屈曲点
を算出すると、第11図b図中に“黒丸”を用い
て示すようになる。 Similarly, if the bending point is calculated for the contour line of the original pattern shown in Figure 11a (the line represented using a "white circle" in the figure), it will be shown using a "black circle" in Figure 11b. .
従来のパターン情報量圧縮方式では、例えば第
11図b図中“黒丸”を用いて示す屈曲点情報を
用いて原パターンを表現して圧縮していたため、
第2図aを用いて示す屈曲点では、直角部分に複
数の屈曲点が存在してしまい、充分に圧縮し得な
いという問題点があつた。
In the conventional pattern information amount compression method, for example, the original pattern is expressed and compressed using the bending point information indicated by the "black circle" in Figure 11b.
With the bending points shown in FIG. 2a, there is a problem that there are a plurality of bending points in the right angle portion, and it is not possible to compress the material sufficiently.
本発明は、前記問題点を解決するために、相互
に直角の態様かつ所定の位置関係で抽出された屈
曲点の位置を補正して屈曲点の数を削除する構成
を採用することにより、原パターンを表現する屈
曲点の数を少なくして圧縮を行つている。
In order to solve the above-mentioned problems, the present invention corrects the positions of the bending points extracted in a manner perpendicular to each other and in a predetermined positional relationship to eliminate the number of bending points. Compression is performed by reducing the number of bending points that represent the pattern.
第1図は本発明の原理的構成を示す。図中、1
は磁気デイスク装置9内に設けた原パターン保持
部、3は直線発生部、4は輪郭線切出部、7は屈
曲点位置補正部、8は磁気デイスク装置9内に設
けた圧縮データ保持部、9は磁気デイスク装置を
表す。 FIG. 1 shows the basic configuration of the present invention. In the figure, 1
3 is an original pattern holding section provided in the magnetic disk device 9; 3 is a straight line generating section; 4 is a contour cutting section; 7 is a bending point position correction section; 8 is a compressed data holding section provided in the magnetic disk device 9. , 9 represents a magnetic disk device.
第1図において、直線発生部3は、原パターン
保持部1に格納されている原パターンを読み出
し、この原パターンの輪郭線に対応するドツト情
報のうち、任意の2点を結ぶ直線を発生させるも
のである。 In FIG. 1, a straight line generation unit 3 reads out the original pattern stored in the original pattern holding unit 1, and generates a straight line connecting any two points among the dot information corresponding to the outline of this original pattern. It is something.
輪郭線切出部4は、直線発生部3によつてパタ
ーンの輪郭線の所定の2点間を結ぶ態様で生成し
た直線と、この2点間の輪郭線との両者が一致し
た当該輪郭線を切り出して屈曲点を抽出するもの
である。 The contour line cutting section 4 extracts the contour line in which both the straight line generated by the straight line generation section 3 in a manner connecting two predetermined points on the contour line of the pattern and the contour line between these two points match. It cuts out the curve and extracts the bending point.
屈曲点位置補正部7は、輪郭線切出部4によつ
て抽出された屈曲点が直角かつ所定の位置に存在
するか否かを判別し、この判別結果に基づいて屈
曲点の位置を補正するるものである。この屈曲点
の位置が補正され、屈曲点の数が削減された屈曲
点情報は磁気デイスク装置9内に設けた圧縮デー
タ保持部8に格納される。 The bending point position correction unit 7 determines whether the bending point extracted by the contour cutting unit 4 is at a right angle and at a predetermined position, and corrects the position of the bending point based on the result of this determination. It is something to do. The position of the bending point is corrected, and the bending point information with the number of bending points reduced is stored in the compressed data holding section 8 provided in the magnetic disk device 9.
第2図に示す本発明の原理説明を用いて第1図
に示す構成の動作および作用を説明する。
The operation and effect of the configuration shown in FIG. 1 will be explained using the principle explanation of the present invention shown in FIG.
第2図a図中P1ないしP4は位置補正前の屈曲
点、第2図b図中P1,P12,P4は位置補正後の屈
曲点を表す。 P 1 to P 4 in FIG. 2A represent the bending points before the position correction, and P 1 , P 12 and P 4 in FIG. 2B represent the bending points after the position correction.
第2図aにおいて、図中原パターンの輪郭線に
対応する“丸印”を用いて示すパターンのうち、
屈曲点は“黒丸”によつて表されている。この
“黒丸”は、輪郭線切出部4によつて抽出された
ものである。 In Figure 2a, among the patterns shown using "circles" corresponding to the outlines of the original patterns in the figure,
The inflection point is represented by a "black circle". This "black circle" is extracted by the contour cutout section 4.
そして、以下の処理が屈曲点位置補正部7によ
つて行われる。即ち、連続する屈曲点P1,P2,
P3およびP4に対し、屈曲点P2を1ドツト分屈曲
点P1から屈曲点P2の方向に移動させた点Nと、
屈曲点P3を1ドツト分屈曲点P4から屈曲点P3の
方向に移動させた点とが一致し、かつその点に
“丸印”で示される輪郭点が存在する場合、屈曲
点P2の座標を点Nの座標に置き換え(第2図b
図中屈曲点P12)、屈曲点P3を削除する。これによ
り、4個の屈曲点(P1,P2,P3,P4)を用いて
表現していたパターンが、3個の屈曲点(P1,
P12,P4)を用いて表現することが可能になる。 Then, the following processing is performed by the bending point position correction section 7. That is, consecutive bending points P 1 , P 2 ,
A point N obtained by moving the bending point P2 by one dot in the direction of the bending point P2 from the bending point P1 with respect to P3 and P4 ,
If the point obtained by moving the bending point P 3 by one dot from the bending point P 4 in the direction of the bending point P 3 coincides with the point, and there is a contour point indicated by a "circle" at that point, the bending point P Replace the coordinates of 2 with the coordinates of point N (Fig. 2b
In the figure, the bending point P 12 ) and the bending point P 3 are deleted. As a result, the pattern expressed using four bending points (P 1 , P 2 , P 3 , P 4 ) has changed to three bending points (P 1 , P 4 ).
P 12 , P 4 ).
以上説明したように、屈曲点情報を用いてパタ
ーンの輪郭情報を表現すると共に、屈曲点が相互
に直角かつ所定の位置関係にある場合に当該屈曲
点を統合して屈曲点の数を削減する構成を採用し
ているため、圧縮を充分に行うことが可能にな
り、かつパターンの拡大、縮小、圧縮を容易に行
うことができる。 As explained above, the contour information of the pattern is expressed using the bending point information, and the number of bending points is reduced by integrating the bending points when the bending points are at right angles to each other and in a predetermined positional relationship. Since this configuration is adopted, it is possible to perform sufficient compression, and the pattern can be easily enlarged, reduced, and compressed.
本発明の1実施例を第3図〜第9図にもとづき
説明する。
One embodiment of the present invention will be described based on FIGS. 3 to 9.
(a) 本発明の1実施例構成
第3図は本発明の1実施例構成図、第4図はそ
の直線発生部の直線発生状態説明図、第5図は直
線発生部の動作フローチヤートを示す。(a) Configuration of one embodiment of the present invention Fig. 3 is a configuration diagram of one embodiment of the present invention, Fig. 4 is an explanatory diagram of the straight line generation state of the straight line generation section, and Fig. 5 is an operation flowchart of the straight line generation section. show.
第3図において、図中、1は原パターン保持
部、2は追跡部、3は直線発生部、4は輪郭線切
出部、5は比較部、6は屈曲点生成部、7は屈曲
点位置補正部、8は圧縮データ保持部を表す。 In FIG. 3, 1 is an original pattern holding section, 2 is a tracing section, 3 is a straight line generating section, 4 is a contour cutting section, 5 is a comparison section, 6 is a bending point generating section, and 7 is a bending point The position correction section 8 represents a compressed data holding section.
原パターン保持部1は、TVカメラのCCDの如
き適宜入力手段から伝達された、例えば文字のオ
リジナル・パターン(原パターン)を記憶保持す
るものである。 The original pattern holding section 1 stores and holds, for example, an original pattern of characters (original pattern) transmitted from an appropriate input means such as a CCD of a TV camera.
追跡部2は、原パターンの輪郭部分を追跡して
輪郭線上の座標列点を得るものである。このた
め、例えばパターンを3×3のウインドウで走査
してパターンの輪郭線上の一点を捉え、そこから
輪郭線を8方向に追跡可能にしてこれを追跡し、
輪郭上の点の座標列を得る。輪郭線の始点をS、
終点をEとすれば、例えば第6図aにおいて、白
丸で示す如き輪郭線を得ることになる。なお第6
図aにおける*印は輪郭線内部のパターンであ
る。 The tracing section 2 traces the outline of the original pattern to obtain coordinate string points on the outline. For this purpose, for example, the pattern is scanned in a 3 x 3 window to capture a point on the outline of the pattern, and from there the outline can be traced in 8 directions.
Obtain the coordinate string of points on the contour. Set the starting point of the contour line to S,
If the end point is E, a contour line as shown by the white circle in FIG. 6a, for example, will be obtained. Furthermore, the 6th
The * mark in figure a is a pattern inside the contour line.
直線発生部3は、与えられた2点間に直線を発
生する手段であつて、周知のものが使用できる。
一例としてDDA(Digital Differential Analy
zer:デイジタル微分解析機)を使用する例につ
いて、第4図および第5図を用いて説明する。第
4図に示す如く、P1(X1,Y1)とP2(X2,Y2)と
の間に直線を引くとき、第1ステツプ(第5図図
示)として、始点を(X1,Y1)にプロツトし、
この直線の角度をφとするとき、係数G1=cosφ、
係数G2=sinφを求め、スタート点(X,Y)の
座標をX=X1,Y=Y1にセツトする。そして、
初期値としてX座標レジスタR1,Y座標レジス
タR2に次のデータを記入する。 The straight line generating section 3 is a means for generating a straight line between two given points, and any known type can be used.
An example is DDA (Digital Differential Analysis).
An example of using a digital differential analyzer (zer: digital differential analyzer) will be described with reference to FIGS. 4 and 5. As shown in Figure 4, when drawing a straight line between P 1 (X 1 , Y 1 ) and P 2 (X 2 , Y 2 ), the first step (shown in Figure 5) is to set the starting point at (X 1 , Y 1 ),
When the angle of this straight line is φ, the coefficient G 1 = cosφ,
Find the coefficient G 2 =sinφ and set the coordinates of the starting point (X, Y) to X=X 1 and Y=Y 1 . and,
Write the following data into the X coordinate register R 1 and Y coordinate register R 2 as initial values.
R1=X1+0.5 ……(1)
R2=Y1+0.5 ……(2)
第2ステツプ(第5図図示)として、X座標レ
ジスタR1の値に前記cosφを加え、Y座標レジス
タR2の値に前記sinφを加える。これは、第4図
において、スタート点P1よりP2の方に単位長1
だけ直線を引いたときのX座標およびY座標の値
を示す。ところで、メモリにセツトされるデータ
は、通常整数単位であるので、前記加算後の値の
整数部分I1,I2だけを取り出す。なお第5図の第
2ステツプでint(R1)は、レジスタR1より整数
部分のみを取り出すことを示し、int(R2)はレジ
スタR2より整数部分のみを取り出すことを示す。
ここでintは、少数点以下を切り捨てる関数を示
す。 R 1 = _ _ Add the sinφ to the value of the Y coordinate register R2 . This means that in Fig. 4, the unit length is 1 from the starting point P 1 to P 2 .
shows the values of the X and Y coordinates when a straight line is drawn. By the way, since the data set in the memory is usually in integer units, only the integer parts I 1 and I 2 of the value after the addition are taken out. In the second step of FIG. 5, int(R 1 ) indicates that only the integer part is taken out from register R1 , and int(R 2 ) shows that only the integer part is taken out from register R2 .
Here, int indicates a function that truncates the fraction below the decimal point.
第3ステツプ(第5図図示)として、前記第2
ステツプで得た整数I1が第1ステツプのXと異な
るか、または整数I2が第1ステツプのYと異なる
ときには、X=I1,Y=I2としてこれらを(X,
Y)にプロツトする。このようなことをX=X2,
Y=Y2になるまで繰り返す。このようにして、
第4図に◎印で示す如きP1,P2間の直線のデー
タが得られる。 As a third step (shown in Figure 5), the second
If the integer I 1 obtained in the step is different from X in the first step, or if the integer I 2 is different from Y in the first step, then set them as (X,
Plot Y). In this case, X=X 2 ,
Repeat until Y= Y2 . In this way,
Data on a straight line between P 1 and P 2 as shown by the mark ◎ in FIG. 4 is obtained.
輪郭線切出部4は、輪郭線を適宜切り出してそ
の間の座標を出力するものである。 The contour line cutting section 4 cuts out the contour lines as appropriate and outputs the coordinates between them.
比較部5は、直線発生部3により発生した直線
と、輪郭線切出部4の切り出した輪郭線とが一致
するか否かを比較するものである。 The comparing section 5 compares whether the straight line generated by the straight line generating section 3 and the contour cut out by the contour cutting section 4 match.
屈曲点生成部6は、後述する終了条件チエツク
信号を発生し、屈曲点生成処理をさらに続けるか
否かを判断するものである。 The bending point generation section 6 generates a termination condition check signal, which will be described later, and determines whether or not to continue the bending point generation process.
屈曲点位置補正部7は、第2図図示原理説明図
を用いて説明した如く、屈曲点生成部6によつて
生成された屈曲点の数を削減するものである。 The bending point position correction section 7 reduces the number of bending points generated by the bending point generating section 6, as explained using the principle explanatory diagram shown in FIG.
圧縮データ保持部8は、補正部7によつて相互
に直角な屈曲点の削除が実施された後の輪郭線の
屈曲点を保持するものである。 The compressed data holding unit 8 holds the bending points of the contour line after the correction unit 7 deletes the bending points that are perpendicular to each other.
(b) 本発明の動作
本発明は2点間の直線の発生、輪郭線から
の屈曲点抽出、および屈曲点の位置補正という
3つの技術を主にしている。(b) Operation of the present invention The present invention mainly uses three techniques: generating a straight line between two points, extracting a bending point from a contour line, and correcting the position of a bending point.
イ このうちについては、前記(a)の直線発生部
3について第4図および第5図にもとづき説明し
たので省略し、およびについて順次説明し、
その後に全体の動作について説明する。(b) Of these, the straight line generating section 3 in (a) was explained based on FIGS. 4 and 5, so it will be omitted, and and will be explained sequentially.
After that, the overall operation will be explained.
第7図は屈曲点検出動作フローチヤート、第8
図は屈曲点の抽出例、第9図は屈曲点の位置補正
列を示す。 Figure 7 is a flowchart of the bending point detection operation;
The figure shows an example of extraction of bending points, and FIG. 9 shows a position correction sequence of bending points.
の輪郭線から屈曲点抽出は次の第1ステツプ
〜第5ステツプの手順によりパターンの輪郭線か
ら屈曲点を抽出する。 The bending points are extracted from the contour of the pattern by the following steps 1 to 5.
第1ステツプでは、例えば第6図aに示す如
く、パターンの輪郭線上の一点を捉え、そこから
輪郭線を8連結で追跡し、白丸印で示す如き輪郭
上の点の座標列を得る。輪郭線の始点をS、終点
をEとする。 In the first step, for example, as shown in FIG. 6A, one point on the outline of the pattern is captured, and the outline is traced from there by eight connections to obtain a coordinate string of points on the outline as shown by white circles. Let S be the starting point of the contour line, and E be the ending point.
第2ステツプでは、まず始点SをP1とし、こ
のP1の無条件に屈曲点として抽出する。 In the second step, first, the starting point S is set as P1 , and this P1 is unconditionally extracted as a bending point.
第3ステツプでは、点Pを終点Eから始点Sに
向かつて輪郭線上を移動させながら点Pと点Sと
の間にの方法で直線発生部3により直線を発生
し、その区間の輪郭線を輪郭線切出部4で求め、
比較部5によりこの直線と輪郭線との差を求め
る。例えば、点Pが第6図bに示す星印の位置に
あるとき、この星印と始点S(X印)との間の直
線を求めると、(星印、◎,◎,◎,X印)の如
き直線が得られ、また輪郭線として星印から左廻
り方向にX印までの輪郭線が得られるが、この両
者は一致せず、その差は零ではない。そのため、
次に、点Pは星印位置より一個S側寄りに移動し
たP1の位置で同様に直線を発生し、また輪郭線
を切り出して一致状態をチエツクする。このよう
なことを順次P1,P2と始点S方向に移動させて
行う。そして、第6図bのPVで行うとき、その
PVから始点Sに向かう直線とその区間の輪郭線
とが一致してその差が零になるので、この点PV
を屈曲点Vとして抽出する。 In the third step, while moving the point P on the contour from the end point E to the start point S, the straight line generator 3 generates a straight line between the points P and S, and the contour line in that section is generated. Obtained by the contour line cutting section 4,
The comparing section 5 calculates the difference between this straight line and the contour line. For example, when point P is located at the position of the star shown in Figure 6b, if we find a straight line between this star and the starting point S (X mark), (star mark, ◎, ◎, ◎, ) is obtained, and a contour line from the star mark to the X mark in the counterclockwise direction is obtained, but the two do not match and the difference between them is not zero. Therefore,
Next, a straight line is generated in the same way at the position P1 , where the point P is moved one position closer to the S side than the star mark position, and the outline is cut out to check whether it matches. This is done by sequentially moving P 1 and P 2 toward the starting point S. Then, when performing P V in Figure 6b, the
Since the straight line from P V to the starting point S and the contour line of that section match and the difference becomes zero, this point P V
is extracted as the bending point V.
第4ステツプでは、屈曲点を全部抽出したか否
かをチエツクするものである。このために、前記
第3ステツプで得た屈曲点Vと終点Eとを経由し
て始点Sまでの区間の輪郭線(この例では屈曲点
Vから右廻り方向の輪郭線)と、屈曲点Vと始点
Sの直線との差が零か否かをチエツクする。この
チエツクは、第3図の屈曲点生成部6からの指示
により、直線発生部3が直線を発生させ、輪郭線
切出部4が輪郭線を切り出し、比較部5がその一
致,不一致をチエツクすることにより行われる。
この差が後述するように零ならば、屈曲点抽出処
理は終了することになるが、第6図bにおいて、
屈曲点PVにおける前記チエツクでは不一致であ
るので、次の屈曲点を検出するために第5ステツ
プに続く。 In the fourth step, it is checked whether all bending points have been extracted. For this purpose, the contour line of the section from the bending point V obtained in the third step and the end point E to the starting point S (in this example, the contour line in the clockwise direction from the bending point V) and the bending point V Check whether the difference between the line and the straight line at the starting point S is zero. In this check, the straight line generating section 3 generates a straight line, the contour cutting section 4 cuts out the contour line, and the comparing section 5 checks whether the lines match or do not match according to instructions from the bending point generating section 6 in FIG. It is done by doing.
If this difference is zero as described later, the bending point extraction process ends, but in FIG. 6b,
Since the check at the inflection point P V is inconsistent, we continue with the fifth step to find the next inflection point.
第5ステツプでは、終点Eから左廻りにスター
トさせて、第3ステツプと同様に、屈曲点Vへの
直線と、屈曲点Vまでの輪郭線とが一致する点を
検出し、これにより、次の屈曲点V1が検出でき
る。そして、前記第4ステツプの終了条件をチエ
ツクするが、V1でも終了条件が満足されてない
ので再びEをスタート点としてV1に対する直線
および輪郭線をを比較する。これにより、次に屈
曲点V2が検出できる。ここで終了条件のチエツ
クが行われ、終了条件が満たされていなければ、
Eよりこの屈曲点V2までの直線および輪郭線を
順次比較する。このような処理を順次行うことに
より、第6図dに黒丸で示す如き各屈曲点が検出
される。 In the fifth step, start counterclockwise from the end point E, and similarly to the third step, detect a point where the straight line to the bending point V and the contour line to the bending point V match, and from this, the next point is detected. The inflection point V 1 can be detected. Then, the end condition of the fourth step is checked, but since the end condition is not satisfied even for V1 , the straight line and contour line for V1 are compared again using E as the starting point. Thereby, the bending point V2 can be detected next. The termination condition is checked here, and if the termination condition is not met,
The straight line and contour line from E to this bending point V2 are sequentially compared. By sequentially performing such processing, bending points as shown by black circles in FIG. 6d are detected.
第7図は、前記屈曲点検出のための一般的な動
作を説明するフローチヤートである。ここでは、
追跡した輪郭線の座標点列を(P1,P2…Po)と
し、輪郭線上のi番目の点Piと、j番目の点Pjと
の間に前記の手法(aの直線発生部3における
説明)で発生した点列(N1,N2…NL)と、(Pi
…Pj)とを比較して、両者が等しい時はYES、
等しくないときはNOを返す処理SAME(i,j)
が定義されているものとする。 FIG. 7 is a flowchart illustrating the general operation for detecting the bending point. here,
Let the coordinate point sequence of the traced contour line be (P 1 , P 2 ...P o ), and use the method described above (the straight line generation unit 3 of a) between the i-th point Pi and the j-th point Pj on the contour line. The point sequence (N 1 , N 2 ...N L ) generated in the explanation in
...P j ), and if they are equal, YES,
Processing that returns NO if not equal SAME (i, j)
is defined.
尚、屈曲点の位置補正については、既に第2
図を用いて説明した如く、第2図a図中パターン
P1ないしP4中のパターンP2を1ドツト分P1から
P2の方向に移動させた点Nと、パターンP3を1
ドツト分P4からP3の方向に移動させた点と一致
し、かつその位置に輪郭上の点が存在する場合、
パターンP2の座標値を点Nの座標値に置き換え
ると共に、パターンP3を削除し、第2図bの如
きパターンおよび屈曲点P1,P12,P4を得る。こ
れにより、屈曲点の位置補正前の4個の屈曲点
P1,P2,P3…P4が、3個の屈曲点P1,P12,P4に
削減されたこととなり、圧縮が実行されたことと
なる。 In addition, regarding the position correction of the bending point, the second
As explained using the diagram, the pattern in Figure 2 a
Pattern P 2 from P 1 to P 4 by one dot from P 1
Point N moved in the direction of P 2 and pattern P 3 are 1
If it matches the point moved in the direction of P 3 by a dot and there is a point on the contour at that position,
The coordinate values of pattern P 2 are replaced with the coordinate values of point N, and pattern P 3 is deleted to obtain a pattern and bending points P 1 , P 12 , and P 4 as shown in FIG. 2b. As a result, the four bending points before the bending point position correction
P 1 , P 2 , P 3 . . . P 4 have been reduced to three bending points P 1 , P 12 , P 4 , and compression has been performed.
ロ 次に第3図を用いて本発明の全体動作を説明
する。(b) Next, the overall operation of the present invention will be explained using FIG.
図示省略したTVカメラの如き画像入力部よ
り入力された文字パターンが保持部1に保持さ
れる。このパターンは追跡部2により、その輪
郭部分が追跡され、第6図aの白丸で示す如き
輪郭線上の座標列点が得られる。このとき得ら
れた輪郭線の始点をS、終点をEとする。これ
らのデータは、直線発生部3および輪郭線切出
部4にて保持される。 A character pattern input from an image input unit such as a TV camera (not shown) is held in the holding unit 1. The contour portion of this pattern is traced by the tracing section 2, and coordinate string points on the contour line as shown by white circles in FIG. 6a are obtained. The starting point of the contour obtained at this time is S, and the ending point is E. These data are held in the straight line generating section 3 and the contour cutting section 4.
まず屈曲点生成部6は無条件に始点Sを屈曲
点として抽出する。 First, the bending point generation unit 6 unconditionally extracts the starting point S as a bending point.
終点Eと始点Sとの間の直線を直線発生部3
により発生させ、その直線の座標を比較部5に
送出する。また、輪郭線切出部4は終点Eから
左廻りで始点Sまでの輪郭線の座標(E,P1,
P2…S)を比較部5に送出する。比較部5は
この直線と輪郭線座標とを比較して不一致のと
き、不一致信号を屈曲点生成部6に出力する。
屈曲点生成部6は、これにより終点Eの次の輪
郭線上の点P1(始点Sと反対側の点)に対して
同様の処理を行うように直線発生部3と輪郭線
切出部4とに指令する。これにより、直線発生
部3はP1とSとの間に直線を発生させ、また
輪郭線切出部4は(P1,P2…S)を送出し、
比較部5で比較で行われる。このときも不一致
なので、次に点P2からSに向かう直線と輪郭
線との比較を行う。このようなことが順次行わ
れ、点PVにおいて比較部5から一致信号が出
力される。 The straight line between the end point E and the start point S is the straight line generator 3
and sends the coordinates of the straight line to the comparing section 5. In addition, the contour line cutting unit 4 calculates the coordinates (E, P 1 ,
P 2 ...S) is sent to the comparison section 5. Comparison unit 5 compares this straight line with the contour line coordinates and outputs a mismatch signal to bending point generation unit 6 when they do not match.
The bending point generation unit 6 thereby causes the straight line generation unit 3 and the contour cutout unit 4 to perform the same processing on the point P 1 on the contour line next to the end point E (the point on the opposite side to the starting point S). to command. As a result, the straight line generating section 3 generates a straight line between P 1 and S, and the contour cutting section 4 sends out (P 1 , P 2 ...S),
Comparison is performed in the comparator 5. Since they do not match at this time as well, next a comparison is made between the straight line from point P2 to S and the contour line. These steps are performed sequentially, and a matching signal is output from the comparing section 5 at point P V.
これにより、屈曲点生成部6は、今度は輪郭
線切出部4に対して点PVから右廻り終点Eを
経由して始点Sまでの輪郭線を出力させ、また
直線発生部3にはPVとSとの直線を出力させ、
比較する。比較部5から不一致信号が送出され
るので、屈曲点生成部6はその終了条件が満た
されていないことを認識し、今度は前記イの第
5ステツプに関する説明と同様な制御が行われ
る。このようにして、各屈曲点が順次検出され
る。そして、第6図dに黒丸として示す各屈曲
点が屈曲点位置補正部7に通知される。 As a result, the bending point generating section 6 in turn causes the contour line cutting section 4 to output a contour line from the point P V to the starting point S via the clockwise end point E, and the straight line generating section 3 Output a straight line between P V and S,
compare. Since the comparison section 5 sends out a mismatch signal, the inflection point generation section 6 recognizes that the termination condition is not satisfied, and this time the same control as described for the fifth step in A above is performed. In this way, each bending point is detected in sequence. Then, each bending point shown as a black circle in FIG. 6d is notified to the bending point position correction unit 7.
輪郭線の屈曲点情報の通知を受けた屈曲点位
置補正部7は、隣接する屈曲点が相互に直角か
つ所定の位置関係にある場合には、第2図を用
いて説明した如く、一方の屈曲点の座標を置き
換えると共に、他の屈曲点を削除する。そし
て、この位置補正を行つた各屈曲点情報が圧縮
データ保持部8に保持される。 When the adjacent bending points are perpendicular to each other and have a predetermined positional relationship, the bending point position correction unit 7 that has received the notification of the bending point information of the contour line corrects one of the bending points as explained using FIG. Replace the coordinates of the bend point and delete other bend points. Then, the information on each bending point subjected to this position correction is held in the compressed data holding unit 8.
このようにして、例えば第8図図中“黒四角”
を用いて示す位置が屈曲点として屈曲点生成部6
によつて抽出される。そして、更にこれら抽出し
た屈曲点のうち、屈曲点位置補正部7によつて位
置補正を行つたものを第9図に示す。図中“*”
は屈曲点位置補正部7によつて屈曲点が位置補正
され、屈曲点の数が削減された位置を示す。この
ように、第9図に示す如く、屈曲点の位置補正を
実行した後の屈曲点情報を用いて原パターンを圧
縮して表現することができる。 In this way, for example, the "black square" in Figure 8
The position indicated using
Extracted by. Further, among these extracted bending points, those whose positions have been corrected by the bending point position correction section 7 are shown in FIG. “*” in the diagram
indicates a position where the bending points are corrected by the bending point position correction unit 7 and the number of bending points is reduced. In this way, as shown in FIG. 9, the original pattern can be compressed and expressed using the bending point information after the bending point position correction has been performed.
以上説明したように、本発明によれば、原パタ
ーン情報を屈曲点情報を用いて表現すると共に、
当該屈曲点情報が相互に直角かつ所定の位置関係
にある場合に位置補正を実行して屈曲点の数を削
減する構成を採用しているため、屈曲点情報を用
いてきわめて圧縮した態様で原パターン情報を表
現することができる。しかも、屈曲点を座標情報
として持つため、拡大、縮小、回転等の各種変換
を容易に行うことができる。そのため、いままで
フル・ドツトを用いてパターンを記憶していた装
置に比較し、極めて小型かつ高性能化することが
できる。
As explained above, according to the present invention, original pattern information is expressed using bending point information, and
Since we have adopted a configuration in which position correction is performed to reduce the number of bending points when the bending point information is at right angles to each other and in a predetermined positional relationship, the bending point information is used to generate the original in a highly compressed manner. Pattern information can be expressed. Furthermore, since the bending point is provided as coordinate information, various transformations such as enlargement, reduction, rotation, etc. can be easily performed. Therefore, compared to devices that have conventionally stored patterns using full dots, it is possible to achieve extremely small size and high performance.
第1図は本発明の原理的構成図、第2図は本発
明の原理説明図、第3図は本発明の1実施例構成
図、第4図は直線発生状態説明図、第5図は直線
発生部の動作フローチヤート、第6図は屈曲点検
出状態説明図、第7図は屈曲点検出動作フローチ
ヤート、第8図は屈曲点の抽出例、第9図は屈曲
点の位置補正例、第10図は従来のパターン情報
量圧縮方式の原理説明図、第11図は屈曲点の抽
出例を示す。
図中、1は原パターン保持部、3は直線発生
部、4は輪郭線切出部、7は屈曲点位置補正部、
8は圧縮データ保持部、9は磁気デイスク装置を
表す。
FIG. 1 is a diagram showing the basic configuration of the present invention, FIG. 2 is a diagram explaining the principle of the invention, FIG. Flowchart of the operation of the straight line generation section, FIG. 6 is an explanatory diagram of the bending point detection state, FIG. 7 is a flowchart of the bending point detection operation, FIG. 8 is an example of extracting the bending point, and FIG. 9 is an example of correcting the position of the bending point. , FIG. 10 is a diagram explaining the principle of a conventional pattern information amount compression method, and FIG. 11 shows an example of extraction of bending points. In the figure, 1 is an original pattern holding section, 3 is a straight line generation section, 4 is a contour cutting section, 7 is a bending point position correction section,
8 represents a compressed data holding unit, and 9 represents a magnetic disk device.
Claims (1)
情報量を圧縮するパターン情報量圧縮方式におい
て、 2点間に直線を発生する直線発生部3と、 原パターンの輪郭から抽出される2点間の直線
と、その間の輪郭線とが一致するか否かを検出し
て輪郭線の屈曲点情報を抽出する輪郭線切出部4
と、 この輪郭線切出部4によつて抽出された屈曲点
が直角かつ所定の位置に存在するか否かを判別
し、この判別結果に基づいて屈曲点の位置を補正
する屈曲点位置補正部7とを備え、 この屈曲点位置補正部7によつて補正された屈
曲点情報を用いて前記輪郭線情報を表現するよう
構成したことを特徴とするパターン情報量圧縮方
式。[Claims] 1. In a pattern information compression method that compresses the amount of information by approximating the outline of a pattern with a broken line, the method comprises: a straight line generation unit 3 that generates a straight line between two points; a contour line cutting unit 4 that detects whether or not a straight line between two points matches a contour line therebetween and extracts information on bending points of the contour line;
and a bending point position correction for determining whether or not the bending point extracted by the contour cutout section 4 exists at a right angle and at a predetermined position, and correcting the position of the bending point based on the determination result. 7. A pattern information amount compression method characterized in that the contour information is expressed using the bending point information corrected by the bending point position correcting section 7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP15791885A JPS6219976A (en) | 1985-07-17 | 1985-07-17 | Compressing system for quantity of pattern information |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP15791885A JPS6219976A (en) | 1985-07-17 | 1985-07-17 | Compressing system for quantity of pattern information |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6219976A JPS6219976A (en) | 1987-01-28 |
| JPH0338624B2 true JPH0338624B2 (en) | 1991-06-11 |
Family
ID=15660302
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP15791885A Granted JPS6219976A (en) | 1985-07-17 | 1985-07-17 | Compressing system for quantity of pattern information |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS6219976A (en) |
-
1985
- 1985-07-17 JP JP15791885A patent/JPS6219976A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6219976A (en) | 1987-01-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Bunke et al. | Applications of approximate string matching to 2D shape recognition | |
| US6011873A (en) | Method and apparatus for lossless compression of signature data | |
| CA1089988A (en) | Apparatus for producing vectors | |
| JPH05135121A (en) | Diagram recognition system | |
| US5357602A (en) | Apparatus for transforming a two-level image into contour vectors by decomposing composite figures into "unitary" (open) and closed-loop figures, especially suitable for minimizing memory use while maintaining system processing speed | |
| US4853885A (en) | Method of compressing character or pictorial image data using curve approximation | |
| JPH0338624B2 (en) | ||
| JPH0325827B2 (en) | ||
| JP2702307B2 (en) | Fingerprint correction system | |
| JPH01161487A (en) | Object recognizing method | |
| JP3130869B2 (en) | Fingerprint image processing device, fingerprint image processing method, and recording medium | |
| JPH0695727B2 (en) | Image data compression device | |
| JPH01277976A (en) | Image processor | |
| JP2512800B2 (en) | Linear approximation method of line figure input device | |
| JPH11175701A (en) | Image recording apparatus and image recording method, and image processing apparatus and image processing method | |
| JP3344791B2 (en) | Line segment extraction method | |
| JP2881039B2 (en) | Data compression device | |
| JP2991735B2 (en) | Buffering method | |
| JP3446794B2 (en) | Polygon approximation method and character recognition device for character recognition | |
| JPH081660B2 (en) | Online handwritten figure recognition device | |
| JPH0749924A (en) | Handwritten character recognizing device | |
| JP2833971B2 (en) | Drafting symbol data conversion method between different models | |
| JPS63198168A (en) | Device for representing linear graphic by polygonal line | |
| JPS6269370A (en) | Compression system for pattern information | |
| JP2867650B2 (en) | Symbol candidate area detection method |