JP2009212800A - Image compression apparatus - Google Patents

Image compression apparatus Download PDF

Info

Publication number
JP2009212800A
JP2009212800A JP2008053565A JP2008053565A JP2009212800A JP 2009212800 A JP2009212800 A JP 2009212800A JP 2008053565 A JP2008053565 A JP 2008053565A JP 2008053565 A JP2008053565 A JP 2008053565A JP 2009212800 A JP2009212800 A JP 2009212800A
Authority
JP
Japan
Prior art keywords
value
gradation
range
image
unit
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.)
Withdrawn
Application number
JP2008053565A
Other languages
Japanese (ja)
Inventor
Takashi Moromizato
尚 諸見里
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 JP2008053565A priority Critical patent/JP2009212800A/en
Publication of JP2009212800A publication Critical patent/JP2009212800A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image compression apparatus capable of compression without damaging a density difference in an intermediate color region even when both the intermediate color region and a line drawing region with a large density difference are present in the same block. <P>SOLUTION: A limited tone range (example; 64-192) narrower than a tone range (256 tones) that image data can take is set in a setting part 13, a maximum value/minimum value detection part 14 detects the maximum value and the minimum value within the limited tone range of a tone value in one block, a threshold generation part 15 divides the tone range having them at both ends into a plurality of regions, and a judgement part 16 judges whether or not the tone values of respective pixels are within the limited tone range. An encoding part 17 encodes the pixel whose tone value exceeds the upper end value of the limited tone range to a first code, the pixel whose tone value is less than the lower end value of the limited tone range to a second code, and the pixel within the limited tone range to the code corresponding to the region to which the tone value of the pixel belongs among the plurality of previously divided regions. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、画像データを圧縮する画像圧縮装置に係り、特に、圧縮対象の画像を所定画素数のブロック単位に圧縮する画像圧縮装置に関する。   The present invention relates to an image compression apparatus that compresses image data, and more particularly to an image compression apparatus that compresses an image to be compressed in blocks of a predetermined number of pixels.

デジタル複合機などの装置では、ビットマップ形式の画像データをメモリやハードディスク装置に保存する場合、必要な記憶容量を削減するために画像データを圧縮して保存することが行われる。   In an apparatus such as a digital multi-function peripheral, when image data in bitmap format is stored in a memory or a hard disk device, the image data is compressed and stored in order to reduce a necessary storage capacity.

静止画の圧縮方式の1つにBTC(Block Truncation Coding)圧縮方式がある。BTC圧縮では、圧縮対象の画像を所定の画素数(たとえば4画素×4画素)毎のブロックに分割する。そして、各ブロックを、そのブロックに属する画素の階調値の最大値と最小値(分布範囲を示す情報)と、該分布範囲内においてブロック内の各画素の階調値を元の画像データの階調数より少ない階調数で正規化(量子化)した符号データとによって表した圧縮データを生成する。   One of the still image 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). Then, for each block, the maximum and minimum values (information indicating the distribution range) of the gradation values of the pixels belonging to the block, and the gradation values of each pixel in the block within the distribution range are converted into the original image data. Compressed data represented by code data normalized (quantized) with a smaller number of gradations than the number of gradations is generated.

伸張時には、圧縮データに含まれる最大値と最小値が示す階調値の分布範囲から符号データの各値に対する代表値を決定し、圧縮データに含まれる各符号データをその対応する代表値の画像データに変換して画像を復元するようになっている。   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.

たとえば、図7は、各画素を8ビット256階調(図中では階調値を16進数で標記)で表した4画素×4画素の1ブロック分の元画像データ100を、1画素あたり2ビット(4階調)の符号データにBTC圧縮する場合を例示している。元画像データは1ブロックあたり16バイトのデータ量である。   For example, FIG. 7 shows the original image data 100 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 bit (4 gradations) code data is illustrated. The original image data has a data amount of 16 bytes per block.

圧縮時にはブロック内の階調値の最大値A0hと最小値40hとを両端とする分布範囲が4等分され、階調値Dが、最大値(A0h)≧D>閾値3(88h)の画素は符号データ「11」に、閾値3(88h)≧D>閾値2(70h)の画素は符号データ「10」に、閾値2(70h)≧D>閾値1(58h)の画素は符号データ「01」に、閾値1(58h)≧D≧最小値(40h)の画素は符号データ「00」に符号化される。圧縮データ101はこれら16画素分の符号データと最大値A0hと最小値40hとで構成され、そのデータ量は6バイトになる。   At the time of compression, the distribution range having the maximum value A0h and the minimum value 40h of the gradation value in the block as both ends is equally divided into four, and the gradation value D is a pixel whose maximum value (A0h) ≧ D> threshold value 3 (88h). Indicates code data “11”, pixels with threshold 3 (88h) ≧ D> threshold 2 (70h) indicate code data “10”, and pixels with threshold 2 (70h) ≧ D> threshold 1 (58h) indicate code data “11”. 01 ”, a pixel having a threshold value 1 (58h) ≧ D ≧ minimum value (40h) is encoded into code data“ 00 ”. The compressed data 101 is composed of code data for these 16 pixels, a maximum value A0h, and a minimum value 40h, and the data amount is 6 bytes.

伸張時には、圧縮データ101の示す最大値A0hを符号データ「11」に対応する代表値4に、最小値40hを符号データ「00」に対応する代表値1に、この最大値と最小値が示す範囲(A0h〜40h)を3つに等分割する2つの境界値のうち大きい方の80hを符号データ「10」に対応する代表値3に、小さい方の60hを符号データ「01」に対応する代表値2に設定する。そして、圧縮データ101に含まれる各符号データをその符号データの値に対応する代表値に変換することで1ブロック分の画像データ102に伸張するようになっている。   At the time of expansion, the maximum value A0h indicated by the compressed data 101 indicates the representative value 4 corresponding to the code data “11”, and the minimum value 40h indicates the representative value 1 corresponding to the code data “00”. Of the two boundary values that equally divide the range (A0h to 40h) into three, the larger 80h corresponds to the representative value 3 corresponding to the code data “10”, and the smaller 60h corresponds to the code data “01”. Set to representative value 2. Each code data included in the compressed data 101 is converted into a representative value corresponding to the value of the code data, so that the image data 102 for one block is expanded.

BTC圧縮では、ブロック内の階調値の分布範囲を符号データのビット数に応じた階調数に正規化するので、ブロック内の階調値の分布範囲が広くなるほど、各画素の元の階調値と圧縮・伸張した後の階調値との誤差が大きくなるおそれがある。   In the BTC compression, the gradation value distribution range in the block is normalized to the number of gradations corresponding to the number of bits of the code data. Therefore, as the gradation value distribution range in the block becomes wider, the original scale of each pixel is increased. There is a possibility that an error between the tone value and the gradation value after compression / expansion becomes large.

そこで、各ブロックが濃度変化のほとんどない平坦部と、2値的な濃度分布を持つ準平坦部と、濃度変化の激しいエッジ部のいずれかに該当するかを判別し、平坦部・準平坦部・エッジ部によって最適な符号化方法を選択する事で画像品質や圧縮率の向上を図るようにした画像処理装置がある(たとえば、特許文献1参照。)。   Therefore, it is determined whether each block corresponds to one of a flat part having almost no density change, a quasi-flat part having a binary density distribution, and an edge part having a strong density change, and a flat part or a quasi-flat part. There is an image processing apparatus that improves image quality and compression rate by selecting an optimal encoding method according to an edge portion (see, for example, Patent Document 1).

特開平6−121175号公報JP-A-6-121175

