[go: up one dir, main page]

JP2009212789A - Image compressor - Google Patents

Image compressor Download PDF

Info

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
Application number
JP2008053385A
Other languages
Japanese (ja)
Other versions
JP4771095B2 (en
Inventor
Atsushi Herai
篤志 戸來
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.)
Konica Minolta Business Technologies Inc
Original Assignee
Konica Minolta Business Technologies Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Konica Minolta Business Technologies Inc filed Critical Konica Minolta Business Technologies Inc
Priority to JP2008053385A priority Critical patent/JP4771095B2/en
Publication of JP2009212789A publication Critical patent/JP2009212789A/en
Application granted granted Critical
Publication of JP4771095B2 publication Critical patent/JP4771095B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image compressor with which compression per block over a plurality of lines is attained by reducing capacity of a memory for temporary storage used in compression. <P>SOLUTION: The image compressor is provided with: a first compression part 11 which compresses image data of one line per area with the predetermined number of pixels (for example, four pixels) to generate primary compression data; first to fourth line memories 21-24 which store the primary compression data generated by the first compression part 11 by every line; and a second compression part which performs compression per large area (block) of four pixels×four pixels constituted of four areas distributed to four lines based on the primary compression data stored in the line memories. <P>COPYRIGHT: (C)2009,JPO&INPIT

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 original image data 80 for one block of 4 pixels × 4 pixels in which each pixel is represented by 8-bit 256 gradations (in the figure, the gradation value is expressed in hexadecimal). A case where BTC compression is performed on code data of 4 bits (four gradations) and further expanded is illustrated.

圧縮時にはブロック内の階調値の最大値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 compressed data 81 is composed of code data for these 16 pixels, data indicating a maximum value B6h and a minimum value 32h, and the amount of data is 6 bytes.

伸張時には、圧縮データ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 compressed data 81 is set to the representative value 4 corresponding to the code data “11”, and the minimum value 32h is set to the representative value 1 corresponding to the code data “00”. Of the two boundary values that divide the range indicated by the value (B6h to 32h) into three equal parts, the larger 8Ah corresponds to the representative value 3 corresponding to the code data “10”, and the smaller 5Eh corresponds to the code data “01”. Set to a representative value of 2. Then, each code data included in the compressed data 81 is converted into a representative value corresponding to the value of the code data, so that the image data 82 for one block is expanded.

また、圧縮率を高めるために、ブロック単位に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).

特開2007−43577号公報JP 2007-43577 A

複合機などでは、スキャナ部から出力される画像データを、スキャナ部での原稿の読み取り動作と同時に並行して圧縮することが行われる。図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 scanner unit 91 sequentially outputs image data to be compressed in line units. The line memory 1 is a memory that holds image data for the first line, the line memory 2 is a memory that holds image data for the second line, the line memory 3 is a memory that holds image data for the third line, and the line memory 4 is 4 This is a memory for holding the image data of the line. The BTC compression unit 95 is a circuit that performs BTC-compliant compression processing with 4 pixels × 4 pixels as one block, and the BTC decompression unit 96 is a circuit that performs BTC-compliant decompression processing. The counter 97 counts the number of lines, outputs an enable signal for starting processing to each unit, and the control unit 98 controls the whole.

制御部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 control unit 98 operates the counter 97 and outputs each enable signal EN1 to EN3 from the counter 97, thereby operating each circuit unit. Specifically, the counter value and each enable signal are 0 in the initial state. When the counter value becomes 1, the enable signal EN1 becomes 1, and the image data for one line input from the scanner unit 91 is held in the line memory 1. Similarly, when the counter value becomes 2, the enable signal EN1 becomes 2, and the image data for one line from the scanner unit 91 is held in the line memory 2. When the counter value becomes 3, the enable signal EN1 becomes 3, and the image data for one line from the scanner unit 91 is held in the line memory 3. When the counter value becomes 4, the enable signal EN1 becomes 4, and the scanner unit 91 Is stored in the line memory 4.

カウンタ値が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 compression unit 95 performs BTC compression processing on the image data held in the line memories 1 to 4, and when the counter value becomes 6, the enable signal EN3. In response to this, the BTC decompression unit 96 decompresses the BTC compressed data, and the decompressed image data is output to the printer unit 99 and printed. FIG. 10 shows a timing chart of the above operation.

