JPS60176084A - Character pattern data 2-d compression - Google Patents

Character pattern data 2-d compression

Info

Publication number
JPS60176084A
JPS60176084A JP59030300A JP3030084A JPS60176084A JP S60176084 A JPS60176084 A JP S60176084A JP 59030300 A JP59030300 A JP 59030300A JP 3030084 A JP3030084 A JP 3030084A JP S60176084 A JPS60176084 A JP S60176084A
Authority
JP
Japan
Prior art keywords
data
character pattern
character
compression
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.)
Pending
Application number
JP59030300A
Other languages
Japanese (ja)
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP59030300A priority Critical patent/JPS60176084A/en
Publication of JPS60176084A publication Critical patent/JPS60176084A/en
Pending legal-status Critical Current

Links

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 [技術分野] 本発明は、高解像度の印字機や文字表示装置等、お、、
6電子的文字処理、用い6文字A )) −J/。
[Detailed Description of the Invention] [Technical Field] The present invention is applicable to high-resolution printing machines, character display devices, etc.
6 electronic character processing, using 6 characters A)) -J/.

データを2次元的に圧縮する文字パターンデータ2次元
圧縮方法に関し、特に、文字パターンの ・ランレング
スに応じたデータ圧縮を2次元的に適用してデータ圧縮
率を格段に増大させるようにしたものである。
Regarding a two-dimensional compression method for character pattern data that compresses data two-dimensionally, in particular, a method that dramatically increases the data compression rate by applying data compression two-dimensionally according to the run length of the character pattern. It is.

[従来技術] 一般に、高解像力を有する例えばレーザプリンタやレー
ザタイプセッタなどの印字機、あるいは、例えば200
0本/画面CRTディスプレイなどの文字表示装置にお
ける電子的文字処理、特に、電子計算システムにおいて
漢字等の文字情報を取扱う場合のこの種の電子的文字処
理には、電子的に発生させた文字パターンが必要である
[Prior Art] In general, printing machines such as laser printers and laser typesetters having high resolution, or printing machines such as 200
0 lines/screen Electronic character processing in character display devices such as CRT displays, especially when handling character information such as kanji in electronic computing systems, involves the use of electronically generated character patterns. is necessary.

この種の文字パターンは、通例、2次元のマトリックス
状に分割した文字パターンデータなメモリ装置に格納し
ておいて使用する。
This type of character pattern is usually used after being stored in a memory device as character pattern data divided into a two-dimensional matrix.

しかして、比較的小規模の文字パターンマトリックス、
例えば24X24ドツトあるいは32X32ドツト等の
ドツトマトリックスについては、−文字あたりのメモリ
容量が、例えば72バイトあるいは128バイト等とな
って、少なくてすむ。
However, a relatively small-scale character pattern matrix,
For example, for a dot matrix of 24×24 dots or 32×32 dots, the memory capacity per character is small, for example, 72 bytes or 128 bytes.

しかしながら、高解像度の出力装置に高品位の文字を印
字し、あるいは表示する場合には、例えば84X134
ドツトあるいは128X128 ドツト等の大規模のド
ツトマトリックスよりなる文字パターンを用いる必要が
ある。その場合、−文字あたりのメモリ容量が、例えば
512バイトあるいは2キロバイト等と莫大な量となる
。したがって、通常使用する漢字等の4000文字を記
憶するには2メガバイトあるは8メガバイト等の極めて
大きいメモリ容量が必要となり、文字パターン°データ
の圧縮を施さずにかかる大量の文字パターンデータをそ
のまま記憶保持することは甚だ不経済である。
However, when printing or displaying high-quality characters on a high-resolution output device, for example, 84
It is necessary to use a character pattern consisting of dots or a large dot matrix such as 128x128 dots. In that case, the memory capacity per - character becomes enormous, for example 512 bytes or 2 kilobytes. Therefore, in order to store 4,000 characters such as kanji that are normally used, an extremely large memory capacity of 2 or 8 megabytes is required, and such a large amount of character pattern data can be stored as is without compressing the character pattern data. It is extremely uneconomical to retain it.