特許文献1に開示された装置のように、ブロックごとに符号化方法を最適化する技術では、1つのブロック内に濃度変化の激しい領域と濃度変化のほとんどない領域とが混在すると、濃度変化の激しい領域に適した符号化方法が選択され、濃度変化のほとんどない領域の濃淡がなくなってしまうという問題がある。   As in the device disclosed in Patent Document 1, in the technique of optimizing the encoding method for each block, if a region with a strong density change and a region with little density change are mixed in one block, the density change There is a problem that the coding method suitable for the intense region is selected, and the density of the region having almost no density change is lost.

たとえば、同じブロック内に濃度変化のほとんどない中間色の多い写真や絵などの画像(中間色領域)と、コントラストの高いテキストなどの画像(線画領域)の両方が含まれる場合、圧縮後に中間色領域の濃淡がなくなってしまう。図8はその一例を示している。斜線を施した部分は中間色領域であり、斜線の施されていない部分はコントラストの高い線画領域である。このブロックの画像を1画素あたり2ビット(4階調)にBTC圧縮して伸張すると、元画像の中間色領域にあった微妙な濃度差が消えてしまう。たとえば、画素aと画素bは元画像データ110では階調値60hと階調値70hであるが、圧縮/伸張後の画像データ112においてはいずれも代表値55hに伸張されて濃度差が失われている。   For example, if the same block contains both images (intermediate color areas) such as photographs and pictures with many intermediate colors that have almost no density change and images (line drawing areas) such as high-contrast text, the density of the intermediate color areas after compression Will disappear. FIG. 8 shows an example. The shaded portion is a neutral color region, and the shaded portion is a high-contrast line drawing region. When this block image is decompressed by BTC compression to 2 bits (4 gradations) per pixel, the subtle density difference in the intermediate color area of the original image disappears. For example, the pixel a and the pixel b have the gradation value 60h and the gradation value 70h in the original image data 110, but in the image data 112 after compression / expansion, both are expanded to the representative value 55h and the density difference is lost. ing.

この欠点を解消する為に、圧縮時の各画素の階調数を増やす(符号データのビット数をたとえば、1画素あたり3ビットに増やす)といった方法もあるが、中間色領域と線画領域の濃淡差が大きい場合には効果が小さい。図9に、図8と同じ元画像データ110を各画素3ビットの符号データに圧縮して伸張した場合の例を示す。伸張後の画像データ115において画素aと画素bはいずれも代表値6Chに伸張されて濃度差が失われている。   In order to eliminate this drawback, there is a method of increasing the number of gradations of each pixel at the time of compression (increasing the number of bits of code data to 3 bits per pixel, for example), but the density difference between the intermediate color area and the line drawing area When is large, the effect is small. FIG. 9 shows an example in which the same original image data 110 as in FIG. 8 is compressed and expanded into code data of 3 bits for each pixel. In the expanded image data 115, both the pixel a and the pixel b are expanded to the representative value 6Ch, and the density difference is lost.

本発明は、上記の問題を解決しようとするものであり、同一ブロック内に中間色領域とこれに対して濃度差の大きい線画領域の双方が含まれる場合でも、中間色領域の濃度差を損なわずに圧縮可能な画像圧縮装置を提供することを目的としている。   The present invention is intended to solve the above-described problem. Even when both the intermediate color area and the line drawing area having a large density difference are included in the same block, the density difference of the intermediate color area is not impaired. An object of the present invention is to provide a compressible image compression apparatus.

かかる目的を達成するための本発明の要旨とするところは、次の各項の発明に存する。   The gist of the present invention for achieving the object lies in the inventions of the following items.

[1]圧縮対象の画像を所定の画素数毎のブロックに分割する分割部と、
前記画像の取り得る階調範囲の一部をなす制限階調範囲が設定される設定部と、
前記分割部で分割して得たブロック毎に、そのブロックに属する画素の階調値の前記制限階調範囲内での最大値と最小値を検出する検出部と、
前記分割部で分割して得たブロック毎に、そのブロックについて前記検出部で検出された前記最大値と最小値とを両端とする第1範囲を複数の領域に区分する領域設定部と、
前記分割部で分割して得た各ブロックの各画素に対して、その画素の階調値が前記制限階調範囲の上端値より大きい場合は第1の符号データを割り当て、前記階調値が前記制限階調範囲の下端値より小さい場合は第2の符号データを割り当て、前記階調値が前記制限階調範囲内の場合はその階調値がその画素の属するブロックについて前記領域設定部で区分された前記複数の領域の中のいずれの領域に属するかを示す符号データを割り当てる符号化部と、
前記分割部で分割して得たブロック毎に、そのブロックに係る前記第1範囲を示す情報と前記ブロックに属する各画素に対して前記符号化部で割り当てた符号データとを含む圧縮データを生成する出力部と、
を有する
ことを特徴とする画像圧縮装置。
[1] a dividing unit that divides an image to be compressed into blocks each having a predetermined number of pixels;
A setting unit in which a limited gradation range that forms a part of a gradation range that the image can take is set;
For each block obtained by dividing by the dividing unit, a detecting unit for detecting the maximum value and the minimum value of the gradation values of the pixels belonging to the block within the limited gradation range;
For each block obtained by dividing by the dividing unit, a region setting unit that divides a first range having both ends of the maximum value and the minimum value detected by the detection unit for the block into a plurality of regions;
For each pixel of each block obtained by dividing by the dividing unit, when the gradation value of the pixel is larger than the upper limit value of the restricted gradation range, first code data is assigned, and the gradation value is If the lower limit value of the limit gradation range is smaller than the lower limit value, the second code data is allocated. If the gradation value is within the limit gradation range, the area setting unit sets the gradation value of the block to which the pixel belongs. An encoding unit that assigns code data indicating which of the plurality of divided areas belongs to; and
For each block obtained by the division by the division unit, compressed data including information indicating the first range related to the block and code data allocated by the encoding unit to each pixel belonging to the block is generated. An output unit to
An image compression apparatus comprising:

上記発明では、1つのブロックに属する画素のうち、階調値が制限階調範囲の上端値を超える画素には第1の符号データを、下端値未満の画素には第2の符号データを固定的に割り当てる。また、制限階調範囲内にある画素のみを対象として、その階調値の最大値と最小値を検出し、制限階調範囲内にある各画素は、この最大値と最小値を両端とする階調範囲(第1範囲)を所定の複数階調で表すように量子化され、第1、第2の符号データとは値の異なる符号データに符号化される。これにより、線画領域と中間色領域とが1ブロック内に混在した場合には、線画領域は制限階調範囲外と判定され、中間色領域に対して多く階調数を割り当て符号化することができ、中間色領域の階調差を損なうことなく圧縮することができる。   In the above invention, among the pixels belonging to one block, the first code data is fixed to pixels whose gradation value exceeds the upper limit value of the limited gradation range, and the second code data is fixed to pixels less than the lower limit value. To assign. Further, only the pixels within the limited gradation range are targeted, and the maximum and minimum values of the gradation value are detected, and each pixel within the limited gradation range has the maximum value and the minimum value as both ends. The gradation range (first range) is quantized so as to be expressed by a predetermined plurality of gradations, and is encoded into code data having a value different from that of the first and second code data. As a result, when the line drawing area and the intermediate color area are mixed in one block, the line drawing area is determined to be outside the limited gradation range, and a large number of gradations can be assigned to the intermediate color area for encoding. Compression can be performed without impairing the gradation difference in the intermediate color area.

[2]前記制限階調範囲の上端値は、前記画像の取り得る最大階調値より小さく、
前記制限階調範囲の下端値は、前記画像の取り得る最小階調値より大きい、
ことを特徴とする[1]に記載の画像圧縮装置。
[2] The upper limit value of the limited gradation range is smaller than the maximum gradation value that the image can take,
The lower limit value of the limited gradation range is larger than the minimum gradation value that the image can take,
The image compression apparatus according to [1], wherein

