JPH1084486A - Coding method for image data and coder - Google Patents

Coding method for image data and coder

Info

Publication number
JPH1084486A
JPH1084486A JP8261313A JP26131396A JPH1084486A JP H1084486 A JPH1084486 A JP H1084486A JP 8261313 A JP8261313 A JP 8261313A JP 26131396 A JP26131396 A JP 26131396A JP H1084486 A JPH1084486 A JP H1084486A
Authority
JP
Japan
Prior art keywords
pixels
run
encoding
image
image data
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
JP8261313A
Other languages
Japanese (ja)
Inventor
Yuuichi Tamakuma
裕一 玉熊
Isao Teranishi
勲 寺西
Kazuhiro Yamamoto
和弘 山本
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.)
Kokusai Electric Corp
Original Assignee
Kokusai Electric Corp
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 Kokusai Electric Corp filed Critical Kokusai Electric Corp
Priority to JP8261313A priority Critical patent/JPH1084486A/en
Publication of JPH1084486A publication Critical patent/JPH1084486A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PROBLEM TO BE SOLVED: To encode a binarized image at a high efficiency through a run length coding. SOLUTION: A conversion pattern of a block, consisting of 2×2 pixels where black or white pixels are consecutive in a line direction for run length coding, is prepared for a table 8, and a natural still image received from an input means 1 is binarized by a binarization means 4 and blocks each consisting of 2×2 pixels in the binary images obtained are replaced with conversion patterns, stored in the table 8 by a pattern conversion means 4. Then binary image data subject to replacement processing are run-length-coded by the MH coding and sent as G3 facsimile data from communication means 6, 7. That is, a block in the binary image is replaced with the conversion pattern, to extend the run length of the black pixel or white pixel, and the code length as a result of applying run length coding to the binary image is reduced band the data amount is reduced.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、黒画素及び白画素
から成る2値画像をランレングス符号化する画像データ
の符号化方法及び符号化装置に関し、特に、画素の置き
換えを行うことによりランレングス長を長くして符号化
されたデータ量を減少させる技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and apparatus for encoding image data for run-length encoding a binary image composed of black pixels and white pixels, and more particularly to a run-length encoding method for replacing a pixel. The present invention relates to a technique for reducing the amount of encoded data by increasing the length.

【0002】[0002]

【従来の技術】ファクシミリ装置における画像データの
通信では、黒画素及び白画素から成る2値画像へ変換し
た自然静止画像をランレングス符号化して送信すること
が行われている。このようなファクシミリ送信にはIT
U−T勧告で種々の規格が定められており、例えば、
T.4規格のG3ファクシミリ装置では拡張ハフマン符
号化(以下、MH符号化)により2値画像をランレング
ス符号化している。
2. Description of the Related Art In communication of image data in a facsimile apparatus, a natural still image converted into a binary image composed of black pixels and white pixels is transmitted by run-length encoding. For such facsimile transmission, IT
Various standards are defined in the UT recommendation, for example,
T. In a G3 facsimile apparatus of four standards, a binary image is run-length encoded by extended Huffman encoding (hereinafter, MH encoding).

【0003】図5には、自然静止画像をG3ファクシミ
リ装置へ送信処理する従来の装置構成を示してある。こ
の装置では、入力手段21から取り込んだ自然静止画像
をフレームメモリ22に保持し、この自然静止画像デー
タをグレースケール変換及びディザ法を用いて2値化処
理し、更には、MH符号化する。すなわち、自然静止画
像データを2値化処理して得たビットイメージデータ2
4をRAM23に保持し、更に、このビットイメージデ
ータ24をMH符号化してファクシミリデータ25に変
換する。そして、このファクシミリデータ25をモデム
26を用いて変調し、当該ファクシミリデータ25を電
話回線等を介してG3ファクシミリ装置へ送信する。
FIG. 5 shows a conventional apparatus configuration for transmitting a natural still image to a G3 facsimile apparatus. In this apparatus, a natural still image captured from an input means 21 is stored in a frame memory 22, and this natural still image data is binarized by using a gray scale conversion and a dither method, and further subjected to MH coding. That is, bit image data 2 obtained by binarizing natural still image data
4 is held in the RAM 23, and the bit image data 24 is MH-coded and converted into facsimile data 25. Then, the facsimile data 25 is modulated using the modem 26, and the facsimile data 25 is transmitted to the G3 facsimile apparatus via a telephone line or the like.

【0004】ここで、上記した2値化処理について図6
〜図8を参照し、また、MH符号化について図9〜図1
2を参照して更に詳しく説明する。図6に示すように、
カラー自然静止画像は1画素当たり3バイトのデータと
してフレームメモリ22に取り込まれ、各バイトデータ
によって赤(R)、緑(G)、青(B)の3原色の濃淡
値を表している。このカラー自然静止画像データの2値
化処理では、各画素毎のRGBの濃淡値からグレースケ
ール変換によって輝度値(Y)を求め、これら各画素の
輝度値からディザ法等を用いて各画素に黒画素を割り当
てるか或いは白画素を割り当てるかを決定する。
Here, the above-mentioned binarization processing is described with reference to FIG.
To FIG. 8, and FIG. 9 to FIG.
This will be described in more detail with reference to FIG. As shown in FIG.
The color natural still image is fetched into the frame memory 22 as data of 3 bytes per pixel, and each byte data represents the gray value of the three primary colors of red (R), green (G), and blue (B). In the binarization processing of the color natural still image data, a luminance value (Y) is obtained by grayscale conversion from the RGB grayscale value of each pixel, and the luminance value of each pixel is applied to each pixel using a dither method or the like. It is determined whether to assign a black pixel or a white pixel.

