JPS60201475A - Graphic data processing unit - Google Patents

Graphic data processing unit

Info

Publication number
JPS60201475A
JPS60201475A JP5767884A JP5767884A JPS60201475A JP S60201475 A JPS60201475 A JP S60201475A JP 5767884 A JP5767884 A JP 5767884A JP 5767884 A JP5767884 A JP 5767884A JP S60201475 A JPS60201475 A JP S60201475A
Authority
JP
Japan
Prior art keywords
line
point
straight line
points
cross
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.)
Pending
Application number
JP5767884A
Other languages
Japanese (ja)
Inventor
Toshio Matsuura
松浦 俊夫
Katsuhiko Nishikawa
克彦 西川
Akira Inoue
彰 井上
Kiyoshi Iwata
清 岩田
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 JP5767884A priority Critical patent/JPS60201475A/en
Publication of JPS60201475A publication Critical patent/JPS60201475A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0007Image acquisition

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To attain accurate polygonal line approximation without needing much labor and time by extracting a coordinate of a cross point where a distance with a straight line convecting two points on a line graphic is maximum and exceeds a prescribed reference value and extracting the coordinate values until the cross point is not detected where the distance with the obtained from the straight line exceeds a prescribed reference value. CONSTITUTION:A straight line generating circuit 2 extracts a coordinate a terminal point S (start point) of a line graphic stored in a picture memory 1 an a coordinate of other terminal point E (end point) at first, generates a straight line SE connecting the points S and E and the generated straight line SE is stored in a buffer 3. On the other hand, a boundary cross point extracting circuit 4 extracts coordinates of cross points 1, 2-6 being boundaries between the line drawing stored in the picture memory 1 and the square region and the extracted cross points are stored in buffer 5. Then coordinates of cross points having a maximum distance with a straight line connecting the point S and the cross point 3 and a stright line connecting the cross point 3 and the point E and satisfying the condition of specific Equation are outputted as to cross points 1, 2 and cross points 4-6 and stored in an output memory 7. After the processing above is conducted until the cross point satisfying the condition of specific Equation is not obtained, the line drawing SE is approximated by polygonal line with desired accuracy by tying the stored cross points in the output memory 7.

Description

【発明の詳細な説明】 (a)発明の技術分野 本発明は、マトリックス状に配列される画素毎に図形構
成画素と背景構成画素との2値データとして表される線
図形を、いくつかの線分に分割して折線近似するために
用いる図形データ処理装置5関する。
DETAILED DESCRIPTION OF THE INVENTION (a) Technical Field of the Invention The present invention relates to a linear diagram expressed as binary data of a figure constituent pixel and a background constituent pixel for each pixel arranged in a matrix. The present invention relates to a graphic data processing device 5 used for dividing into line segments and performing broken line approximation.

(b)技術の背景 電子計算機システムを利用した画像処理技術の分野にお
いては1通常、被処理画像をマトリックス状に配列され
る画素毎の濃度等の画像情報を量子化し量子化データに
よって表し所望の処理を行っている。
(b) Background of the technology In the field of image processing technology using electronic computer systems, 1. Normally, the image to be processed is quantized and image information such as the density of each pixel arranged in a matrix is expressed as quantized data. Processing is in progress.

また例えば被処理画像が地図等の線図形の場合には1図
形構成画素(黒画素)を“1”とし背景画素(白画素)
を“0”とする2値データによって表しており、これを
ファイルメモリに記憶する等の場合には、線図形をいく
つかの線分に分割して折線近似し2分割された線分毎に
ベクトルデータによって表すことによってデータ圧縮を
施し1記憶容量の節減を図っている。
For example, if the image to be processed is a line figure such as a map, the pixels constituting one figure (black pixels) are set to "1" and the background pixels (white pixels)
It is represented by binary data with "0" as "0", and when storing this in a file memory, etc., the line figure is divided into several line segments and approximated by a broken line, and each divided line segment is By representing the data in vector data, the data is compressed and storage capacity is reduced.

(C)従来技術と問題点 前記線図形を折線近似するため、従来、タブレットある
いはデジタイツ等と称される入力装置を用い、「1視に
よって線図形を追跡しオペレータの判断によって折点を
抽出するという装置、あるいは、2値データとして表さ
れる線図形をたとえば3×3画素のマスクによって走査
して折点を抽出するという装置が用いられていた。
(C) Prior Art and Problems In order to approximate the above-mentioned line figure with a broken line, conventionally, an input device called a tablet or digitights is used to trace the line figure with one look and extract the break points based on the operator's judgment. Alternatively, a device that scans a line figure expressed as binary data using a mask of, for example, 3×3 pixels and extracts a break point has been used.