このように、ライン毎に順次入力される画像データを、複数ラインに跨るブロックを単位に圧縮するためには、少なくともブロックに含まれる複数ライン分のラインメモリを必要とするので、圧縮前の画像データを保持するためのメモリ容量が嵩むという問題があった。   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 Patent Document 1 is combined into a plurality of blocks and subjected to secondary compression.

本発明は、上記の問題を解決しようとするものであり、複数ラインに跨るブロック単位の圧縮を、圧縮時に使用する一時保持用のメモリの容量を少なくして実現可能な画像圧縮装置を提供することを目的としている。   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 / decompression apparatus 10 according to an embodiment of the present invention. The image compression / decompression apparatus 10 has a function of compressing input image data and a function of expanding compressed image data. The image compression / decompression apparatus 10 is connected to a scanner unit 5 serving as a supply source of image data to be compressed and a printer unit 7 that prints an image on a recording sheet based on the decompressed image data.

スキャナ部5は、原稿画像を主走査方向に1ライン分読み取るラインイメージセンサと、このラインイメージセンサによる読み取り位置を主走査方向に対して直交する副走査方向へ相対移動させる相対移動部とを備えている。ラインイメージセンサの原稿に対する読み取り位置を副操作方向へ相対移動させながらライン単位の読み取り動作を繰り返すことで、二次元平面をなす原稿の画像を読み取るように構成されている。ラインイメージセンサは、読み取った1ライン分の画像に対応するアナログ信号をラインの一端から他端に向けて順次出力し、該アナログ信号はその出力順にディジタルの画像データに変換されてスキャナ部5から画像圧縮伸張装置10へ出力される。ここでは、スキャナ部5は、各画素を8ビット256階調で表した画像データを出力する。   The scanner unit 5 includes a line image sensor that reads an original image for one line in the main scanning direction, and a relative moving unit that relatively moves a reading position by the line image sensor in a sub-scanning direction orthogonal to the main scanning direction. ing. By repeating the reading operation in units of lines while relatively moving the reading position of the line image sensor with respect to the original in the sub-operation direction, an image of the original on a two-dimensional plane is read. The line image sensor sequentially outputs an analog signal corresponding to the read image for one line from one end of the line to the other end, and the analog signal is converted into digital image data in the output order from the scanner unit 5. The image is output to the image compression / decompression apparatus 10. Here, the scanner unit 5 outputs image data in which each pixel is represented by 8-bit 256 gradations.

画像圧縮伸張装置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 / decompression apparatus 10 holds first data for sequentially compressing image data sequentially input from the scanner unit 5 and first compression data for one line each of primary compression data output from the first compression unit 11. 4th line memory 21-24, the 2nd compression part 12 which compresses the primary compression data currently hold | maintained at the 1st-4th line memories 21-24, and outputs secondary compression data, The 2nd compression part 12 Are provided with a BTC decompression unit 13 for decompressing the secondary compressed data output to the image data, a counter 14, and a control unit 15.

第1圧縮部11は、1ラインの画像データを所定画素数のエリア単位に圧縮する。ここでは、図2に示すように1ライン分の画像データLGをその先頭から4画素ずつのエリア単位にBTC圧縮し、各エリアに対応する一次圧縮データEを出力する。   The first compression unit 11 compresses one line of image data into areas of a predetermined number of pixels. Here, as shown in FIG. 2, the image data LG for one line is BTC-compressed in units of areas of four pixels from the head, and primary compressed data E corresponding to each area is output.

第1圧縮部11は、4N−3(Nは1以上の整数)ライン目の画像データを圧縮した一次圧縮データを第1ラインメモリ21に出力して保持させる。また、4N−2ライン目の画像データを圧縮した一次圧縮データを第2ラインメモリ22に出力して保持させ、4N−1ライン目の画像データを圧縮した一次圧縮データを第3ラインメモリ23に出力して保持させ、4Nライン目の画像データを圧縮した一次圧縮データを第4ラインメモリ24に出力して保持させる。   The first compression unit 11 outputs primary compressed data obtained by compressing the image data of the 4N-3 (N is an integer of 1 or more) line to the first line memory 21 to hold it. Also, the primary compressed data obtained by compressing the image data of the 4N-2 line is output to the second line memory 22 and held, and the primary compressed data obtained by compressing the image data of the 4N-1 line is stored in the third line memory 23. The first compressed data obtained by compressing the image data of the 4N-th line is output to the fourth line memory 24 and held.

