JPH09322162A - Image compression method and image expansion method - Google Patents
Image compression method and image expansion methodInfo
- Publication number
- JPH09322162A JPH09322162A JP15350196A JP15350196A JPH09322162A JP H09322162 A JPH09322162 A JP H09322162A JP 15350196 A JP15350196 A JP 15350196A JP 15350196 A JP15350196 A JP 15350196A JP H09322162 A JPH09322162 A JP H09322162A
- Authority
- JP
- Japan
- Prior art keywords
- block
- pixel
- pixels
- value
- image
- 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.)
- Granted
Links
Landscapes
- Color, Gradation (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Dot-Matrix Printers And Others (AREA)
- Record Information Processing For Printing (AREA)
- Control Or Security For Electrophotography (AREA)
Abstract
(57)【要約】
【課題】 階調画像を扱うプリンタ,複写機等で用いら
れる階調画像データを高圧縮率で符号化するブロック符
号化圧縮方法及びその伸張方法を提供する。
【解決手段】 画像のデータの1ブロックを、ブロック
内のデータが全て等しい場合には、階調情報として1つ
の代表値a1とブロック内のデータが全て等しいことを
意味する固定値a0によってブロック符号化する。又連
続して同じ値の階調画素が1ブロック範囲に限らず連続
する間において、例外処理を示す固定値a0及び代表値
a1及び連続する長さa2でブロック符号を生成する。
こうすれば更に圧縮率を高めることができる。
(57) Abstract: A block coding compression method and a decompression method for coding gradation image data used at a printer, a copying machine, etc. that handle gradation images at a high compression rate. When one block of image data has the same data in all blocks, one representative value a1 as gradation information and a fixed value a0 meaning that the data in the block are all equal Turn into. In addition, the block code is generated with the fixed value a0 and the representative value a1 indicating the exceptional processing and the continuous length a2 while the gradation pixels having the same value are not limited to one block range and are continuous.
In this way, the compression rate can be further increased.
Description
【0001】[0001]
【発明の属する技術分野】本発明はプリンタ,複写機等
で用いる多階調画素の画像圧縮方法及び画像伸縮方法に
関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image compression method and image expansion / contraction method for multi-gradation pixels used in printers, copying machines and the like.
【0002】[0002]
【従来の技術】近年、プリンタ,複写機等の事務機器
は、各種オフィスを始め個人ユーザの間にも浸透しつつ
ある。又これらの機器では、高画質化やカラー画像を対
象として扱うことも要求されている。特にカラー画像の
場合には、データ量は膨大となり、メモリの増大、引い
ては高価格化は避けることのできない問題となってい
る。低価格化を実現するためには、高画質を維持しつつ
画像データの圧縮を行い、画像の記憶に必要なメモリを
削減していく必要がある。2. Description of the Related Art In recent years, office equipment such as printers and copiers have been spreading to individual users including various offices. Further, in these devices, it is required to improve the image quality and handle color images. Particularly in the case of a color image, the amount of data becomes enormous, and an increase in memory, and thus an increase in price, is an unavoidable problem. In order to realize the low price, it is necessary to compress the image data while maintaining the high image quality and reduce the memory required for storing the image.
【0003】従来、階調画像の情報圧縮方法としてブロ
ック符号化と呼ばれる技術がある。この方法を図1及び
図12乃至図17を参照しながら説明する。図1は画像
の一部を拡大したものである。図1においては画素1は
画像構成する最小単位である。1つの画素は8ビットデ
ータで256階調を扱うものとし、0から255の値を
持つ。4×4(総画素数16)の近隣画素を集めたブロ
ック2をとり、このブロック単位に処理を行う。Conventionally, there is a technique called block coding as a method of compressing information of a gradation image. This method will be described with reference to FIGS. 1 and 12 to 17. FIG. 1 is an enlarged view of a part of the image. In FIG. 1, the pixel 1 is the minimum unit that constitutes an image. One pixel handles 256 gradations with 8-bit data, and has a value of 0 to 255. The block 2 in which 4 × 4 (total number of pixels 16) neighboring pixels are collected is taken, and processing is performed for each block.
【0004】図12はあるブロック2の実際の例を示し
たものであり、図15はブロック2をブロック符号化す
る際の手順を示すフローチャートである。まずブロック
符号化するブロック2の平均値を算出し、これをブロッ
ク内平均値mとする(ステップS1)。図12のブロッ
ク内平均値mは小数以下を四捨五入してm=122とな
る。次にブロック内平均値とブロック2の各画素とを比
較し、ブロック内平均値未満の値を持つ画素を”0”、
ブロック内平均値以上の値を持つ画素を”1”とするフ
ラグビットによる画素配列パターンを形成する(ステッ
プS2)。図12のブロック2に相当する画素配列パタ
ーンを図13に示す。次に画素配列パターンが”0”で
ある画素の組の平均値a0、及び”1”である画素の組
の平均値をa1を夫々算出し、ブロック代表値とする
(ステップS3)。図12のブロック2ではブロック代
表値はa0=34(22h)、a1=162(A2h)
である。尚hは16進数表示を示す。最終的なこのブロ
ック2のブロック符号は図14(a)に示すような各8
ビットのデータである2つの代表値(a0,a1)と、
図13をシリアルに配置した16ビットの1つの画素配
列パターン(Bitmap)とで構成される。図12の
例では図14(b)に示すような符号となる。FIG. 12 shows an actual example of a certain block 2, and FIG. 15 is a flow chart showing a procedure for block-encoding the block 2. First, the average value of block 2 to be block-encoded is calculated, and this is set as the intra-block average value m (step S1). The average value m in the block in FIG. 12 is m = 122 by rounding off fractional numbers. Next, the average value in the block is compared with each pixel of the block 2, and the pixel having a value less than the average value in the block is “0”,
A pixel array pattern is formed by flag bits that set pixels having a value equal to or greater than the average value within the block to "1" (step S2). A pixel array pattern corresponding to block 2 in FIG. 12 is shown in FIG. Next, a1 is calculated as the average value a0 of the pixel set whose pixel array pattern is "0" and a1 of the pixel set whose pixel array pattern is "1", respectively, and is set as the block representative value (step S3). In block 2 of FIG. 12, the block representative values are a0 = 34 (22h) and a1 = 162 (A2h).
It is. Note that h indicates hexadecimal notation. The final block code of this block 2 is 8 as shown in FIG.
Two representative values (a0, a1), which are bit data,
It is configured by one 16-bit pixel array pattern (Bitmap) in which FIG. 13 is serially arranged. In the example of FIG. 12, the code is as shown in FIG.
【0005】又このブロック符号を実際の画像データと
して復元するための伸張処理のフローチャートを図16
に示す。図14のブロック符号に収められたブロック代
表値a0を各々画素配列パターンの”0”である画素に
対し、又代表値a1を画素配列パターンの”1”である
画素に対し当てはめていく。これを1ブロック内の全画
素に対して行う。図14のブロック符号を伸張した伸張
画像を図17に示す。FIG. 16 is a flowchart of a decompression process for restoring this block code as actual image data.
Shown in The block representative value a0 contained in the block code of FIG. 14 is applied to the pixel which is "0" in the pixel array pattern, and the representative value a1 is applied to the pixel which is "1" in the pixel array pattern. This is performed for all the pixels in one block. FIG. 17 shows a decompressed image obtained by decompressing the block code of FIG.
【0006】一般に、1画素をqビットデータ、1ブロ
ックの画素数をNとして表したときには、原画像の1ブ
ロック内のデータ量はq×Nビットであり、ブロック符
号化後の画像データはNビットの画素配列パターンと2
×qビットのブロック代表値を合わせた2q+Nビット
となる。従ってブロック符号化による画像データの圧縮
率はqN/(2q+N)である。図12に示す例では、
1画素q=8ビットで1ブロックN=16であるため、
圧縮率は4となる。Generally, when one pixel is represented by q-bit data and the number of pixels in one block is represented by N, the amount of data in one block of the original image is q × N bits, and the image data after block coding is N. Bit pixel array pattern and 2
It is 2q + N bits, which is a combination of block representative values of × q bits. Therefore, the compression rate of the image data by the block coding is qN / (2q + N). In the example shown in FIG.
Since 1 pixel q = 8 bits and 1 block N = 16,
The compression rate is 4.
【0007】[0007]
【発明が解決しようとする課題】一般に画像の種類を大
きく二分した場合、文字や図形により構成される画像と
写真や絵画等の自然画像とに区別できる。前者の場合に
はそのデータの多くがブロック内のデータの値が等しい
ベタ画像であり、階調に変化があるときにもその変化は
著しく大きく、又後者の場合には近隣画素間の階調変化
はつねにあるものの、その変化は小さいことが多い。し
かし上記のような従来のブロック符号化では、1ブロッ
クの圧縮符号が常に2つの代表値と1つのビットマップ
データで表現されており、1ブロック内のデータが全て
等しい場合、即ちベタ画像であるような場合にも、同様
の符号化圧縮を行っていた。そのため1つの代表値で十
分なブロックに対しても2つの代表値を持ち、又階調変
化の小さい画像に対しても代表値データをそのまま符号
化するため、圧縮率が悪いという欠点があった。Generally, when the types of images are roughly divided into two, it is possible to distinguish between images composed of characters and figures and natural images such as photographs and paintings. In the former case, most of the data is a solid image in which the data values in the block are the same, and even if there is a change in gradation, the change is significantly large, and in the latter case, the gradation between neighboring pixels is large. Changes are always, but often small. However, in the conventional block coding as described above, the compression code of one block is always expressed by two representative values and one bit map data, and when the data in one block are all the same, that is, a solid image. Even in such a case, similar coding compression was performed. Therefore, one representative value has two representative values even for a sufficient block, and the representative value data is encoded as it is for an image with a small gradation change, so that the compression rate is poor. .
【0008】本発明はこのような従来の問題点に鑑みて
なされたものであって、従来のブロック符号化による圧
縮技術よりも更に圧縮率を高めるようにすることを技術
的課題とする。The present invention has been made in view of such conventional problems, and it is a technical object to further increase the compression rate as compared with the conventional compression technique by block coding.
【0009】[0009]
【課題を解決するための手段】本願の請求項1の発明
は、各画素が多階調で表現された画像の複数画素を1つ
のブロックとし、前記ブロック内の全画素の平均値をと
り前記平均値より大きい画素と小さい画素に分けて夫々
の平均値を求めこれを階調情報とし、前記階調情報と夫
々の画素が全画素の平均値より大きいか又は小さいかを
示したフラグビットによる画素配列パターンとによって
構成されるブロック符号を生成することで、画像情報量
を削減することを特徴とする画像圧縮方法において、前
記ブロック内の全画素が全て同じ値の場合において、例
外処理を示す固定値及び代表値のみでそのブロックのブ
ロック符号を生成することを特徴とするものである。According to the invention of claim 1 of the present application, a plurality of pixels of an image in which each pixel is expressed in multi-gradation is set as one block, and an average value of all the pixels in the block is calculated. By dividing each pixel into a pixel larger than the average value and a pixel smaller than the average value and obtaining the average value, the gradation information and the flag bit indicating whether each pixel is larger or smaller than the average value of all pixels An image compression method characterized by reducing the amount of image information by generating a block code composed of a pixel array pattern and showing an exceptional process when all the pixels in the block have the same value. The feature is that the block code of the block is generated only with a fixed value and a representative value.
【0010】本願の請求項2の発明は、各画素が多階調
で表現された画像の複数画素を1つのブロックとし、前
記ブロック内の全画素の平均値をとり前記平均値より大
きい画素と小さい画素に分けて夫々の平均値を求めこれ
を階調情報とし、前記階調情報と夫々の画素が全画素の
平均値より大きいか又は小さいかを示したフラグビット
による画素配列パターンとによって構成されるブロック
符号を生成することで、画像情報量を削減することを特
徴とする画像圧縮方法において、前記ブロック内の全画
素が全て同じ値であり、その値が1ブロック範囲に限ら
ず連続する場合において、例外処理を示す固定値及び代
表値と同一画素値の連続する長さとによりブロック符号
を生成することを特徴とするものである。According to a second aspect of the present invention, a plurality of pixels of an image in which each pixel is expressed in multiple gradations are set as one block, and an average value of all the pixels in the block is taken to be a pixel larger than the average value. Each pixel is divided into small pixels, each average value is obtained, and this is used as gradation information. The gradation information and a pixel arrangement pattern by a flag bit indicating whether each pixel is larger or smaller than the average value of all pixels are configured. In the image compression method, which is characterized by reducing the amount of image information by generating a block code that is generated, all pixels in the block have the same value, and the value is not limited to one block range and is continuous. In this case, the block code is generated with a fixed value indicating the exceptional process and a representative value and a continuous length of the same pixel value.
【0011】本願の請求項3の発明は、請求項1の例外
処理を含んだブロック符号を判別して伸張する画像伸張
方法であって、例外処理を示す固定値を有するブロック
符号にはその代表値をそのブロックの全ての画素に当て
はめると共に、その他のブロック符号には画素配列パタ
ーンによって平均値より大きい画素と小さい画素に対し
て夫々の平均値を当てはめることにより多階調画像の画
素を再構成することを特徴とするものである。The invention of claim 3 of the present application is an image decompression method for discriminating a decompressing block code including an exceptional process of claim 1 and decompressing the block code, which is typical for a block code having a fixed value indicating an exceptional process. Values are applied to all the pixels in the block, and pixels in the multi-tone image are reconstructed by applying the average values to the pixels larger and smaller than the average value to the other block codes according to the pixel arrangement pattern. It is characterized by doing.
【0012】本願の請求項4の発明は、請求項2の例外
処理を含んだブロック符号を判別して伸張する画像伸張
方法であって、例外処理を示す固定値が含まれていると
きにその長さに相当するブロックの全画素に代表値を当
てはめると共に、その他のブロック符号には画素配列パ
ターンによって平均値より大きい画素と小さい画素に対
して夫々の平均値を当てはめることにより多階調画像の
画素を再構成することを特徴とするものである。The invention according to claim 4 of the present application is an image expansion method for determining and expanding a block code including an exception process according to claim 2, which is performed when a fixed value indicating an exception process is included. A representative value is applied to all the pixels of the block corresponding to the length, and the average values are applied to the other block codes according to the pixel arrangement pattern to the pixels larger and smaller than the average value. It is characterized by reconstructing pixels.
【0013】このような特徴を有する本願の請求項1の
発明によれば、多階調で表現された複数画素を1つのブ
ロックとしてブロックの平均値によって各画素の階調を
識別し、夫々の平均値と全画素の平均値の大小を示す画
素配列パターンによってブロック符号を生成している。
そしてブロック内の全画素が同一の値の場合に、固定値
とその代表値によってブロック符号を生成している。こ
うすれば文字や図形等のブロック内のデータの値が等し
いベタ画像の場合に、画像情報量が削減され、圧縮効率
が高まることとなる。又請求項2の発明では、複数のブ
ロックに渡って同一の画素値が連続する場合に、同一画
素値の連続する長さを加えて例外処理を示すブロック符
号を生成している。このため同一の画素値が複数ブロッ
クに継続する場合には画像圧縮効率をより高めることが
できる。又請求項3及び4は、こうして圧縮されたブロ
ック符号をその圧縮規則に基づいて復元して元の画像を
生成するようにしたものである。According to the invention of claim 1 of the present application having such a characteristic, the gradation of each pixel is identified by the average value of the blocks, with a plurality of pixels represented by multiple gradations as one block, and The block code is generated by a pixel array pattern indicating the magnitude of the average value and the average value of all pixels.
Then, when all the pixels in the block have the same value, the block code is generated by the fixed value and its representative value. By doing so, in the case of a solid image in which the data values in blocks such as characters and figures are the same, the amount of image information is reduced and the compression efficiency is increased. According to the second aspect of the invention, when the same pixel value continues in a plurality of blocks, the block code indicating the exceptional process is generated by adding the continuous length of the same pixel value. Therefore, when the same pixel value continues in a plurality of blocks, the image compression efficiency can be further improved. According to claims 3 and 4, the block code compressed in this way is restored based on the compression rule to generate the original image.
【0014】[0014]
【発明の実施の形態】以下、本発明の第1の実施形態に
ついて図1〜図7を参照しながら説明する。図2は本発
明による符号化圧縮を説明するために画像の原画像を拡
大し図示したものである。図2の1は画素であり、画像
構成する最小単位である。各色共に8ビットデータで2
56階調を扱うものとし、1つの画素1は0〜255の
値を持つ。太線で示すように4×4(総画素数16)の
近隣画素を集めたブロック2をとる。本発明はブロック
2の全ての画素が同じ値であった場合の例外処理による
符号化を特徴としており、図2及び図3はその符号化を
説明する図である。図2はブロック2が全て同じ値の場
合の例であり、図3は図2に対して例外処理を行った後
の符号化の状態を示している。又本発明の例外処理のた
めに従来のブロック符号化に特別ルールが必要となるた
め、その例を図4と図5に示す。図4は特別ルールを必
要とする符号化されたデータの例であり、図5は図4に
対して特別ルールを適用した後の符号化データである。
図6はブロック2をブロック符号化する際の手順を示し
たフローチャートである。BEST MODE FOR CARRYING OUT THE INVENTION A first embodiment of the present invention will be described below with reference to FIGS. FIG. 2 is an enlarged view of the original image of the image for explaining the coding compression according to the present invention. 1 in FIG. 2 is a pixel, which is the minimum unit that constitutes an image. 2 for 8-bit data for each color
Assuming that 56 gradations are handled, one pixel 1 has a value of 0-255. As shown by a thick line, a block 2 in which 4 × 4 (total number of pixels 16) neighboring pixels are collected is taken. The present invention is characterized by the encoding by the exceptional processing when all the pixels of the block 2 have the same value, and FIGS. 2 and 3 are diagrams for explaining the encoding. FIG. 2 shows an example in which all the blocks 2 have the same value, and FIG. 3 shows a coding state after the exception processing is performed on FIG. Further, since special rules are required for the conventional block coding for the exception processing of the present invention, examples thereof are shown in FIGS. 4 and 5. FIG. 4 shows an example of encoded data that requires a special rule, and FIG. 5 shows encoded data after applying the special rule to FIG.
FIG. 6 is a flowchart showing the procedure for block-encoding the block 2.
【0015】次にこれらの図を用いて本実施形態の画像
圧縮方法について、その処理の流れを説明する。まず図
6のフローチャートにおいて、ブロック2において画素
の値が全て同じ値かどうかを調べる(ステップS1)。
もし全ての画素が同じ値であった場合は、特殊なフロー
チャート処理として例外処理を示す固定値a0と画素値
(代表値)a1の2バイトでブロックを構成する(ステ
ップS2)。最終的なこのブロック2のブロック符号は
図3(a)に示すような8ビットのデータである2つの
代表値で構成され、具体的には図3(b)に示すような
符号となる。ここでは図2の画素値が全て128であっ
た場合の例であり、この場合符号化後のブロックは図3
に示すように、例外処理を示す固定値としてa0=1,
画素値a1=128で構成される。ここでは例外処理を
示す固定値としてa0=1を定義しているが、その理由
としては、画素をパソコンやプリンタで描画した場合に
256階調中の画素データとしても0も1も黒を示すも
のであり、視覚上見分けがつきにくいため、1に特殊な
意味を持たすことにしたものである。以上の操作により
ブロック内の画素が全て同じ値である場合は、16バイ
トのブロック2を2バイトで表現することにより圧縮率
8を実現できることになる。Next, the processing flow of the image compression method of this embodiment will be described with reference to these figures. First, in the flowchart of FIG. 6, it is checked in block 2 whether all pixel values are the same (step S1).
If all the pixels have the same value, a block is composed of a fixed value a0 indicating exceptional processing and a pixel value (representative value) a1 of 2 bytes as a special flowchart processing (step S2). The final block code of this block 2 is composed of two representative values which are 8-bit data as shown in FIG. 3A, and specifically, the code is as shown in FIG. 3B. 2 is an example in which all the pixel values in FIG. 2 are 128, and in this case, the block after encoding is shown in FIG.
As shown in, the fixed value indicating the exception handling is a0 = 1,
The pixel value a1 = 128. Here, a0 = 1 is defined as a fixed value indicating exceptional processing. The reason is that when pixels are drawn by a personal computer or a printer, both 0 and 1 show black as pixel data in 256 gradations. Since it is difficult to distinguish visually, it is decided to give 1 a special meaning. When all the pixels in the block have the same value by the above operation, the compression rate of 8 can be realized by expressing the block 2 of 16 bytes by 2 bytes.
【0016】次にブロック2が全て同じ値ではない場合
の処理について以下に説明する。まずブロック符号化す
るブロック2の平均値を算出し、これをブロック内平均
値mとする(ステップS3)。ブロック内平均値とブロ
ック2内の各画素とを比較し、ブロック内平均値未満の
値を持つ画素を”0”、ブロック内平均値以上の値を持
つ画素を”1”とするフラグビットによる画素配列パタ
ーンを形成する(ステップS4)。次に画素配列パター
ンが”0”である画素の組の平均値a0、及び”1”で
ある画素の組の平均値をa1を夫々算出し、ブロック代
表値とする(ステップS5)。ここまでは従来の技術で
示した符号化の流れと同じであるが、本発明では画素の
値1を例外処理を示す固定値としているため、次の特別
ルールを施す必要がある。このブロック2のブロック符
号は図4(a)に示すような各8ビットのデータである
2つの代表値と16ビットで表される1つの画素配列パ
ターンとで構成され、具体的には図4(b)に示すよう
な符号となる。ここで図4のa0の値が1の場合、黒の
画素として近似するために値0と置き換える(ステップ
S6,S7)。即ちa0=0としてブロックを再形成す
る。これにより伸張する場合にはa0=1は必ず例外処
理を示すことになる。最後に図5に示すようにa0及び
a1、画素配列パターンによってブロックを構成する
(ステップS8)。以下同様に次のブロックの処理を繰
り返すことでブロック符号化が実現できる。Next, the processing when the blocks 2 do not have the same value will be described below. First, the average value of the block 2 to be block-encoded is calculated, and this is set as the intra-block average value m (step S3). By comparing the average value in the block with each pixel in block 2, the pixel having a value less than the average value in the block is set to "0", and the pixel having a value not less than the average value in the block is set to "1". A pixel array pattern is formed (step S4). Next, a1 is calculated as the average value a0 of the pixel set having the pixel array pattern of "0" and a1 of the pixel set having the pixel array pattern of "1", and is set as the block representative value (step S5). Up to this point, the flow of encoding has been the same as that of the conventional technique, but since the pixel value 1 is a fixed value indicating exceptional processing in the present invention, the following special rule must be applied. The block code of this block 2 is composed of two representative values, each of which is 8-bit data, and one pixel array pattern represented by 16 bits, as shown in FIG. The code is as shown in (b). Here, when the value of a0 in FIG. 4 is 1, it is replaced with the value 0 in order to approximate it as a black pixel (steps S6 and S7). That is, the block is re-formed with a0 = 0. Therefore, when decompressing, a0 = 1 always indicates exceptional processing. Finally, as shown in FIG. 5, a block is formed by a0 and a1, and the pixel array pattern (step S8). Similarly, block coding can be realized by repeating the processing of the next block.
【0017】次に圧縮ブロックの伸張方法について述べ
る。実際の画像データとして復元するための伸張処理の
フローチャートを図7に示す。まずa0の値が1かどう
かを調べる(ステップS1)。a0=1の場合は全ての
画素にa1の値を当てはめることでブロックを再生する
(ステップS2)。a0が1でない場合は従来の伸張方
法と同様に、a0を各々画素配列パターンの”0”であ
る画素に対して、a1を画素配列パターンの”1”であ
る画素に対し当てはめる処理をブロック内の全画素に対
して行う(ステップS3)。以上の操作をブロック毎に
繰り返すことにより、画素の伸張が可能となる。Next, the method of decompressing the compressed block will be described. FIG. 7 shows a flowchart of a decompression process for restoring as actual image data. First, it is checked whether the value of a0 is 1 (step S1). When a0 = 1, the block is reproduced by applying the value of a1 to all pixels (step S2). If a0 is not 1, as in the conventional decompression method, the process of applying a0 to pixels that are "0" in the pixel array pattern and applying a1 to pixels that are "1" in the pixel array pattern is performed within the block. Are performed for all pixels (step S3). By repeating the above operation for each block, the pixel can be expanded.
【0018】次に本発明の第2の実施形態について図8
乃至図10を用いて説明する。第2の実施形態では、ブ
ロック内が全て同じ値の場合の処理において1つのブロ
ックに限らず連続する複数ブロックに対して処理を適用
し、その長さを属性としてブロック情報に追加すること
で、更に圧縮率を高めるものである。以下図10のフロ
ーチャートを用いて圧縮方法を説明する。1ブロック内
の画素の値が全て同じ値であった場合は、ブロック単位
で同じ値が連続する間連続する長さ、例えば画素数を計
算する(ステップS2)。この場合、ブロック内に1つ
でも異なる値が含まれていた場合は、1つ前のブロック
までを適用する。次に圧縮後のブロック符号を形成する
際に例外処理を示す固定値a0=1及び画素値a1に加
え、連続画素数a2の3バイトによって符号を構成する
(ステップS3)。最終的には図9(a)に示すような
各8ビットのデータである固定値及び代表値と8ビット
の連続する画素の長さで表される。図8は画素の同じ値
128が3ブロックに渡って連続した場合の例であり、
図9(b)はこれを圧縮した後のブロック符号を示して
おり、3ブロック分48画素が連続して同じ値のためa
2=48となる。尚ブロック内が全て同一値でない場合
の処理(ステップS4乃至ステップS9)は第1の実施
形態と同じであり、ここでは省略する。Next, FIG. 8 shows the second embodiment of the present invention.
It will be described with reference to FIGS. In the second embodiment, in the processing in the case where all values in the block are the same, the processing is applied not only to one block but to a plurality of consecutive blocks, and the length is added to the block information as an attribute, It further increases the compression rate. The compression method will be described below with reference to the flowchart of FIG. When all the pixel values in one block are the same value, the continuous length, for example, the number of pixels, is calculated while the same value continues for each block (step S2). In this case, if at least one different value is included in the block, the previous block is applied. Next, when forming the block code after compression, in addition to the fixed value a0 = 1 and the pixel value a1 indicating the exceptional processing, the code is configured by 3 bytes of the continuous pixel number a2 (step S3). Finally, as shown in FIG. 9A, it is represented by a fixed value and a representative value which are each 8-bit data and a length of a continuous pixel of 8 bits. FIG. 8 shows an example of the case where the same value 128 of pixels continues over three blocks,
FIG. 9 (b) shows the block code after compression, and since 48 pixels for three blocks have the same value continuously, a
2 = 48. Note that the processing (steps S4 to S9) when the values in all the blocks are not the same is the same as that in the first embodiment, and is omitted here.
【0019】次に圧縮ブロックの伸張方法について述べ
る。実際の画像データとして復元するための伸張処理の
フローチャートを図11に示す。まずa0の値が1かど
うかを調べて(ステップS1)、a0=1の場合は全て
の画素にa1の値を画素数a2分当てはめることでブロ
ックを再生する(ステップS2)。尚a0=1でない場
合の処理(ステップS3)は第1の実施形態と同様であ
り、ここでは省略する。以上の操作をブロック毎に繰り
返すことにより、画素の伸張が可能となる。尚連続する
長さは画素数を直接a2としてもよく、ブロック数をa
2としてもよい。Next, a method of expanding the compressed block will be described. FIG. 11 shows a flowchart of a decompression process for restoring as actual image data. First, it is checked whether or not the value of a0 is 1 (step S1). If a0 = 1, the value of a1 is applied to all pixels by the number of pixels a2 to reproduce the block (step S2). Note that the process (step S3) when a0 = 1 is not the same as that in the first embodiment, and will be omitted here. By repeating the above operation for each block, the pixel can be expanded. The number of pixels may be directly set to a2 for the continuous length, and
It may be 2.
【0020】[0020]
【発明の効果】以上詳細に説明したように本願の請求項
1の発明によれば、画像のデータの1ブロック内のデー
タが全て等しい場合には、1つの代表値と例外処理を示
す固定値で表すことで、画像データにおいて圧縮率の高
い画像圧縮方法を提供できる。As described in detail above, according to the invention of claim 1 of the present application, when all the data in one block of image data are the same, one representative value and a fixed value indicating an exception process. By representing by, it is possible to provide an image compression method with a high compression rate for image data.
【0021】又本願の請求項2の発明によれば、多階調
画素が連続して同一値の場合に1ブロック範囲に限らず
連続する間において、例外処理を示す固定値と代表値に
加えて、連続する長さでブロック符号を生成すること
で、更に圧縮率を高めることができる。According to the second aspect of the present invention, when the multi-gradation pixels have the same value in succession, in addition to the fixed value indicating the exceptional processing and the representative value during the continuous not limited to one block range, By generating block codes with continuous lengths, the compression ratio can be further increased.
【0022】又請求項3及び4の発明では、請求項1,
2の発明によって圧縮した画像を夫々の例外規則に基づ
いて伸張することによって、元の画像を復元することが
できる。According to the inventions of claims 3 and 4, claim 1,
The original image can be restored by decompressing the image compressed by the second invention based on the respective exception rules.
【図1】本発明のブロック符号化を行うブロックの説明
図である。FIG. 1 is an explanatory diagram of a block that performs block coding according to the present invention.
【図2】本発明の第1実施形態における圧縮前のブロッ
ク符号を示す説明図である。FIG. 2 is an explanatory diagram showing a block code before compression according to the first embodiment of the present invention.
【図3】本発明の第1実施形態における圧縮後のブロッ
ク符号を示す説明図である。FIG. 3 is an explanatory diagram showing a compressed block code according to the first embodiment of the present invention.
【図4】本発明の第1実施形態における圧縮後のブロッ
ク符号を示す説明図である。FIG. 4 is an explanatory diagram showing a compressed block code according to the first embodiment of the present invention.
【図5】本発明の第1実施形態における圧縮後のブロッ
ク説明図である。FIG. 5 is an explanatory block diagram after compression in the first embodiment of the present invention.
【図6】本発明の第1実施形態における圧縮処理のフロ
ーチャートである。FIG. 6 is a flowchart of a compression process according to the first embodiment of the present invention.
【図7】本発明の第1実施形態における伸張処理のフロ
ーチャートである。FIG. 7 is a flowchart of decompression processing according to the first embodiment of the present invention.
【図8】本発明の第2実施形態における処理前の画像デ
ータの説明図である。FIG. 8 is an explanatory diagram of image data before processing according to the second embodiment of the present invention.
【図9】本発明の第2実施形態における圧縮処理後のブ
ロック符号を示す説明図である。FIG. 9 is an explanatory diagram showing a block code after compression processing according to the second embodiment of the present invention.
【図10】本発明の第2実施形態における圧縮処理のフ
ローチャートである。FIG. 10 is a flowchart of a compression process according to the second embodiment of the present invention.
【図11】本発明の第2実施形態における伸張処理のフ
ローチャートである。FIG. 11 is a flowchart of decompression processing according to the second embodiment of the present invention.
【図12】従来のブロック符号化における圧縮処理前の
画像データの説明図である。FIG. 12 is an explanatory diagram of image data before compression processing in conventional block coding.
【図13】従来のブロック符号化におけるビットマップ
データの説明図である。FIG. 13 is an explanatory diagram of bitmap data in conventional block encoding.
【図14】従来のブロック符号化における圧縮後のブロ
ック符号の説明図である。FIG. 14 is an explanatory diagram of a block code after compression in conventional block coding.
【図15】従来のブロック符号化の圧縮処理のフローチ
ャートである。FIG. 15 is a flowchart of a conventional block coding compression process.
【図16】従来のブロック符号化の伸張処理のフローチ
ャートである。FIG. 16 is a flowchart of decompression processing of conventional block coding.
【図17】従来のブロック符号化の伸張処理後の画像デ
ータの説明図である。FIG. 17 is an explanatory diagram of image data after decompression processing of conventional block encoding.
1 画素 2 ブロック 1 pixel 2 blocks
───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 // H03M 7/30 B41J 3/00 A ─────────────────────────────────────────────────── ─── Continuation of front page (51) Int.Cl. 6 Identification code Office reference number FI technical display location // H03M 7/30 B41J 3/00 A
Claims (4)
画素を1つのブロックとし、前記ブロック内の全画素の
平均値をとり前記平均値より大きい画素と小さい画素に
分けて夫々の平均値を求めこれを階調情報とし、前記階
調情報と夫々の画素が全画素の平均値より大きいか又は
小さいかを示したフラグビットによる画素配列パターン
とによって構成されるブロック符号を生成することで、
画像情報量を削減することを特徴とする画像圧縮方法に
おいて、 前記ブロック内の全画素が全て同じ値の場合において、
例外処理を示す固定値及び代表値のみでそのブロックの
ブロック符号を生成することを特徴とする画像圧縮方
法。1. A plurality of pixels of an image in which each pixel is expressed in multiple gradations are set as one block, an average value of all the pixels in the block is taken, and each pixel is divided into a pixel larger than the average value and a pixel smaller than the average value. An average value is obtained and used as gradation information, and a block code composed of the gradation information and a pixel array pattern of flag bits indicating whether each pixel is larger or smaller than the average value of all pixels is generated. By that,
In an image compression method characterized by reducing the amount of image information, when all the pixels in the block are all the same value,
An image compression method characterized in that a block code of the block is generated only with a fixed value and a representative value indicating exceptional processing.
画素を1つのブロックとし、前記ブロック内の全画素の
平均値をとり前記平均値より大きい画素と小さい画素に
分けて夫々の平均値を求めこれを階調情報とし、前記階
調情報と夫々の画素が全画素の平均値より大きいか又は
小さいかを示したフラグビットによる画素配列パターン
とによって構成されるブロック符号を生成することで、
画像情報量を削減することを特徴とする画像圧縮方法に
おいて、 前記ブロック内の全画素が全て同じ値であり、その値が
1ブロック範囲に限らず連続する場合において、例外処
理を示す固定値及び代表値と同一画素値の連続する長さ
とによりブロック符号を生成することを特徴とする画像
圧縮方法。2. A plurality of pixels of an image in which each pixel is expressed in multiple gradations are set as one block, an average value of all pixels in the block is taken, and each pixel is divided into a pixel larger than the average value and a pixel smaller than the average value. An average value is obtained and used as gradation information, and a block code composed of the gradation information and a pixel array pattern of flag bits indicating whether each pixel is larger or smaller than the average value of all pixels is generated. By that,
In an image compression method characterized by reducing the amount of image information, when all pixels in the block have the same value and the values are not limited to one block range and are continuous, a fixed value indicating exceptional processing and An image compression method characterized in that a block code is generated by a representative value and a continuous length of the same pixel value.
号を判別して伸張する画像伸張方法であって、 例外処理を示す固定値を有するブロック符号にはその代
表値をそのブロックの全ての画素に当てはめると共に、
その他のブロック符号には画素配列パターンによって平
均値より大きい画素と小さい画素に対して夫々の平均値
を当てはめることにより多階調画像の画素を再構成する
ことを特徴とする画像伸張方法。3. An image decompression method for discriminating and decompressing a block code including an exceptional process according to claim 1, wherein a block code having a fixed value indicating the exceptional process has a representative value of all of the blocks. While applying to the pixel,
An image decompression method characterized by reconstructing the pixels of a multi-tone image by applying the respective average values to pixels larger than the average value and pixels smaller than the average value for other block codes depending on the pixel arrangement pattern.
号を判別して伸張する画像伸張方法であって、 例外処理を示す固定値が含まれているときにその長さに
相当するブロックの全画素に代表値を当てはめると共
に、その他のブロック符号には画素配列パターンによっ
て平均値より大きい画素と小さい画素に対して夫々の平
均値を当てはめることにより多階調画像の画素を再構成
することを特徴とする画像伸張方法。4. An image decompression method for discriminating and decompressing a block code including an exceptional process according to claim 2, wherein a block corresponding to a length of a block when a fixed value indicating the exceptional process is included. It is possible to reconstruct the pixels of a multi-tone image by applying representative values to all pixels and applying other averages to other block codes depending on the pixel arrangement pattern for pixels larger than the average value and smaller than the average value. Characteristic image expansion method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP15350196A JP3862781B2 (en) | 1996-05-24 | 1996-05-24 | Image compression method and image expansion method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP15350196A JP3862781B2 (en) | 1996-05-24 | 1996-05-24 | Image compression method and image expansion method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH09322162A true JPH09322162A (en) | 1997-12-12 |
JP3862781B2 JP3862781B2 (en) | 2006-12-27 |
Family
ID=15563948
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP15350196A Expired - Lifetime JP3862781B2 (en) | 1996-05-24 | 1996-05-24 | Image compression method and image expansion method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3862781B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8750607B2 (en) | 2008-06-13 | 2014-06-10 | Konica Minolta Business Technologies, Inc. | Image processing apparatus capable of efficiently compressing an original image |
JP2017152755A (en) * | 2016-02-22 | 2017-08-31 | 富士ゼロックス株式会社 | Data processing device and program |
-
1996
- 1996-05-24 JP JP15350196A patent/JP3862781B2/en not_active Expired - Lifetime
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8750607B2 (en) | 2008-06-13 | 2014-06-10 | Konica Minolta Business Technologies, Inc. | Image processing apparatus capable of efficiently compressing an original image |
JP2017152755A (en) * | 2016-02-22 | 2017-08-31 | 富士ゼロックス株式会社 | Data processing device and program |
Also Published As
Publication number | Publication date |
---|---|
JP3862781B2 (en) | 2006-12-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH03165181A (en) | High quality compression method of binary text picture | |
JPWO2004068844A1 (en) | Image compression method, image restoration method, program, and apparatus | |
JP4189443B2 (en) | Graphics image compression and decompression method | |
WO2001067776A1 (en) | Improved vector quantization of images | |
CN112118449B (en) | Method and device for compressing and decompressing image | |
JPH07322074A (en) | Equipment and method for data processing to process 2 level image file that a dither ring happened | |
JP2702408B2 (en) | Image conversion system | |
JPH09322162A (en) | Image compression method and image expansion method | |
US20050078329A1 (en) | Image processing device, image processing program, image processing method and data structure for data conversion | |
JP3777649B2 (en) | Image compression method and image expansion method | |
JPH0818790A (en) | Halftone image compression method | |
JPH09275498A (en) | Image compression method | |
JP3707419B2 (en) | Image compression apparatus, image compression method, image expansion apparatus, and program | |
JP3676078B2 (en) | Run-length encoding method and compression apparatus | |
JP3375078B2 (en) | Image compression device | |
JP2619759B2 (en) | Image data compression method | |
JP3375079B2 (en) | Image compression device | |
JP3375080B2 (en) | Image compression method | |
JP3083336B2 (en) | Image processing apparatus and method | |
JPS62145969A (en) | Compression and restoration method of gradation image information | |
JP2002540685A (en) | Image compression and decompression | |
JP3152772B2 (en) | Image data restoration device | |
JP4741317B2 (en) | Data compression apparatus and data compression program | |
JP3531844B2 (en) | Image processing device | |
JPH05268484A (en) | Piclture coding processing method and picture decoding processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050607 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050728 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050906 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20051101 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20051220 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060117 |
|
A911 | Transfer of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20060309 |
|
A912 | Removal of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A912 Effective date: 20060331 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20060927 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091006 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101006 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111006 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121006 Year of fee payment: 6 |