【0005】上記の2値化処理において、例えば誤差拡
散ディザ法を用いた場合には図7及び図8に示すように
して2値化処理がなされる。なお、図7には、カラー自
然静止画像データをグレースケール変換して得たデータ
中の1ラインの各画素の輝度値をY0〜Y10として示
してあり、このライン中の各画素について、計算輝度値
(元輝度値+誤差)が128以上であれば白画素を割り
当て、128未満であれば黒画素を割り当てる処理を示
してある。すなわち、図8に示すように、まず、誤差を
ゼロに初期化して処理を開始し(ステップS10)、ラ
インの先頭の画素について計算輝度を算出する(ステッ
プS11)。なお、この誤差は、1つ前の画素に黒画素
を割り当てた場合には当該1つ前の画素の計算輝度値で
ある一方、1つ前の画素に白画素を割り当てた場合には
当該1つ前の画素の計算輝度値から255減じた値であ
る。したがって、ラインの先頭画素については誤差はゼ
ロとなる。
In the above-described binarization processing, for example, when the error diffusion dither method is used, the binarization processing is performed as shown in FIGS. In FIG. 7, the luminance values of pixels on one line in data obtained by performing grayscale conversion on color natural still image data are shown as Y0 to Y10, and the calculated luminance for each pixel in this line is shown. When the value (original luminance value + error) is 128 or more, white pixels are assigned, and when the value is less than 128, black pixels are assigned. That is, as shown in FIG. 8, first, the error is initialized to zero and the processing is started (step S10), and the calculated luminance is calculated for the first pixel of the line (step S11). Note that this error is the calculated luminance value of the immediately preceding pixel when a black pixel is assigned to the immediately preceding pixel, whereas the error is one when a white pixel is assigned to the immediately preceding pixel. This is a value obtained by subtracting 255 from the calculated luminance value of the immediately preceding pixel. Therefore, the error is zero for the first pixel of the line.

【0006】次いで、算出した計算輝度が128以上で
あるかを判断し(ステップS12)、128未満である
場合には当該先頭画素に黒画素を割り当て(ステップS
13)、算出した計算輝度を次の画素の誤差として設定
する(ステップS14)。一方、算出した計算輝度が1
28以上である場合には、当該先頭画素に白画素を割り
当て(ステップS15)、算出した計算輝度から255
を減じた値を次の画素の誤差として設定する(ステップ
S16)。上記の処理を1ライン中に含まれる各画素に
ついて順次繰り返して行い(ステップS17)、ライン
中の最後の画素について処理が終了したところで、当該
ラインについての処理を終了する。なお、1フレームの
カラー自然静止画像については、上記のようなライン毎
の2値化処理を全ラインについて繰り返し行い、1フレ
ーム分のビットイメージデータに変換する。
Next, it is determined whether the calculated brightness is 128 or more (step S12). If the calculated brightness is less than 128, a black pixel is assigned to the head pixel (step S12).
13) The calculated brightness is set as the error of the next pixel (step S14). On the other hand, the calculated brightness is 1
If it is not less than 28, a white pixel is assigned to the head pixel (step S15), and 255 is calculated from the calculated luminance.
Is set as the error of the next pixel (step S16). The above processing is sequentially repeated for each pixel included in one line (step S17). When the processing for the last pixel in the line is completed, the processing for the line is terminated. Note that, for a color natural still image of one frame, the above-described binarization processing for each line is repeated for all lines, and converted into bit image data for one frame.

【0007】また、上記のMH符号化処理では、ビット
イメージデータについて、ライン方向に黒画素又は白画
素がいくつ連続しているか(ランレングス)をハフマン
符号で構成した符号によって表す処理を行う。特に、M
H符号化では、黒画素又は白画素の0〜63までのラン
レングスに図9に示すようなターミネーティング符号を
割り当て、黒画素又は白画素の64以上のランレングス
に64の倍数毎に図10に示すようなメークアップ符号
を割り当てる処理を行う。例えば図11に示すように、
白画素が4個、黒画素が70個、白画素が7個並んだラ
インでは、ランレングス”4”の白画素に対してターミ
ネーティング符号”1011”が割り当てられ、ランレ
ングス”64+6”の黒画素に対してメークアップ符
号”0000001111”とターミネーティング符
号”0010”が割り当てられ、ランレングス”7”の
白画素に対してターミネーティング符号”1111”が
割り当てられて、全体としての符号が”1011000
000111100101111”となる。
In the above MH encoding process, a process of representing how many black pixels or white pixels continue in the line direction (run length) of the bit image data by a code constituted by a Huffman code is performed. In particular, M
In the H coding, a terminating code as shown in FIG. 9 is assigned to the run lengths of black pixels or white pixels from 0 to 63, and the run lengths of 64 or more black or white pixels are shown in FIG. A process for allocating a makeup code as shown in FIG. For example, as shown in FIG.
In a line in which 4 white pixels, 70 black pixels, and 7 white pixels are arranged, a terminating code “1011” is assigned to a white pixel of run length “4” and a black code of run length “64 + 6”. The makeup code “000001111” and the terminating code “0010” are assigned to the pixel, and the terminating code “1111” is assigned to the white pixel of run length “7”, and the code as a whole is “1011000”.
000111100101111 ".

【0008】なお、実際の符号化においては、ラインの
先頭は白画素から始まるように設定されているため、1
ライン全体としての符号の先頭には、ランレングス”
0”の白画素についてのターミネーティング符号”00
110101”が挿入される。例えば図12に示すよう
に、黒画素が2個、白画素が3個、黒画素が1個、・・
・・・、白画素が1個並んだラインでは、ランレング
ス”2”の黒画素に対してターミネーティング符号”1
1”が割り当てられ、ランレングス”3”の白画素に対
してターミネーティング符号”1000”が割り当てら
れ、ランレングス”1”の黒画素に対してターミネーテ
ィング符号”010”が割り当てられ、・・・・・、ラ
ンレングス”1”の白画素に対してターミネーティング
符号”000111”が割り当てられるが、このライン
は黒画素から始まるため、ラインの先頭にランレング
ス”0”の白画素を挿入して、全体としての符号は”0
0110101111000010000111010
000111010000111”となる。
In actual encoding, since the head of a line is set to start from a white pixel, 1
At the beginning of the code as a whole line,
A terminating code “00” for a white pixel of “0”
110101 ". For example, as shown in FIG. 12, two black pixels, three white pixels, one black pixel,.
.., In a line in which one white pixel is arranged, a terminating code “1” is assigned to a black pixel of run length “2”.
1 "is assigned, a terminating code" 1000 "is assigned to a white pixel having a run length of" 3 ", and a terminating code" 010 "is assigned to a black pixel having a run length of" 1 ". .., A terminating code “000111” is assigned to a white pixel with a run length of “1”. Since this line starts with a black pixel, a white pixel with a run length of “0” is inserted at the head of the line. The code as a whole is “0”
01101011111000010000111010
000111010000111 ".

