JPH0492572A - Data compressing device - Google Patents

Data compressing device

Info

Publication number
JPH0492572A
JPH0492572A JP2208018A JP20801890A JPH0492572A JP H0492572 A JPH0492572 A JP H0492572A JP 2208018 A JP2208018 A JP 2208018A JP 20801890 A JP20801890 A JP 20801890A JP H0492572 A JPH0492572 A JP H0492572A
Authority
JP
Japan
Prior art keywords
data
encoded
encoding
amount
bit
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
JP2208018A
Other languages
Japanese (ja)
Inventor
Yasuyuki Nomizu
泰之 野水
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2208018A priority Critical patent/JPH0492572A/en
Publication of JPH0492572A publication Critical patent/JPH0492572A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To always obtain a high data compression ratio by comparing the amount of data of encoded data obtained by a reverse encoding means with those of the encoded data obtained by a normal encoding means, selecting one encoded data whose amount of data is small, and outputting them. CONSTITUTION:Inputted binarization data are encoded as it is, and at the same time the binarization data whose bit value is reversed is encoded. Then, the amounts of data of the two obtained encoded data are compared, and one encoded data whose amount of data are small is outputted. Thus, a provided amount of data comparing and selecting circuit 5 compares the amounts of data of encoded picture information outputted from each of encoding circuits 3 and 4, and takes away one encoded data whose amount of data are small. Then, an output format preparing means 6 adds various codes to the encoded data in order to prepare a data format format for a facsimile transmission. Thus, the constant high data compression ratio can be obtained in spite of the bit value of the binarization data.

Description