上記発明によれば、制限階調範囲は、画像の取り得る階調範囲の最大値近くと最小値近くを除く範囲に設定される。すなわち、制限階調範囲は濃度が非常に濃い領域と非常に薄い領域とを除く階調範囲にされる。これにより線画領域を除くことができ、線画を除く画像領域に対してより多くの階調数を与えて量子化することが可能になる。   According to the invention, the limited gradation range is set to a range excluding near the maximum value and the minimum value of the gradation range that can be taken by the image. That is, the limited gradation range is a gradation range excluding a very dark area and a very thin area. As a result, the line drawing area can be removed, and the image area excluding the line drawing can be quantized by giving a larger number of gradations.

[3]前記設定部は、前記圧縮対象の画像の濃淡レベルを示す濃淡情報を入力し、該入力された濃淡情報に応じて前記制限階調範囲を変更する
ことを特徴とする[1]または[2]に記載の画像圧縮装置。
[3] The setting unit inputs density information indicating a density level of the image to be compressed, and changes the limited gradation range according to the input density information [1] or The image compression apparatus according to [2].

上記発明では、圧縮対象の画像の濃淡レベルに応じて制限階調範囲を変更するので、その画像の特性に応じた適切な圧縮を行うことができる。   In the above invention, since the limited gradation range is changed according to the density level of the image to be compressed, it is possible to perform appropriate compression according to the characteristics of the image.

本発明に係る画像圧縮装置によれば、同一ブロック内に中間色領域とこれに対して濃度差の大きい線画領域の双方が含まれる場合でも、中間色領域の濃度差を損なわずに画像データを圧縮することができる。   The image compression apparatus according to the present invention compresses image data without losing the density difference between the intermediate color areas even when both the intermediate color area and the line drawing area with a large density difference are included in the same block. be able to.

以下、図面に基づき本発明の各種実施の形態を説明する。   Hereinafter, various embodiments of the present invention will be described with reference to the drawings.

図1は本発明の第1の実施の形態に係る画像圧縮装置10の構成を示している。画像圧縮装置10は、圧縮対象の画像(画像データ)を入力し、この画像を所定の画素数毎のブロックに分割し、ブロック毎に圧縮した圧縮データを出力する機能を果たす。   FIG. 1 shows the configuration of an image compression apparatus 10 according to the first embodiment of the present invention. The image compression apparatus 10 has a function of inputting an image to be compressed (image data), dividing the image into blocks each having a predetermined number of pixels, and outputting compressed data compressed for each block.

画像圧縮装置10は、たとえば、原稿のコピー機能やプリント機能などを備えた複合機において、入力される原稿の画像データをハードディスク装置などに圧縮して保存する際の圧縮処理に使用される。   The image compression apparatus 10 is used, for example, in compression processing when compressing and storing image data of an input document in a hard disk device or the like in a multi-function peripheral having a document copy function, a print function, and the like.

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

画像圧縮装置10で使用される圧縮方式は、BTC圧縮を基本としたものである。画像圧縮装置10に入力される圧縮対象の画像データは、1画素を深さ8ビットの256階調で表したビットマップ形式の画像データである。画像圧縮装置10は、各画素の階調をNビット(Nは3以上の整数で、ここでは「3」とする)の符号データに正規化して表した圧縮データを生成する。   The compression method used in the image compression apparatus 10 is based on BTC compression. The image data to be compressed input to the image compression apparatus 10 is image data in a bitmap format in which one pixel is expressed by 256 tones with a depth of 8 bits. The image compression apparatus 10 generates compressed data in which the gradation of each pixel is normalized and expressed as code data of N bits (N is an integer equal to or greater than 3, here “3”).

画像圧縮装置10は、入力部11と、分割部12と、設定部13と、最大値最小値検出部14と、閾値生成部15と、判定部16と、符号化部17と、出力部18とを備えて構成される。   The image compression apparatus 10 includes an input unit 11, a division unit 12, a setting unit 13, a maximum / minimum value detection unit 14, a threshold generation unit 15, a determination unit 16, an encoding unit 17, and an output unit 18. And is configured.

入力部11は、圧縮対象の画像データの入力を受ける。分割部12は、入力部11から入力された圧縮対象の画像データを所定の画素数毎のブロックに分割する。ここでは、図2に示すように、画像Gの左上を基点として4画素×4画素のブロックBLに分割する。分割部12は1ブロックを分割する毎にそのブロックの画像データを最大値最小値検出部14と、判定部16と、符号化部17に送出する。   The input unit 11 receives input of image data to be compressed. The dividing unit 12 divides the image data to be compressed input from the input unit 11 into blocks each having a predetermined number of pixels. Here, as shown in FIG. 2, the image G is divided into 4 × 4 pixel blocks BL with the upper left corner as the base point. Each time the dividing unit 12 divides one block, the image data of the block is sent to the maximum / minimum value detecting unit 14, the determining unit 16, and the encoding unit 17.

設定部13は、入力部11から入力される画像データの取り得る階調範囲(ここでは、0〜255階調)の一部をなす制限階調範囲の設定を、図示省略のCPU(Central Processing Unit)などから受け付け、その設定された制限階調範囲を記憶する機能を果たす。ここでは制限階調範囲の上端値Aと下端値Bの設定を受けてこれらを記憶する。設定部13は設定された制限階調範囲の上端値Aと下端値Bを、最大値最小値検出部14および判定部16に送る。   The setting unit 13 sets a limited gradation range that forms a part of a gradation range (here, 0 to 255 gradations) that the image data input from the input unit 11 can take, and a CPU (Central Processing) (not shown). Unit), and the function of storing the set limited gradation range is achieved. Here, the upper limit value A and the lower limit value B of the limited gradation range are received and stored. The setting unit 13 sends the upper limit value A and the lower limit value B of the set limited gradation range to the maximum / minimum value detection unit 14 and the determination unit 16.

制限階調範囲は、非常に濃い領域と非常に薄い領域を除外した階調範囲に設定される。すなわち、線画の領域と中間色領域とが混在し、中間色領域の濃度と線画領域の濃度との間の大きな濃度差があるような場合に、中間色領域と線画領域とを制限階調範囲の内外として分離できるように、制限階調範囲は設定される。たとえば、画像の取り得る階調範囲の最大階調側の1割と最小階調側の1割とを除く中間の8割部分を制限階調範囲に設定する。   The limited gradation range is set to a gradation range excluding a very dark area and a very thin area. In other words, when the line drawing area and the intermediate color area are mixed and there is a large density difference between the density of the intermediate color area and the density of the line drawing area, the intermediate color area and the line drawing area are set to be inside and outside the restricted gradation range. The limited gradation range is set so that it can be separated. For example, an intermediate 80% portion excluding 10% on the maximum gradation side and 10% on the minimum gradation side of the gradation range that the image can take is set as the limited gradation range.

このほか、圧縮対象の画像データGの取り得る階調範囲を、1画素あたりの符号データのデータ量であるNビット(3ビット)で表現可能な種類数M(「8」)で除して得たサイズQの(M−2)倍以下に設定すれば、制限階調範囲内を(M−2)階調で表す場合の1階調あたりの量子化対象範囲を、画像の取り得る階調範囲全体をM階調で表す場合の1階調あたりの量子化対象範囲以下にすることができる。   In addition, the gradation range that can be taken by the image data G to be compressed is divided by the number of types M (“8”) that can be expressed by N bits (3 bits), which is the data amount of code data per pixel. If the obtained size Q is set to (M−2) times or less, the quantization target range per gradation when the restricted gradation range is expressed by (M−2) gradations can be obtained. When the entire gradation range is expressed by M gradations, the quantization target range per gradation can be made equal to or less.