しかし、前者には労力と時間を要するという欠点、また
l&者においては、一般に2値データによって表される
線図形は数画素分もの線幅があるのでマスク走査のまえ
に細線化処理を施さなければならず、細線化処理に伴っ
て誤差が生し易いという欠点があった。
However, the former method has the drawback of requiring labor and time, and in the latter method, line figures represented by binary data generally have a line width of several pixels, so line thinning processing must be performed before mask scanning. However, there is a drawback that errors are likely to occur as a result of the line thinning process.

(d)発明の目的 本発明の目的は、労力と時間を要せず、かつ正確な折線
近似を行うことのできる図形データ処理装置を提イJ(
することにある。
(d) Object of the Invention An object of the present invention is to provide a graphic data processing device that can perform accurate polygonal line approximation without requiring labor and time.
It's about doing.

(e)発明の構成 本発明になる図形データ処理装置は、マトリックス状に
配列される画素毎に図形構成画素と背景構成画素との2
値データとして表されかつ順次隣接する複数個の複数画
素幅の方形領域によって区切られる線図形上の2点を結
ぶ直線を生成する手段と、前記線図形と前記方形領域の
境界との交点の座標値を抽出する手段と、前記抽出され
た複数の交点のうち前記線図形上の2点を結ぶ直線との
間の距離が最大かつ所定の基準値を越える交点の座標値
を抽出する手段と、前記抽出された座標値と前記線図形
上の2点とを結ぶ直線を発生する手段とを備え、得られ
た直線との間の距離が所定の基準値を越える交点が抽出
できなくなるまで前記座標値の抽出を行うことを特徴と
するものである。
(e) Structure of the Invention The graphic data processing device according to the present invention has two pixels, a graphic constituent pixel and a background constituent pixel, for each pixel arranged in a matrix.
means for generating a straight line connecting two points on a line figure expressed as value data and separated by a plurality of sequentially adjacent rectangular areas having multiple pixel widths; and coordinates of the intersection of the line figure and the boundary of the rectangular area. means for extracting a value; and means for extracting a coordinate value of an intersection point having a maximum distance between the extracted plurality of intersection points and a straight line connecting two points on the line figure and exceeding a predetermined reference value; means for generating a straight line connecting the extracted coordinate values and two points on the line figure, and generating a straight line connecting the extracted coordinate values and two points on the line figure, and generating a straight line connecting the extracted coordinate values and the two points on the line figure, It is characterized by extracting values.

(f)発明の実施例 次に本発明の要旨を実施例によって具体的に説明する。(f) Examples of the invention Next, the gist of the present invention will be specifically explained using examples.

第1図は本発明一実施例の構成を示すブロック図であり
、1はマトリックス状に配列される画素毎に図形構成画
素と背景構成画素との2値データとして表されかつ順次
隣接する複数画素幅毎の複数の方形領域によって区切ら
れる線図形を記憶する画像メモリ、2は画像メモリ1に
記憶する線図形子の両端および後記折点抽出回路6によ
って得られる折点の何れか2点を結ぶ直線を生成する直
線生成回路、3は直線生成回路2によって得られた直線
を記憶するバッファ、4は画像メモリlに記憶される線
図形と前記方形領域の境界との交点の座標値を抽出する
境界交点抽出回路、5は境界交点抽出回路4によって抽
出された交点を記憶するバッファ、6はバッファ5に記
憶する交点のうちバッファ3に記憶する直線との間の距
離が最大かつ所定値を越える交点の座標値を抽出する折
点抽出回路、7は画像メモリ1に記憶する線図形の両端
の座標と折点抽出回路6によって抽出された折点の座標
を格納する出力メモリ、8は画像メモリ1と出力メモリ
7との読取り制御を行う読取り制御回路である。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, in which each pixel arranged in a matrix is represented as binary data of a figure constituent pixel and a background constituent pixel, and a plurality of sequentially adjacent pixels. An image memory 2 stores line figures separated by a plurality of rectangular areas of each width, and 2 connects any two points of both ends of the line figure stored in the image memory 1 and the break points obtained by the break point extraction circuit 6 described later. A straight line generation circuit generates a straight line; 3 is a buffer that stores the straight line obtained by the straight line generation circuit 2; 4 extracts the coordinate values of the intersection of the line figure stored in the image memory l and the boundary of the rectangular area; A boundary intersection extraction circuit; 5 is a buffer that stores the intersections extracted by the boundary intersection extraction circuit 4; 6 is a buffer whose distance between the intersections stored in the buffer 5 and the straight line stored in the buffer 3 is maximum and exceeds a predetermined value; A corner extraction circuit extracts the coordinate values of the intersection; 7 is an output memory that stores the coordinates of both ends of the line figure stored in the image memory 1 and the coordinates of the corner extracted by the corner extraction circuit 6; 8 is an image memory This is a read control circuit that controls reading between the output memory 1 and the output memory 7.

画像メモリ1には、 0.1mm毎のピンチでマトリッ
クス状に配列される画素毎に図形構成画素(黒画素)と
背景構成画素(白画素)との2値データとして表される
線図形を5第2図に例示するようにマトリックスの行お
よび列方向にそれぞれ32画素(3,2+n+n)毎に
分割し、こようにして得られた正方形領域のうち1分岐
線図形または交差線図形等の複雑図形が含まれている二
つの正方形領域(※印)によって挟まれ、かつ順次隣接
すると共に前記複雑図形が含まれない7個の正方形領域
■・■・・・■を格納する(第3図参照)。
The image memory 1 stores 5 line figures that are expressed as binary data of figure constituent pixels (black pixels) and background constituent pixels (white pixels) for each pixel arranged in a matrix with a pinch of 0.1 mm. As illustrated in Figure 2, the matrix is divided into 32 pixels (3, 2 + n + n) in the row and column directions, and one of the square areas thus obtained is divided into complex shapes such as branch line figures or intersecting line figures. Store seven square areas ■, ■, ...■ that are sandwiched between two square areas (marked with *) that contain figures, are sequentially adjacent, and do not contain the complex figure (see Figure 3). ).

