JP2009212789A - Image compressor - Google Patents
Image compressor Download PDFInfo
- Publication number
- JP2009212789A JP2009212789A JP2008053385A JP2008053385A JP2009212789A JP 2009212789 A JP2009212789 A JP 2009212789A JP 2008053385 A JP2008053385 A JP 2008053385A JP 2008053385 A JP2008053385 A JP 2008053385A JP 2009212789 A JP2009212789 A JP 2009212789A
- Authority
- JP
- Japan
- Prior art keywords
- compression
- data
- unit
- line
- primary
- 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
- 230000006835 compression Effects 0.000 claims abstract description 170
- 238000007906 compression Methods 0.000 claims abstract description 170
- 230000015654 memory Effects 0.000 abstract description 53
- 230000006837 decompression Effects 0.000 description 31
- 238000000034 method Methods 0.000 description 12
- 230000004044 response Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
Description
本発明は、画像を圧縮する画像圧縮装置に係り、特に、画像を複数のブロックに分割して圧縮する画像圧縮装置に関する。 The present invention relates to an image compression apparatus that compresses an image, and more particularly, to an image compression apparatus that compresses an image by dividing the image into a plurality of blocks.
ディジタル複合機などの装置では、ビットマップ形式の画像データをメモリやハードディスク装置に保存する場合に必要な記憶容量を削減するために画像データを圧縮して保存することが行われる。 In an apparatus such as a digital multi-function peripheral, image data is compressed and stored in order to reduce the storage capacity required when image data in bitmap format is stored in a memory or a hard disk device.
その圧縮方式の1つにBTC(Block Truncation Coding)圧縮方式がある。BTC圧縮では、圧縮対象の画像を所定の画素数(たとえば、4画素×4画素)毎のブロックに分割し、各ブロックを、そのブロックに属する画素の階調値の分布範囲を示す情報(たとえば、最大値と最小値)と、該分布範囲内においてブロック内の各画素の階調値を元の画像データの階調数より少ない階調数で正規化した符号データとで表わした圧縮データを生成する。 One of the compression methods is a BTC (Block Truncation Coding) compression method. In BTC compression, an image to be compressed is divided into blocks each having a predetermined number of pixels (for example, 4 pixels × 4 pixels), and each block is information indicating the distribution range of gradation values of pixels belonging to the block (for example, , The maximum value and the minimum value), and the compressed data represented by the code data obtained by normalizing the gradation value of each pixel in the block within the distribution range with the gradation number smaller than the gradation number of the original image data. Generate.
伸張時には、圧縮データに含まれる最大値と最小値が示す階調値の分布範囲から符号データの各値に対する代表値を決定し、圧縮データに含まれる各符号データをその対応する代表値の画像データに変換して画像を復元するようになっている。 At the time of decompression, a representative value for each value of the code data is determined from the distribution range of gradation values indicated by the maximum value and the minimum value included in the compressed data, and each code data included in the compressed data is an image of the corresponding representative value. It is designed to restore the image by converting it to data.
たとえば、図8は、各画素を8ビット256階調(図中では階調値を16進数で標記)で表した4画素×4画素の1ブロック分の元画像データ80を、1画素あたり2ビット(4階調)の符号データにBTC圧縮し、さらに伸張した場合を例示している。
For example, FIG. 8 shows the
圧縮時にはブロック内の階調値の最大値B6hと最小値32hを検出し、これらを両端とする分布範囲が4等分され、階調値Dが、最大値(B6h)≧D>閾値3(95h)の画素は2ビットの符号データ「11」に、閾値3(95h)≧D>閾値2(74h)の画素は符号データ「10」に、閾値2(74h)≧D>閾値1(53h)の画素は符号データ「01」に、閾値1(53h)≧D≧最小値(32h)の画素は符号データ「00」に符号化される。圧縮データ81はこれら16画素分の符号データと最大値B6hと最小値32hを示すデータとで構成され、そのデータ量は6バイトになる。
At the time of compression, the maximum value B6h and the minimum value 32h of the gradation values in the block are detected, the distribution range having these as both ends is equally divided into four, and the gradation value D is the maximum value (B6h) ≧ D> threshold 3 ( 95h) pixel is 2-bit code data “11”, threshold 3 (95h) ≧ D> threshold 2 (74h) is code data “10”, threshold 2 (74h) ≧ D> threshold 1 (53h) ) Are encoded into code data “01”, and pixels with threshold 1 (53h) ≧ D ≧ minimum value (32h) are encoded into code data “00”. The
伸張時には、圧縮データ81内のデータが示す最大値B6hを符号データ「11」に対応する代表値4に、最小値32hを符号データ「00」に対応する代表値1に、この最大値と最小値が示す範囲(B6h〜32h)を3等分する2つの境界値のうち大きい方の8Ahを符号データ「10」に対応する代表値3に、小さい方の5Ehを符号データ「01」に対応する代表値2に設定する。そして、圧縮データ81に含まれる各符号データをその符号データの値に対応する代表値に変換することで1ブロック分の画像データ82に伸張される。
At the time of decompression, the maximum value B6h indicated by the data in the
また、圧縮率を高めるために、ブロック単位にBTC圧縮した後、複数ブロックを1つに纏めた大ブロック単位に、BTC圧縮データをJBIG(Joint Bi-level Image experts Group)やMH方式で二次圧縮する画像処理装置がある(たとえば、特許文献1参照。)。 In order to increase the compression ratio, BTC compression is performed on a block basis, and then the BTC compressed data is converted into a secondary block using JBIG (Joint Bi-level Image Experts Group) or MH method. There is an image processing apparatus for compression (see, for example, Patent Document 1).
複合機などでは、スキャナ部から出力される画像データを、スキャナ部での原稿の読み取り動作と同時に並行して圧縮することが行われる。図9は、スキャナ部からライン毎に順次入力される画像データを圧縮するようにされた従来の圧縮回路の構成例を示している。 In a multifunction machine or the like, image data output from the scanner unit is compressed in parallel with the document reading operation by the scanner unit. FIG. 9 shows a configuration example of a conventional compression circuit configured to compress image data sequentially input line by line from the scanner unit.
スキャナ部91は圧縮対象の画像データをライン単位に順次出力する。ラインメモリ1は1ライン目の画像データを保持するメモリ、ラインメモリ2は2ライン目の画像データを保持するメモリ、ラインメモリ3は3ライン目の画像データを保持するメモリ、ラインメモリ4は4ライン目の画像データを保持するメモリである。BTC圧縮部95は、4画素×4画素を1ブロックとしてBTC準拠の圧縮処理を行い、BTC伸張部96はBTC準拠の伸張処理を行う回路である。カウンタ97はライン数をカウントし、各部に対し処理開始のイネーブル信号を出力し、制御部98は全体を制御する。
The
制御部98によりカウンタ97を動作させ、カウンタ97から各イネーブル信号EN1〜EN3を出力させることにより、各回路部を動作させる。詳細には、初期状態ではカウンタ値、各イネーブル信号は0になっている。カウンタ値が1になるとイネーブル信号EN1が1になり、スキャナ部91から入力される1ライン分の画像データをラインメモリ1に保持する。同様に、カウンタ値が2になるとイネーブル信号EN1が2になり、スキャナ部91からの1ライン分の画像データをラインメモリ2に保持する。カウンタ値が3になるとイネーブル信号EN1が3になり、スキャナ部91からの1ライン分の画像データをラインメモリ3に保持し、カウンタ値が4になるとイネーブル信号EN1が4になり、スキャナ部91からの1ライン分の画像データをラインメモリ4に保持する。
The
カウンタ値が5になるとイネーブル信号EN2が1になり、これを受けてBTC圧縮部95はラインメモリ1〜4に保持されている画像データをBTC圧縮処理し、カウンタ値が6になるとイネーブル信号EN3が1になり、これを受けてBTC伸張部96はBTC圧縮データを伸張し、その伸張された画像データがプリンタ部99に出力されて印刷される。図10は、上記動作のタイミングチャートを示している。
When the counter value becomes 5, the enable signal EN2 becomes 1, and in response to this, the BTC
このように、ライン毎に順次入力される画像データを、複数ラインに跨るブロックを単位に圧縮するためには、少なくともブロックに含まれる複数ライン分のラインメモリを必要とするので、圧縮前の画像データを保持するためのメモリ容量が嵩むという問題があった。 As described above, in order to compress image data sequentially input for each line in units of blocks extending over a plurality of lines, a line memory for at least a plurality of lines included in the block is required. There has been a problem that the memory capacity for holding data increases.
この問題は、特許文献1に開示された技術のようにブロック単位に一次圧縮した圧縮データを複数ブロック分1つにまとめて二次圧縮する場合でも、その一次圧縮の段階で発生する。
This problem occurs at the stage of the primary compression even when the compressed data subjected to the primary compression in units of blocks as in the technique disclosed in
本発明は、上記の問題を解決しようとするものであり、複数ラインに跨るブロック単位の圧縮を、圧縮時に使用する一時保持用のメモリの容量を少なくして実現可能な画像圧縮装置を提供することを目的としている。 The present invention is intended to solve the above problem, and provides an image compression apparatus capable of realizing block unit compression across a plurality of lines by reducing the capacity of a temporary holding memory used at the time of compression. The purpose is that.
かかる目的を達成するための本発明の要旨とするところは、次の各項の発明に存する。 The gist of the present invention for achieving the object lies in the inventions of the following items.
[1]1ラインの画像データを所定画素数のエリア単位に圧縮した一次圧縮データを生成する第1圧縮部と、
前記第1圧縮部によって生成された一次圧縮データを、複数のラインに分散する複数のエリアで構成された大エリア単位に圧縮する第2圧縮部と、
を有する
ことを特徴とする画像圧縮装置。
[1] A first compression unit that generates primary compression data obtained by compressing image data of one line in an area unit of a predetermined number of pixels;
A second compression unit that compresses the primary compressed data generated by the first compression unit into a large area unit composed of a plurality of areas distributed over a plurality of lines;
An image compression apparatus comprising:
上記発明では、第1圧縮部は1ライン分の画像データを所定画素数(たとえば、4画素)のエリア単位に圧縮して一次圧縮データを出力し、第2圧縮部は一次圧縮データを、複数のラインに分散する複数のエリア(たとえば、隣接4ラインに分散して存在する4つのエリア)で構成された大エリア単位に圧縮する。これにより、元の画像データから直に大エリア単位の圧縮を行う場合に比べて、圧縮時に画像データなどを一時的に保持するためのメモリエリアを削減することができる。 In the above invention, the first compression unit compresses image data for one line in an area unit of a predetermined number of pixels (for example, 4 pixels) and outputs primary compression data, and the second compression unit outputs a plurality of primary compression data. Compressed into a large area unit composed of a plurality of areas distributed over the lines (for example, four areas distributed over adjacent four lines). As a result, it is possible to reduce the memory area for temporarily storing image data and the like during compression, compared to the case where large area unit compression is performed directly from the original image data.
[2]前記第2圧縮部は、前記大エリアを構成する複数のエリア分の一次圧縮データを伸張した場合に得られる画像データを、前記大エリア単位に圧縮する
ことを特徴とする[1]に記載の画像圧縮装置。
[2] The second compression unit compresses image data obtained when decompressing primary compressed data for a plurality of areas constituting the large area in units of the large area. [1] The image compression apparatus described in 1.
上記発明では、大エリアを構成する複数のエリア分の一次圧縮データをそのまま圧縮するのではなく、これらの一次圧縮データを伸張した場合に得られる画像データを大エリア単位に圧縮する。これにより、元の画像データを直にブロック単位に圧縮した場合に相当する二次圧縮データを得ることができる。したがって、伸張時は2段階に伸張する必要はなく、二次圧縮データを伸張することで画像データを直接得ることができる。 In the above invention, the primary compressed data for a plurality of areas constituting a large area is not compressed as it is, but the image data obtained when the primary compressed data is expanded is compressed in a large area unit. Thereby, secondary compressed data corresponding to the case where the original image data is directly compressed in units of blocks can be obtained. Therefore, when decompressing, it is not necessary to decompress in two stages, and image data can be obtained directly by decompressing secondary compressed data.
[3]前記第1圧縮部が生成した一次圧縮データを記憶する記憶部を備え
前記第2圧縮部は、前記記憶部に記憶された、前記大エリアを構成する複数のエリア分の一次圧縮データに基づいて前記大エリアの圧縮を行う
ことを特徴とする[1]または[2]に記載の画像圧縮装置。
[3] A storage unit for storing the primary compressed data generated by the first compression unit is provided. The second compression unit is stored in the storage unit and is primary compressed data for a plurality of areas constituting the large area. The image compression apparatus according to [1] or [2], wherein the large area is compressed based on the above.
上記発明では、一次圧縮データは、一旦、記憶部に記憶され、この記憶部から読み出されて二次圧縮が行われる。元画像データを記憶部に保持させて元画像データから直にブロック単位で圧縮する場合に比べて、一次圧縮データを記憶部に保持させるので、記憶部に必要なメモリ容量が低減される。 In the said invention, primary compression data are once memorize | stored in a memory | storage part, and are read from this memory | storage part, and secondary compression is performed. Compared to the case where the original image data is held in the storage unit and compressed from the original image data directly in units of blocks, the primary compressed data is held in the storage unit, so that the memory capacity required for the storage unit is reduced.
[4]前記第1圧縮部は、1ライン分の画像データを圧縮した後に次のラインの圧縮を行い、
前記第2圧縮部は、大エリアを構成する複数のエリア分の一次圧縮データが前記記憶部に記憶された後に、前記大エリアの圧縮を行う
ことを特徴とする[3]に記載の画像圧縮装置。
[4] The first compression unit compresses the next line after compressing the image data for one line,
The image compression according to [3], wherein the second compression unit compresses the large area after primary compressed data for a plurality of areas constituting the large area is stored in the storage unit. apparatus.
上記発明では、1ライン分の画像データを一次圧縮した後、次のラインの一時圧縮が行われる。記憶部には大エリアに含まれる複数ライン分の一次圧縮データが記憶され、大エリアに含まれる複数ライン分の画像データが記憶部に揃った段階で二次圧縮が開始される。なお、大エリアに含まれるラインのうち、最後に一次圧縮データの生成されるラインについては、そのライン全体の一次圧縮データが記憶部に保持される前であっても、当該圧縮対象の大エリアに含まれるエリアの一次圧縮データが揃った段階で二次圧縮を開始してもよい。 In the above invention, the image data for one line is primarily compressed, and then the next line is temporarily compressed. The storage unit stores primary compressed data for a plurality of lines included in the large area, and secondary compression is started when the image data for the plurality of lines included in the large area are arranged in the storage unit. Of the lines included in the large area, for the line in which primary compressed data is finally generated, the large area to be compressed is stored even before the primary compressed data of the entire line is stored in the storage unit. Secondary compression may be started at the stage when primary compressed data in the area included in is complete.
[5]前記第1圧縮部は、前記エリアを1ブロックとしたBTC圧縮を行い、
前記第2圧縮部は、前記大エリアを1ブロックとしたBTC圧縮を行う
ことを特徴とする[1]乃至[4]のいずれか1つに記載の画像圧縮装置。
[5] The first compression unit performs BTC compression with the area as one block,
The image compression apparatus according to any one of [1] to [4], wherein the second compression unit performs BTC compression with the large area as one block.
本発明に係る画像圧縮装置によれば、複数のラインに跨るブロック単位の圧縮を、圧縮時に使用する一時保持用のメモリの容量を少なくして行うことができる。 According to the image compression apparatus according to the present invention, it is possible to perform block unit compression across a plurality of lines while reducing the capacity of a temporary holding memory used at the time of compression.
以下、図面に基づき本発明の実施の形態を説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図1は、本発明の実施の形態に係る画像圧縮伸張装置10の構成を示している。画像圧縮伸張装置10は、入力される画像データを圧縮する機能と、圧縮された画像データを伸張する機能を備えている。画像圧縮伸張装置10には、圧縮対象の画像データの供給元となるスキャナ部5と、伸張後の画像データに基づいて記録紙に画像を印刷するプリンタ部7が接続されている。
FIG. 1 shows the configuration of an image compression /
スキャナ部5は、原稿画像を主走査方向に1ライン分読み取るラインイメージセンサと、このラインイメージセンサによる読み取り位置を主走査方向に対して直交する副走査方向へ相対移動させる相対移動部とを備えている。ラインイメージセンサの原稿に対する読み取り位置を副操作方向へ相対移動させながらライン単位の読み取り動作を繰り返すことで、二次元平面をなす原稿の画像を読み取るように構成されている。ラインイメージセンサは、読み取った1ライン分の画像に対応するアナログ信号をラインの一端から他端に向けて順次出力し、該アナログ信号はその出力順にディジタルの画像データに変換されてスキャナ部5から画像圧縮伸張装置10へ出力される。ここでは、スキャナ部5は、各画素を8ビット256階調で表した画像データを出力する。
The
画像圧縮伸張装置10は、スキャナ部5から順次入力される画像データを、一次圧縮する第1圧縮部11と、第1圧縮部11の出力する一次圧縮データをそれぞれ1ライン分保持する第1〜第4ラインメモリ21〜24と、第1〜第4ラインメモリ21〜24に保持されている一次圧縮データを圧縮して二次圧縮データを出力する第2圧縮部12と、第2圧縮部12の出力する二次圧縮データを画像データに伸張するBTC伸張部13と、カウンタ14と、制御部15とを備えて構成される。
The image compression /
第1圧縮部11は、1ラインの画像データを所定画素数のエリア単位に圧縮する。ここでは、図2に示すように1ライン分の画像データLGをその先頭から4画素ずつのエリア単位にBTC圧縮し、各エリアに対応する一次圧縮データEを出力する。
The
第1圧縮部11は、4N−3(Nは1以上の整数)ライン目の画像データを圧縮した一次圧縮データを第1ラインメモリ21に出力して保持させる。また、4N−2ライン目の画像データを圧縮した一次圧縮データを第2ラインメモリ22に出力して保持させ、4N−1ライン目の画像データを圧縮した一次圧縮データを第3ラインメモリ23に出力して保持させ、4Nライン目の画像データを圧縮した一次圧縮データを第4ラインメモリ24に出力して保持させる。
The
第2圧縮部12は、第1圧縮部11によって生成された一次圧縮データを、複数のラインに分散する複数のエリアで構成された大エリア単位に圧縮する。ここでは、第2圧縮部12は、第1〜第4ラインメモリ21〜24に記憶されている連続する4ラインからそれぞれラインの先頭から同一のオフセット位置にある4つのエリアで構成されるブロック(大エリア)を単位にBTC圧縮する。すなわち、二次圧縮は、図3に示すように、原稿画像Gの左上を基点として4画素(主走査方向)×4画素(副走査方向)のブロックBL単位に行われる。
The
BTC伸張部13は、二次圧縮データをブロック単位の画像データに伸張する。カウンタ14は、処理するライン数をカウントし、各部に対して処理開始のイネーブル信号を出力する。制御部15は画像圧縮伸張装置10の動作を統括制御する。
The
画像圧縮伸張装置10は、マイクロプログラムを内蔵したシーケンサや論理回路などのハードウェア回路とメモリとで構成される。なお、画像圧縮伸張装置10は、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)などを備えたコンピュータ装置において所定のプログラムを実行することで実現されてもよい。
The image compression /
画像圧縮伸張装置10は、制御部15によりカウンタ14を動作させ、カウンタ14からそのカウンタ値に対応した各イネーブル信号EN1〜EN3を出力させることにより、各回路部(第1圧縮部11、第2圧縮部12、BTC伸張部13)を動作させる。
The image compression /
詳細には、初期状態ではカウンタ14のカウンタ値、各イネーブル信号EN1〜EN3は0になっている。制御部15がスキャナ部5に対して原稿の読み取り開始を指示すると、スキャナ部5は原稿の読み取り動作を開始する。
Specifically, in the initial state, the counter value of the
カウンタ14のカウンタ値が1になるとイネーブル信号EN1が1になり、これに応じて第1圧縮部11はスキャナ部5から1ライン分((4N−3)ライン目)の画像データを順次取り込み、その画像データを隣接4画素のエリア単位に一次圧縮し、生成された各エリアの一次圧縮データを、順次、第1ラインメモリ21に保持させる。
When the counter value of the
同様に、カウンタ14のカウンタ値が2になるとイネーブル信号EN1が2になり、これに応じて第1圧縮部11はスキャナ部から次の1ライン分((4N−2)ライン目)の画像データを順次取り込み、その画像データを隣接4画素のエリア単位に一次圧縮し、生成された各エリアの一次圧縮データを、順次、第2ラインメモリ22に保持させる。
Similarly, when the counter value of the
カウンタ14のカウンタ値が3になるとイネーブル信号EN1が3になり、これに応じて第1圧縮部11はスキャナ部5から次の1ライン分((4N−1)ライン目)の画像データを順次取り込み、その画像データを隣接4画素のエリア単位に一次圧縮し、生成された各エリアの一次圧縮データを、順次、第3ラインメモリ23に保持させる。
When the counter value of the
カウンタ14のカウンタ値が4になるとイネーブル信号EN1が4になり、これに応じて第1圧縮部11はスキャナ部から次の1ライン分((4N)ライン目)の画像データを順次取り込み、その画像データを隣接4画素のエリア単位に一次圧縮し、生成された各エリアの一次圧縮データを、順次、第4ラインメモリ24に保持させる。
When the counter value of the
カウンタ値が5になるとイネーブル信号EN1は0に戻り、かつイネーブル信号EN2が1になる。これに応じて第1〜第4ラインメモリ21〜24に保持している一次圧縮データを第2圧縮部12がブロック(大エリア)単位に二次圧縮する。カウンタ値が6になるとイネーブル信号EN2は0に戻り、かつイネーブル信号EN3が1になり、BTC伸張部13が二次圧縮データをBTC伸張し、伸張された画像データはプリンタ部7に出力されて印刷される。図4は、上記動作のタイミングチャートを示している。
When the counter value becomes 5, the enable signal EN1 returns to 0 and the enable signal EN2 becomes 1. In response to this, the
なお、第2圧縮部12の出力する二次圧縮データをHDD(Hard Disk Drive)などの記憶装置に記憶しておき、後に出力要求を受けた時点でHDDから読み出してBTC伸張部13で伸張し、プリンタ部7で印刷出力するように構成されてもよい。
The secondary compressed data output from the
次に、第1圧縮部11による一次圧縮と第2圧縮部12による二次圧縮の詳細を説明する。
Next, details of primary compression by the
第1圧縮部11は、各ラインを隣接4画素のエリア単位に一次圧縮する。ここでは、1画素を4階調2ビットの符号データで表すようにBTC圧縮する。具体的には、主走査方向に隣接する4画素で構成された1つのエリアに属する画素の階調値の最大値Maxと最小値Minとを求め、最大値Maxと最小値Minとを両端とする階調範囲を4つの領域に分割(ここでは、4等分)する閾値1、閾値2、閾値3(閾値1<閾値2<閾値3とする)を算出する。そして、画素の階調値Dとしたとき、
最大値≧D>閾値3ならば、領域3、符号データ「11」
閾値3≧D>閾値2ならば、領域2、符号データ「10」
閾値2≧D>閾値1ならば、領域1、符号データ「01」
閾値1≧D≧最小値ならば、領域0、符号データ「00」
をその画素に対する2ビットの符号データとして与える。そして、最大値Maxを示すデータと最小値Minを示すデータと各画素に与えた符号データ(2ビット×4画素)とから構成される一次圧縮データを生成する。
The
If maximum value ≧ D>
If
If
If
Are given as 2-bit code data for the pixel. Then, primary compressed data including data indicating the maximum value Max, data indicating the minimum value Min, and code data (2 bits × 4 pixels) given to each pixel is generated.
図5は、1つのブロック(大エリア)に着目して、その圧縮から伸張までの過程を示している。このブロックは1ライン目のエリアA1と、2ライン目のエリアA2と、3ライン目のエリアA3と、4ライン目のエリアA4とから構成される。 FIG. 5 shows the process from compression to decompression, focusing on one block (large area). This block includes an area A1 for the first line, an area A2 for the second line, an area A3 for the third line, and an area A4 for the fourth line.
第1圧縮部11で圧縮する際に、たとえば、1ライン目のエリアA1は、最大値50h、最小値32hであり、閾値1=39h、閾値2=41h、閾値3=48hと算出される。そして、階調値Dが、50h≧D>48hの画素は符号データ「11」に、48h≧D>41hの画素は符号データ「10」に、41h≧D>39hの画素は符号データ「01」に、39h≧D≧32hの画素は符号データ「00」に変換されて一次圧縮データE1が生成される。
When the
4ライン分の一次圧縮が終了した後、第2圧縮部12は一次圧縮データをブロック単位に圧縮する。すなわち、圧縮対象のブロックを構成する4ラインに分散して存在する4つのエリアの一次圧縮データを第1〜第4ラインメモリ21〜24から読み出し、これらの一次圧縮データを圧縮して二次圧縮データを生成する。生成された二次圧縮データは、BTC伸張部13で伸張され、伸張後の画像データEXが生成される。
After the primary compression for four lines is completed, the
図5の例では、1ライン目のエリアA1に対応する一次圧縮データE1と、2ライン目のエリアA2に対応する一次圧縮データE2と、3ライン目のエリアA3に対応する一次圧縮データE3と、4ライン目のエリアA4に対応する一次圧縮データE4に基づいて、これら4つのエリアA1〜A4で構成されたブロック単位の二次圧縮が行われる。 In the example of FIG. 5, primary compressed data E1 corresponding to the area A1 of the first line, primary compressed data E2 corresponding to the area A2 of the second line, and primary compressed data E3 corresponding to the area A3 of the third line, Based on the primary compression data E4 corresponding to the area A4 of the fourth line, secondary compression in block units constituted by these four areas A1 to A4 is performed.
この際、第2圧縮部12は、ブロックを構成する複数のエリア(4つのエリア)分の一次圧縮データE1〜E4を伸張した場合に得られる画像データを、ブロック単位に圧縮する。詳細には、図6に示すように、各一次圧縮データE1〜E4をそれぞれ伸張して、1ブロック分の伸張された画像データ(中間画像データ)MEを生成し、この1ブロック分の中間画像データMEを改めて各画素4階調2ビットとなるようにBTC圧縮して二次圧縮データEEを生成する。
At this time, the
各エリアの一次圧縮データの伸張は次のようにして行う。一次圧縮データ内のデータが示す最大値Maxを代表値4に、最小値Minを代表値1に、最大値Maxと最小値Minとを両端とする階調範囲を3等分する境界値のうち小さい方を代表値2に、大きい方を代表値3に設定する。そして、一次圧縮データに含まれる各符号データを、符号データ「00」は代表値1に、符号データ「01」は代表値2に、符号データ「10」は代表値3に、符号データ「11」は代表値4に変換して画像データに伸張する。
The decompression of the primary compressed data in each area is performed as follows. Among the boundary values that divide the gradation range having the maximum value Max indicated by the data in the primary compressed data into the
各一次圧縮データE1〜E4を伸張して得た中間画像データMEに対する圧縮は次のようにして行われる。中間画像データMEに含まれる16画素の中で階調値の最大値Maxと最小値Minとを求め、最大値Maxと最小値Minとを両端とする階調範囲を4つの領域に分割(ここでは、4等分)する閾値1、閾値2、閾値3(閾値1<閾値2<閾値3とする)を算出し、画素の階調値Dが、
最大値≧D>閾値3ならば、領域3、符号データ「11」
閾値3≧D>閾値2ならば、領域2、符号データ「10」
閾値2≧D>閾値1ならば、領域1、符号データ「01」
閾値1≧D≧最小値ならば、領域0、符号データ「00」
をその画素に対する符号データとして与える。そして、最大値Maxを示すデータと最小値Minを示すデータと各画素に与えた符号データ(2ビット×16画素)とから構成される二次圧縮データを生成する。図6の例では中間画像データ内の最大値MaxはB6h、最小値Minは32hであり、閾値1=53h、閾値2=74h、閾値3=95hと算出される。そして、階調値Dが、B6h≧D>95hの画素は符号データ「11」に、95h≧D>74hの画素は符号データ「10」に、74h≧D>53hの画素は符号データ「01」に、53h≧D≧32hの画素は符号データ「00」に変換されて二次圧縮データEEが生成される。
Compression of the intermediate image data ME obtained by expanding the primary compression data E1 to E4 is performed as follows. Among the 16 pixels included in the intermediate image data ME, the maximum value Max and the minimum value Min of the gradation value are obtained, and the gradation range having both ends of the maximum value Max and the minimum value Min is divided into four regions (here Then,
If maximum value ≧ D>
If
If
If
Is given as code data for the pixel. Then, secondary compressed data including data indicating the maximum value Max, data indicating the minimum value Min, and code data (2 bits × 16 pixels) given to each pixel is generated. In the example of FIG. 6, the maximum value Max in the intermediate image data is B6h, the minimum value Min is 32h, and the
なお、1つのブロックを構成する複数エリア分の一次圧縮データから二次圧縮データを生成する過程で中間画像データMEを実際にメモリ上に生成する必要はなく、エリア毎の代表値1〜4と、ブロック単位での最大値Max、最小値Minと、閾値1〜閾値3とから、一次圧縮データの各符号データを二次圧縮データの符号データに変換する処理を行うように構成されてもよい。
It is not necessary to actually generate the intermediate image data ME on the memory in the process of generating the secondary compressed data from the primary compressed data for a plurality of areas constituting one block, and
このように、圧縮対象の画像データをライン毎に第1圧縮部11で一次圧縮し、生成された一次圧縮データを4ラインに跨るブロック単位に圧縮するので、元の画像データから直接ブロック単位にBTC圧縮する場合に比べて、画像データを保持する第1〜第4ラインメモリ21〜24のメモリ容量を削減することができる。すなわち、4画素×4画素で構成される1ブロック分の元画像データは、8ビット×16画素=136ビットになるが、一次圧縮データでは1エリア分が最大値8ビット+最小値8ビット+2ビット×4画素=24ビットなので、4エリア分で96ビットとなる。したがって、元画像データから直にブロック単位で圧縮する場合に比べてラインメモリとして必要なメモリ容量を3/4に削減することができる。
In this way, the image data to be compressed is primarily compressed by the
また、1ブロック分の一次圧縮データを伸張した場合に得られる画像データをブロック単位にBTC圧縮するので、元画像データを直にブロック単位に圧縮した場合に相当する二次圧縮データを得ることができる。したがって、伸張時は2段階に伸張する必要はなく、二次圧縮データを伸張することで画像データを直接得ることができる。また、元画像データから直にブロック単位でBTC圧縮する場合とほぼ同一の圧縮データを得ることができる。図6の例では、二次圧縮データは、元の画像データから直にブロック単位でBTC圧縮した場合の圧縮データ(図8の圧縮データ81)と同一であり、伸張された画像データも一致している。
Further, since the image data obtained when the primary compressed data for one block is expanded is BTC-compressed for each block, secondary compressed data corresponding to the case where the original image data is directly compressed for each block can be obtained. it can. Therefore, when decompressing, it is not necessary to decompress in two stages, and image data can be obtained directly by decompressing secondary compressed data. Also, almost the same compressed data can be obtained from the original image data as when BTC compression is performed in units of blocks. In the example of FIG. 6, the secondary compressed data is the same as the compressed data (compressed
図7は、画像圧縮伸張装置10が行う圧縮伸張の動作の流れを示している。カウンタ値を0に初期化(ステップS101)する。その後、カウンタ値が1になるとスキャナ部5から圧縮対象の画像データ(元画像データ)を1ライン分入力し(ステップS102)、これを順次一次圧縮し(ステップS103)、生成された一次圧縮データをイネーブル信号EN1の値に対応するラインメモリ21〜24に保持する(ステップS104)。
FIG. 7 shows the flow of the compression / decompression operation performed by the image compression /
カウンタ14のカウンタ値が5でなければ(ステップS105;N)、ステップS102に戻って次のラインの一次圧縮を行う。カウンタ値が5ならば(ステップS105;Y)、第1〜第4ラインメモリ21〜24に保持されている一次圧縮データに基づいて、ブロック単位の二次圧縮を行う(ステップS106)。その後、二次圧縮データを順次BTC伸張部13で伸張し(ステップS107)、プリンタ部7へ出力する(ステップS108)。1ページ分のすべての画像データを処理終了か否かを判断し(ステップS109)、未終了なら(ステップS109;N)、ステップS101に戻って次の4ラインを処理する。終了なら(ステップS109;Y)、本処理を終了する(エンド)。
If the counter value of the
以上、本発明の実施の形態を図面によって説明してきたが、具体的な構成は実施の形態に示したものに限られるものではなく、本発明の要旨を逸脱しない範囲における変更や追加があっても本発明に含まれる。 The embodiment of the present invention has been described with reference to the drawings. However, the specific configuration is not limited to that shown in the embodiment, and there are changes and additions within the scope of the present invention. Are also included in the present invention.
たとえば、実施の形態では、第1圧縮部11は1ラインの画像データを4画素のエリア単位に分割して一次圧縮するようにしたが、必ずしも、一次圧縮はラインを対象に行われなくてもかまわない。たとえば、2画素×2画素の矩形領域を一次圧縮のエリアとし、複数エリア分の一次圧縮データに基づき、その複数エリアで構成される大エリア単位の二次圧縮を行うようにされてもよい。このとき、一次圧縮データをそのまま圧縮するのではなく、一次圧縮データを伸張した場合に得られる画像データを大エリア単位に圧縮する。すなわち、第1圧縮部は、圧縮対象の画像の画像データを所定のエリア単位に圧縮した一次圧縮データを生成し、第2圧縮部は、第1圧縮部によって生成された複数のエリア分の一次圧縮データに基づいて、前記複数エリア分の一次圧縮データを伸張した場合に得られる画像データを、前記複数のエリアで構成される大エリア単位に圧縮するように構成されてもよい。
For example, in the embodiment, the
このほか、元画像データにおける1画素あたりのビット数、圧縮時の1画素あたりの符号データのビット数、1つのエリアのサイズ、1つのブロックのサイズなどは実施の形態で例示したものに限定されない。ただし、(元画像データの1画素あたりのビット数×2+一次圧縮データにおける1画素あたりの符号データのビット数×1つのエリアの画素数)<(元の画像データの1画素あたりのビット数×1つのエリアの画素数)、の関係が成立するように、エリアのサイズや符号データのビット数を設定する。これにより、ラインメモリのメモリ容量が削減される。 In addition, the number of bits per pixel in the original image data, the number of bits of code data per pixel at the time of compression, the size of one area, the size of one block, etc. are not limited to those exemplified in the embodiment. . However, (number of bits per pixel of original image data × 2 + number of bits of code data per pixel in primary compressed data × number of pixels in one area) <(number of bits per pixel of original image data × The size of the area and the number of bits of code data are set so that the relationship of the number of pixels in one area) is established. Thereby, the memory capacity of the line memory is reduced.
画像圧縮伸張装置10に画像データを供給する装置はスキャナ部5に限定されず、供給源は問わない。たとえば、外部から通信を介して受信される画像データであってもかまわない。
The apparatus that supplies the image data to the image compression /
5…スキャナ部
7…プリンタ部
10…画像圧縮伸張装置
11…第1圧縮部
12…第2圧縮部
13…BTC伸張部
14…カウンタ
15…制御部
21…第1ラインメモリ
22…第2ラインメモリ
23…第3ラインメモリ
24…第4ラインメモリ
A1〜A4…エリア
BL…1ブロック分の元画像データ
E、E1〜E4…一次圧縮データ
LG…1ライン分の画像データ
ME…中間画像データ
EE…二次圧縮データ
EX…伸張後の画像データ
DESCRIPTION OF
Claims (5)
前記第1圧縮部によって生成された一次圧縮データを、複数のラインに分散する複数のエリアで構成された大エリア単位に圧縮する第2圧縮部と、
を有する
ことを特徴とする画像圧縮装置。 A first compression unit that generates primary compression data obtained by compressing one line of image data in an area unit of a predetermined number of pixels;
A second compression unit that compresses the primary compressed data generated by the first compression unit into a large area unit composed of a plurality of areas distributed over a plurality of lines;
An image compression apparatus comprising:
ことを特徴とする請求項1に記載の画像圧縮装置。 The said 2nd compression part compresses the image data obtained when the primary compression data for several areas which comprise the said large area are expand | extended in the said large area unit. Image compression device.
前記第2圧縮部は、前記記憶部に記憶された、前記大エリアを構成する複数のエリア分の一次圧縮データに基づいて前記大エリアの圧縮を行う
ことを特徴とする請求項1または2に記載の画像圧縮装置。 A storage unit that stores primary compression data generated by the first compression unit is provided. The second compression unit is based on primary compression data for a plurality of areas constituting the large area, which is stored in the storage unit. The image compression apparatus according to claim 1, wherein the large area is compressed.
前記第2圧縮部は、大エリアを構成する複数のエリア分の一次圧縮データが前記記憶部に記憶された後に、前記大エリアの圧縮を行う
ことを特徴とする請求項3に記載の画像圧縮装置。 The first compression unit compresses image data for one line and then compresses the next line,
The image compression according to claim 3, wherein the second compression unit compresses the large area after primary compressed data for a plurality of areas constituting the large area is stored in the storage unit. apparatus.
前記第2圧縮部は、前記大エリアを1ブロックとしたBTC圧縮を行う
ことを特徴とする請求項1乃至4のいずれか1つに記載の画像圧縮装置。 The first compression unit performs BTC compression with the area as one block,
The image compression apparatus according to any one of claims 1 to 4, wherein the second compression unit performs BTC compression with the large area as one block.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008053385A JP4771095B2 (en) | 2008-03-04 | 2008-03-04 | Image compression device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008053385A JP4771095B2 (en) | 2008-03-04 | 2008-03-04 | Image compression device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2009212789A true JP2009212789A (en) | 2009-09-17 |
| JP4771095B2 JP4771095B2 (en) | 2011-09-14 |
Family
ID=41185519
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2008053385A Expired - Fee Related JP4771095B2 (en) | 2008-03-04 | 2008-03-04 | Image compression device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4771095B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10089953B2 (en) | 2012-11-28 | 2018-10-02 | Synaptics Japan Gk | Image processing circuit for image compression and decompression and display panel driver incorporating the same |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH02135871A (en) * | 1988-11-17 | 1990-05-24 | Oki Electric Ind Co Ltd | Facsimile equipment |
| JPH11331614A (en) * | 1998-05-21 | 1999-11-30 | Minolta Co Ltd | Image processing unit |
| JP2001268369A (en) * | 2000-01-11 | 2001-09-28 | Minolta Co Ltd | Device and method for encoding image data, recording medium and image forming device |
-
2008
- 2008-03-04 JP JP2008053385A patent/JP4771095B2/en not_active Expired - Fee Related
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH02135871A (en) * | 1988-11-17 | 1990-05-24 | Oki Electric Ind Co Ltd | Facsimile equipment |
| JPH11331614A (en) * | 1998-05-21 | 1999-11-30 | Minolta Co Ltd | Image processing unit |
| JP2001268369A (en) * | 2000-01-11 | 2001-09-28 | Minolta Co Ltd | Device and method for encoding image data, recording medium and image forming device |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10089953B2 (en) | 2012-11-28 | 2018-10-02 | Synaptics Japan Gk | Image processing circuit for image compression and decompression and display panel driver incorporating the same |
Also Published As
| Publication number | Publication date |
|---|---|
| JP4771095B2 (en) | 2011-09-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP4101312B2 (en) | Graphic image compression system and method | |
| US8452083B2 (en) | Image processing apparatus, image processing method, and computer-readable medium | |
| US20110158525A1 (en) | Image processing apparatus and image processing method | |
| JP3661520B2 (en) | Image processing apparatus, image processing method, image forming apparatus, and recording medium recording program | |
| JP5479225B2 (en) | Image processing apparatus, image processing method, and program | |
| US7742199B2 (en) | System and method for compressing and rotating image data | |
| JP2018058295A (en) | Image processing apparatus, image processing method, and program | |
| JP4771095B2 (en) | Image compression device | |
| JP2011120080A (en) | Image forming apparatus | |
| JP2002229759A (en) | Code converting method for supporting image conversion | |
| JP3901514B2 (en) | Image compression method, decompression method and program | |
| JP5441676B2 (en) | Image processing apparatus and processing method thereof | |
| US8494261B2 (en) | Image processing apparatus, image processing method, and computer-readable medium | |
| JP4610450B2 (en) | Image processing apparatus for processing fixed length compressed image and packing data of attribute information | |
| JP2008236084A (en) | Image processing method, image processing apparatus, image processing program, and recording medium | |
| JP4320497B2 (en) | Image processing device | |
| JP3997851B2 (en) | Image coding apparatus and image coding program | |
| JPH09168092A (en) | Image processing device | |
| JP3818239B2 (en) | Image processing apparatus and image processing method | |
| JP5599033B2 (en) | Image processing apparatus and method, and program | |
| JP4802853B2 (en) | Image processing apparatus and image processing program | |
| JP2004254187A (en) | Information processing equipment | |
| JP3463643B2 (en) | Compression device, compression method, recording medium recording compression method, printer | |
| JP5606223B2 (en) | Image processing apparatus and processing method thereof | |
| JP2012095227A (en) | Image processing system, image processing method, and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20101116 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20101124 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110118 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20110525 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110607 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140701 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| LAPS | Cancellation because of no payment of annual fees |