かかる不経済性を緩和するために、従来から1、 いわ
ゆるランレングス方法による文字パターンデータの圧縮
が行われていた。すなわち、文字マトリックスの各行を
処理単位として、白画素および黒画素の連続する長さを
コード化することによって文字パターンデータを圧縮し
ていた。かかるランレングス方法によるデータ圧縮は極
めて有効であり、文字マトリックスのサイズが大きいほ
どデータ圧縮率が増大する。
In order to alleviate such uneconomical problems, character pattern data has traditionally been compressed using a so-called run-length method. That is, character pattern data is compressed by using each row of a character matrix as a processing unit and encoding the continuous length of white pixels and black pixels. Data compression by such a run-length method is extremely effective, and the larger the size of the character matrix, the greater the data compression ratio.

しかしながら、従来のこの種文字パターンデータの圧縮
においては、ドツトマトリックスの縦方向については何
等データ圧縮が行われてはいなかった。これがため、マ
トリックスのサイズが大きくなれば、縦方向にはそのま
まデータが増大するので、前述したメモリ容量削減の効
果がそれだけ低減するという欠点があった。
However, in conventional compression of this type of character pattern data, no data compression was performed in the vertical direction of the dot matrix. For this reason, as the size of the matrix increases, the data increases in the vertical direction, resulting in a drawback that the effect of reducing the memory capacity described above is reduced accordingly.

[目 的] そこで、本発明の目的は、上述した従来の欠点を除去し
1文字パターンマトリックスの縦方向にもランレングス
方法を適用して、効率の極めて高いデータ圧縮を行い得
るようにした文字パターンデータ2次元圧縮方法を提供
することにある。
[Objective] Therefore, the object of the present invention is to eliminate the above-mentioned conventional drawbacks and to apply the run-length method also in the vertical direction of a single character pattern matrix, thereby achieving highly efficient data compression. An object of the present invention is to provide a two-dimensional pattern data compression method.

本発明の他の目的は、文字パターンマトリックスの横方
向データに従来どおりのランレングス方法を適用すると
ともに、各行の圧縮データの末尾等に行の区切りである
ことを示すデータと、その行を始端とする列方向のラー
ンレングス圧縮データを付加することにより、ランレン
グス方法を2次元的に適用し得るようにした客室パター
ユデータ2次元圧縮方法を提供することにある。
Another object of the present invention is to apply the conventional run-length method to horizontal data of a character pattern matrix, and to add data indicating that the line is a line break at the end of each line of compressed data, and to indicate that the line is the starting point. It is an object of the present invention to provide a two-dimensional compression method for guest room pattern data in which the run-length method can be applied two-dimensionally by adding run-length compressed data in the column direction.

[実 施 例] 以下に図面を参照して実施例につき本発明の詳細な説明
する。
[Example] The present invention will be described in detail below with reference to the drawings.

まず、本発明による文字パターンデータ2次元圧縮の基
本原理を第1図(A)および(B)を用いて説明する。
First, the basic principle of two-dimensional compression of character pattern data according to the present invention will be explained using FIGS. 1(A) and 1(B).

第1図(A)は、NXNドツトマトリックスによる文字
パターン「高」を示し、第1図(B)は、その文字パタ
ーンの第(m+1)行から第n行までを本発明方法によ
って縦横両方向に符号化した結果を示す。
FIG. 1(A) shows the character pattern "HIGH" by the NXN dot matrix, and FIG. 1(B) shows the character pattern from the (m+1)th row to the nth row being processed in both the vertical and horizontal directions by the method of the present invention. The encoded result is shown.

図示の文字パターンにおいては、第1行から第1行まで
には黒画素が皆無であるから、第1図(^)に示すよう
に、[EOL・i] (ここで、EOLは打綿りの符号
であり、iは繰返しカウントである)と符号化する。
In the illustrated character pattern, there are no black pixels from the first line to the first line, so as shown in Figure 1 (^), [EOL・i] (here, EOL is , and i is the repetition count).

第(i+1)行から第1行までは自画素長誓◇、黒画索
長BOに引続き黒画素皆無となるので、 [Wo、Bo
、EOL争 (j −i) ]と符号化する。
From the (i+1)th row to the first row, there are no black pixels following the self-pixel length ◇ and the black pixel length BO, so [Wo, Bo
, EOL conflict (j − i)].

以下同様にして、第(m+1)行から第n行までは、第
1図(B)に示すように、[W+ +BI 。
Similarly, from the (m+1)th row to the nth row, as shown in FIG. 1(B), [W+ +BI].

w2+Ilh lW3183.11141B4 +EO
L・(n−m) ]と符号化する。
w2+Ilh lW3183.11141B4 +EO
L.(n-m) ].