第2圧縮部12は、第1圧縮部11によって生成された一次圧縮データを、複数のラインに分散する複数のエリアで構成された大エリア単位に圧縮する。ここでは、第2圧縮部12は、第1〜第4ラインメモリ21〜24に記憶されている連続する4ラインからそれぞれラインの先頭から同一のオフセット位置にある4つのエリアで構成されるブロック(大エリア)を単位にBTC圧縮する。すなわち、二次圧縮は、図3に示すように、原稿画像Gの左上を基点として4画素(主走査方向)×4画素(副走査方向)のブロックBL単位に行われる。   The 2nd compression part 12 compresses the primary compression data produced | generated by the 1st compression part 11 to the large area unit comprised by the several area disperse | distributed to several lines. Here, the second compression unit 12 is a block composed of four areas at the same offset position from the head of each line from the four consecutive lines stored in the first to fourth line memories 21 to 24. BTC compression is performed in units of large areas. That is, as shown in FIG. 3, the secondary compression is performed in units of blocks BL of 4 pixels (main scanning direction) × 4 pixels (sub-scanning direction) with the upper left corner of the document image G as a base point.

BTC伸張部13は、二次圧縮データをブロック単位の画像データに伸張する。カウンタ14は、処理するライン数をカウントし、各部に対して処理開始のイネーブル信号を出力する。制御部15は画像圧縮伸張装置10の動作を統括制御する。   The BTC decompression unit 13 decompresses the secondary compressed data into image data in units of blocks. The counter 14 counts the number of lines to be processed and outputs a processing start enable signal to each unit. The control unit 15 performs overall control of the operation of the image compression / decompression apparatus 10.

画像圧縮伸張装置10は、マイクロプログラムを内蔵したシーケンサや論理回路などのハードウェア回路とメモリとで構成される。なお、画像圧縮伸張装置10は、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)などを備えたコンピュータ装置において所定のプログラムを実行することで実現されてもよい。   The image compression / decompression apparatus 10 includes a hardware circuit such as a sequencer or a logic circuit incorporating a microprogram, and a memory. The image compression / decompression apparatus 10 may be realized by executing a predetermined program in a computer apparatus including a CPU (Central Processing Unit), a ROM (Read Only Memory), a RAM (Random Access Memory), and the like.

画像圧縮伸張装置10は、制御部15によりカウンタ14を動作させ、カウンタ14からそのカウンタ値に対応した各イネーブル信号EN1〜EN3を出力させることにより、各回路部(第1圧縮部11、第2圧縮部12、BTC伸張部13)を動作させる。   The image compression / decompression apparatus 10 operates the counter 14 by the control unit 15 and outputs the enable signals EN1 to EN3 corresponding to the counter value from the counter 14, so that each circuit unit (the first compression unit 11, the second compression unit 11, and the second compression unit 11). The compression unit 12 and the BTC decompression unit 13) are operated.

詳細には、初期状態ではカウンタ14のカウンタ値、各イネーブル信号EN1〜EN3は0になっている。制御部15がスキャナ部5に対して原稿の読み取り開始を指示すると、スキャナ部5は原稿の読み取り動作を開始する。   Specifically, in the initial state, the counter value of the counter 14 and the enable signals EN1 to EN3 are 0. When the control unit 15 instructs the scanner unit 5 to start reading a document, the scanner unit 5 starts a document reading operation.

カウンタ14のカウンタ値が1になるとイネーブル信号EN1が1になり、これに応じて第1圧縮部11はスキャナ部5から1ライン分((4N−3)ライン目)の画像データを順次取り込み、その画像データを隣接4画素のエリア単位に一次圧縮し、生成された各エリアの一次圧縮データを、順次、第1ラインメモリ21に保持させる。   When the counter value of the counter 14 becomes 1, the enable signal EN1 becomes 1, and in response to this, the first compression unit 11 sequentially captures image data for one line ((4N-3) line) from the scanner unit 5, The image data is primarily compressed in units of areas of adjacent four pixels, and the generated primary compressed data of each area is sequentially held in the first line memory 21.

同様に、カウンタ14のカウンタ値が2になるとイネーブル信号EN1が2になり、これに応じて第1圧縮部11はスキャナ部から次の1ライン分((4N−2)ライン目)の画像データを順次取り込み、その画像データを隣接4画素のエリア単位に一次圧縮し、生成された各エリアの一次圧縮データを、順次、第2ラインメモリ22に保持させる。   Similarly, when the counter value of the counter 14 becomes 2, the enable signal EN1 becomes 2, and in response to this, the first compression unit 11 receives image data for the next one line ((4N-2) line) from the scanner unit. Are sequentially compressed, and the image data is primarily compressed in units of adjacent four pixels, and the generated primary compressed data of each area is sequentially held in the second line memory 22.