前記第2図のように区切られた各正方形領域内に前記の
ような複雑図形が含まれているか否かの識別については
、たとえば本発明者等の出願による特願昭58−200
629 (昭和58年10月25日)に述べられている
ように、各正方形領域の外周を一巡して走査し、正方形
領域の4辺と線図形との接点の数を検出し、その数によ
って、単純図形領域・分岐線図形領域および交差線図形
領域等に識別することができる。
Regarding the identification of whether or not such a complex figure as described above is included in each of the square areas divided as shown in FIG.
629 (October 25, 1988), the outer circumference of each square area is scanned once, the number of contact points between the four sides of the square area and the line figure is detected, and based on that number, , a simple figure area, a branch line figure area, an intersecting line figure area, etc.

直線生成回路2は、まず最初に画像メモリ1に記憶され
た線図形の一方の端点S(始点)の座標値(Xs、 Y
s)ならびに他方の端点E(終点)の座標値(Xe、 
ve)を抽出すると共に、#A点Sと端点Eとを結ぶ直
線SEを生成し、生成された直線SEはバッファ3に記
憶される。
The straight line generation circuit 2 first calculates the coordinate values (Xs, Y
s) and the coordinate value (Xe,
ve) and generates a straight line SE connecting #A point S and end point E, and the generated straight line SE is stored in the buffer 3.

一方、境界交点抽出回路4は1画像メモリ1に記憶され
る線図形と正方形領域の■・■・・・■の境界との交点
0)・(2)・・・(6)の座標値(XI、Yl) ・
(X2. Y2) ・・・(X6. Ye)を抽出し、
抽出された交点はバッファ5に記憶される。前記交点の
抽出において線図形の線幅が複数画素幅の場合には、何
れか一方の輪郭線を用いるか、あるいは線幅の中央部を
用いる。
On the other hand, the boundary intersection extraction circuit 4 extracts the coordinate values ( XI, Yl)・
(X2. Y2) ... (X6. Ye) is extracted,
The extracted intersection points are stored in the buffer 5. In extracting the intersection points, if the line width of the line figure is a plurality of pixels wide, one of the contour lines or the center of the line width is used.

折点抽出回路6は、バッファ3に記憶される直線SEの
傾きに応して。
The corner point extraction circuit 6 extracts the line according to the slope of the straight line SE stored in the buffer 3.

1χ5−Xe1≧IYs−Yel のときには。1χ5-Xe1≧IYs-Yel When.