上述のように、文字パターンの縦横両方向にランレング
ス符号化を適用する2次元データ圧縮方法によれば、文
字パターンマトリックスが128X128 ドツト程度
に大きく、また、例えば漢字「高」のように水平線およ
び垂直線によって構成される部分が多い文字パターンを
符号化したデータを記憶保持する場合に、データ圧縮効
率を極めて高くすることができる0例えば、115〜l
/15程度のデータ圧縮率を実現することができる。
As mentioned above, according to the two-dimensional data compression method that applies run-length encoding to both the vertical and horizontal directions of the character pattern, the character pattern matrix can be as large as 128 x 128 dots, and it can also be When storing data encoded with a character pattern that consists of many lines, the data compression efficiency can be extremely high. For example, 115 to l.
A data compression ratio of about /15 can be achieved.

なお、このデータ圧縮率は、符号化すべき文字パターン
のデザインによって若干影響される。
Note that this data compression rate is slightly influenced by the design of the character pattern to be encoded.

つぎに、本発明方法による文字パターンデータ2次元圧
縮におけるデータ処理のフローチャートを第2図に示子
Next, FIG. 2 shows a flowchart of data processing in two-dimensional compression of character pattern data according to the method of the present invention.

第2図示のフローチャートにおいては、ステップSlに
おいて文字パターンの1行分を入力し、次のステップS
2において第1行目のデータ処理であるか否かを判別す
る。ここで、第1行目のデータ処理であればステップS
5に移行する。他方、第1行目のデータ処理でなければ
、ステップS3において前の行と同一データであるか否
かを判別する。
In the flowchart shown in the second figure, one line of character pattern is input in step Sl, and the next step S
In step 2, it is determined whether or not the data processing is for the first row. Here, if the data processing is for the first line, step S
Move to 5. On the other hand, if it is not data processing for the first row, it is determined in step S3 whether the data is the same as the previous row.

しかして、同一データでなければステップS5に移行す
る。
However, if the data are not the same, the process moves to step S5.

ついで、ステップS5において繰返しカウントをクリア
したのち、ステップS6に進み、ここで白画素のみのパ
ターンであるか否かを判別する。白パターンのみであれ
ばステッ、プS8に移行する。また、自パターンのみで
なければ、ステップS7においてその白黒パターンにつ
いてランレングス・データを作成したうえでステップS
8に移行する。
After clearing the repetition count in step S5, the process proceeds to step S6, where it is determined whether the pattern includes only white pixels. If there is only a white pattern, the process moves to step S8. If it is not only the own pattern, run length data is created for the black and white pattern in step S7, and then the run length data is created in step S7.
Move to 8.

ついで、ステップS8においては、行終了符号を付加し
た後に、ステップS自に進んで繰返しカウントを書込み
もしくは書換える。次のステップSIOにおいては文字
バi−ンマトリックスについてデータ圧縮処理が終了し
たか省かを判別し、終了していなければステップS1に
戻って上述した一連のデータ処理を繰返す。
Next, in step S8, after adding a line end code, the process proceeds to step S, where the repetition count is written or rewritten. In the next step SIO, it is determined whether the data compression process for the character i-bine matrix has been completed or omitted, and if it has not been completed, the process returns to step S1 and the above-described series of data processing is repeated.

なお、ステップS3において前の行と同一データである
と判別した場合には、ステップS4に進み、ここで繰返
しカウントを1だけ歩進させたうえで、直ちにステップ
S8に移行して繰返しカウントの書込みを行う。
Note that if it is determined in step S3 that the data is the same as the previous row, the process advances to step S4, where the repetition count is incremented by 1, and then the process immediately advances to step S8 to write the repetition count. I do.

つぎに、本発明方法により2次元圧縮を施した文字パタ
ーンデータに逆処理を施してデータ伸張を行い、もとの
文字パターンに復元するためのデータ処理のフローチャ
ートを第3図に示す。
Next, FIG. 3 shows a flowchart of data processing for decompressing character pattern data that has been two-dimensionally compressed by the method of the present invention and restoring it to the original character pattern.

第3図示のフローチャートにおいては、ステップSit
において1行分のデータを入力し、次のステップS12
においてそのデータがランレングス圧縮データであるか
否かを判別する。そして、圧縮データであれば、ステッ
プS14においてランレングスデータに基づきデータ伸
張を行、って白黒パターンデータに復元したうえで、ス
テップS15に移行する。他方、圧縮データでなければ
、ステップS13に進んで1行分の白パターンデータを
作成したうえでステップS15に移行する。
In the flowchart shown in the third figure, step Sit
Input data for one line in step S12.
In step 1, it is determined whether the data is run-length compressed data. If the data is compressed data, the data is expanded based on the run length data in step S14 to restore it to black and white pattern data, and then the process moves to step S15. On the other hand, if the data is not compressed data, the process proceeds to step S13, where one line of white pattern data is created, and then the process proceeds to step S15.