【発明の詳細な説明】 [産業上の利用分野コ 本発明は、画情報のデータ圧縮に好適なデータ圧縮装置
に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a data compression device suitable for data compression of image information.

[従来の技術] 一般に、ファクシミリ装置は、CCITTの勧告T、4
またはT、6に準拠し、M H(Modified l
luffman)、M R(Modified REA
D)あるいはM M R(Modified MR)の
各符号化方式で画情報を伝送している。
[Prior Art] In general, facsimile machines comply with CCITT Recommendation T, 4.
Or in accordance with T, 6, M H (Modified l
luffman), M R (Modified REA
D) or MMR (Modified MR) encoding methods are used to transmit image information.

このような各符号化方式は、いずれも基本的に、黒白画
素のランレングスをハフマン符号に置換することにより
符号化するものである。
Each of these encoding methods basically performs encoding by replacing the run length of black and white pixels with a Huffman code.

CCITTのファクシミリ用のハフマン符号は、黒画素
と白画素のそれぞれの各ランレングスに対して、各符号
が定義されている。
In CCITT's Huffman codes for facsimile, each code is defined for each run length of black pixels and white pixels.

第5図(a)は、黒画素の各ランレングスに対するハフ
マン符号のビット数を示し、同図(b)は、白画素の各
ランレングスに対する同符号のビット数を示している。
FIG. 5(a) shows the number of bits of the Huffman code for each run length of black pixels, and FIG. 5(b) shows the number of bits of the same code for each run length of white pixels.

いずれの場合も、ランレングスが大きくなると、符号ビ
ット数も大きくなる。しかし、・ランレングスが一定値
以上になると、符号ビット数は、黒画素の場合の方が白
画素の場合よりも大きくなっている。
In either case, as the run length increases, the number of code bits also increases. However, when the run length exceeds a certain value, the number of sign bits is larger for black pixels than for white pixels.

[発明が解決しようとする課題] 従って、黒画素の連続部分が多い画像を符号化する場合
、白画素が同様に連続している画像の場合に比べて、デ
ータの圧縮率が低下していた。このため、ファクシミリ
装置で5黒領域の多い原稿画像を送信する場合、白領域
の多い原稿画像よりも、通信時間が長くかかっていた。
[Problems to be Solved by the Invention] Therefore, when encoding an image with many consecutive black pixels, the data compression rate is lower than when encoding an image with similar consecutive white pixels. . For this reason, when a facsimile device transmits a document image with many black areas, it takes longer to communicate than a document image with many white areas.

このように、従来は、データを圧縮する場合。In this way, conventionally, when compressing data.

元のデータのランレングスが同一でも、データビットが
「1」かrQJかで、データ圧縮率が変化していまつと
いう不都合があった。
Even if the run length of the original data is the same, there is an inconvenience that the data compression rate changes depending on whether the data bit is "1" or rQJ.

本発明は、上記の不都合を解消し、データのビット値に
拘らず常に高いデータ圧縮率を得ることができるデータ
圧縮装置を提供することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide a data compression device that can eliminate the above-mentioned disadvantages and can always obtain a high data compression rate regardless of the bit value of the data.

[課題を解決するための手段] このために本発明は、入力する2値データをそのまま符
号化すると同時に、ビット値を反転させた2値データを
符号化して、得られた2つの符号化データのデータ量を
比較し、データ量の少ない一方の符号化データを出力す
るようにしたことを特徴とするものである。
[Means for Solving the Problems] To this end, the present invention encodes input binary data as it is, and at the same time encodes binary data with bit values inverted, thereby generating two resulting encoded data. This feature is characterized in that the amounts of data are compared, and the encoded data with the smaller amount of data is output.

[作用コ これにより、2値データのビット値に拘らず一定のデー
タ圧縮率を得ることができるようになる。
[Operation] This makes it possible to obtain a constant data compression rate regardless of the bit value of binary data.

[実施例コ 以下、添付図面を参照しながら、本発明の実施例を詳細
に説明する。
[Embodiments] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

第1図は、本発明の一実施例に係るデータ圧縮装置のブ
ロック構成図を示したものである。図において、入力回
路1は、2値画情報を1ラインずつ入力するもので、ビ
ット反転回路2は、入力された画情報の黒画素と白画素
つまり「1」と「0」とを反転するものである。符号化
回路3,4は、それぞれM H、M R、M M Rな
どの各方式で入力される画情報を符号化するものである
FIG. 1 shows a block diagram of a data compression device according to an embodiment of the present invention. In the figure, an input circuit 1 inputs binary image information line by line, and a bit inversion circuit 2 inverts black pixels and white pixels, that is, "1" and "0" of the input image information. It is something. The encoding circuits 3 and 4 encode input image information using various methods such as MH, MR, and MMR, respectively.

データ量比較・選択回路5は、符号化回路3と4からそ
れぞれ出力される符号化画情報のデータ量を比較し、デ
ータ量の少ない一方を取り出すものである。出力フォー
マット形成回路゛6は、その符号化データに各種符号を
付加してファクシミリ伝送用のデータフォーマットに形
成するものである。
The data amount comparison/selection circuit 5 compares the amount of encoded image information output from the encoding circuits 3 and 4, and extracts the one with the smaller amount of data. The output format forming circuit 6 adds various codes to the encoded data to form a data format for facsimile transmission.

以上の構成で、いま、本実施例のデータ圧縮装置がファ
クシミリ装置に配設されているものとする。
With the above configuration, it is assumed that the data compression apparatus of this embodiment is installed in a facsimile machine.

このデータ圧縮装置は、ファクシミリ装置の送信時にお
いて、原稿画像の読取動作開始時に起動される。
This data compression device is activated when a document image reading operation is started during transmission by a facsimile device.

データ圧縮装置が起動されると、第2図に示すように、
入力回路1は、原稿から読み取られた画情報を1ライン
ずつ順次入力して符号化回路3とビット反転回路2とに
出力する(処理101)。
When the data compression device is activated, as shown in Figure 2,
The input circuit 1 sequentially inputs image information read from a document line by line and outputs it to the encoding circuit 3 and the bit inverting circuit 2 (process 101).

符号化回路3は、その画情報をそのまま符号化する。ま
た、ビット反転回路2は、その画情報のビットを反転し
、符号化回路4は、そのビット反転された画情報を符号
化する(処理]02)。データ量比較・選択回路5は、
符号化回路3と4から出力されるIライン分の符号化画
情報をそれぞれ入力し、両者のデータ量を比較する。そ
して、データ量の少ない一方の符号化画情報と、どちら
の画情報であるかを示す情報とを出力フォーマット形成
回路6に出力する(処理103)。
The encoding circuit 3 encodes the image information as it is. Further, the bit inversion circuit 2 inverts the bits of the image information, and the encoding circuit 4 encodes the bit-inverted image information (processing] 02). The data amount comparison/selection circuit 5 is
The encoded image information for I lines output from the encoding circuits 3 and 4 is inputted, respectively, and the data amounts of the two are compared. Then, the encoded image information having the smaller amount of data and information indicating which image information it is are outputted to the output format forming circuit 6 (processing 103).

出力フォーマット形成回路6は、入力された符号化画情
報に、第2図に示すように、ラインの区切りを示すEO
Lコードと、ビット反転した画情報であるか否かを示す
1ビツトの識別符号Xとを付加して一定フオーマットの
送信データを形成して出力する(処理104)。
The output format forming circuit 6 adds EO to the input encoded image information, as shown in FIG.
The L code and a 1-bit identification code X indicating whether or not the image information is bit-inverted are added to form transmission data in a fixed format and output (process 104).

出力された送信データは、ファクシミリ装置の図示せぬ
送信部により送信される。
The output transmission data is transmitted by a transmission section (not shown) of the facsimile machine.

この後、次のラインの画情報の有無をチエツクしく処理
105)1画情報がある場合(処理105のY)、上記
各ラインの符号化処理を同様に繰り返す(処理101へ
)、そして、画情報がなくなると(処理105のN)、
以上の符号化処理を終了する。
After this, the process 105 checks the presence or absence of image information for the next line. If there is one-stroke information (Y in process 105), repeats the encoding process for each line in the same way (proceeds to process 101). When the information runs out (N in process 105),
The above encoding process ends.