【0009】[0009]

【発明が解決しようとする課題】上記のように自然画像
をディザ法等を用いて2値化した場合には、ランレング
スの短い黒画素及び白画素が交互に並ぶ場合が多く、こ
れをMH等のハフマン符号化してファクシミリデータに
変換した場合には画像全体としてのデータ量が比較的多
いものとなってしまっていた。すなわち、図9から判る
ように、MH符号の1画素当たりのビット数を表す「B
IT/画素」はランレングスが長い程小さくなり(換言
すれば、ランレングスが長い程1画素当たりの符号長が
短くなり)、符号化の効率が高くなるが、上記した従来
の符号化においては、ランレングスが短くなって高い符
号化効率を達成することができなかった。
As described above, when a natural image is binarized by using a dither method or the like, black pixels and white pixels having short run lengths are often arranged alternately. And the like, and converted to facsimile data, the data amount of the entire image becomes relatively large. That is, as can be seen from FIG. 9, “B” representing the number of bits per pixel of the MH code
“IT / pixel” becomes smaller as the run length becomes longer (in other words, as the run length becomes longer, the code length per pixel becomes shorter), and the coding efficiency becomes higher. However, the run length was short, and high coding efficiency could not be achieved.

【0010】なお、図13には縦480画素、横768
画素のグレースケール変換した自然静止画像を示し、図
14にはこの自然静止画像を誤差拡散ディザ法によって
2値化した画像を示してあるが、この2値化画像をMH
符号化すると全体で151Kバイトとなり、原画像の1
画素当たり約3.35ビットのデータ量となる。
FIG. 13 shows 480 pixels vertically and 768 pixels horizontally.
FIG. 14 shows a grayscale-converted natural still image of a pixel. FIG. 14 shows an image obtained by binarizing the natural still image by the error diffusion dither method.
When encoded, the total size is 151 Kbytes,
The data amount is about 3.35 bits per pixel.

【0011】本発明は上記従来の事情に鑑みなされたも
ので、2値化画像をハフマン符号化等のランレングス符
号化により高効率で符号化する画像データの符号化方法
及び符号化装置を提供することを目的とする。また、本
発明は、自然画像からグレースケール処理やディザ法処
理等によって2値化画像を生成し、当該2値化画像をハ
フマン符号化等のランレングス符号化により高効率で符
号化する画像データの符号化方法及び符号化装置を提供
することを目的とする。また、本発明は、自然画像から
グレースケール処理やディザ法処理等によって2値化画
像を生成し、当該2値化画像をハフマン符号化等のラン
レングス符号化により高効率で符号化し、これをファク
シミリデータとして送信する画像データの符号化方法及
び符号化装置を提供することを目的とする。
The present invention has been made in view of the above-mentioned conventional circumstances, and provides an image data encoding method and an encoding device for encoding a binary image with high efficiency by run-length encoding such as Huffman encoding. The purpose is to do. The present invention also provides image data for generating a binarized image from a natural image by grayscale processing, dithering, or the like, and encoding the binarized image with run-length encoding such as Huffman encoding with high efficiency. It is an object of the present invention to provide an encoding method and an encoding device. In addition, the present invention generates a binarized image from a natural image by grayscale processing, dither method processing, or the like, and encodes the binarized image with run-length coding such as Huffman coding with high efficiency. It is an object of the present invention to provide an encoding method and an encoding device for image data transmitted as facsimile data.

【0012】[0012]

【課題を解決するための手段】上記の目的を達成するた
め、本発明では、黒画素及び白画素から成る2値画像を
ランレングス符号化する画像データの符号化において、
ランレングス符号化のライン方向の複数の黒画素又は白
画素が連なる変換パターンを予め用意しておき、2値画
像中のライン方向に連なる複数の画素から成るブロック
を所定の基準に基づいて前記変換パターンに置き換えた
後、当該2値画像をMH符号化等でランレングス符号化
する。すなわち、2値画像中のブロックを変換パターン
に置き換えることによって当該ブロック内の黒画素又は
白画素のランレングスを長くし、2値画像全体としての
画素の並びをランレングスが長い状態に変換する。これ
によって、当該2値画像をランレングス符号化した結果
の符号長を短縮化して、データ量を減少させる。
In order to achieve the above object, the present invention provides a method for run-length encoding a binary image composed of black pixels and white pixels.
A conversion pattern in which a plurality of black pixels or white pixels in the line direction of the run-length encoding is continuous is prepared in advance, and a block including a plurality of pixels in the binary image in the line direction is converted based on a predetermined reference. After the replacement with the pattern, the binary image is run-length encoded by MH encoding or the like. That is, by replacing the blocks in the binary image with the conversion pattern, the run length of the black pixels or white pixels in the block is increased, and the arrangement of the pixels in the entire binary image is converted into a state in which the run length is long. As a result, the code length as a result of the run-length encoding of the binary image is shortened, and the data amount is reduced.