Y−(Vs−Ye)+(Xs−Xe)X(にn−Xs)
十YsDn−l Y −Yn l ’−−−−−− (
alまた。
Y-(Vs-Ye)+(Xs-Xe)X(ni-Xs)
10 YsDn-l Y -Yn l'------- (
Al again.

l Xs−Xe l < l Vs −’le lのと
きには。
When l Xs-Xe l < l Vs -'le l.

X−(Xs−にe)÷(Ys−Ye) X (Yn −
J’s) +X5On−l X −Xn l −−−−
−−−−fblとして、前記6個の各々の交点(11・
(2)・・(nl・・(6)から直線SEまでの距離を
め、すべての距離が折線近似の目標精度から定まる基準
値01に対して On<Dt −−−−−−−−1cj の場合には、線図形SRを直線SEによって近似する。
X- (Xs- to e) ÷ (Ys-Ye) X (Yn -
J's) +X5On-l X -Xn l -----
---- As fbl, each of the above six intersections (11・
(2)...(nl...) Find the distance from (6) to the straight line SE, and all distances are determined from the target accuracy of the polygonal line approximation with respect to the reference value 01: On<Dt ----------1cj In this case, the line figure SR is approximated by a straight line SE.

また On≧[1t −−−−一−−−1dlを満たずような
Onがある場合には、その最大値たとえばD3をめ、こ
れに対応する交点(3)の座標値(X3. Y3)が抽
出されて出力メモリ7に記憶される。
In addition, if there is an On that does not satisfy On≧[1t -----1---1dl, take its maximum value, for example, D3, and calculate the coordinates of the corresponding intersection (3) (X3. Y3) is extracted and stored in the output memory 7.

続いて、交点(1)および(2)、ならびに交点(4)
・(5)および(6)に対し、それぞれ端点Sと前記の
ようにして得られた交点(3)とを結ぶ直線、ならびに
交点(3)と終点Eとを結ぶ直線との間の距離が最大か
つ(C1式の条件を満たす交点の座標値が抽出されて出
力メモリ7に記憶される。このような処理をtC)式の
条件を満たす交点が得られなくなるまで行ったのち、出
力メモリ7に記憶された交点を結ぶことによって線図形
SRを所望の精度で折線近似することができる。
Then, the intersections (1) and (2), and the intersection (4)
-For (5) and (6), the distances between the straight line connecting the end point S and the intersection point (3) obtained as above, and the straight line connecting the intersection point (3) and the end point E, respectively, are The coordinate value of the intersection that is the largest and satisfies the condition of the formula (C1) is extracted and stored in the output memory 7. After performing this process until no intersection that satisfies the condition of the formula (tC) is obtained, the coordinate value is extracted and stored in the output memory 7. By connecting the intersection points stored in , the line figure SR can be approximated as a polygonal line with desired accuracy.

上記実施例では、第2図に例示したような線図形の中の
第3図に示すような一部の線図形を画像メモリ1に格納
したのちに処理をおこなっているが、第2図に例示する
ように複雑図形が含まれている図形を対象として前記処
理をおこなうこともできる。
In the above embodiment, some line figures as shown in FIG. 3 among the line figures illustrated in FIG. 2 are processed after being stored in the image memory 1. As illustrated, the above processing can also be performed on figures that include complex figures.

上記実施例によれば、(C)式のDtの値を折線近似の
目標精度に応じた値に選ぶことによって、線図形SEを
任意の精度で折線近似し、このようにして得られる折線
を形成する線分をそれぞれベクトルによって表すことに
よって、線図形sEの対しデータ圧縮を施すことができ
る。
According to the above embodiment, by selecting the value of Dt in equation (C) to be a value corresponding to the target accuracy of the broken line approximation, the line figure SE is approximated as a broken line with arbitrary precision, and the broken line obtained in this way is By representing each line segment formed by a vector, data compression can be applied to the line figure sE.

また線図形を32画素幅の正方形領域に分割しているが
、この幅を変えることによっても折線近似の精度を変え
ることができる。
Furthermore, although the line figure is divided into square areas each having a width of 32 pixels, the accuracy of the polygonal line approximation can also be changed by changing this width.

なお、第2図に※印を付した正方形領域の分岐線図形ま
たは交差線図形等の複雑図形に対しては別の手段によっ
てデータ圧縮を行う。
It should be noted that data compression is performed by other means for complex figures such as branch line figures or intersecting line figures in square areas marked with * in Fig. 2.

(g)発明の詳細 な説明したように9本発明によれば従来例のような労力
と時間を必要とすることなく、線図形を希望する精度に
よって正確に折線近似することができる。
(g) Detailed Description of the Invention As described above, according to the present invention, a line figure can be accurately approximated to a polygonal line with a desired accuracy without requiring the labor and time required in the prior art.

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

第1図は本発明−実施例のブロック図、第2図は処理対
象線図形の例、第3図は画像メモリ1に記憶する線図形
の例である。
1 is a block diagram of an embodiment of the present invention, FIG. 2 is an example of line figures to be processed, and FIG. 3 is an example of line figures to be stored in the image memory 1.

Claims (1)

【特許請求の範囲】[Claims] マトリックス状に配列される画素毎に図形構成画素と背
景構成画素との2値データとして表されかつ順次隣接す
る複数個の複数画素幅の方形領域によって区切られる線
図形上の2点を結ぶ直線を生成する手段と、前記線図形
と前記方形領域の境界との交点の座標値を抽出する手段
と、前記抽出された複数の交点のうち前記線図形上の2
点を結ぶ直線との距離が最大かつ所定の基準値を越える
交点の座標値を抽出する手段と、前記抽出された座標値
と前記線図形」二の2点とを結ぶ直線を発生する手段と
を備え2得られた直線との間の距離が所定の基準値を越
える交点が抽出できなくなるまで前記座標値の抽出を行
うことを特徴とする図形データ処理装置。
Each pixel arranged in a matrix is expressed as binary data of a figure constituent pixel and a background constituent pixel, and a straight line connecting two points on a line figure divided by a plurality of sequentially adjacent rectangular areas of multiple pixel widths is expressed. means for extracting the coordinate values of an intersection between the line figure and the boundary of the rectangular area;
means for extracting a coordinate value of an intersection point whose distance to a straight line connecting the points is maximum and exceeds a predetermined reference value; and means for generating a straight line connecting the extracted coordinate value and the two points of the line figure. 2. A graphic data processing device, comprising: (2) extracting the coordinate values until an intersection point whose distance from the obtained straight line exceeds a predetermined reference value cannot be extracted.
JP5767884A 1984-03-26 1984-03-26 Graphic data processing unit Pending JPS60201475A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5767884A JPS60201475A (en) 1984-03-26 1984-03-26 Graphic data processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5767884A JPS60201475A (en) 1984-03-26 1984-03-26 Graphic data processing unit

Publications (1)

Publication Number Publication Date
JPS60201475A true JPS60201475A (en) 1985-10-11

Family

ID=13062584

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5767884A Pending JPS60201475A (en) 1984-03-26 1984-03-26 Graphic data processing unit

Country Status (1)

Country Link
JP (1) JPS60201475A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05266183A (en) * 1992-03-19 1993-10-15 Fujitsu Ltd Linear approximation method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05266183A (en) * 1992-03-19 1993-10-15 Fujitsu Ltd Linear approximation method

Similar Documents

Publication Publication Date Title
JP2591984B2 (en) Pattern recognition device
JPH02277185A (en) Extracting method for rectangle coordinates
JPS6180374A (en) Microprocessing method and apparatus for veriable scanning area
US6215501B1 (en) Method and filling a polygon and recording medium
JPS60201475A (en) Graphic data processing unit
JPH0646408B2 (en) Split image processing method
JP2770582B2 (en) Figure filling device
JP2993007B2 (en) Image area identification device
JPH02245886A (en) Pattern plotting method, pattern processor and pattern processing system using the same processor
JPH04255080A (en) image input device
JPS63208898A (en) character processing device
JPS63113779A (en) Peak extraction method
JPS61184052A (en) Picture data compressing method
JP3352761B2 (en) Image data position conversion method
JPS61221968A (en) Drawing reader
JP2613589B2 (en) Mask processing method
JPS61148487A (en) Expander/reducer
CN117333502A (en) Data processing methods, devices, equipment and readable storage media
JPH06337930A (en) Image processing apparatus and method
JPS61248172A (en) Graph painting-out system
CN117437126A (en) Image conversion method, computer device, and computer-readable storage medium
JPH04152483A (en) Device and method for extracting graphic segmenting boundary
JPH0243220B2 (en)
JPH0375795A (en) Character pattern contraction system
JPH07200804A (en) Image reduction method and image processing apparatus