ついで、ステップS15において引続く行に同一データ
の繰返しが行われているか否かを判別する。ここで、繰
返しがなければステップS17に移行する。また、繰返
しがあれば、ステップSlBに進んで同一パターンデー
タを所定の行数分だけ繰返し作成したうえで、ステップ
S17に移行する。
Then, in step S15, it is determined whether or not the same data is repeated in the subsequent rows. Here, if there is no repetition, the process moves to step S17. If there is repetition, the process proceeds to step S1B, where the same pattern data is repeatedly created for a predetermined number of lines, and then the process proceeds to step S17.

ついで、ステップS17においてデータ伸張による文字
パターンマトリックスの復元が終了したか否かを判別し
、終了していなければ、ステップSllに戻って以上の
データ処理を繰返す。
Next, in step S17, it is determined whether or not the restoration of the character pattern matrix by data expansion has been completed, and if it has not been completed, the process returns to step Sll and the above data processing is repeated.

つぎに、上述した本発明方法による文字パターンデータ
の2次元圧縮および復元のための伸張のデータ処理を実
行するための回路装置の概略構成を第4図に示す。
Next, FIG. 4 shows a schematic configuration of a circuit device for executing data processing for two-dimensional compression and decompression for restoration of character pattern data according to the above-described method of the present invention.

第4図示の構成において、CPUは中央演算処理装置で
あり、■は第2図や第3図に示した処理をCPuにより
実行させるためのプログラムを格納した主メモリ装置で
あり、DISCは本発明により圧縮処理を施したデータ
を保存するための固定ディスクメモリである。CRTは
文字入力の表示を行ってその編集を行うことのできる陰
極線管表示装置であり、LBPは文字出力をプリントア
ウトするためのレーザビームプリンタである。これらの
各構成要素をデータバスBにより相互に接続して上述し
たデータ処理を行う。
In the configuration shown in FIG. 4, CPU is a central processing unit, ■ is a main memory device that stores a program for causing the CPU to execute the processes shown in FIGS. 2 and 3, and DISC is the invention of the present invention. This is a fixed disk memory for storing compressed data. CRT is a cathode ray tube display device that can display and edit character input, and LBP is a laser beam printer that prints out character output. These components are interconnected by a data bus B to perform the above-described data processing.

なお、上述の説明においては、各行圧縮データの末尾に
行の区切りを示す符号および同一データ繰返し行数のデ
ータを付加するものとしたが、これらの符号およびデー
タを各行圧縮データの先端に付加しても全く同様のデー
タ処理を行い得る。
Note that in the above explanation, the code indicating the line break and the data for the number of repeated rows of the same data are added to the end of each row of compressed data, but these codes and data are added to the beginning of each row of compressed data. Exactly the same data processing can be performed even if the

[効 果] 以上の説明から明らかなように、本発明によれば1文字
パターンマトリックス・データのランレングス方法によ
るデータ圧縮を従来どおりの横方向のみならず縦方向に
も適用して2次元的にデータ圧縮を施すので、極めて高
い効率の文字パターンデータ圧縮を実現することができ
る。
[Effects] As is clear from the above explanation, according to the present invention, data compression by the run-length method of single character pattern matrix data is applied not only in the horizontal direction as in the past but also in the vertical direction, resulting in two-dimensional data compression. Since data compression is applied to the data, it is possible to realize extremely highly efficient character pattern data compression.

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