なお、受信側では、上記送信データを受信すると、EO
Lコードを識別することにより各ラインのデータを取り
出す。次いで、そのデータの内の画情報を復号化すると
共に、上記データの識別コードXを判別する。ここで、
その識別コードでビット反転が示されていなければ、上
記復号化により得られた画情報をそのまま出力する。一
方、ビット反転が示されていれば、その画情報をビット
反転した後出力する。
In addition, on the receiving side, when the above transmission data is received, the EO
The data of each line is extracted by identifying the L code. Next, the image information in the data is decoded, and the identification code X of the data is determined. here,
If the identification code does not indicate bit inversion, the image information obtained by the above decoding is output as is. On the other hand, if bit inversion is indicated, the image information is bit inverted and then output.

以上のように、本実施例では、各ラインの元の画情報と
黒白反転した画情報とを符号化して、データ量の少ない
方を取り出すようにしている。
As described above, in this embodiment, the original image information of each line and the black and white inverted image information are encoded, and the one with the smaller amount of data is extracted.

これにより、黒画素の連続した部分の多い原稿画像でも
、白画素のの連続した部分の多い原稿画像でも、同様に
高いデータ圧縮率が得られるようになる。
As a result, high data compression rates can be obtained for both original images that have many consecutive black pixels and original images that have many consecutive white pixels.

ところで、上述の実施例では、符号化画情報のデータ量
を1ライン単位に判別するようにしたが、ページ単位に
判別するようにしてもよい。
Incidentally, in the above-described embodiment, the data amount of encoded image information is determined on a line-by-line basis, but it may be determined on a page-by-page basis.

第4図は、この場合のブロック構成図を示したもので、
第1図と異なる点は、1ペ一ジ分の符号化画情報を一時
格納するページメモリ7.8を新たに配設した点である
Figure 4 shows a block configuration diagram in this case.
The difference from FIG. 1 is that a page memory 7.8 for temporarily storing encoded image information for one page is newly provided.