【0013】また、本発明では、入力された自然静止画
像をグレースケール処理やディザ法処理等によって2値
化し、得られた2値画像に対して上記のランレングス符
号化を行う。また、本発明では、上記のような処理によ
って得られたランレングス符号化データをファクシミリ
データとして送信し、迅速な画像データ伝送を実現す
る。なお、変換パターン及び置き換え対象となる2値画
像中のブロックは、例えば、互いに隣接する2×2画素
から成るブロックとして設定するが、ライン方向に連な
る2以上の画素を含むパターン及びブロックであれば、
任意に設定することが可能である。
In the present invention, the input natural still image is binarized by gray scale processing, dither method processing, or the like, and the obtained binary image is subjected to the above-described run-length encoding. Further, in the present invention, the run-length coded data obtained by the above-described processing is transmitted as facsimile data, thereby realizing quick image data transmission. The conversion pattern and the block in the binary image to be replaced are set as, for example, blocks each including 2 × 2 pixels adjacent to each other, but any pattern or block including two or more pixels connected in the line direction. ,
It can be set arbitrarily.

【0014】また、本発明は、例えばファクシミリ送信
機能を有した画像データの符号化装置をして実現され、
ランレングス符号化のライン方向に黒画素又は白画素が
連なる2×2画素から成るブロックの変換パターンを保
持したテーブルを有し、入力手段から入力された処理対
象のカラー自然静止画像を2値化手段によってグレース
ケール処理及びディザ法を用いて2値化する。そして、
得られた2値画像中の2×2画素から成るブロックにつ
いてパターン変換手段が所定の基準に基づいてテーブル
に保持された変換パターンに置き換え、この置き換え処
理がなされた2値画像を拡張ハフマン符号化により符号
化手段がランレングス符号化し、このランレングス符号
化された2値画像データを送信手段がG3ファクシミリ
データとして送信する。したがって、G3ファクシミリ
装置への画像データの伝送を、データ量を大幅に削減し
て迅速に行うことができる。
Further, the present invention is realized by an image data encoding device having a facsimile transmission function, for example.
It has a table holding a conversion pattern of blocks of 2 × 2 pixels in which black pixels or white pixels continue in the line direction of the run-length encoding, and binarizes a color natural still image to be processed input from the input means. Binarization is performed by gray scale processing and dithering by means. And
The pattern conversion means replaces the block composed of 2 × 2 pixels in the obtained binary image with a conversion pattern held in a table based on a predetermined criterion, and the binary image subjected to the replacement processing is subjected to extended Huffman coding. , The encoding means performs run-length encoding, and the transmission means transmits the run-length encoded binary image data as G3 facsimile data. Therefore, the transmission of image data to the G3 facsimile apparatus can be performed rapidly with a significantly reduced data amount.

【0015】[0015]

【発明の実施の形態】本発明に係る画像データの符号化
方法及び符号化装置を図面を参照して説明する。図1に
は、本発明の一実施例に係る画像データの符号化装置を
示してある。この符号化装置には、自然静止画像を取り
込む自然画像入力手段1と、取り込まれた画像データを
保持する画像格納メモリ2と、制御プログラム及び後述
する変換パターンテーブル8を格納したROM3と、制
御プログラムに従って後述する種々な処理を実行する主
制御部4と、主制御部4による処理の作業領域を構成す
るRAM5と、ファクシミリデータの送信処理を行う通
信手段6と、ファクシミリデータを変調して図外のG3
ファクシミリ装置へ送信するモデム7と、を備えてい
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS A method and apparatus for encoding image data according to the present invention will be described with reference to the drawings. FIG. 1 shows an image data encoding apparatus according to one embodiment of the present invention. The encoding apparatus includes a natural image input unit 1 for capturing a natural still image, an image storage memory 2 for storing captured image data, a ROM 3 storing a control program and a conversion pattern table 8 described later, and a control program. , A RAM 5 forming a work area for processing by the main control unit 4, a communication unit 6 for performing facsimile data transmission processing, and modulating the facsimile data. G3
And a modem 7 for transmitting to the facsimile machine.

【0016】主制御部4は制御プログラムを実行するこ
とにより、自然静止画像データに対してグレースケール
変換処理を行うグレースケール変換手段、グレースケー
ル変換されたデータに対して誤差拡散ディザ法による処
理を行う誤差拡散ディザ処理手段、ディザ処理がなされ
た2値データに対して図3に示す変換パターンとの置き
換え処理を行うパターン変換処理手段、パターン変換さ
れた2値データに対してMH符号化処理を行うMH符号
化手段、MH符号化されたファクシミリデータを通信手
段6及びモデム7を介して送信させる通信制御手段、等
の各種の処理手段を構成する。すなわち、画像格納メモ
リ2に保持された自然静止画像データを符号化してファ
クシミリデータに変換する処理は、上記の各処理手段に
よって図2に示す手順で行われる。
The main control unit 4 executes a control program to execute grayscale conversion processing on natural still image data, and performs error diffusion dither processing on the grayscale converted data. Error diffusion dither processing means, pattern conversion processing means for performing replacement processing of the dither-processed binary data with the conversion pattern shown in FIG. 3, and MH encoding processing for the pattern-converted binary data Various kinds of processing means such as an MH coding means for performing, an communication control means for transmitting the MH-coded facsimile data via the communication means 6 and the modem 7, and the like. That is, the process of encoding the natural still image data held in the image storage memory 2 and converting it into facsimile data is performed by the above-described processing means in the procedure shown in FIG.

【0017】まず、画像格納メモリ2に保持された自然
静止画像データを水平方向のラインに沿って画素毎に読
み込み、グレースケール変換を行ってグレースケールデ
ータをRAM5内のバッファ9に格納する(ステップS
1)。次いで、このグレースケールデータに誤差拡散デ
ィザ処理を行った後(ステップS2)、変換パターンテ
ーブル8に保持された変換パターンを用いてパターン変
換処理を行い(ステップS3)、パターン変換されたデ
ータをRAM5内のバッファ10に格納する。次いで、
パターン変換されたデータをMH符号化し(ステップS
4)、MH符号化されたファクシミリデータをRAM5
内のバッファ11に格納する。そして、バッファ11に
格納されたファクシミリデータを読み出して、通信手段
6及びモデム7を介してG3ファクシミリ装置へ送信さ
せる。
First, the natural still image data held in the image storage memory 2 is read for each pixel along a horizontal line, grayscale conversion is performed, and the grayscale data is stored in the buffer 9 in the RAM 5 (step). S
1). Next, after performing an error diffusion dither process on the grayscale data (step S2), a pattern conversion process is performed using the conversion pattern held in the conversion pattern table 8 (step S3). Is stored in the buffer 10 in the memory. Then
MH-encoding the pattern-converted data (step S
4) The MH-encoded facsimile data is stored in the RAM 5
Is stored in the buffer 11 in the storage area. Then, the facsimile data stored in the buffer 11 is read and transmitted to the G3 facsimile apparatus via the communication means 6 and the modem 7.