最大値最小値検出部14は、分割部12で分割して得たブロック毎に、そのブロック(分割部12から入力された処理対象のブロック)に属する画素の階調値の制限階調範囲内での最大値と最小値を検出する。たとえば、処理対象のブロックの各画素の階調値Dと設定部13から入力される上端値Aおよび下端値Bとを比較し、上端値A≧D≧下端値Bとなる画素を抽出し、それら抽出した画素の階調値D同士を順次比較して、該抽出した画素の中の階調値の最大値と最小値を検出する。検出結果21は閾値生成部15および出力部18に送られる。   For each block obtained by dividing by the dividing unit 12, the maximum value / minimum value detecting unit 14 falls within the limited gradation range of the gradation values of pixels belonging to the block (the processing target block input from the dividing unit 12). Detect maximum and minimum values at. For example, the gradation value D of each pixel of the block to be processed is compared with the upper end value A and the lower end value B input from the setting unit 13 to extract pixels that satisfy the upper end value A ≧ D ≧ lower end value B, The extracted gradation values D of the pixels are sequentially compared to detect the maximum and minimum gradation values in the extracted pixels. The detection result 21 is sent to the threshold value generator 15 and the output unit 18.

閾値生成部15は、最大値最小値検出部14から入力された最大値と最小値とを両端とする範囲(第1範囲)を、(M−2)個の領域に分割するための閾値を生成する。ここでは、第1範囲を6等分するための5個の閾値1〜閾値5が生成される。小さい方の閾値から順に閾値1、閾値2、閾値3…とする。生成された各閾値は符号化部17に送られる。   The threshold value generation unit 15 sets a threshold value for dividing a range (first range) having both the maximum value and the minimum value input from the maximum value / minimum value detection unit 14 into (M−2) areas. Generate. Here, five threshold values 1 to 5 for dividing the first range into six equal parts are generated. It is assumed that threshold value 1, threshold value 2, threshold value 3,... In order from the smaller threshold value. Each generated threshold value is sent to the encoding unit 17.

判定部16は、分割部12で分割して得た各ブロックの各画素に対して、その画素の階調値が制限階調範囲内か否かを判定する。具体的には、分割部12から処理対象のブロックの各画素の階調値Dが予め定めた順序(たとえば、図2のブロックBL内の各画素に付した番号順)で順次入力され、その入力順に、その画素の階調値Dと設定部13から入力されている制限階調範囲の上端値Aおよび下端値Bとを比較する。そして、上端値A≧D≧下端値Bの場合は制限階調範囲内を示す第1信号を、D>上端値Aのときは上端値超えを示す第2信号を、D<下端値Bの場合は下端値未満を示す第3信号を符号化部17に対して出力する。   The determination unit 16 determines, for each pixel in each block obtained by the division unit 12, whether the gradation value of the pixel is within the limited gradation range. Specifically, the gradation value D of each pixel of the block to be processed is sequentially input from the dividing unit 12 in a predetermined order (for example, the number order given to each pixel in the block BL in FIG. 2). In order of input, the gradation value D of the pixel is compared with the upper limit value A and the lower limit value B of the limited gradation range input from the setting unit 13. When the upper end value A ≧ D ≧ the lower end value B, the first signal indicating the limit gradation range is satisfied. When D> the upper end value A, the second signal indicating that the upper end value is exceeded, and D <the lower end value B In this case, a third signal indicating less than the lower end value is output to the encoding unit 17.

符号化部17は、分割部12で分割して得た各ブロックの各画素に対して、その画素の階調値Dが制限階調範囲の上端値Aより大きい場合は第1の値の符号データを割り当て、階調値Dが制限階調範囲の下端値Bより小さい場合は第2の値の符号データを割り当てる。また、階調値Dが制限階調範囲内の場合は、その画素の階調値Dが、その画素の属するブロックについて最大値最小値検出部14で検出された最大値と最小値とを両端とする第1範囲を同ブロックについて閾値生成部15で生成された複数の閾値で区分して得られる(M−2)個の領域の中のいずれの領域に属するかを判断し、その領域を一意に示す値の符号データをその画素に割り当てる。   For each pixel of each block obtained by dividing by the dividing unit 12, the encoding unit 17 encodes the first value when the gradation value D of the pixel is larger than the upper end value A of the limited gradation range. Data is assigned, and if the gradation value D is smaller than the lower limit value B of the restricted gradation range, code data of the second value is assigned. Further, when the gradation value D is within the limited gradation range, the gradation value D of the pixel has the maximum value and the minimum value detected by the maximum value / minimum value detection unit 14 for the block to which the pixel belongs. It is determined which of the (M−2) areas obtained by dividing the first range by the plurality of threshold values generated by the threshold value generation unit 15 for the same block, and The code data having a uniquely indicated value is assigned to the pixel.

符号化部17には、分割部12から判定部16へ入力される画素と同じ画素の階調値(画像データ)Dが順次入力される。符号化部17はその入力された画素に対して順次、符号データを割り当てる。   The gradation value (image data) D of the same pixel as the pixel input from the dividing unit 12 to the determining unit 16 is sequentially input to the encoding unit 17. The encoding unit 17 sequentially assigns code data to the input pixels.

詳細には、符号化部17に分割部12から処理対象の画素の階調値D(画像データ)が入力されたとき、その同じ画素に対する判定部16での判定結果が判定部16から入力される。符号化部17は判定部16から第2信号が入力されている場合は、その処理対象の画素に対して3ビットの符号データ「111」を割り当てる。分割部12から処理対象の画素の階調値D(画像データ)が入力された際に同時に判定部16から第3信号が入力されている場合は、その処理対象の画素に対して符号データ「000」を割り当てる。   Specifically, when the gradation value D (image data) of the pixel to be processed is input from the dividing unit 12 to the encoding unit 17, the determination result in the determination unit 16 for the same pixel is input from the determination unit 16. The When the second signal is input from the determination unit 16, the encoding unit 17 assigns 3-bit code data “111” to the pixel to be processed. When the third signal is input from the determination unit 16 at the same time when the gradation value D (image data) of the pixel to be processed is input from the dividing unit 12, the code data “ 000 "is assigned.

なお、判定部16にて第2信号と第3信号を区別せずに、制限階調範囲内か制限階調範囲外であるかを示す信号を符号化部17へ出力するようにし、制限階調範囲外を示す信号を受けた場合に符号化部17側でその対応する画像の階調値が上端値A超えであるか下端値B未満であるかを閾値生成部15から入力される任意の閾値とその画素の階調値Dとを比較して判断してもよい。すなわち、制限階調範囲外でかつ画素の階調値がいずれかの閾値超えの場合は上端値A超え、閾値未満の場合は下端値B未満と判断することができる。   The determination unit 16 outputs a signal indicating whether the signal is within the restricted gradation range or outside the restricted gradation range to the encoding unit 17 without distinguishing between the second signal and the third signal. Arbitrary input from the threshold generation unit 15 on whether the tone value of the corresponding image is higher than the upper limit value A or lower than the lower limit value B on the encoding unit 17 side when a signal indicating out of the adjustment range is received This threshold value may be compared with the gradation value D of the pixel. That is, it can be determined that the upper limit value A is exceeded when the gradation value of the pixel is outside the limit gradation range and exceeds any threshold value, and is less than the lower limit value B when it is less than the threshold value.