この構成で、入力回路l、ビット反転回路2および符号
化回路3,4は、前述の実施例の場合と同様に、画情報
を1ラインずつJllffllff型る。このとき、ペ
ージメモリ7.8は、符号化されて出力される画情報を
それぞれ1ペ一ジ分格納する。
With this configuration, the input circuit 1, the bit inverting circuit 2, and the encoding circuits 3 and 4 input image information line by line in the Jllffllff format, as in the previous embodiment. At this time, the page memory 7.8 stores one page of encoded and output image information.

データ量比較・選択回路5は、ページメモリ7と8の1
ペ一ジ分の符号化画情報のデータ量を比較して、少ない
方を取り出す。そして、出力フォーマット形成回路6は
、1ペ一ジ分の画情報に対して、その画情報がビット反
転したものであるか否かを示す1つの識別符号を付加す
る。
The data amount comparison/selection circuit 5 includes one of the page memories 7 and 8.
The data amount of encoded image information for one page is compared and the smaller one is extracted. Then, the output format forming circuit 6 adds one identification code to the image information for one page, indicating whether or not the image information is bit-inverted.

これにより、識別符号は1ページに1つだけでよくなる
ため、出力データのデータ量を減少させることができる
As a result, only one identification code is required per page, so the amount of output data can be reduced.

なお、以上の実施例では、符号化画情報のデータ量を1
ライン単位とページ単位に判定する場合を説明したが、
このほか、一定ライン単位や複数ページ単位に判定する
ことが考えられる。
Note that in the above embodiment, the data amount of encoded image information is
I explained how to judge by line and page, but
In addition, it is possible to make the determination in units of a certain line or in units of multiple pages.

また、符号化回路を2つ配設したが1元の画情報の符号
化とビット反転した画情報の符号化とを別々に実行すれ
ば、符号化回路を1つにすることも可能である。
Furthermore, although two encoding circuits are provided, it is possible to reduce the number of encoding circuits to one by separately performing encoding of 1-element image information and encoding of bit-inverted image information. .

さらに、上述の各実施例では、ファクシミリ装置で画情
報を符号化する場合について説明したが、本発明は、画
情報に限らず、例えば音声データなどの各種データをラ
ンレングス符号化する場合に同様に適用することができ
る。
Further, in each of the above-described embodiments, a case has been described in which image information is encoded by a facsimile machine, but the present invention is applicable not only to image information but also to run-length encoding of various data such as audio data. It can be applied to

[発明の効果] 以上のように、本発明によれば、一定量ずつ入力する2
値データをそのまま符号化すると共に、ビット反転させ
て符号化し、データ量の少ない一方の符号化データを高
力するようにしたので、2値データのビット値に拘らず
一定の高いデータ圧縮率を得ることができるようになる
[Effects of the Invention] As described above, according to the present invention, two
The value data is encoded as is, and the bits are inverted and encoded to increase the power of the encoded data, which has a smaller amount of data, so a constant high data compression rate can be achieved regardless of the bit value of the binary data. be able to obtain it.

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

第1図は本発明の一実施例に係るデータ圧縮装置のブロ
ック構成図、第2図は符号化処理の動作フローチャート
、第3図は出力データのデータフォーマット説明図、第
4図は本発明の他の実施例を示すデータ圧縮装置のブロ
ック構成図、第5図(a)、 (b)は、各ランレング
スに対するハフマン符号のビット数を示すグラフ図であ
る。 1・・・入力回路、2・・・ビット反転回路、3,4・
・・符号化回路、5・・・データ量比較・選択回路、6
・・・出力フォーマット形成回路、7,8・・・ページ
メモリ。
FIG. 1 is a block configuration diagram of a data compression device according to an embodiment of the present invention, FIG. 2 is an operation flowchart of encoding processing, FIG. 3 is an explanatory diagram of the data format of output data, and FIG. FIGS. 5(a) and 5(b), which are block configuration diagrams of a data compression apparatus showing another embodiment, are graphs showing the number of bits of a Huffman code for each run length. 1... Input circuit, 2... Bit inversion circuit, 3, 4...
... Encoding circuit, 5... Data amount comparison/selection circuit, 6
... Output format forming circuit, 7, 8... Page memory.

