JPH0423303B2 - - Google Patents
Info
- Publication number
- JPH0423303B2 JPH0423303B2 JP58063965A JP6396583A JPH0423303B2 JP H0423303 B2 JPH0423303 B2 JP H0423303B2 JP 58063965 A JP58063965 A JP 58063965A JP 6396583 A JP6396583 A JP 6396583A JP H0423303 B2 JPH0423303 B2 JP H0423303B2
- Authority
- JP
- Japan
- Prior art keywords
- segment
- run
- runs
- row
- registered
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—Two-dimensional [2D] image generation
- G06T11/20—Drawing from basic elements
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Description
【発明の詳細な説明】
(1) 発明の技術分野
本発明は入力画像の2次元的情報をセグメント
テーブルの形で圧縮し、走査線方向の情報はラン
(画素の連なり)の形でバツフアメモリに記録し
ておき、走査線間の相関は該ラン情報とセグメン
トテーブルを対照とすることにより取り、ベクト
ル(折線近似パターン)の座標値を、ベクトル発
生条件を満足した時点で速やかに出力する方式に
関する。[Detailed Description of the Invention] (1) Technical Field of the Invention The present invention compresses two-dimensional information of an input image in the form of a segment table, and stores information in the scanning line direction in a buffer memory in the form of a run (a series of pixels). The present invention relates to a method in which the correlation between scanning lines is determined by comparing the run information with a segment table, and the coordinate values of a vector (broken line approximation pattern) are promptly output when vector generation conditions are satisfied. .
(2) 従来技術と問題点
従来、画像処理機器は書類や図面を単に光電変
換し、2値化処理(濃淡を白、黒の2値に変換す
る。)のみを施すものであり、2値化されたデー
タの記憶容量が大きくなることとパターン処理等
に容易に利用できない欠点があつた。(2) Conventional technology and problems Conventionally, image processing equipment simply photoelectrically converts documents and drawings and performs only binary processing (converting shading into two values of white and black). The drawbacks were that the storage capacity of the converted data was large and that it could not be easily used for pattern processing.
(3) 発明の目的
本発明は前記欠点を解消して、線図形を光電変
換し、更に2値化処理した後、速やかにベクトル
化(折線近似化)されたデータを得ることによ
り、画像データの符号化、パターン認識処理の容
易化を図ることを目的とする。(3) Purpose of the Invention The present invention solves the above-mentioned drawbacks, photoelectrically converts line figures, further performs binarization processing, and then quickly obtains vectorized (broken line approximation) data, thereby converting image data. The purpose is to facilitate encoding and pattern recognition processing.
(4) 発明の構成
該目的は線画像を光電変換し、2値化器により
0又は1に2値化するシステムにおいて、該2値
化したデータを格納するバツフアメモリと、該2
値化データからランを検出するラン検出手段と、
該検出された行のランの個数と、該検出された行
のランに相当する区間の前行のランの個数をそれ
ぞれ計数し、且つ該検出された行のランの個数と
該前行のランの個数とを比較するマツチング手段
と、ランの集合体から構成されるセグメントのセ
グメント長、傾き、線幅が登録されるセグメント
テーブルと、該ランの個数から任意のランがどの
セグメントに結合しているかを調べ、結合するラ
ン数が1つの場合は、当該セグメントテーブルに
登録された任意のセグメントのセグメント長、傾
き、線幅と当該ランを比較し、該ランの両端画素
の位置が登録されたセグメントの傾きに対して離
れていないか、またはラン幅が登録されたセグメ
ントの線幅から逸脱していないかを調べることに
より、該ランが当該セグメントに含まれるか、ま
たは屈曲部であるかを判定して上記セグメントテ
ーブルに登録し、結合するラン数が0または複数
の場合は該ランを新規なセグメントとして上記セ
グメントテーブルに登録するセグメント判定手段
と、該登録されたセグメントの中の最上位セグメ
ントと最下位セグメントの座標関係からベクトル
を発生させるベクトル発生手段と、から構成され
ることを特徴とする線画像のベクトル発生方式に
より達成される。(4) Structure of the invention The object is to provide a system that photoelectrically converts a line image and binarizes it into 0 or 1 using a binarizer, which includes a buffer memory for storing the binarized data, and a buffer memory for storing the binarized data;
a run detection means for detecting a run from digitized data;
The number of runs in the detected row and the number of runs in the previous row in the section corresponding to the runs in the detected row are counted, and the number of runs in the detected row and the run in the previous row are counted. a matching means for comparing the number of runs, a segment table in which the segment length, slope, and line width of a segment composed of a collection of runs are registered; If the number of runs to be combined is one, the segment length, slope, and line width of any segment registered in the segment table are compared with the run, and the positions of the pixels at both ends of the run are registered. By checking whether the run is apart from the slope of the segment or whether the run width deviates from the registered line width of the segment, it is possible to determine whether the run is included in the segment or is a bend. a segment determination means for determining and registering the run in the segment table, and registering the run as a new segment in the segment table if the number of runs to be combined is zero or more; and the highest segment among the registered segments. and vector generation means for generating a vector from the coordinate relationship of the lowest segment.
(5) 発明の実施例
以下図面を参照しつつ本発明を詳細に説明す
る。(5) Embodiments of the invention The present invention will be described in detail below with reference to the drawings.
第1図は本発明の一実施例を示す全体ブロツク
図である。 FIG. 1 is an overall block diagram showing one embodiment of the present invention.
図において、11は図面、12は光電変換部、
13は2値化器、14は行カウンタ、15は列カ
ウンタ、16はデータバス、17はスイツチ、1
8はバツフアメモリA、19はメモリアクセス部
1(メモリリードライト)、110はラン検出部、
111はメモリアクセス部4、112はバツフア
メモリB、113はメモリアクセス2、114は
マツチング部、115はセグメントテーブル、1
16はメモリアクセス3、117はセグメント判
定部、118はベクトル発生部、119は外部メ
モリである。 In the figure, 11 is a drawing, 12 is a photoelectric conversion unit,
13 is a binarizer, 14 is a row counter, 15 is a column counter, 16 is a data bus, 17 is a switch, 1
8 is a buffer memory A, 19 is a memory access unit 1 (memory read/write), 110 is a run detection unit,
111 is a memory access unit 4, 112 is a buffer memory B, 113 is a memory access 2, 114 is a matching unit, 115 is a segment table, 1
16 is a memory access 3, 117 is a segment determination section, 118 is a vector generation section, and 119 is an external memory.
第2図は本発明の一実施例を示すラン検出の詳
細を示す図である。 FIG. 2 is a diagram showing details of run detection according to an embodiment of the present invention.
図において21はl1(セグメントのラベル)、2
2は黒部、23はl2(セグメントのラベル)、24
は黒部、25は前行のバツフア、26は処理行の
バツフアである。 In the figure, 21 is l 1 (segment label), 2
2 is black part, 23 is l 2 (segment label), 24
is the black part, 25 is the buffer of the previous row, and 26 is the buffer of the processed row.
第3図は本発明の一実施例を示すセグメントテ
ーブルの詳細を示す図である。図において、31
はセグメントNo.、32はセグメント開始点座標、
33はセグメント長さ、34は傾き、35は線幅
である。 FIG. 3 is a diagram showing details of a segment table showing an embodiment of the present invention. In the figure, 31
is the segment number, 32 is the segment start point coordinates,
33 is the segment length, 34 is the slope, and 35 is the line width.
まず図面11を光電変換部12で左から右へ、
上から下へと、横方向1ラインづつテレビ式走査
を行ない、2値化器13で0(白)と1(黒)に2
値化して行カウンタ114を使つてバツフアメモ
リA18、バツフアメモリB112に1行づつ連
続して格納する。該バツフアメモリは整数値が扱
えるために1画素あたりnビツトもつている。バ
ツフアの幅およびビツト数nは扱う画像により変
えることができる。 First, from left to right in drawing 11 with photoelectric conversion unit 12,
Television-style scanning is performed horizontally one line at a time from top to bottom, and the binarizer 13 converts the data into 0 (white) and 1 (black).
The data is converted into a value and sequentially stored one row at a time in the buffer memory A 18 and buffer memory B 112 using the row counter 114. The buffer memory has n bits per pixel because it can handle integer values. The width of the buffer and the number of bits n can be changed depending on the image being handled.
次に、該バツフアメモリA18、B112に格
納された2値データをメモリアクセス部19,1
13で読出すとともにラン検出部110にて1
(黒)の部分の1つの連続をラン(RUN)として
検出する。即ちバツフアメモリに格納された2値
データを一方向から検出し、0値の部分から0よ
り大きい値となる箇所(ランの始まり)、その逆
の箇所(ランの終り)を記録する。マツチング部
114は、該ラン同志の結合を調べるものである
が、第2図の様に前行のバツフア25と処理行の
バツフア26のランを調べる。つまり、始まり、
終了の座標が、x1,x2なるランの場合、x1〜x2に
相当する前行バツフア25の区間を列カウンタ1
5を使い走査し、0より大きい値(l121)のラ
ンがあるか調べる。区間〔x1,x2〕にそのような
ランがいくつあるか数えてる。0個の場合には前
行に結合したランがなく、処理行バツフア26で
はじめてランが出現したことを示す。K個(K>
0)の場合にはK本のラン(セグメント又は線)
が1つのラインに集まつてきたことを示す。1つ
のランについて以上の処理が終了したら、次のセ
グメント判定部によりランの結合状態のチエツク
から、今処理中のランが、どのセグメント(ラン
の集合体)に結合しているか判る。ここでセグメ
ントとはランの集合体であり、ある一定の傾きの
線片に相当する。本説明では、前行バツフア25
を走査した時にわかる値l121はセグメントNo.で
ある。セグメント長さ33、即ち最初のランを1
とし下に伸びている場合に+1した値や、最初の
ランと次のランとの平均傾きを示す傾き34と第
1行目のランと次行のラン座標差である線幅35
を持つたセグメントテーブル115を作成する。
つづいて次のランについても同様にセグメントテ
ーブル115に書込む。セグメントテーブル11
5の作成が終わると、該セグメント判定部は次に
セグメントl121の平均傾きΔxや線幅Wなどの
値と、今のランのx1,x2の座標を比較して、当該
ランをl1セグメントに含めるか否かを、Δxに
対してx1,x2が大きくはずれたり、線幅が極端に
違つたりした場合には同じセグメントに含めな
い、他方Δxに対してx1,x2が余りずれず、線
幅が略同じ場合は含めると判定する。その際同じ
セグメントに含むと判定した場合はmを1つ増や
し、バツフアのランの部分にl1を書込む。他方同
じセグメントに含まないと判定した場合は新しい
番号l1をランに与えて、セグメントテーブル11
5に登録する。次にベクトル発生部118は1行
分のランが全てセグメントとしてセグメントテー
ブル115に登録された後、次の条件を満たす場
合、セグメントをベクトル化する。 Next, the binary data stored in the buffer memories A18 and B112 is transferred to the memory access units 19 and 1.
13, and the run detection unit 110 reads 1.
One series of (black) parts is detected as a run (RUN). That is, the binary data stored in the buffer memory is detected from one direction, and the part where the value is greater than 0 (the start of the run) and the opposite part (the end of the run) are recorded. The matching unit 114 examines the combination of the runs, and as shown in FIG. 2, it examines the runs of the buffer 25 in the previous row and the buffer 26 in the processing row. In other words, the beginning
In the case of a run whose end coordinates are x 1 and x 2 , the section of the previous buffer 25 corresponding to x 1 to x 2 is stored in column counter 1.
5 to see if there is a run with a value greater than 0 (l 1 21). We are counting how many such runs there are in the interval [x 1 , x 2 ]. If it is 0, it means that there is no run connected to the previous row and that the run appears for the first time in the processing row buffer 26. K pieces (K>
0) then K runs (segments or lines)
This shows that the lines have gathered into one line. When the above processing is completed for one run, the next segment determination unit checks the run connection state to determine which segment (run collection) the run currently being processed is connected to. Here, a segment is a collection of runs, and corresponds to a line segment with a certain inclination. In this explanation, the previous buffer 25
The value l 1 21 found when scanning is the segment number. Segment length 33, i.e. 1 for the first run
and +1 value if it extends downward, slope 34 indicating the average slope between the first run and the next run, and line width 35 which is the difference in run coordinates between the first run and the next line.
A segment table 115 with the following information is created.
Subsequently, the next run is written in the segment table 115 in the same manner. Segment table 11
5, the segment determination unit then compares the average slope Δx, line width W, etc. of the segment l 1 21 with the coordinates of x 1 and x 2 of the current run, and determines the current run. l If x 1 and x 2 deviate greatly from Δx or the line widths are extremely different, do not include them in the same segment; If x 2 does not deviate much and the line widths are approximately the same, it is determined to be included. At that time, if it is determined that they are included in the same segment, m is incremented by 1 and l 1 is written in the run part of the buffer. On the other hand, if it is determined that the run is not included in the same segment, a new number l1 is given to the run and the segment table 11 is
Register for 5. Next, after all of the runs for one row are registered in the segment table 115 as segments, the vector generation unit 118 vectorizes the segments if the following conditions are satisfied.
′ セグメントの下に新しいセグメントが発生
した場合(セグメントl1に含まれないランが新
しいセグメントl1を作つた場合…線の屈曲に相
当する。)
′ セグメントの下にランがない場合(線の途
切に相当する。)
セグメントのベクトル化はセグメントテーブル
115の開始点座標x,y,傾きΔx、長さmか
ら
(Xf,Yf)←(x,y):fはfromの略(Xt,
Yt)←(x+m・Δx,y+m):tはtoの略
としてベクトル〔(Xf,Yf)→(Xt,Yt)〕を計
算する。′ If a new segment occurs below the segment (if a run not included in segment l 1 creates a new segment l 1 ...corresponds to a bend in the line) (This corresponds to an interruption.) Vectorization of the segment is performed from the starting point coordinates x, y, slope Δx, and length m in the segment table 115. (Xf, Yf) ← (x, y):
Yt)←(x+m・Δx,y+m): Calculate the vector [(Xf, Yf)→(Xt, Yt)], where t is an abbreviation for to.
1行分の以上の処理が終了した後、前行分バツ
フア25に処理中のバツフアを移し、処理中バツ
フアには次の行の2値データを入れて同様手順で
ベクトルを発生させる。 After the above processing for one row is completed, the buffer under processing is transferred to the previous row buffer 25, the binary data of the next row is input into the buffer under processing, and a vector is generated in the same manner.
(6) 発明の効果
以上説明したように、本発明によれば、2値化
されたデータを速やかにベクトル化(折線近似
化)できパターン認識処理の容易化が図れる。(6) Effects of the Invention As described above, according to the present invention, binarized data can be quickly vectorized (broken line approximation) and pattern recognition processing can be facilitated.
第1図は本発明の一実施例を示す全体ブロツク
図である。第2図は本発明の一実施例を示すラン
検出の詳細を示す図である。第3図は本発明の一
実施例を示すセグメントテーブルの詳細を示す図
である。
記号の説明、11は図面、12は光電変換部、
13は2値化器、14は行カウンタ、15は列カ
ウンタ、16はデータバス、17はスイツチ、1
8はバツフアメモリA、19はメモリアクセス部
1(メモリリードライト)、110はラン検出部、
111はメモリアクセス部4、112はバツフア
メモリB、113はメモリアクセス2、114は
マツチング部、115はセグメントテーブル、1
16はメモリアクセス3、117はセグメント判
定部、118はベクトル発生部、119は外部メ
モリ。
FIG. 1 is an overall block diagram showing one embodiment of the present invention. FIG. 2 is a diagram showing details of run detection according to an embodiment of the present invention. FIG. 3 is a diagram showing details of a segment table showing an embodiment of the present invention. Explanation of symbols, 11 is a drawing, 12 is a photoelectric conversion unit,
13 is a binarizer, 14 is a row counter, 15 is a column counter, 16 is a data bus, 17 is a switch, 1
8 is a buffer memory A, 19 is a memory access unit 1 (memory read/write), 110 is a run detection unit,
111 is a memory access unit 4, 112 is a buffer memory B, 113 is a memory access 2, 114 is a matching unit, 115 is a segment table, 1
16 is a memory access 3, 117 is a segment determination section, 118 is a vector generation section, and 119 is an external memory.
Claims (1)
1に2値化するシステムにおいて、 該2値化したデータを格納するバツフアメモリ
と、 該2値化データからランを検出するラン検出手
段と、 該検出された行のランの個数と、該検出された
行のランに相当する区間の前行のランの個数をそ
れぞれ計数し、且つ該検出された行のランの個数
と該前行のランの個数とを比較するマツチング手
段と、 ランの集合体から構成されるセグメントのセグ
メント長、傾き、線幅が登録されるセグメントテ
ーブルと、 該ランの個数から任意のランがどのセグメント
に結合しているかを調べ、結合するラン数が1つ
の場合は、当該セグメントテーブルに登録された
任意のセグメントのセグメント長、傾き、線幅と
当該ランを比較し、該ランの両端画素の位置が登
録されたセグメントの傾きに対して離れていない
か、またはラン幅が登録されたセグメントの線幅
から逸脱していないかを調べることにより、該ラ
ンが当該セグメントに含まれるか、または屈曲部
であるかを判定して上記セグメントテーブルに登
録し、結合するラン数が0または複数の場合は該
ランを新規なセグメントとして上記セグメントテ
ーブルに登録するセグメント判定手段と、 該登録されたセグメントの中の最上位セグメン
トと最下位セグメントの座標関係からベクトルを
発生させるベクトル発生手段と、 から構成されることを特徴とする線画像のベクト
ル発生方式。[Claims] A system that photoelectrically converts a one-line image and binarizes it into 0 or 1 using a binarizer, comprising: a buffer memory for storing the binarized data; and a run from the binarized data. A run detecting means for detecting, counting the number of runs in the detected row and the number of runs in the previous row of the section corresponding to the run in the detected row, and counting the number of runs in the detected row. a matching means that compares the number of runs with the number of runs in the previous row; a segment table in which the segment length, slope, and line width of a segment composed of a collection of runs are registered; and an arbitrary run from the number of runs. If the number of runs to be combined is one, compare the segment length, slope, and line width of any segment registered in the segment table with that run, and compare both ends of the run. Whether the run is included in the segment by checking whether the position of the pixel is not far from the slope of the registered segment or whether the run width does not deviate from the line width of the registered segment; or a bent part, and registers the determined run in the segment table, and if the number of runs to be combined is zero or more, registers the run as a new segment in the segment table; A vector generation method for a line image, comprising: vector generation means for generating a vector from the coordinate relationship between the highest segment and the lowest segment among the segments;
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP6396583A JPS59189469A (en) | 1983-04-12 | 1983-04-12 | Vector generating system of line picture |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP6396583A JPS59189469A (en) | 1983-04-12 | 1983-04-12 | Vector generating system of line picture |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS59189469A JPS59189469A (en) | 1984-10-27 |
| JPH0423303B2 true JPH0423303B2 (en) | 1992-04-21 |
Family
ID=13244514
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP6396583A Granted JPS59189469A (en) | 1983-04-12 | 1983-04-12 | Vector generating system of line picture |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS59189469A (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US4777651A (en) * | 1984-06-25 | 1988-10-11 | Tektronix, Inc. | Method of pixel to vector conversion in an automatic picture coding system |
| US4821336A (en) * | 1987-02-19 | 1989-04-11 | Gtx Corporation | Method and apparatus for simplifying runlength data from scanning of images |
| DE10137270A1 (en) | 2001-07-31 | 2003-02-20 | Aloys Wobben | Wind energy installation has a ring generator with a stator having grooves spaced at intervals on an internal or external periphery for receiving a stator winding. |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB1517870A (en) * | 1976-12-20 | 1978-07-12 | Ibm | Apparatus for producing vectors from raster scanned data |
| JPS5837773A (en) * | 1981-08-28 | 1983-03-05 | Fuji Electric Co Ltd | Processor for plural patterns |
-
1983
- 1983-04-12 JP JP6396583A patent/JPS59189469A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS59189469A (en) | 1984-10-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2670273B2 (en) | Image processing device | |
| JPH0423303B2 (en) | ||
| US5059775A (en) | Slip and method of and apparatus for automatic reading of the slip | |
| JPH0750496B2 (en) | Image signal processor | |
| JP2590099B2 (en) | Character reading method | |
| JPH0233685A (en) | Image signal processing device | |
| JPH02168363A (en) | Image signal processor | |
| JP2697085B2 (en) | Image signal processing device | |
| JP3341097B2 (en) | Optical character reader | |
| JPH07175927A (en) | Image processing device | |
| JPH02125383A (en) | Image signal processing device | |
| JPH02125385A (en) | Image signal processing device | |
| JPH02125384A (en) | Image signal processor | |
| JPH02168364A (en) | Image signal processing device | |
| JPH0498376A (en) | Pattern recognition device | |
| JPS59176879A (en) | Extracting method of singular point of pattern | |
| JPS5779564A (en) | Line-picture information conversion system | |
| JPS60205783A (en) | Linear graphic recognizing system | |
| JPS6140683A (en) | Contour tracking device | |
| JPH0877351A (en) | Image processing method and apparatus | |
| JPS5846476A (en) | Detecting circuit for black area peak | |
| JPS5890274A (en) | Extracting device of feature point | |
| JPS61234480A (en) | Method for recognizing form of digital picture | |
| JPS59189481A (en) | Character recognizing device | |
| JPS61234684A (en) | Animation picture binary-coding device |