分割部12から処理対象の画素の階調値D(画像データ)が入力された際に同時に判定部16から第1信号(制限階調範囲内を示す信号)が入力されている場合は、その画素の階調値Dと、閾値生成部15から入力されている閾値1〜5とを比較し、その比較結果に応じてその処理対象の画素に対して以下のように符号データを割り当てる。   When the gradation value D (image data) of the pixel to be processed is input from the dividing unit 12 and the first signal (signal indicating the limited gradation range) is input from the determination unit 16 at the same time, The gradation value D of the pixel is compared with the thresholds 1 to 5 input from the threshold generation unit 15, and the code data is assigned to the processing target pixel as follows according to the comparison result.

・D>閾値5ならば符号データ「110」
・閾値5≧D>閾値4ならば符号データ「101」
・閾値4≧D>閾値3ならば符号データ「100」
・閾値3≧D>閾値2ならば符号データ「011」
・閾値2≧D>閾値1ならば符号データ「010」
・閾値1≧Dならば符号データ「001」
このように割り当てた符号データを符号化部17は逐次、出力部18へ出力する。
If D> threshold 5, code data “110”
If threshold 5 ≧ D> threshold 4, code data “101”
If threshold 4 ≧ D> threshold 3, code data “100”
If threshold 3 ≧ D> threshold 2, code data “011”
If threshold 2 ≧ D> threshold 1, code data “010”
If the threshold value 1 ≧ D, the code data “001”
The encoding unit 17 sequentially outputs the code data allocated in this way to the output unit 18.

出力部18は、分割部12で分割して得たブロック毎に、そのブロックに係る第1範囲を示す情報とそのブロックに属する各画素に対して符号化部17で割り当てた符号データとを含む圧縮データを生成して出力する。すなわち、最大値最小値検出部14から入力される処理対象のブロックに係る最大値と最小値(第1範囲を示す情報)と、符号化部17から順次入力されるそのブロックの各画素に割り当てられた16画素分の符号データとから構成される圧縮データをブロック毎に生成し出力する。   The output unit 18 includes, for each block obtained by dividing by the dividing unit 12, information indicating the first range related to the block and code data assigned by the encoding unit 17 to each pixel belonging to the block. Generate and output compressed data. That is, the maximum value and the minimum value (information indicating the first range) related to the processing target block input from the maximum value / minimum value detection unit 14 and the pixels of the block sequentially input from the encoding unit 17 are assigned. The compressed data composed of the coded data for 16 pixels is generated and output for each block.

図3は、画像圧縮装置10による圧縮処理の流れを示している。圧縮対象の画像データを入力部11から入力し(ステップS101)、分割部12はこの入力された画像を所定画素数毎(4×4画素など)のブロックに順次分割する(ステップS102)。   FIG. 3 shows the flow of compression processing by the image compression apparatus 10. Image data to be compressed is input from the input unit 11 (step S101), and the dividing unit 12 sequentially divides the input image into blocks each having a predetermined number of pixels (such as 4 × 4 pixels) (step S102).

最大値最小値検出部14は、分割部12から与えられる処理対象のブロックに属する画素の中で、設定部13から与えられた制限階調範囲内での最大の階調値(最大値)と最小の階調値(最小値)とを検出する(ステップS103)。   The maximum value / minimum value detection unit 14 determines the maximum gradation value (maximum value) within the limited gradation range given from the setting unit 13 among the pixels belonging to the processing target block given from the division unit 12. The minimum gradation value (minimum value) is detected (step S103).

閾値生成部15は最大値最小値検出部14の検出した最大値と最小値を両端とする階調の分布範囲(第1範囲)を(M−2)等分(ここでは6等分)するための閾値を生成する(ステップS104)。また判定部16は、処理対象のブロックに属する各画素の階調値が制限階調範囲外か否かを判別する(ステップS105)。   The threshold value generation unit 15 equally divides the gradation distribution range (first range) having the maximum value and the minimum value detected by the maximum value / minimum value detection unit 14 at both ends into (M-2) equal parts (here, equal to 6 parts). A threshold value is generated (step S104). Further, the determination unit 16 determines whether or not the gradation value of each pixel belonging to the processing target block is outside the limited gradation range (step S105).

符号化部17は、判定部16の判別結果と閾値生成部15の生成した閾値とから各画素に符号データを割り当てて符号化する(ステップS106)。すなわち、処理対象の画素の階調値が、制限階調範囲の上端値Aより大きい場合は第1の符号データ(3ビットの符号データ「111」)を割り当て、階調値が制限階調範囲の下端値Bより小さい場合は第2の符号データ(3ビットの符号データ「000」)を割り当て、階調値が制限階調範囲内の場合は該階調値と閾値生成部15の生成した各閾値1〜5と比較し、この階調値がそれらの閾値1〜5で区分けされた複数の領域の中のどの領域に属するかを判別し、その領域に対応した符号データ(「001」〜「110」のいずれか)を割り当てる。   The encoding unit 17 assigns code data to each pixel based on the determination result of the determination unit 16 and the threshold value generated by the threshold value generation unit 15 and encodes it (step S106). That is, when the gradation value of the pixel to be processed is larger than the upper limit value A of the restricted gradation range, the first code data (3-bit code data “111”) is assigned, and the gradation value is within the restricted gradation range. If the tone value is smaller than the lower end value B, the second code data (3-bit code data “000”) is assigned. If the tone value is within the limit tone range, the tone value and the threshold value generator 15 generate Compared with each of the threshold values 1 to 5, it is determined which of the plurality of regions divided by the threshold values 1 to 5 belongs, and code data (“001”) corresponding to the region is determined. To any one of “110”.

出力部18は、符号化部17によって割り当てられた画素毎の符号データと最大値最小値検出部14から与えられる最大値と最小値とから、処理対象のブロックに係る圧縮データを生成して出力する(ステップS107)。   The output unit 18 generates and outputs compressed data related to the block to be processed from the code data for each pixel assigned by the encoding unit 17 and the maximum value and the minimum value given from the maximum value / minimum value detection unit 14. (Step S107).

次に、画像圧縮装置10による画像の圧縮例について説明する。図4は、図9と同じブロックの元画像データ110を画像圧縮装置10にて圧縮した例を示している。この例では制限階調範囲は20h〜DFhに設定されている。斜線を施した領域の各画素はその階調値が制限階調範囲内にある画素である。制限階調範囲内にある画素の階調値の中の最大値は90h、最小値は60hなので、この最大値と最小値を両端とする60h〜90hの範囲(第1範囲)を6等分するための閾値1(68h)、閾値2(70h)、閾値3(78h)、閾値4(80h)、閾値5(88h)が閾値生成部15によって生成される。   Next, an example of image compression by the image compression apparatus 10 will be described. FIG. 4 shows an example in which the original image data 110 of the same block as in FIG. 9 is compressed by the image compression apparatus 10. In this example, the limited gradation range is set to 20h to DFh. Each pixel in the shaded area is a pixel whose gradation value is within the limited gradation range. Since the maximum value of the gradation values of the pixels within the limited gradation range is 90h and the minimum value is 60h, the range of 60h to 90h (first range) with the maximum value and the minimum value at both ends is divided into 6 equal parts. Threshold value 1 (68h), threshold value 2 (70h), threshold value 3 (78h), threshold value 4 (80h), and threshold value 5 (88h) are generated by the threshold value generation unit 15.