Claims (2)

【特許請求の範囲】[Claims] (1)2値データの各ランレングスを順次各符号に置換
することにより符号化する一方、同一ランレングスでも
2値データのビット値により上記各符号のビット数が異
なっているデータ圧縮装置において、2値データを一定
量ずつ入力する入力手段と、入力した2値データをその
まま符号化する通常符号化手段と、入力した2値データ
の各ビット値を反転させるビット反転手段と、反転させ
た2値データを符号化する反転符号化手段と、その反転
符号化手段で得られた符号化データと上記通常符号化手
段で得られた符号化データとのデータ量を比較するデー
タ量比較手段と、データ量の少ない一方の符号化データ
を選択して出力するデータ選択手段とを備えていること
を特徴とするデータ圧縮装置。
(1) In a data compression device that encodes binary data by sequentially replacing each run length with each code, but in which the number of bits of each code differs depending on the bit value of the binary data even for the same run length, An input means for inputting a fixed amount of binary data, a normal encoding means for encoding the input binary data as it is, a bit inversion means for inverting each bit value of the input binary data, and a bit inversion means for inverting each bit value of the input binary data. an inverse encoding means for encoding value data; a data amount comparison means for comparing the amount of encoded data obtained by the inverse encoding means and the encoded data obtained by the normal encoding means; 1. A data compression device comprising: data selection means for selecting and outputting encoded data having a smaller amount of data.
(2)上記出力する符号化データにビット反転したデー
タであるか否かを示す識別符号を付加する出力フォーマ
ット形成手段を備えていることを特徴とする請求項1記
載のデータ圧縮装置。
2. The data compression apparatus according to claim 1, further comprising an output format forming means for adding an identification code to the output encoded data to indicate whether or not the data is bit-inverted data.
JP2208018A 1990-08-08 1990-08-08 Data compressing device Pending JPH0492572A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2208018A JPH0492572A (en) 1990-08-08 1990-08-08 Data compressing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2208018A JPH0492572A (en) 1990-08-08 1990-08-08 Data compressing device

Publications (1)

Publication Number Publication Date
JPH0492572A true JPH0492572A (en) 1992-03-25

Family

ID=16549315

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2208018A Pending JPH0492572A (en) 1990-08-08 1990-08-08 Data compressing device

Country Status (1)

Country Link
JP (1) JPH0492572A (en)

Similar Documents

Publication Publication Date Title
US4156880A (en) Method for transmitting a facsimile signal by sequential edge differential coding
JPH07264417A (en) Image coding method
JPH0492572A (en) Data compressing device
JPH0789618B2 (en) Image coding method
US5243435A (en) Method of decoding MR codes of continuous vertical mode data for the same change points
KR0128667B1 (en) Mh code decoding device
JP3852237B2 (en) Image processing device
JPS62248380A (en) Facsimile encoding system
KR960014318B1 (en) Data compressing method of facsimile
JPH0144067B2 (en)
JPH01108861A (en) Picture coder
JP2995740B2 (en) Facsimile image density converter
JPH04318764A (en) Facsimile equipment
JP2790755B2 (en) Facsimile machine
JPS6132665A (en) Compression decoding method for binary picture information
JPS63108870A (en) Facsimile transmission system
JPS6184163A (en) Encoding system for image data
JPS63138882A (en) Data compressor
JPS5957578A (en) Data compressing system by extended one-dimensional code
JPH09252408A (en) Decoder for multi-gradation image
JPH06245084A (en) Processor for picture data
JPS59163961A (en) Picture data processing system
JPS6074777A (en) Coding system of picture information
JPH08307701A (en) Runlength encoding and decoding method
JPH0416068A (en) Facsimile transmission system