カウンタ14のカウンタ値が3になるとイネーブル信号EN1が3になり、これに応じて第1圧縮部11はスキャナ部5から次の1ライン分((4N−1)ライン目)の画像データを順次取り込み、その画像データを隣接4画素のエリア単位に一次圧縮し、生成された各エリアの一次圧縮データを、順次、第3ラインメモリ23に保持させる。   When the counter value of the counter 14 becomes 3, the enable signal EN1 becomes 3, and in response to this, the first compression unit 11 sequentially outputs image data for the next one line ((4N-1) line) from the scanner unit 5. Then, the image data is subjected to primary compression in units of adjacent four pixels, and the generated primary compressed data of each area is sequentially held in the third line memory 23.

カウンタ14のカウンタ値が4になるとイネーブル信号EN1が4になり、これに応じて第1圧縮部11はスキャナ部から次の1ライン分((4N)ライン目)の画像データを順次取り込み、その画像データを隣接4画素のエリア単位に一次圧縮し、生成された各エリアの一次圧縮データを、順次、第4ラインメモリ24に保持させる。   When the counter value of the counter 14 becomes 4, the enable signal EN1 becomes 4, and in response to this, the first compression unit 11 sequentially takes in the image data for the next one line ((4N) line) from the scanner unit, Image data is primarily compressed in units of adjacent four pixels, and the generated primary compressed data of each area is sequentially held in the fourth line memory 24.

カウンタ値が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 second compression unit 12 secondarily compresses the primary compressed data held in the first to fourth line memories 21 to 24 in units of blocks (large areas). When the counter value becomes 6, the enable signal EN2 returns to 0, the enable signal EN3 becomes 1, the BTC decompression unit 13 BTC decompresses the secondary compressed data, and the decompressed image data is output to the printer unit 7. Printed. FIG. 4 shows a timing chart of the above operation.

なお、第2圧縮部12の出力する二次圧縮データをHDD(Hard Disk Drive)などの記憶装置に記憶しておき、後に出力要求を受けた時点でHDDから読み出してBTC伸張部13で伸張し、プリンタ部7で印刷出力するように構成されてもよい。   The secondary compressed data output from the second compression unit 12 is stored in a storage device such as an HDD (Hard Disk Drive), and is read out from the HDD and decompressed by the BTC decompression unit 13 when an output request is received later. The printer unit 7 may be configured to print out.

次に、第1圧縮部11による一次圧縮と第2圧縮部12による二次圧縮の詳細を説明する。   Next, details of primary compression by the first compression unit 11 and secondary compression by the second compression unit 12 will be described.

第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 first compression unit 11 primarily compresses each line in units of adjacent four pixels. Here, BTC compression is performed so that one pixel is represented by 4-gradation 2-bit code data. Specifically, the maximum value Max and the minimum value Min of the gradation values of pixels belonging to one area composed of four pixels adjacent in the main scanning direction are obtained, and the maximum value Max and the minimum value Min are determined at both ends. Threshold value 1, threshold value 2, and threshold value 3 (threshold value 1 <threshold value 2 <threshold value 3) for dividing the gradation range to be divided into four regions (here, divided into four equal parts) are calculated. And when it is set as the gradation value D of the pixel,
If maximum value ≧ D> threshold 3, region 3 and code data “11”
If threshold 3 ≧ D> threshold 2, area 2, code data “10”
If threshold 2 ≧ D> threshold 1, area 1 and code data “01”
If threshold 1 ≧ D ≧ minimum value, area 0, code data “00”
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 first compression unit 11 performs compression, for example, the area A1 of the first line has the maximum value 50h and the minimum value 32h, and is calculated as threshold 1 = 39h, threshold 2 = 41h, threshold 3 = 48h. A pixel with a gradation value D of 50h ≧ D> 48h is code data “11”, a pixel with 48h ≧ D> 41h is code data “10”, and a pixel with 41h ≧ D> 39h is code data “01”. , The pixels of 39h ≧ D ≧ 32h are converted into code data “00” to generate primary compressed data E1.