符号化部17は、処理対象の画素の階調値Dが、
・E0h〜FFhにあれば符号データ「111」
・88h〜90hにあれば符号データ「110」
・80h〜87hにあれば符号データ「101」
・78h〜7Fhにあれば符号データ「100」
・70h〜77hにあれば符号データ「011」
・68h〜6Fhにあれば符号データ「010」
・60h〜67hにあれば符号データ「001」
・00h〜1Fhにあれば符号データ「000」
をその画素に対して割り当て、出力部18はこれらの16画素分の符号データと最大値と最小値とから構成された圧縮データ51を生成する。
The encoding unit 17 determines that the gradation value D of the pixel to be processed is
-If E0h to FFh, code data "111"
-Code data "110" if in 88h to 90h
-Code data "101" if in 80h to 87h
-Code data "100" if in 78h-7Fh
-Code data “011” in the range from 70h to 77h
-Code data "010" in 68h-6Fh
-If it is in 60h to 67h, code data "001"
-Code data "000" if in 00h to 1Fh
Is assigned to the pixel, and the output unit 18 generates compressed data 51 composed of the code data, maximum value, and minimum value for these 16 pixels.

画像圧縮装置10で生成された圧縮データ51は次のようにして伸張される。   The compressed data 51 generated by the image compression apparatus 10 is expanded as follows.

画像の取り得る階調範囲(0〜255階調)の中の最大値であるFFhを符号データ「111」に対する代表値8に設定し、画像の取り得る階調範囲の中の最小値である00hを符号データ「000」に対する代表値1に設定する。また圧縮データに含まれている最大値(90h)を符号データ「110」に対する代表値7に設定し、最小値(60h)を符号データ「001」に対する代表値2に設定する。   The maximum value FFh in the gradation range that the image can take (0 to 255 gradations) is set to the representative value 8 for the code data “111”, and is the minimum value in the gradation range that the image can take. 00h is set as the representative value 1 for the code data “000”. Further, the maximum value (90h) included in the compressed data is set to the representative value 7 for the code data “110”, and the minimum value (60h) is set to the representative value 2 for the code data “001”.

さらに、この最大値(90h)と最小値(60h)を両端とする範囲を5個(すなわち、(M−2)−1)に等分するための4つの境界値(69h、72h、7Bh、84h)を求め、その中の最も小さい境界値69hを符号データ「010」に対する代表値3に、次に小さい境界値72hを符号データ「011」に対する代表値4に、次に小さい境界値7Bhを符号データ「100」に対する代表値5に、最も大きい境界値84hを符号データ「101」に対する代表値6に設定する。そして、圧縮データ51に含まれる各画素の符号データをその値に対応する代表値1〜8に変換することで、画像データ55に伸張される。   Furthermore, four boundary values (69h, 72h, 7Bh, and so on) for equally dividing the range having the maximum value (90h) and the minimum value (60h) at both ends into five (ie, (M-2) -1). 84h), the smallest boundary value 69h among them is the representative value 3 for the code data “010”, the next smallest boundary value 72h is the representative value 4 for the code data “011”, and the next smallest boundary value 7Bh is The largest boundary value 84h is set to the representative value 6 for the code data “101” and the largest boundary value 84h is set to the representative value 6 for the code data “100”. Then, the code data of each pixel included in the compressed data 51 is converted into representative values 1 to 8 corresponding to the values, so that the image data 55 is expanded.

図4に示す伸張後の画像データ55では画素aと画素bに階調差があり、圧縮前の画像データ110の中間色領域にあった階調差が再現されている。このように画像圧縮装置10では、同一ブロック内に中間色領域とこれに対して濃度差の大きい線画領域の双方が含まれる場合でも、中間色領域の濃度差を損なわずに圧縮でき、伸張時の画質の向上が図られる。   In the decompressed image data 55 shown in FIG. 4, there is a gradation difference between the pixel a and the pixel b, and the gradation difference corresponding to the intermediate color area of the image data 110 before compression is reproduced. As described above, the image compression apparatus 10 can perform compression without losing the density difference between the intermediate color areas even when both the intermediate color area and the line drawing area having a large density difference are included in the same block. Is improved.

次に、本発明の第2の実施の形態について説明する。   Next, a second embodiment of the present invention will be described.

図5は、第2の実施の形態に係る画像圧縮装置10Bの構成を示している。第2の実施の形態の画像圧縮装置10Bは、設定部13に代えて設定部19を備えている点で第1の実施の形態の画像圧縮装置10と相違する。その他の構成は第1の実施の形態の画像圧縮装置10と同一であり、それらの説明は省略する。   FIG. 5 shows a configuration of an image compression apparatus 10B according to the second embodiment. The image compression apparatus 10B according to the second embodiment is different from the image compression apparatus 10 according to the first embodiment in that a setting unit 19 is provided instead of the setting unit 13. Other configurations are the same as those of the image compression apparatus 10 according to the first embodiment, and a description thereof will be omitted.

設定部19は、圧縮対象の画像の濃淡レベルを示す濃淡情報を外部から入力し、該入力された濃淡情報に応じて制限階調範囲を変更する。たとえば、画像圧縮装置10Bは、図5に示すように、原稿を光学的に読み取るスキャナ装置60を備えた装置(たとえば、複写機)に設けられ、このスキャナ装置60が備えるEEセンサ61から原稿の濃度レベルを示す濃度情報を受け取るように構成される。スキャナ装置60は、光源の発する光を原稿に照射し、その反射光をイメージセンサで受光することで原稿画像を読み取るように構成されており、EEセンサ61はその反射光の通過経路に沿って設けられて光の強さを検知するセンサである。   The setting unit 19 inputs grayscale information indicating the grayscale level of the image to be compressed from the outside, and changes the limited gradation range according to the input grayscale information. For example, as shown in FIG. 5, the image compression apparatus 10B is provided in an apparatus (for example, a copying machine) including a scanner apparatus 60 that optically reads an original, and an original document is detected from an EE sensor 61 included in the scanner apparatus 60. It is configured to receive density information indicating a density level. The scanner device 60 is configured to irradiate a document with light emitted from a light source and receive the reflected light with an image sensor so as to read a document image. The EE sensor 61 follows a path through which the reflected light passes. It is a sensor that is provided and detects the intensity of light.

スキャナ装置60で原稿を読み取って得た画像データを画像圧縮装置10Bで圧縮する際に、設定部19は、EEセンサ61から入力される濃度情報に基づいて、スキャナ装置60で読み取った原稿(もしくは原稿の背景)が濃いか、淡いか、標準的かを判断する。濃いと判断した場合は、制限階調範囲を階調値の標準(初期の設定値)より小さい方へ片寄るように変更する。これにより、符号化する際に濃い色の階調範囲における濃淡がつぶれ難くなる。   When image data obtained by reading a document with the scanner device 60 is compressed with the image compression device 10B, the setting unit 19 reads the document (or the document read with the scanner device 60 based on density information input from the EE sensor 61). Determine whether the background of the manuscript is dark, pale, or standard. If it is determined that the image is dark, the limited gradation range is changed so as to be shifted toward a smaller value than the standard gradation value (initial setting value). As a result, the shading in the dark tone range is less likely to be lost when encoding.

階調値の小さい方へ片寄るように制限階調範囲を変更する方法には、
(1)制限階調範囲の下端値を下げて制限階調範囲を最小値側へ広げる、
(2)制限階調範囲のサイズは変えずに全体を最小値側へシフトさせる、
(3)制限階調範囲のサイズ縮小と下端値を下げることの双方を行う、
などがある。なお、濃度と階調値の関係は、濃度が濃いほど階調値は小さくなり、真っ黒(最大濃度)の階調値は00hであるものとする。
To change the limited gradation range so that the gradation value is smaller,
(1) Lower the lower limit value of the limited gradation range to widen the limited gradation range to the minimum value side.
(2) Shift the whole to the minimum value side without changing the size of the limited gradation range,
(3) Both the size reduction of the limited gradation range and the lower end value are reduced.
and so on. Note that the relationship between the density and the gradation value is such that the higher the density, the smaller the gradation value, and the gradation value of black (maximum density) is 00h.