【0018】上記したパターン変換処理は、本実施例で
は図3に示す変換パターンを用いて行われる。図3
(a)〜(f)に”変換後の画像パターン”として示す
ように、この変換パターンは2×2画素のブロックパタ
ーンであり、各パターンは水平方向(ランレングス符号
化のライン方向)で黒画素又は白画素が連なった画素配
列パターンとなっている。すなわち、(a)及び(b)
のパターンは白画素がライン方向の上下2段でそれぞれ
連続し、(c)及び(d)のパターンは白画素及び黒画
素がライン方向の上下2段で連続し、(e)及び(f)
のパターンは黒画素がライン方向の上下2段でそれぞれ
連続したパターンとなっている。
In the present embodiment, the above-described pattern conversion processing is performed using the conversion pattern shown in FIG. FIG.
As shown as “image pattern after conversion” in (a) to (f), this conversion pattern is a block pattern of 2 × 2 pixels, and each pattern is black in a horizontal direction (line direction of run-length encoding). The pixel array pattern has a series of pixels or white pixels. That is, (a) and (b)
In the pattern (1), white pixels are continuous in the upper and lower stages in the line direction, respectively. In the patterns (c) and (d), white pixels and black pixels are continuous in the upper and lower stages in the line direction.
Is a pattern in which black pixels are respectively continuous in upper and lower two stages in the line direction.

【0019】そして、これら変換パターンは、ディザ変
換されたデータ(ビットイメージデータ)中の2×2画
素のブロックパターン(図3(a)〜(f)の”元の画
像パターン”)と置き換えられるものであり、各変換パ
ターン(a)〜(f)にはそれぞれ幾つかの”元の画像
パターン”が所定の基準に従って対応付けられている。
すなわち、”元の画像パターン”が図3(a)又は
(b)に示すように全て白画素或いは1つだけ白画素の
場合には全て白画素の変換パターンに対応付けられ、図
3(e)又は(f)に示すように1つだけ黒画素或いは
全て黒画素の場合には全て黒画素の変換パターンに対応
付けられている。また、”元の画像パターン”が図3
(c)又は(d)に示すように黒画素と白画素とが同数
の場合には、ブロックパターン中の左上の画素に応じ
て、上段の2画素を黒画素又は白画素とするとともに下
段の2画素を白画素又は黒画素とした変換パターンに対
応付けられている。
These conversion patterns are replaced with 2 × 2 pixel block patterns (“original image patterns” in FIGS. 3A to 3F) in the dither-converted data (bit image data). Each of the conversion patterns (a) to (f) is associated with some “original image patterns” in accordance with a predetermined standard.
That is, when the “original image pattern” is all white pixels or only one white pixel as shown in FIG. 3A or 3B, it is associated with the conversion pattern of all white pixels, and FIG. ) Or (f), in the case of only one black pixel or all black pixels, it is associated with the conversion pattern of all black pixels. Also, “original image pattern” is shown in FIG.
When the number of black pixels and the number of white pixels are the same as shown in (c) or (d), the upper two pixels are set as black or white pixels and the lower two pixels according to the upper left pixel in the block pattern. It is associated with a conversion pattern in which two pixels are white pixels or black pixels.

【0020】上記の変換パターンを用いた変換処理で
は、ビットイメージデータに含まれている2×2画素の
ブロックを符号化のライン方向に沿って順次抽出し、各
ブロックの画素パターン(図3の”元の画像パターン”
に該当)を対応する変換パターン(図3の”変換後の画
像パターン”に該当)に置き換える処理を行う。例え
ば、変換処理を行う前のビットイメージデータが図4
(a)に示す画素配列であった場合、パターン変換処理
によって当該ビットイメージデータ中の画素の配列は図
4(b)に示すように黒画素及び白画素がライン方向に
長く連続したものとなり、ランレングスが長いビットイ
メージデータに変換される。
In the conversion process using the above conversion pattern, a block of 2 × 2 pixels included in the bit image data is sequentially extracted along the encoding line direction, and the pixel pattern of each block (see FIG. 3). "Original image pattern"
Is replaced with a corresponding conversion pattern (corresponding to the “converted image pattern” in FIG. 3). For example, the bit image data before the conversion processing is performed as shown in FIG.
In the case of the pixel array shown in FIG. 4A, the pattern conversion process causes the pixel array in the bit image data to be such that black pixels and white pixels are long and continuous in the line direction as shown in FIG. The run length is converted to long bit image data.

【0021】したがって、変換前のビットイメージデー
タをMH符号化する場合に較べて、パターン変換後のビ
ットイメージデータをMH符号化することにより、符号
化されたデータ量を大幅に削減することができる。図1
5には、図13に示した縦480画素、横768画素の
グレースケール変換画像を誤差拡散ディザ処理し、更
に、パターン変換処理した画像を示してある。図14に
示した誤差拡散ディザ処理を行った画像データではMH
符号化すると全体で151Kバイト、原画像の1画素当
たり約3.35ビットのデータ量であったが、パターン
変換処理を行った画像ではMH符号化すると全体で16
Kバイト、原画像の1画素当たり約0.36ビットのデ
ータ量となり、データ量が約11%に減少する。
Therefore, compared with the case where the bit image data before the conversion is MH-coded, the amount of the coded data can be greatly reduced by performing the MH coding on the bit image data after the pattern conversion. . FIG.
5 shows an image obtained by subjecting the grayscale converted image of 480 pixels vertically and 768 pixels horizontally shown in FIG. 13 to error diffusion dither processing and further pattern conversion processing. In the image data subjected to the error diffusion dither processing shown in FIG.
When encoded, the total data amount was 151 Kbytes, and the data amount was about 3.35 bits per pixel of the original image.
The data amount is about 0.36 bits per pixel of the original image of K bytes, and the data amount is reduced to about 11%.