4ライン分の一次圧縮が終了した後、第2圧縮部12は一次圧縮データをブロック単位に圧縮する。すなわち、圧縮対象のブロックを構成する4ラインに分散して存在する4つのエリアの一次圧縮データを第1〜第4ラインメモリ21〜24から読み出し、これらの一次圧縮データを圧縮して二次圧縮データを生成する。生成された二次圧縮データは、BTC伸張部13で伸張され、伸張後の画像データEXが生成される。   After the primary compression for four lines is completed, the second compression unit 12 compresses the primary compressed data in units of blocks. That is, primary compressed data in four areas existing in four lines constituting a block to be compressed is read from the first to fourth line memories 21 to 24, and these primary compressed data are compressed and subjected to secondary compression. Generate data. The generated secondary compressed data is decompressed by the BTC decompression unit 13, and decompressed image data EX is generated.

図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 second compression unit 12 compresses the image data obtained when the primary compressed data E1 to E4 for a plurality of areas (four areas) constituting the block are expanded in units of blocks. Specifically, as shown in FIG. 6, each primary compression data E1 to E4 is expanded to generate expanded image data (intermediate image data) ME for one block, and this intermediate image for one block is generated. The data ME is again BTC-compressed so that each pixel has 4 gradations and 2 bits to generate secondary compressed data EE.

各エリアの一次圧縮データの伸張は次のようにして行う。一次圧縮データ内のデータが示す最大値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 representative value 4, the minimum value Min as the representative value 1, and the maximum value Max and the minimum value Min as both ends into three equal parts. The smaller value is set to representative value 2 and the larger value is set to representative value 3. Then, each code data included in the primary compressed data includes the code data “00” as the representative value 1, the code data “01” as the representative value 2, the code data “10” as the representative value 3, and the code data “11”. "Is converted into a representative value 4 and expanded into image data.

各一次圧縮データ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, threshold 1, threshold 2, and threshold 3 (threshold 1 <threshold 2 <threshold 3) are calculated, and the gradation value D of the pixel is
If maximum value ≧ D> threshold 3, region 3 and code data “11”
If threshold 3 ≧ D> threshold 2, area 2, code data “10”
If threshold 2 ≧ D> threshold 1, area 1 and code data “01”
If threshold 1 ≧ D ≧ minimum value, area 0, code data “00”
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 threshold value 1 = 53h, the threshold value 2 = 74h, and the threshold value 3 = 95h are calculated. Pixels with a gradation value D of B6h ≧ D> 95h are code data “11”, pixels with 95h ≧ D> 74h are code data “10”, and pixels with 74h ≧ D> 53h are code data “01”. In addition, pixels with 53h ≧ D ≧ 32h are converted into code data “00” to generate secondary compressed data EE.

なお、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 representative values 1 to 4 for each area Further, it may be configured to perform processing for converting each code data of the primary compressed data into code data of the secondary compressed data from the maximum value Max and the minimum value Min in the block unit and the threshold value 1 to the threshold value 3. .

このように、圧縮対象の画像データをライン毎に第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 first compression unit 11 for each line, and the generated primary compressed data is compressed in units of blocks over four lines, so that the original image data is directly in units of blocks. Compared with the case of BTC compression, the memory capacity of the first to fourth line memories 21 to 24 holding image data can be reduced. That is, the original image data for one block composed of 4 pixels × 4 pixels is 8 bits × 16 pixels = 136 bits, but in the primary compressed data, one area has a maximum value of 8 bits + a minimum value of 8 bits + 2 Since 4 bits × 24 pixels = 24 bits, it is 96 bits for 4 areas. Therefore, the memory capacity required for the line memory can be reduced to 3/4 compared with the case where the original image data is directly compressed in units of blocks.

また、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 data 81 in FIG. 8) when BTC compression is performed directly from the original image data in units of blocks, and the decompressed image data also matches. ing.

図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 / decompression apparatus 10. The counter value is initialized to 0 (step S101). Thereafter, when the counter value becomes 1, one line of image data (original image data) to be compressed is input from the scanner unit 5 (step S102), and this is subjected to primary compression sequentially (step S103), and the generated primary compressed data. Is held in the line memories 21 to 24 corresponding to the value of the enable signal EN1 (step S104).

カウンタ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 counter 14 is not 5 (step S105; N), the process returns to step S102 to perform primary compression of the next line. If the counter value is 5 (step S105; Y), secondary compression in units of blocks is performed based on the primary compression data held in the first to fourth line memories 21 to 24 (step S106). Thereafter, the secondary compressed data is sequentially decompressed by the BTC decompression unit 13 (step S107) and output to the printer unit 7 (step S108). It is determined whether or not the processing of all image data for one page has been completed (step S109). If the processing has not been completed (step S109; N), the process returns to step S101 to process the next four lines. If completed (step S109; Y), this process ends (end).