第1図(A)および(B)は本発明方法による文字パタ
ーンデータ2次元圧縮の基本原理をそれぞれ例示する線
図、 第2図は同じくそのデータ圧縮の処理過程を示すフロー
チャート、 第3図は本発明方法により圧縮した文字パターンデータ
を復元するためのデータ伸張の処理過程を示すフローチ
ャート、 第4図は本発明方法を実施するための回路装置の概略構
成を示すブロック線図である。 −cpu・・・中央演算処理装置、 MW・・・主メモリ装置、 DISC・・・固定ディスクメモリ、 CRT・・・陰極線管表示装置、 LBP・・・レーザビームプリンタ。 特許出願人 キャノン株式会社 第3図 第4図
Figures 1 (A) and (B) are diagrams illustrating the basic principle of two-dimensional compression of character pattern data according to the method of the present invention, Figure 2 is a flowchart showing the process of data compression, and Figure 3 is FIG. 4 is a flowchart showing a data decompression process for restoring character pattern data compressed by the method of the present invention. FIG. 4 is a block diagram showing a schematic configuration of a circuit device for implementing the method of the present invention. -cpu...central processing unit, MW...main memory device, DISC...fixed disk memory, CRT...cathode ray tube display device, LBP...laser beam printer. Patent applicant Canon Co., Ltd. Figure 3 Figure 4

Claims (1)

【特許請求の範囲】 l)電子的文字処理に用いる文字パターンを発生させる
にあたり、文字パターンを構成するドツトマトリクスに
おiする各行の横方向データをランレングスに応じて圧
縮するとともに、各行データの端部に行の区切りを示す
符号および縦方向に同一パターンを繰返す行数を示すデ
ータを付加することにより、文字パターンデータを2次
元的に圧縮することを特徴とする文字パターンデータ2
次元圧縮方法。 (以下、余白)
[Scope of Claims] l) In generating a character pattern for use in electronic character processing, horizontal data of each line in a dot matrix constituting the character pattern is compressed according to the run length, and each line of data is compressed according to the run length. Character pattern data 2 characterized in that character pattern data is compressed two-dimensionally by adding a code indicating a line break and data indicating the number of lines in which the same pattern is repeated in the vertical direction to the end.
Dimensional compression method. (Hereafter, margin)
JP59030300A 1984-02-22 1984-02-22 Character pattern data 2-d compression Pending JPS60176084A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59030300A JPS60176084A (en) 1984-02-22 1984-02-22 Character pattern data 2-d compression

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59030300A JPS60176084A (en) 1984-02-22 1984-02-22 Character pattern data 2-d compression

Publications (1)

Publication Number Publication Date
JPS60176084A true JPS60176084A (en) 1985-09-10

Family

ID=12299892

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59030300A Pending JPS60176084A (en) 1984-02-22 1984-02-22 Character pattern data 2-d compression

Country Status (1)

Country Link
JP (1) JPS60176084A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62250489A (en) * 1986-04-23 1987-10-31 カシオ計算機株式会社 Character compression system
JPS63173094A (en) * 1987-01-12 1988-07-16 アルプス電気株式会社 Character generation system
JPH03117036A (en) * 1989-09-28 1991-05-17 Nec Corp Character data compressing system
JPH04293093A (en) * 1991-03-22 1992-10-16 Brother Ind Ltd Image data output device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62250489A (en) * 1986-04-23 1987-10-31 カシオ計算機株式会社 Character compression system
JPS63173094A (en) * 1987-01-12 1988-07-16 アルプス電気株式会社 Character generation system
JPH03117036A (en) * 1989-09-28 1991-05-17 Nec Corp Character data compressing system
JPH04293093A (en) * 1991-03-22 1992-10-16 Brother Ind Ltd Image data output device

Similar Documents

Publication Publication Date Title
JP2922680B2 (en) Compressed image storage method for high-resolution computer graphics
EP0260883B1 (en) Method for rotating an image
JPH0613224B2 (en) Font inclusion method
JPS60176084A (en) Character pattern data 2-d compression
JPS60101637A (en) Text display system
JPH03220979A (en) Compressing device and recovery device for contour line data
JP2798025B2 (en) Video coding method and apparatus
JPH01130957A (en) Character controlling apparatus
JPS60176085A (en) Compression unit for character pattern data
JPH02304596A (en) Character data generator
JPS5855973A (en) Compression of graphic japanese character
KR950000540B1 (en) Window generating method and apparatus therefor
JPS6373481A (en) Compressing/stretching system for character/graphic data
JPH02287739A (en) Memory access method
JPH07261737A (en) Character and the like generator
JPH01241269A (en) Picture processing unit
JPS5831381A (en) Graphic generator
JPS6227789A (en) Data compression system for character generator
JPH03281363A (en) Document output device
JPH04335394A (en) Font data compression system
JPS5830785A (en) Display unit
JPS6378278A (en) Image processing device
JPS6377091A (en) Compression memory system of character pattern and restoration system therefor
JPH07137341A (en) Recorder
JPS63268372A (en) Method for compressing picture data