【0022】なお、上記の実施例で示した元のブロック
パターンと変換パターンとの対応付けには、他の種々な
態様を採用することが可能であり、要は、元の画像の濃
度分布をでき得る限り保ちつつ黒画素又は白画素をラン
レングス符号化のライン方向にでき得る限り連続させる
ようにすればよい。また、上記の実施例では、ランレン
グス符号化をMH符号化で行ったが、一般的にランレン
グス符号量はランレングスが長い程効率がよいため、ワ
イル法による符号化等といった他の方式のランレングス
符号化を行うことも可能である。
It should be noted that various other modes can be adopted for associating the original block pattern with the conversion pattern shown in the above-described embodiment. What is necessary is to keep the black pixels or white pixels as continuous as possible in the line direction of the run-length encoding while keeping as much as possible. In the above embodiment, the run-length encoding is performed by MH encoding. However, the run-length code amount is generally more efficient as the run-length is longer. It is also possible to perform run-length encoding.

【0023】また、上記の実施例では、2値化処理にグ
レースケール処理および誤差拡散ディザ処理を用いた
が、他の方式のディザ法を用いることも可能であり、更
には、自然画像を2値化できれば特にその方式に限定は
ない。
In the above embodiment, the gray scale processing and the error diffusion dither processing are used for the binarization processing. However, a dither method of another method can be used. There is no particular limitation on the method as long as the value can be converted.

【0024】また、上記の実施例で示したように変換処
理されるブロック及び変換パターンは2×2画素のパタ
ーンとすると、元の画像の濃度分布を保持した状態でラ
ンレングスの伸長化が容易に図れるが、本発明ではライ
ン方向に2以上の画素が連続したパターンであれば、2
×2画素以外の種々な画素パターンを採用することが可
能である。また、本発明では、モノクロ画像に限らず、
カラー画像についても2値化処理して符号化することが
できる。
When the blocks and conversion patterns to be converted are 2 × 2 pixel patterns as described in the above embodiment, the run length can be easily expanded while maintaining the density distribution of the original image. According to the present invention, if a pattern in which two or more pixels are continuous in the line direction, 2
Various pixel patterns other than × 2 pixels can be employed. Also, in the present invention, not only monochrome images,
A color image can also be encoded by binarization.

【0025】[0025]

【発明の効果】以上説明したように、本発明によると、
黒画素又は白画素が連なる変換パターンで2値画像中の
ライン方向に連なる複数の画素から成るブロックを置き
換えた後、当該2値画像をランレングス符号化するよう
にしたため、符号化されたデータ量を従来に比して大幅
に削減することができる。したがって、画像データを高
効率で符号化したファクシミリデータを得ることがで
き、データ伝送を迅速に行うことができる。特に、ラン
レングス符号化にMH符号化を用いるG3ファクシミリ
装置への適用が有効であり、従来に比して迅速なデータ
伝送を実現することができる。
As described above, according to the present invention,
After the block composed of a plurality of pixels connected in the line direction in the binary image is replaced with the conversion pattern in which the black pixels or the white pixels are connected, the binary image is run-length coded. Can be significantly reduced as compared with the related art. Therefore, facsimile data obtained by encoding image data with high efficiency can be obtained, and data transmission can be performed quickly. In particular, application to a G3 facsimile apparatus using MH coding for run-length coding is effective, and it is possible to realize faster data transmission as compared with the related art.

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

【図1】本発明の一実施形態に係る画像データの符号化
装置を示す構成図である。
FIG. 1 is a configuration diagram illustrating an image data encoding device according to an embodiment of the present invention.

【図2】本発明の一実施形態に係る画像データ符号化装
置の処理手順及び処理手段を示す図である。
FIG. 2 is a diagram showing a processing procedure and processing means of an image data encoding device according to an embodiment of the present invention.

【図3】本発明の一実施形態に係る変換パターンを示す
図である。
FIG. 3 is a diagram showing a conversion pattern according to an embodiment of the present invention.

【図4】本発明の一実施形態に係るパターン変換処理を
説明する図である。
FIG. 4 is a diagram illustrating a pattern conversion process according to an embodiment of the present invention.

【図5】従来の画像データ符号化装置を示す構成図であ
る。
FIG. 5 is a configuration diagram showing a conventional image data encoding device.

【図6】カラー画像の2値化処理を説明する図である。FIG. 6 is a diagram illustrating a binarization process of a color image.

【図7】誤差拡散ディザ法による処理を説明する図であ
る。
FIG. 7 is a diagram for explaining processing by an error diffusion dither method.

【図8】誤差拡散ディザ法による処理の手順を示すフロ
ーチャートである。
FIG. 8 is a flowchart showing a procedure of processing by an error diffusion dither method.

【図9】MH符号のターミネーティング符号を示す図で
ある。
FIG. 9 is a diagram showing a terminating code of an MH code.

【図10】MH符号のメークアップ符号を示す図であ
る。
FIG. 10 is a diagram illustrating a makeup code of an MH code.

【図11】MH符号化の一例を説明する図である。FIG. 11 is a diagram illustrating an example of MH coding.

【図12】MH符号化の他の一例を説明する図である。FIG. 12 is a diagram illustrating another example of MH coding.

【図13】グレースケール処理を施した画像の一例を示
す図である。
FIG. 13 is a diagram illustrating an example of an image that has been subjected to grayscale processing.

【図14】誤差拡散ディザ処理を施した画像の一例を示
す図である。
FIG. 14 is a diagram illustrating an example of an image subjected to error diffusion dither processing.