設定部19は、EEセンサ61から入力される濃度情報から、スキャナ装置60で読み取った原稿(もしくは原稿の背景)が淡い(薄い)と判断した場合は、制限階調範囲を階調値の大きい方へ片寄るように変更する。これにより、符号化する際に淡い色の階調範囲における濃淡がつぶれ難くなる。   If the setting unit 19 determines from the density information input from the EE sensor 61 that the document read by the scanner device 60 (or the background of the document) is light (light), the limit gradation range has a large gradation value. Change it so that it is closer to you. As a result, the shading in the gradation range of light colors is difficult to be lost when encoding.

階調値の大きい方へ片寄るように制限階調範囲を変更する方法には、
(1)制限階調範囲の上端値を高めて制限階調範囲を最大値側へ広げる、
(2)制限階調範囲のサイズは変えずに全体を最大値側へシフトさせる、
(3)制限階調範囲のサイズ縮小と上端値を高めることの双方を行う、
などがある。
To change the limit gradation range so that it is offset toward the larger gradation value,
(1) Increasing the upper limit value of the limited gradation range to widen the limited gradation range to the maximum value side.
(2) Shift the whole to the maximum value side without changing the size of the limit gradation range,
(3) Both the size reduction of the limited gradation range and the upper end value are increased.
and so on.

図6は、第2の実施の形態の画像圧縮装置10Bにおける圧縮処理の流れを示している。図3の流れ図と同じ処理内容のステップには同一のステップ番号を付してある。図6の処理は図3の処理に比べてS102とS103の間にS102Bが挿入さている点で相違する。すなわち、EEセンサ61からの濃度情報に基づいて制限階調範囲を設定変更し(ステップS102B)、その設定変更後の制限階調範囲に基づいてS103以後の処理が行われる。制限階調範囲の設定変更はページ単位に行われる。   FIG. 6 shows the flow of compression processing in the image compression apparatus 10B of the second embodiment. Steps having the same processing contents as those in the flowchart of FIG. 3 are given the same step numbers. The process of FIG. 6 differs from the process of FIG. 3 in that S102B is inserted between S102 and S103. That is, the limited gradation range is set and changed based on the density information from the EE sensor 61 (step S102B), and the processing after S103 is performed based on the limited gradation range after the setting change. The setting change of the limited gradation range is performed for each page.

EEセンサ61の出力する濃度情報は00h〜FFhの範囲で濃度レベルを示し、これに対して設定部19は以下のように制限階調範囲を設定する。
a.濃度情報が00h〜4Fhの場合、制限階調範囲を10h〜CFhに設定する。
b.濃度情報が50h〜AFhの場合、制限階調範囲を20h〜DFhに設定する。
c.濃度情報がB0h〜FFhの場合、制限階調範囲を30h〜EFhに設定する。
The density information output from the EE sensor 61 indicates the density level in the range of 00h to FFh. On the other hand, the setting unit 19 sets the limited gradation range as follows.
a. When the density information is 00h to 4Fh, the limited gradation range is set to 10h to CFh.
b. When the density information is 50h to AFh, the limited gradation range is set to 20h to DFh.
c. When the density information is B0h to FFh, the limited gradation range is set to 30h to EFh.

このように、EEセンサ61などで検知された原稿や原稿背景の濃度レベルに応じて、制限階調範囲のサイズと中心位置のいずれかもしくは双方を変更することで、原稿全体の濃淡や用紙の特性を加味することができ、より一層、画質劣化の少ない圧縮が実現される。   As described above, by changing either or both of the size of the limited gradation range and the center position according to the density level of the original or the background of the original detected by the EE sensor 61 or the like, the density of the entire original or the paper Characteristics can be taken into account, and compression with less image quality deterioration can be realized.

以上、本発明の実施の形態を図面によって説明してきたが、具体的な構成は実施の形態に示したものに限られるものではなく、本発明の要旨を逸脱しない範囲における変更や追加があっても本発明に含まれる。   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.

たとえば、圧縮時に各画素を3ビットの符号データに変換する例を示したが、1画素あたりの符号データは3ビット以上であってもかまわない。ただし、圧縮するのであるから元の画像データの階調数(ビット数)より少ないビット数にされる。   For example, an example is shown in which each pixel is converted into 3-bit code data at the time of compression, but the code data per pixel may be 3 bits or more. However, since compression is performed, the number of bits is smaller than the number of gradations (bits) of the original image data.

また、第2の実施の形態では、EEセンサ61の出力する濃度情報に基づいて制限階調範囲を設定変更するようにしたが、たとえば、1枚の画像データにおける階調値のヒストグラムを作成し、階調値の分布状態に応じて制限階調範囲を設定変更するようにされてもよい。要するに、濃度情報は、圧縮対象の画像が全体として濃い原稿か淡い原稿かを判断可能な情報であればよい。   In the second embodiment, the limit gradation range is set and changed based on the density information output from the EE sensor 61. For example, a histogram of gradation values in one piece of image data is created. The limit gradation range may be set and changed according to the distribution state of gradation values. In short, the density information may be information that can determine whether the image to be compressed is a dark original or a light original as a whole.

圧縮対象の画像データはスキャナ装置60などで読み取ったものに限定されず、パーソナルコンピュータなどの情報処理装置で作成された画像データなど任意の画像データでかまわない。   The image data to be compressed is not limited to that read by the scanner device 60 or the like, and may be arbitrary image data such as image data created by an information processing device such as a personal computer.

このほか、1ブロックのサイズは実施の形態で例示したものに限定されない。   In addition, the size of one block is not limited to that exemplified in the embodiment.

本発明の第1の実施の形態に係る画像圧縮装置の概略構成を示すブロック図である。1 is a block diagram showing a schematic configuration of an image compression apparatus according to a first embodiment of the present invention. 圧縮対象の画像をブロックに分割する様子を模擬的に示す説明図である。It is explanatory drawing which shows a mode that the image of compression object is divided | segmented into a block. 本発明の第1の実施の形態に係る画像圧縮装置が行う圧縮処理を示す流れ図である。It is a flowchart which shows the compression process which the image compression apparatus which concerns on the 1st Embodiment of this invention performs. 中間色領域と線画領域の混在するブロックを画像圧縮装置で圧縮して伸張した場合の各種データを例示した説明図である。It is explanatory drawing which illustrated various data at the time of compressing and decompress | decompressing with the image compression apparatus the block in which a neutral color area | region and a line drawing area | region are mixed. 本発明の第2の実施の形態に係る画像圧縮装置およびその周辺装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the image compression apparatus which concerns on the 2nd Embodiment of this invention, and its peripheral device. 本発明の第2の実施の形態に係る画像圧縮装置が行う圧縮処理を示す流れ図である。It is a flowchart which shows the compression process which the image compression apparatus which concerns on the 2nd Embodiment of this invention performs. 従来のBTC圧縮により画像を1画素2ビットの符号データに圧縮して伸張した場合の各種データを例示した説明図である。It is explanatory drawing which illustrated various data at the time of compressing and decompress | decompressing the image to the code data of 1 pixel 2 bits by the conventional BTC compression. 従来のBTC圧縮により中間色領域と線画領域の混在するブロックの画像を1画素2ビットの符号データに圧縮して伸張した場合の各種データを例示した説明図である。It is explanatory drawing which illustrated various data at the time of compressing and decompress | decompressing the image of the block in which a neutral color area | region and a line drawing area mixed by the conventional BTC compression to the code data of 1 pixel 2 bits. 従来のBTC圧縮により中間色領域と線画領域の混在するブロックの画像を1画素3ビットの符号データに圧縮して伸張した場合の各種データを例示した説明図である。It is explanatory drawing which illustrated various data at the time of compressing and decompress | decompressing the image of the block in which a neutral color area | region and a line drawing area mixed by the conventional BTC compression to the code data of 1 pixel 3 bits.