以上、本発明の実施の形態を図面によって説明してきたが、具体的な構成は実施の形態に示したものに限られるものではなく、本発明の要旨を逸脱しない範囲における変更や追加があっても本発明に含まれる。   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 first compression unit 11 divides one line of image data into 4-pixel area units and performs primary compression. However, the primary compression is not necessarily performed on a line. It doesn't matter. For example, a rectangular area of 2 pixels × 2 pixels may be used as an area for primary compression, and secondary compression may be performed on a large area basis including a plurality of areas based on primary compression data for a plurality of areas. At this time, the primary compressed data is not compressed as it is, but the image data obtained when the primary compressed data is expanded is compressed in units of large areas. That is, the first compression unit generates primary compressed data obtained by compressing image data of an image to be compressed in units of predetermined areas, and the second compression unit performs primary for a plurality of areas generated by the first compression unit. Based on the compressed data, the image data obtained when the primary compressed data corresponding to the plurality of areas is expanded may be compressed into a large area unit composed of the plurality of areas.

このほか、元画像データにおける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 / decompression apparatus 10 is not limited to the scanner unit 5, and the supply source is not limited. For example, it may be image data received from outside via communication.

本発明の実施の形態に係る画像圧縮伸張装置の概略構成を示すブロック図である。1 is a block diagram illustrating a schematic configuration of an image compression / decompression apparatus according to an embodiment of the present invention. 1ラインの画像データとこれを一次圧縮して得られる一次圧縮データとを対比して例示した説明図である。It is explanatory drawing which illustrated by contrasting the image data of 1 line, and the primary compression data obtained by carrying out the primary compression of this. 原稿と、各ラインとブロックとの関係を示す説明図である。It is explanatory drawing which shows the relationship between a document, each line, and a block. 画像圧縮伸張装置10の動作を示すタイミングチャートである。3 is a timing chart showing the operation of the image compression / decompression apparatus 10. 1つのブロック(大エリア)に着目して、その圧縮から伸張までの過程を例示した説明図である。It is explanatory drawing which illustrated the process from the compression to expansion | extension, paying attention to one block (large area). 1ブロック分の一次圧縮データから二次圧縮する過程を示す説明図である。It is explanatory drawing which shows the process of carrying out the secondary compression from the primary compression data for 1 block. 画像圧縮伸張装置10の動作シーケンスを示す流れ図である。3 is a flowchart showing an operation sequence of the image compression / decompression apparatus 10. 4画素×4画素のブロック単位にBTC圧縮して伸張した場合の各データを示す説明図である。It is explanatory drawing which shows each data at the time of BTC compression and expansion | extension by the block unit of 4 pixels x 4 pixels. 従来から使用されている画像圧縮伸張装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the image compression / decompression apparatus conventionally used. 図9に示す装置の動作タイミングを示すタイミングチャートである。10 is a timing chart showing the operation timing of the apparatus shown in FIG. 9.

符号の説明Explanation of symbols

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 SYMBOLS 5 ... Scanner part 7 ... Printer part 10 ... Image compression / expansion apparatus 11 ... 1st compression part 12 ... 2nd compression part 13 ... BTC expansion | extension part 14 ... Counter 15 ... Control part 21 ... 1st line memory 22 ... 2nd line memory 23 ... 3rd line memory 24 ... 4th line memory A1-A4 ... Area BL ... Original image data E, E1-E4 ... Primary compression data LG ... Image data for 1 line ME ... Intermediate image data EE ... Secondary compressed data EX ... Image data after decompression

Claims (5)

1ラインの画像データを所定画素数のエリア単位に圧縮した一次圧縮データを生成する第1圧縮部と、
前記第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:
前記第2圧縮部は、前記大エリアを構成する複数のエリア分の一次圧縮データを伸張した場合に得られる画像データを、前記大エリア単位に圧縮する
ことを特徴とする請求項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.
前記第1圧縮部が生成した一次圧縮データを記憶する記憶部を備え
前記第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.
前記第1圧縮部は、1ライン分の画像データを圧縮した後に次のラインの圧縮を行い、
前記第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.
前記第1圧縮部は、前記エリアを1ブロックとしたBTC圧縮を行い、
前記第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.
JP2008053385A 2008-03-04 2008-03-04 Image compression device Expired - Fee Related JP4771095B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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