【図15】パターン変換処理を施した画像の一例を示す
図である。
FIG. 15 is a diagram illustrating an example of an image subjected to a pattern conversion process.

【符号の説明】[Explanation of symbols]

1・・・自然画像入力手段、 4・・・主制御部、 6
・・・通信手段、7・・・モデム、 8・・・変換パタ
ーンテーブル、9・・・グレースケールデータバッフ
ァ、10・・・パターン変換データバッファ、11・・
・ファクシミリデータバッファ、
1 ... natural image input means 4 ... main control unit 6
... Communication means, 7 ... Modem, 8 ... Conversion pattern table, 9 ... Gray scale data buffer, 10 ... Pattern conversion data buffer, 11 ...
・ Facsimile data buffer,

─────────────────────────────────────────────────────
────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成8年11月22日[Submission date] November 22, 1996

【手続補正1】[Procedure amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】図13[Correction target item name] FIG.

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【図13】グレースケール処理を施した画像の一例を示
図面代用写真である。
FIG. 13 is a drawing substitute photograph showing an example of an image subjected to grayscale processing.

【手続補正2】[Procedure amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】図14[Correction target item name] FIG.

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【図14】誤差拡散ディザ処理を施した画像の一例を示
図面代用写真である。
FIG. 14 is a drawing substitute photograph showing an example of an image subjected to error diffusion dither processing.

【手続補正3】[Procedure amendment 3]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】図15[Correction target item name] FIG.

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【図15】パターン変換処理を施した画像の一例を示す
図面代用写真である。
FIG. 15 shows an example of an image subjected to a pattern conversion process.
It is a drawing substitute photograph .

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 黒画素及び白画素から成る2値画像をラ
ンレングス符号化する画像データの符号化方法におい
て、 ランレングス符号化のライン方向の複数の黒画素又は白
画素が連なる変換パターンを予め用意しておき、 2値画像中のライン方向に連なる複数の画素から成るブ
ロックを所定の基準に基づいて前記変換パターンに置き
換えた後、当該2値画像をランレングス符号化すること
を特徴とする画像データの符号化方法。
1. An image data encoding method for run-length encoding a binary image composed of black pixels and white pixels, wherein a conversion pattern in which a plurality of black pixels or white pixels in a line direction of the run-length encoding is connected in advance. It is characterized in that after preparing, a block composed of a plurality of pixels connected in the line direction in the binary image is replaced with the conversion pattern based on a predetermined criterion, and then the binary image is run-length encoded. Image data encoding method.
【請求項2】 黒画素及び白画素から成る2値画像をラ
ンレングス符号化する画像データの符号化方法におい
て、 ランレングス符号化のライン方向の複数の黒画素又は白
画素が連なる変換パターンを予め用意しておく一方、 自然静止画像を2値化し、得られた2値画像中のライン
方向に連なる複数の画素から成るブロックを所定の基準
に基づいて前記変換パターンに置き換えた後、当該2値
画像をランレングス符号化することを特徴とする画像デ
ータの符号化方法。
2. An image data encoding method for run-length encoding a binary image composed of black pixels and white pixels, wherein a conversion pattern in which a plurality of black pixels or white pixels in a line direction of the run-length encoding is continuous is determined in advance. On the other hand, the natural still image is binarized, and a block composed of a plurality of pixels connected in the line direction in the obtained binary image is replaced with the conversion pattern based on a predetermined criterion. A method for encoding image data, comprising: performing run-length encoding on an image.
【請求項3】 黒画素及び白画素から成る2値画像をラ
ンレングス符号化して送信する画像データの符号化方法
において、 ランレングス符号化のライン方向の複数の黒画素又は白
画素が連なる変換パターンを予め用意しておく一方、 自然静止画像を2値化し、得られた2値画像中のライン
方向に連なる複数の画素から成るブロックを所定の基準
に基づいて前記変換パターンに置き換えた後、当該2値
画像をランレングス符号化して送信することを特徴とす
る画像データの符号化方法。
3. An image data encoding method for transmitting a binary image composed of black pixels and white pixels by run-length encoding and transmitting the binary image, wherein a plurality of black pixels or white pixels in a line direction of the run-length encoding are continuous. Is prepared in advance, the natural still image is binarized, and a block composed of a plurality of pixels connected in the line direction in the obtained binary image is replaced with the conversion pattern based on a predetermined criterion. A method for encoding image data, wherein a binary image is run-length encoded and transmitted.
【請求項4】 請求項2又は請求項3に記載の画像デー
タの符号化方法において、 2値化処理においては、更にディザ法による処理がなさ
れることを特徴とする画像データの符号化方法。
4. The image data encoding method according to claim 2, wherein the binarization processing further includes a dither method.
【請求項5】 請求項1乃至請求項4のいずれか1項に
記載の画像データの符号化方法において、 ランレングス符号化は拡張ハフマン符号化によって行わ
れることを特徴とする画像データの符号化方法。
5. The image data encoding method according to claim 1, wherein the run-length encoding is performed by extended Huffman encoding. Method.
【請求項6】 請求項1乃至請求項5のいずれか1項に
記載の画像データの符号化方法において、 変換パターン及び置き換え対象となる2値画像中のブロ
ックは、互いに隣接する2×2画素から成るブロックで
あることを特徴とする画像データの符号化方法。
6. The image data encoding method according to claim 1, wherein the conversion pattern and the block in the binary image to be replaced include 2 × 2 pixels adjacent to each other. A method for encoding image data, characterized in that the image data is a block comprising:
【請求項7】 黒画素及び白画素から成る2値画像をラ
ンレングス符号化する画像データの符号化装置におい
て、 ランレングス符号化のライン方向の複数の黒画素又は白
画素が連なる変換パターンを保持したテーブルと、 2値画像中のライン方向に連なる複数の画素から成るブ
ロックを所定の基準に基づいてテーブルに保持された変
換パターンに置き換えるパターン変換手段と、 パターン変換手段によって置き換え処理がなされた2値
画像をランレングス符号化する符号化手段と、 を備えたことを特徴とする画像データの符号化装置。
7. An image data encoding apparatus for run-length encoding a binary image composed of black pixels and white pixels, wherein a conversion pattern in which a plurality of black pixels or white pixels in a line direction of the run-length encoding is continuous. Table, a pattern conversion unit that replaces a block composed of a plurality of pixels connected in the line direction in the binary image with a conversion pattern held in the table based on a predetermined reference, and a replacement process performed by the pattern conversion unit. Encoding means for performing run-length encoding of the value image; and an encoding device for image data, comprising:
【請求項8】 黒画素及び白画素から成る2値画像をラ
ンレングス符号化する画像データの符号化装置におい
て、 ランレングス符号化のライン方向の複数の黒画素又は白
画素が連なる変換パターンを保持したテーブルと、 処理対象の自然静止画像を入力する入力手段と、 入力された自然静止画像を2値化する2値化手段と、 得られた2値画像中のライン方向に連なる複数の画素か
ら成るブロックを所定の基準に基づいてテーブルに保持
された変換パターンに置き換えるパターン変換手段と、 パターン変換手段によって置き換え処理がなされた2値
画像をランレングス符号化する符号化手段と、 を備えたことを特徴とする画像データの符号化装置。
8. An image data encoding device for run-length encoding a binary image composed of black pixels and white pixels, wherein a conversion pattern in which a plurality of black pixels or white pixels in a line direction of run-length encoding is continuous. Means for inputting a natural still image to be processed, binarizing means for binarizing the input natural still image, and a plurality of pixels connected in the line direction in the obtained binary image. Pattern conversion means for replacing the blocks formed by the conversion pattern stored in the table on the basis of a predetermined criterion, and coding means for run-length coding the binary image subjected to the replacement processing by the pattern conversion means. An image data encoding device characterized by the above-mentioned.
【請求項9】 黒画素及び白画素から成る2値画像をラ
ンレングス符号化して送信する画像データの符号化装置
において、 ランレングス符号化のライン方向に黒画素又は白画素が
連なる2×2画素から成るブロックの変換パターンを保
持したテーブルと、 処理対象のカラー自然静止画像を入力する入力手段と、 入力されたカラー自然静止画像をグレースケール処理及
びディザ法を用いて2値化する2値化手段と、 得られた2値画像中の2×2画素から成るブロックを所
定の基準に基づいてテーブルに保持された変換パターン
に置き換えるパターン変換手段と、 パターン変換手段によって置き換え処理がなされた2値
画像を拡張ハフマン符号化によりランレングス符号化す
る符号化手段と、 ランレングス符号化された2値画像データをG3ファク
シミリデータとして送信する送信手段と、 を備えたことを特徴とする画像データの符号化装置。
9. An image data encoding apparatus for transmitting a binary image composed of black pixels and white pixels by run-length encoding and transmitting the binary image, wherein 2 × 2 pixels in which black pixels or white pixels continue in a line direction of the run-length encoding. A table holding a conversion pattern of blocks consisting of the following: input means for inputting a color natural still image to be processed; binarization for binarizing the input color natural still image using grayscale processing and dithering Means, pattern conversion means for replacing a block consisting of 2 × 2 pixels in the obtained binary image with a conversion pattern held in a table on the basis of a predetermined criterion, and binary data subjected to a replacement process by the pattern conversion means Coding means for performing run-length coding on the image by extended Huffman coding; and G3 coding for the run-length-coded binary image data. Encoding apparatus of the image data, characterized by comprising a transmitting means for transmitting a comb millimeter data.
JP8261313A 1996-09-10 1996-09-10 Coding method for image data and coder Pending JPH1084486A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8261313A JPH1084486A (en) 1996-09-10 1996-09-10 Coding method for image data and coder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8261313A JPH1084486A (en) 1996-09-10 1996-09-10 Coding method for image data and coder

Publications (1)

Publication Number Publication Date
JPH1084486A true JPH1084486A (en) 1998-03-31

Family

ID=17360067

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8261313A Pending JPH1084486A (en) 1996-09-10 1996-09-10 Coding method for image data and coder

Country Status (1)

Country Link
JP (1) JPH1084486A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8515166B2 (en) 2008-03-18 2013-08-20 Samsung Electronics Co., Ltd. Method of compressing a block-based binary image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8515166B2 (en) 2008-03-18 2013-08-20 Samsung Electronics Co., Ltd. Method of compressing a block-based binary image
US8897558B2 (en) 2008-03-18 2014-11-25 Samsung Electronics Co., Ltd. Method of compressing a block-based binary image

Similar Documents

Publication Publication Date Title
CA2403194C (en) Enhanced compression of gray-level images
JPH07264417A (en) Image coding method
EP0711069A1 (en) Image processing method and apparatus
JPH1084486A (en) Coding method for image data and coder
JP2547337B2 (en) Method and apparatus for encoding image information
JPS63182973A (en) Pseudo half-tonal image transmission method for facsimile equipment
JP2925043B2 (en) Data decompression device
JP3736107B2 (en) Image processing device
JP3295507B2 (en) Binary image encoding / decoding method
JPH10108027A (en) Still image transmission method and still image transmitter
KR940010477B1 (en) Half tone image data coding method of fax
JP3463317B2 (en) Color image processing equipment
JPH0763177B2 (en) Image information coding device
JPH0232675A (en) Transmission processing method for pseudo halftone data in facsimile equipment
JPH06217147A (en) Transmitting method for color document image
JPH06152973A (en) Method and device for compressing color picture
JPH0918722A (en) Color image processor
JPH10257310A (en) Image processor
JPS63316974A (en) Two-dimensional data predictive computing system for pseudo halftone image of facsimile equipment
JPH0548899A (en) Halftone picture encoding method and facsimile terminal equipment using the same
JPH036173A (en) Half tone encoding system
JPH11298747A (en) Facsimile equipment and image processing method
JPS6152075A (en) Facsimile encoder
JPS63102559A (en) Image processing device
JPH05167836A (en) Image processing device and facsimile equipment