符号の説明Explanation of symbols

10、10B…画像圧縮装置
11…入力部
12…分割部
13…設定部
14…最大値最小値検出部
15…閾値生成部
16…判定部
17…符号化部
18…出力部
19…設定部
21…検出結果
60…スキャナ装置
61…EEセンサ
DESCRIPTION OF SYMBOLS 10, 10B ... Image compression apparatus 11 ... Input part 12 ... Division | segmentation part 13 ... Setting part 14 ... Maximum value minimum value detection part 15 ... Threshold value generation part 16 ... Determination part 17 ... Encoding part 18 ... Output part 19 ... Setting part 21 ... Detection result 60 ... Scanner device 61 ... EE sensor

Claims (3)

圧縮対象の画像を所定の画素数毎のブロックに分割する分割部と、
前記画像の取り得る階調範囲の一部をなす制限階調範囲が設定される設定部と、
前記分割部で分割して得たブロック毎に、そのブロックに属する画素の階調値の前記制限階調範囲内での最大値と最小値を検出する検出部と、
前記分割部で分割して得たブロック毎に、そのブロックについて前記検出部で検出された前記最大値と最小値とを両端とする第1範囲を複数の領域に区分する領域設定部と、
前記分割部で分割して得た各ブロックの各画素に対して、その画素の階調値が前記制限階調範囲の上端値より大きい場合は第1の符号データを割り当て、前記階調値が前記制限階調範囲の下端値より小さい場合は第2の符号データを割り当て、前記階調値が前記制限階調範囲内の場合はその階調値がその画素の属するブロックについて前記領域設定部で区分された前記複数の領域の中のいずれの領域に属するかを示す符号データを割り当てる符号化部と、
前記分割部で分割して得たブロック毎に、そのブロックに係る前記第1範囲を示す情報と前記ブロックに属する各画素に対して前記符号化部で割り当てた符号データとを含む圧縮データを生成する出力部と、
を有する
ことを特徴とする画像圧縮装置。
A dividing unit that divides an image to be compressed into blocks each having a predetermined number of pixels;
A setting unit in which a limited gradation range that forms a part of a gradation range that the image can take is set;
For each block obtained by dividing by the dividing unit, a detecting unit for detecting the maximum value and the minimum value of the gradation values of the pixels belonging to the block within the limited gradation range;
For each block obtained by dividing by the dividing unit, a region setting unit that divides a first range having both ends of the maximum value and the minimum value detected by the detection unit for the block into a plurality of regions;
For each pixel of each block obtained by dividing by the dividing unit, when the gradation value of the pixel is larger than the upper limit value of the restricted gradation range, first code data is assigned, and the gradation value is If the lower limit value of the limit gradation range is smaller than the lower limit value, the second code data is allocated. If the gradation value is within the limit gradation range, the area setting unit sets the gradation value of the block to which the pixel belongs. An encoding unit that assigns code data indicating which of the plurality of divided areas belongs to; and
For each block obtained by the division by the division unit, compressed data including information indicating the first range related to the block and code data allocated by the encoding unit to each pixel belonging to the block is generated. An output unit to
An image compression apparatus comprising:
前記制限階調範囲の上端値は、前記画像の取り得る最大階調値より小さく、
前記制限階調範囲の下端値は、前記画像の取り得る最小階調値より大きい、
ことを特徴とする請求項1に記載の画像圧縮装置。
The upper limit value of the limited gradation range is smaller than the maximum gradation value that the image can take,
The lower limit value of the limited gradation range is larger than the minimum gradation value that the image can take,
The image compression apparatus according to claim 1.
前記設定部は、前記圧縮対象の画像の濃淡レベルを示す濃淡情報を入力し、該入力された濃淡情報に応じて前記制限階調範囲を変更する
ことを特徴とする請求項1または2に記載の画像圧縮装置。
The said setting part inputs the shading information which shows the shading level of the said image to be compressed, and changes the said limitation gradation range according to the inputted shading information. Image compression device.
JP2008053565A 2008-03-04 2008-03-04 Image compression apparatus Withdrawn JP2009212800A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008053565A JP2009212800A (en) 2008-03-04 2008-03-04 Image compression apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008053565A JP2009212800A (en) 2008-03-04 2008-03-04 Image compression apparatus

Publications (1)

Publication Number Publication Date
JP2009212800A true JP2009212800A (en) 2009-09-17

Family

ID=41185530

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008053565A Withdrawn JP2009212800A (en) 2008-03-04 2008-03-04 Image compression apparatus

Country Status (1)

Country Link
JP (1) JP2009212800A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012128241A1 (en) * 2011-03-18 2012-09-27 ソニー株式会社 Image-processing device, image-processing method, and program
US9571844B2 (en) 2013-12-26 2017-02-14 Megachips Corporation Image processor
CN108881904A (en) * 2018-06-25 2018-11-23 中山大学 Quick decision method, device and storage medium in frame based on Sobel operator
CN117395380A (en) * 2023-12-12 2024-01-12 上海伯镭智能科技有限公司 Intelligent management method for dispatching data of unmanned mine car in large mining area

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012128241A1 (en) * 2011-03-18 2012-09-27 ソニー株式会社 Image-processing device, image-processing method, and program
US9571844B2 (en) 2013-12-26 2017-02-14 Megachips Corporation Image processor
CN108881904A (en) * 2018-06-25 2018-11-23 中山大学 Quick decision method, device and storage medium in frame based on Sobel operator
CN117395380A (en) * 2023-12-12 2024-01-12 上海伯镭智能科技有限公司 Intelligent management method for dispatching data of unmanned mine car in large mining area
CN117395380B (en) * 2023-12-12 2024-02-23 上海伯镭智能科技有限公司 Intelligent management method for dispatching data of unmanned mine car in large mining area

Similar Documents

Publication Publication Date Title
JP5132517B2 (en) Image processing apparatus and image processing method
JP4236659B2 (en) Image encoding apparatus, image encoding method, image encoding program, and recording medium
JP3237582B2 (en) Image processing apparatus and image processing method
JP3843581B2 (en) Image encoding device, image decoding device, image processing device, image encoding method, image decoding method, and image processing method
US20090141048A1 (en) Method, apparatus, and computer program product for processing image
JP4829836B2 (en) Image encoding apparatus, control method for image encoding apparatus, computer program, decoding apparatus, and computer-readable storage medium
JP2009212800A (en) Image compression apparatus
US8107743B2 (en) Image processing device, image processing method, and storage medium
JP2006197178A (en) Image processor, image processing method, program, and storage medium
JP3872217B2 (en) Dither image binary expression processing method, dither image compression binary expression decompression method, and dither image compression and decompression system
US8254703B2 (en) Image compression apparatus and image compression method
JP2007306513A (en) Method and device for image data compression
JP2006100977A (en) Printing system and printer
JP4462360B2 (en) Image compression apparatus and image expansion apparatus
JP2008278462A (en) Image processing device, image processing method, and storage medium
JP2010028796A (en) Image forming apparatus, image converting device, and image forming method
JP4031442B2 (en) Image processing apparatus and image forming apparatus having the same
JP7185451B2 (en) Image processing device, image processing method, and program
JP2003189108A (en) Image compression method
JP2009130467A (en) Image encoding apparatus and method of controlling the same
JPH0918877A (en) Fractal image compression device
JP5434799B2 (en) Image coding apparatus, image coding method, and image coding program
JP4057610B2 (en) Encoding / decoding system and encoding / decoding method
JP4382828B2 (en) Line image separation method, image compression method, and image processing apparatus using the same
JP2009005018A (en) Device for encoding image and device for decoding image and control method therefor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20110510