JP2003338936A - Image data compression equipment and method therefor - Google Patents

Image data compression equipment and method therefor

Info

Publication number
JP2003338936A
JP2003338936A JP2002147388A JP2002147388A JP2003338936A JP 2003338936 A JP2003338936 A JP 2003338936A JP 2002147388 A JP2002147388 A JP 2002147388A JP 2002147388 A JP2002147388 A JP 2002147388A JP 2003338936 A JP2003338936 A JP 2003338936A
Authority
JP
Japan
Prior art keywords
value
pixel data
quantization
section
partial area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002147388A
Other languages
Japanese (ja)
Inventor
Teruyuki Fukaya
輝之 深谷
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2002147388A priority Critical patent/JP2003338936A/en
Publication of JP2003338936A publication Critical patent/JP2003338936A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide image data compression equipment which can prevent deterioration of quality of printed letters which is to be caused by non-reciprocal compression, by avoiding a matter that image data exceed capacity of a storage device in an apparatus wherein margin of capacity of the storage device is small. <P>SOLUTION: This equipment is provided with a partial image extracting means 5 wherein original image data are divided into a plurality of partial regions and image data of each of the partial regions are extracted; a luminance value calculating means 6 for calculating a luminance value regarding the respective picture element data of the partial region; a section calculating means 7 wherein a maximum value and a minimum value of luminance value of the respective picture element data of the partial region are obtained, and a quantized section is output in which a section between the maximum value and the minimum value are divided into a plurality of sections; a central value deciding means 8 for deciding a central value of picture element data belonging to each of the quantized sections; and a quantizing means 11 for quantizing the respective picture element data by making all picture element data belonging to the quantized section a central value in the quantized section, in each of the quantized sections. <P>COPYRIGHT: (C)2004,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、画像データ圧縮装
置及び画像データ圧縮方法に関するものであり、特に、
プリンタや複写機等のようにメモリ容量の余裕が少ない
機器に使用するのに適した画像データ圧縮装置及び画像
データ圧縮方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image data compression apparatus and an image data compression method, and in particular,
The present invention relates to an image data compression apparatus and an image data compression method suitable for use in a device such as a printer or a copier having a small memory capacity.

【0002】[0002]

【従来の技術】従来より、画像データの圧縮を行うデー
タ圧縮方法として、ハフマン符号化、算術符号化等のエ
ントロピ符号化を使用した可逆データ圧縮方法と、JP
EG方式等のように帯域圧縮を使用した非可逆データ圧
縮方法が知られている。
2. Description of the Related Art Conventionally, as a data compression method for compressing image data, a reversible data compression method using entropy coding such as Huffman coding and arithmetic coding, and JP
A lossy data compression method using band compression such as the EG method is known.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、従来の
エントロピ符号化等の可逆データ圧縮方法においては、
圧縮率は原画像の冗長性によって異なったものとなる。
そのため、どのような画像を圧縮するのかが特定されて
いない場合には、圧縮後の画像データの符号量は予測で
きない。従って、プリンタ、複写機等のメモリ容量の余
裕が小さい機器においては、圧縮した画像データのデー
タ量が当該機器のメモリ容量を超えてしまい、印字不可
能な状態が生じるおそれがあるという欠点を有してい
た。
However, in the conventional lossless data compression method such as entropy coding,
The compression rate depends on the redundancy of the original image.
Therefore, if the image to be compressed is not specified, the code amount of the compressed image data cannot be predicted. Therefore, in a device such as a printer or a copying machine having a small memory capacity margin, the data amount of the compressed image data exceeds the memory capacity of the device, and there is a drawback that unprintable state may occur. Was.

【0004】また、従来のJPEG方式等の非可逆デー
タ圧縮方法においては、画像の周波数空間上における高
周波成分を省略するため、文字や線画等の画像内の図形
の輪郭が重要な画像データでは、印字品質が低下すると
いう欠点があった。すなわち、高周波成分を削ることに
より、画像内の図形の輪郭部分のように画素値が急激に
変化する部分においてモスキート・ノイズが発生し、文
字や線画が読みにくくなるという欠点があった。
Further, in the conventional irreversible data compression method such as the JPEG method, high-frequency components in the frequency space of the image are omitted, so that in the image data in which the outline of the figure such as a character or line drawing is important, There is a drawback that the print quality is degraded. That is, by removing the high-frequency component, there is a drawback that mosquito noise is generated in a portion where the pixel value changes abruptly, such as the contour portion of the figure in the image, and it becomes difficult to read characters and line drawings.

【0005】本発明は上記従来の課題を解決するもの
で、メモリ容量の余裕が小さい機器においても、画像デ
ータがメモリ容量を超えるという事態を回避することが
可能であるとともに、画像の輪郭の情報を正確に残し、
非可逆圧縮による印字品質の低下を防止することが可能
な画像データ圧縮装置及び画像データ圧縮方法を提供す
ることを目的とする。
The present invention solves the above-mentioned conventional problems. Even in a device having a small memory capacity margin, it is possible to avoid the situation where the image data exceeds the memory capacity, and at the same time, the outline information of the image is displayed. Leave exactly,
An object of the present invention is to provide an image data compression device and an image data compression method capable of preventing deterioration of print quality due to lossy compression.

【0006】[0006]

【課題を解決するための手段】上記課題を解決するため
に本発明の画像データ圧縮装置は、原画像データを複数
の部分領域に分割し、各部分領域の画素データを抽出す
る部分画像抽出手段と、前記部分画像抽出手段が抽出し
た部分領域の各画素データについて輝度値を計算する輝
度値計算手段と、前記輝度値計算手段から出力された部
分領域の各画素データの輝度値の最大値及び最小値を求
め、前記最大値と前記最小値の間の区間を複数の区間に
分割した量子化区間を出力する区間算出手段と、前記各
量子化区間に属する画素データの代表値を決定する代表
値決定手段と、前記各量子化区間において、当該量子化
区間に属する総ての画素データを、当該量子化区間にお
ける前記代表値とすることにより各画素データを量子化
する量子化手段とを備えた構成よりなる。
In order to solve the above problems, an image data compression apparatus according to the present invention divides original image data into a plurality of partial areas and extracts partial image data of each partial area. A brightness value calculating means for calculating a brightness value for each pixel data of the partial area extracted by the partial image extracting means; and a maximum value of the brightness value of each pixel data of the partial area output from the brightness value calculating means, Section calculating means for obtaining a minimum value and outputting a quantization section obtained by dividing the section between the maximum value and the minimum value into a plurality of sections, and a representative for determining a representative value of pixel data belonging to each of the quantization sections A value determining means, and a quantizing means for quantizing each pixel data by setting all pixel data belonging to the quantization interval as the representative value in the quantization interval in each of the quantization intervals. The constitution with.

【0007】この構成により、メモリ容量の余裕が小さ
い機器においても、画像データがメモリ容量を超えると
いう事態を回避することが可能であるとともに、画像の
輪郭の情報を正確に残し、非可逆圧縮による印字品質の
低下を防止することが可能な画像データ圧縮装置を提供
することができる。
With this configuration, even in a device having a small memory capacity margin, it is possible to avoid the situation where the image data exceeds the memory capacity, and at the same time, the information of the contour of the image is accurately left and the lossy compression is performed. It is possible to provide an image data compression device capable of preventing deterioration of print quality.

【0008】また、本発明の画像データ圧縮方法は、原
画像データを複数の部分領域に分割し、各部分領域の画
素データを抽出する部分画像抽出ステップと、前記部分
画像抽出ステップにおいて抽出した部分領域の各画素デ
ータについて輝度値を計算する輝度値計算ステップと、
前記部分領域の各画素データの輝度値の最大値及び最小
値を求め、前記最大値と前記最小値の間の区間を複数の
区間に分割した量子化区間を出力する区間算出ステップ
と、前記各量子化区間に属する画素データの代表値を決
定する代表値決定ステップと、前記各量子化区間におい
て、当該量子化区間に属する総ての画素データを、当該
量子化区間における前記代表値とすることにより各画素
データを量子化する量子化ステップとを備えた構成より
なる。
In the image data compression method of the present invention, the original image data is divided into a plurality of partial areas and the pixel data of each partial area is extracted, and the partial image extraction step is performed. A brightness value calculation step of calculating a brightness value for each pixel data of the region,
A section calculation step of obtaining a maximum value and a minimum value of the brightness value of each pixel data of the partial area, and outputting a quantization section obtained by dividing a section between the maximum value and the minimum value into a plurality of sections, A representative value determining step of determining a representative value of pixel data belonging to a quantization section; and, in each of the quantization sections, all pixel data belonging to the quantization section is set to the representative value in the quantization section. And a quantizing step for quantizing each pixel data.

【0009】この構成により、メモリ容量の余裕が小さ
い機器においても、画像データがメモリ容量を超えると
いう事態を回避することが可能であるとともに、画像の
輪郭の情報を正確に残し、非可逆圧縮による印字品質の
低下を防止することが可能な画像データ圧縮方法を提供
することができる。
With this configuration, even in a device having a small memory capacity, it is possible to avoid the situation where the image data exceeds the memory capacity, and to accurately leave the contour information of the image and to perform the lossy compression. It is possible to provide an image data compression method capable of preventing deterioration of print quality.

【0010】[0010]

【発明の実施の形態】本発明の請求項1に記載の画像デ
ータ圧縮装置は、原画像データを複数の部分領域に分割
し、各部分領域の画素データを抽出する部分画像抽出手
段と、部分画像抽出手段が抽出した部分領域の各画素デ
ータについて輝度値を計算する輝度値計算手段と、輝度
値計算手段から出力された部分領域の各画素データの輝
度値の最大値及び最小値を求め、最大値と最小値の間の
区間を複数の区間に分割した量子化区間を出力する区間
算出手段と、各量子化区間に属する画素データの代表値
を決定する代表値決定手段と、各量子化区間において、
当該量子化区間に属する総ての画素データを、当該量子
化区間における代表値とすることにより各画素データを
量子化する量子化手段とを備えた構成としたものであ
り、この構成により、以下のような作用が得られる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An image data compression apparatus according to claim 1 of the present invention divides original image data into a plurality of partial areas, and extracts partial pixel data of each partial area. Brightness value calculating means for calculating the brightness value for each pixel data of the partial area extracted by the image extracting means, and the maximum and minimum values of the brightness value of each pixel data of the partial area output from the brightness value calculating means, Interval calculation means for outputting a quantization interval obtained by dividing an interval between the maximum value and the minimum value into a plurality of intervals, a representative value determination means for determining a representative value of pixel data belonging to each quantization interval, and each quantization In the section
All pixel data belonging to the quantization section is configured to include a quantizing unit that quantizes each pixel data by setting the representative value in the quantization section as a representative value. The following action can be obtained.

【0011】まず、部分画像抽出手段が、原画像データ
を部分領域に分割して、各部分領域ごとに画素データを
抽出する。次に、輝度値計算手段は、部分領域内の各画
素データについて輝度値を計算する。次いで、区間算出
手段は、部分領域内の各画素データの輝度値のうち、最
大値と最小値とを求める。そして、この最大値と最小値
との間の区間を複数の区間に分割し、各区間を量子化区
間とする。なお、ここで、特に「輝度値」に着目して閾
値を決定することとしたのは、人間の視覚に対してもっ
とも影響が高いという理由によるものである。次に、代
表値決定手段は、部分領域内の各画素データのうち輝度
値が各量子化区間内にあるものの代表値を決定する。次
いで、量子化手段は、部分領域の各画素データのうち輝
度値が各量子化区間内にある総てのものを代表値とする
ことにより各画素データを量子化する。
First, the partial image extracting means divides the original image data into partial areas and extracts pixel data for each partial area. Next, the brightness value calculation means calculates a brightness value for each pixel data in the partial area. Next, the section calculation means obtains the maximum value and the minimum value among the brightness values of each pixel data in the partial area. Then, the section between the maximum value and the minimum value is divided into a plurality of sections, and each section is set as a quantization section. Note that the reason why the threshold value is decided by paying particular attention to the "brightness value" is because it has the greatest effect on human vision. Next, the representative value determining means determines the representative value of the pixel data in the partial region whose luminance value is in each quantization section. Next, the quantizing means quantizes each pixel data by using as a representative value all of the pixel data of each partial area whose luminance value is within each quantization interval.

【0012】以上のような動作により、原画像データの
各部分領域の画素データの情報量は減少されるため、画
像データを圧縮することが可能となる。具体的には、例
えば、量子化区間を2区間とし、RGBカラー画素デー
タについて部分領域を4×4ピクセルの正方形領域と
し、各画素データの各色の画素値を8ビットとした場
合、原画像のデータの情報量は48バイトであるが、当
該正方形領域を二値化することにより、情報量は8バイ
トまで減少し、1/6となる。従って、どのような画像
であっても原画像の符号量から圧縮後の符号量を理論的
に導き出すことができ、圧縮後の画像データのサイズが
予測可能であるため、メモリ容量の余裕が小さいプリン
タ又は複写機等のような機器であっても、画像データが
メモリ容量を超えるという事態を回避することが可能と
なる。更に、高周波成分を削除するのではなく、部分領
域における輝度値の最大値及び最小値の間の区間を量子
化するという手段を採用することにより、例えば、線画
や文字の画像の線の輪郭部分のように、輝度が急激に変
化するような部分でも、輪郭の情報を正確に残すことが
可能となる。従って、原画像の情報量の削減(すなわ
ち、非可逆圧縮)による印字品質の低下を避けることが
可能となる。
By the above operation, the information amount of the pixel data of each partial area of the original image data is reduced, so that the image data can be compressed. Specifically, for example, when the quantization interval is 2 intervals, the partial area of the RGB color pixel data is a square area of 4 × 4 pixels, and the pixel value of each color of each pixel data is 8 bits, The information amount of data is 48 bytes, but by binarizing the square area, the information amount is reduced to 8 bytes and becomes 1/6. Therefore, the code amount after compression can be theoretically derived from the code amount of the original image for any image, and the size of the image data after compression can be predicted, so that the margin of the memory capacity is small. Even in a device such as a printer or a copying machine, it is possible to avoid the situation where the image data exceeds the memory capacity. Further, by adopting a means of quantizing the interval between the maximum value and the minimum value of the brightness value in the partial area, instead of deleting the high frequency component, for example, the outline portion of the line of a line drawing or a character image. As described above, the contour information can be accurately left even in a portion where the brightness changes abruptly. Therefore, it is possible to avoid deterioration of print quality due to reduction of the information amount of the original image (that is, lossy compression).

【0013】ここで、「原画像データ」とは、データ圧
縮処理を行う前の画像のデータをいう。「原画像」の種
類は特に特定するものではなく、白黒画像(グレイスケ
ール)、RGBカラー画像、CMYKカラー画像等の各
種画像が使用される。「部分領域」とは、全体画像の中
に含まれている領域をいい、領域の形やサイズは特に特
定するものではない。従って、矩形領域、六角形領域等
の平面充填図形で区分された領域や、画像の輪郭に対応
して区分された領域等が考えられる。「画素データ」と
は、画像データを構成する各ピクセルのデータをいい、
例えば、RGBカラー画像であればR(赤),G
(緑),B(青)の各色の強度データの組をいう。「輝
度値」とは、各ピクセルの明るさの値をいい、例えば、
RGBカラー画像の場合には、輝度値Yは、Y=0.2
99R+0.587G+0.114Bのような所定の計
算式により算出される。区間算出手段が区間の分割を行
う分割数については特に特定するものではなく、2区
間、3区間、4区間等、圧縮する画像の特徴や画像デー
タ圧縮装置使用する機器の目的に応じて決められる。ま
た、区間算出手段が輝度値の最大値と最小値とを分割す
る方法は特に特定するものではなく、等分割であって
も、不等分分割であってもよい。「代表値」とは、一つ
の量子化区間内にある総ての画素データを代表するある
1つの画素データの値をいい、例えば、RGBカラー画
像の場合であれば、代表値は(R,G,B)の強度デー
タの組となる。代表値決定手段がこれらの代表値を決定
する方法は特に特定するものではなく、例えば、量子化
区間数を2区間とした場合には、各量子化区間の代表値
を決定する際には、例えば、当該区間内の各画素データ
の輝度値のうち最大のもの又は最小のものを代表値とす
る方法や、当該区間内の各画素データの輝度値の中央値
又は平均値若しくは最頻値にある輝度値を有する画素デ
ータを代表値とする方法等が採られる。また、ここでい
う「量子化」とは、輝度の値をいくつかの区間に区切っ
て、各区間内の輝度値を有する画素データを同一の数値
の組(例えば、RGBカラー画像であれば、(R,G,
B)の数値の組)で代表させることをいう。
Here, "original image data" means image data before data compression processing. The type of “original image” is not particularly specified, and various images such as a monochrome image (gray scale), RGB color image, CMYK color image, etc. are used. The “partial area” means an area included in the entire image, and the shape and size of the area are not particularly specified. Therefore, it is possible to consider an area divided by a plane filling figure such as a rectangular area or a hexagonal area, or an area divided corresponding to the contour of the image. "Pixel data" refers to the data of each pixel that makes up the image data,
For example, if it is an RGB color image, R (red), G
A set of intensity data for each color of (green) and B (blue). “Luminance value” refers to the brightness value of each pixel, for example,
In the case of an RGB color image, the brightness value Y is Y = 0.2
It is calculated by a predetermined calculation formula such as 99R + 0.587G + 0.114B. The number of divisions by which the section calculation unit divides the section is not particularly specified, and it is determined according to the characteristics of the image to be compressed, such as 2 sections, 3 sections, 4 sections, or the purpose of the device using the image data compression apparatus. . Further, the method for the section calculation means to divide the maximum value and the minimum value of the brightness value is not particularly specified, and may be equal division or unequal division. The “representative value” refers to a value of one pixel data representative of all the pixel data in one quantization section. For example, in the case of an RGB color image, the representative value is (R, G, B) intensity data set. The method by which the representative value determination means determines these representative values is not particularly specified. For example, when the number of quantization intervals is two, when determining the representative value of each quantization interval, For example, the method of using the maximum value or the minimum value of the brightness values of each pixel data in the section as a representative value, the median value or the average value or the mode value of the brightness values of the pixel data in the section, For example, a method of using pixel data having a certain brightness value as a representative value is adopted. The term "quantization" used here means that the luminance value is divided into several sections, and the pixel data having the luminance value in each section are grouped with the same numerical value (for example, in the case of an RGB color image, (R, G,
This is represented by the set of numerical values in B)).

【0014】請求項2に記載の発明は、請求項1に記載
の画像データ圧縮装置であって、区間算出手段は、最大
値と最小値の間の区間を2つの量子化区間に等分割する
ものであり、量子化手段は、部分領域の各画素データ
を、輝度値が大きい量子化区間の画素データと輝度値が
小さい量子化区間の画素データとに1ビットのデータで
二値化した二値化画像データと、輝度値が大きい量子化
区間の画素データの代表値及び輝度値が小さい量子化区
間の画素データの代表値とに変換するものであり、この
構成により、以下のような作用が得られる。
According to a second aspect of the present invention, in the image data compression apparatus according to the first aspect, the section calculating means equally divides the section between the maximum value and the minimum value into two quantization sections. The quantization means binarizes each pixel data of the partial region into 1-bit data into pixel data of a quantization section having a large luminance value and pixel data of a quantization section having a small luminance value. The binarized image data is converted into a representative value of pixel data in a quantization section having a large luminance value and a representative value of pixel data in a quantization section having a small luminance value. Is obtained.

【0015】代表値決定手段が、部分領域内の各画素デ
ータについて、輝度値が大きい量子化区間に属するもの
の代表値と、輝度値が小さい量子化区間に属するものの
代表値とを決定した後、量子化手段は、当該部分領域の
各画素データを、輝度値が大きい量子化区間の画素デー
タと輝度値が小さい量子化区間の画素データとに1ビッ
トのデータで二値化した二値化画像データ、及び輝度値
が大きい量子化区間の画素データの代表値、並びに輝度
値が小さい量子化区間の画素データの代表値に変換す
る。これにより、量子化手段による上記変換後の符号量
を(部分領域の画素数)×(1ビット)+(色数)×
(1色の1画素のビット数)とすることができる。従っ
て、データ圧縮処理後の符号量を効率的に減少させるこ
とができる。
After the representative value deciding means decides, for each pixel data in the partial region, a representative value belonging to a quantization section having a large luminance value and a representative value belonging to a quantization section having a small luminance value, The quantizing means binarizes each pixel data of the partial area into 1-bit data for the pixel data of the quantization section having a large luminance value and the pixel data of the quantization section having a small luminance value. The data is converted into a representative value of pixel data in a quantization section having a large luminance value and a representative value of pixel data in a quantization section having a small luminance value. As a result, the code amount after the conversion by the quantizing means is (the number of pixels in the partial area) × (1 bit) + (the number of colors) ×
(Bit number of one pixel of one color). Therefore, the code amount after the data compression processing can be efficiently reduced.

【0016】ここで、「二値化」とは、2つの値に置き
換えることをいい、具体的には、輝度値が大きい量子化
区間に属する画素データを一つの値の組(例えば、
(R,G,B)の組)、輝度値が小さい量子化区間に属
する画素データを他の一つの値の組に置き換えることを
いう。
Here, "binarization" means replacing with two values. Specifically, pixel data belonging to a quantization interval having a large luminance value is a set of one value (for example,
(A set of (R, G, B)), which means replacing pixel data belonging to a quantization interval having a small luminance value with another set of values.

【0017】請求項3に記載の発明は、請求項2に記載
の画像データ圧縮装置であって、代表値決定手段は、部
分領域の画素データのうち、輝度値が大きい量子化区間
に対する画素データの代表値を、部分領域において最大
の輝度値を有する画素データの値とし、部分領域の画素
データのうち、輝度値が小さい量子化区間に対する画素
データの代表値を、部分領域において最小の輝度値を有
する画素データの値とするものであり、この構成によ
り、部分領域の画素データのうち、輝度値が大きい量子
化区間の画素データは、総て当該部分領域における最大
の輝度値を有する画素データの値とされ、輝度値が小さ
い量子化区間の画素データは、総て当該部分領域におい
て最小の輝度値を有する画素データの値とされる。従っ
て、特に文字や線画からなる画像については、線の輪郭
が強調され、輪郭情報を多く残すことが可能となり、デ
ータ圧縮後の画像データの画質の低下を防止することが
可能となる。
According to a third aspect of the invention, there is provided the image data compression apparatus according to the second aspect, wherein the representative value determining means is a pixel data for a quantization section having a large luminance value among the pixel data of the partial area. The representative value of is the value of the pixel data having the maximum brightness value in the partial area, and the representative value of the pixel data for the quantization section having the smaller brightness value in the pixel data of the partial area is the minimum brightness value in the partial area. With this configuration, the pixel data in the quantization section having a large luminance value among the pixel data in the partial area is all pixel data having the maximum luminance value in the partial area. And the pixel data in the quantization section having a small luminance value is the value of the pixel data having the smallest luminance value in the partial area. Therefore, especially for an image composed of characters and line drawings, the contour of the line is emphasized, a large amount of contour information can be left, and the deterioration of the image quality of the image data after data compression can be prevented.

【0018】請求項4に記載の発明は、請求項1又は2
に記載の画像データ圧縮装置であって、代表値決定手段
は、部分領域の画素データの輝度値のヒストグラムを生
成するヒストグラム生成手段と、ヒストグラムに基づき
各量子化区間における代表値の値を決定する代表値抽出
手段と、を有することを特徴とするものであり、この構
成により、ヒストグラム生成手段は、部分領域の各画素
の輝度値のヒストグラムを生成し、当該ヒストグラムに
おける輝度値の分布に応じて、代表値を決定する。従っ
て、原画像中の部分領域における画像の色変化状態に応
じて最適な代表値を決定することが可能となり、データ
圧縮による画質の劣化を最小限に抑えることができる。
The invention according to claim 4 is the invention according to claim 1 or 2.
In the image data compression device described in (1), the representative value determining means determines a value of the representative value in each quantization section based on the histogram generating means for generating a histogram of the luminance value of the pixel data of the partial area and the histogram. The representative value extracting means and the representative value extracting means are provided, and with this configuration, the histogram generating means generates a histogram of the brightness values of each pixel of the partial region, and according to the distribution of the brightness values in the histogram. , Determine the typical value. Therefore, the optimum representative value can be determined according to the color change state of the image in the partial area of the original image, and the deterioration of the image quality due to the data compression can be minimized.

【0019】ここで、ヒストグラム生成手段は、ヒスト
グラムの区間幅を部分領域の画素数に応じて適切に決定
する。例えば、部分領域が4×4=16画素のサイズの
場合、区間数は画素数の1/2〜1倍(8〜16区間)
程度とする。代表値抽出手段がヒストグラムから代表値
を決定する方法については特に限定するものではない
が、例えば、2つの量子化区間を使用する場合の一例と
しては、例えば以下のように行われる。
Here, the histogram generating means appropriately determines the section width of the histogram in accordance with the number of pixels in the partial area. For example, when the partial area has a size of 4 × 4 = 16 pixels, the number of sections is 1/2 to 1 times the number of pixels (8 to 16 sections).
The degree. The method for the representative value extracting means to determine the representative value from the histogram is not particularly limited, but an example of using two quantization intervals is, for example, as follows.

【0020】ヒストグラムの形が大小2つの極大値(ピ
ーク)を有する形状である場合には、当該領域の画像は
輪郭部分を含む可能性が高いため、輪郭の情報を多く残
すべく、輝度値が大きい量子化区間の画素データの代表
値は、輝度値が大きい量子化区間に属する総ての画素デ
ータのうちの輝度値が最大の画素データとし、輝度値が
小さい量子化区間の画素データの代表値は、輝度値が小
さい量子化区間に属する総ての画素データのうちの輝度
値が最小の画素データとする。
When the histogram has a shape having two maximum values (peak) of large and small, the image of the area is likely to include a contour portion, and therefore the brightness value is set to leave a large amount of contour information. The representative value of the pixel data in the large quantization section is the pixel data with the largest luminance value among all the pixel data belonging to the quantization section with the large luminance value, and the representative value of the pixel data in the quantization section with the small luminance value. The value is the pixel data having the smallest luminance value among all the pixel data belonging to the quantization section having the smaller luminance value.

【0021】また、ヒストグラムの形状が、1つの極大
値を有するなだらかな分布(ヒストグラムの分散値が所
定の値以上の分布)の場合には、当該部分領域の画像は
色彩が連続的に変化するぼかしのような画像である可能
性が高いため、色の変化をなだらかにすべく、輝度値が
大きい量子化区間の画素データの代表値は、輝度値が大
きい量子化区間に属する総ての画素データの輝度値の中
央値の輝度を有する画素データとし、輝度値が小さい量
子化区間の画素データの代表値は、輝度値が小さい量子
化区間に属する総ての画素データの輝度値の中央値の輝
度を有する画素データとする。
Further, when the shape of the histogram is a gentle distribution having one maximum value (a distribution in which the distribution value of the histogram is a predetermined value or more), the color of the image of the partial region continuously changes. Since the image is likely to be blurred, the representative value of the pixel data in the quantization section with a large luminance value is all the pixels belonging to the quantization section with a large luminance value in order to smooth the color change. The pixel data having the brightness of the median of the brightness values of the data, and the representative value of the pixel data of the quantization interval having the low brightness value is the median value of the brightness values of all the pixel data belonging to the quantization intervals having the low brightness value. Pixel data having a luminance of.

【0022】また、ヒストグラムの形状が、1つの極大
値を有する急峻な分布(ヒストグラムの分散値が所定の
値以下の分布)の場合には、当該部分領域の画像は殆ど
色の変化のない画像である可能性が高いため、色の変化
を最小限にすべく、輝度値が大きい量子化区間の画素デ
ータの代表値は、輝度値が大きい量子化区間に属する総
ての画素データの輝度値の最小値の輝度を有する画素デ
ータとし、輝度値が小さい量子化区間の画素データの代
表値は、輝度値が小さい量子化区間に属する総ての画素
データの輝度値の最大値の輝度を有する画素データとす
る。
When the shape of the histogram is a steep distribution having one maximum value (a distribution in which the variance value of the histogram is less than or equal to a predetermined value), the image of the partial area is an image with almost no color change. Therefore, in order to minimize the color change, the representative value of the pixel data in the quantization section with a large luminance value is the luminance value of all the pixel data belonging to the quantization section with a large luminance value. The pixel data having the minimum value of luminance is represented, and the representative value of the pixel data in the quantization section having the small luminance value has the luminance of the maximum value of the luminance values of all the pixel data belonging to the quantization section having the small luminance value. This is pixel data.

【0023】請求項5に記載の発明は、請求項1乃至4
の何れか一に記載の画像データ圧縮装置であって、部分
画像抽出手段が原画像データを分割する部分領域の大き
さを設定する部分領域サイズ設定手段を有することを特
徴とするものであり、この構成により、圧縮する画像の
細かさによって、領域サイズを調整することによって圧
縮の際の分解能を自由に設定することが可能となり、圧
縮する原画像に適合して最適な分解能でデータ圧縮を行
うことが可能となる。
The invention described in claim 5 is the invention according to claims 1 to 4.
The image data compression apparatus according to any one of the items, wherein the partial image extraction means has a partial area size setting means for setting a size of a partial area for dividing the original image data, With this configuration, it is possible to freely set the resolution at the time of compression by adjusting the area size according to the fineness of the image to be compressed, and the data is compressed at the optimum resolution in conformity with the original image to be compressed. It becomes possible.

【0024】本発明の請求項6に記載の画像データ圧縮
方法は、原画像データを複数の部分領域に分割し、各部
分領域の画素データを抽出する部分画像抽出ステップ
と、部分画像抽出ステップにおいて抽出した部分領域の
各画素データについて輝度値を計算する輝度値計算ステ
ップと、部分領域の各画素データの輝度値の最大値及び
最小値を求め、最大値と最小値の間の区間を複数の区間
に分割した量子化区間を出力する区間算出ステップと、
各量子化区間に属する画素データの代表値を決定する代
表値決定ステップと、各量子化区間において、当該量子
化区間に属する総ての画素データを、当該量子化区間に
おける代表値とすることにより各画素データを量子化す
る量子化ステップと、を備えたものであり、この構成に
より、原画像の符号量から圧縮後の符号量を理論的に導
き出すことが可能となるため、圧縮後の画像データのサ
イズが予測可能となる。従って、メモリ容量の余裕が小
さいプリンタ又は複写機等のような機器であっても、画
像データがメモリ容量を超えるという事態を回避するこ
とが可能となる。また、高周波成分を削除するのではな
く、部分領域における輝度値の最大値及び最小値の間の
区間を量子化するという手段を採用することにより、例
えば、線画や文字の画像の線の輪郭部分のように、輝度
が急激に変化するような部分でも、輪郭の情報を正確に
残すことが可能となる。従って、原画像の情報量の削減
(すなわち、非可逆圧縮)による印字品質の低下を避け
ることが可能となる。
According to a sixth aspect of the present invention, there is provided a partial image extracting step of dividing original image data into a plurality of partial areas and extracting pixel data of each partial area, and a partial image extracting step. A brightness value calculation step of calculating a brightness value for each pixel data of the extracted partial area, a maximum value and a minimum value of the brightness value of each pixel data of the partial area are obtained, and a section between the maximum value and the minimum value is divided into a plurality of sections. A section calculation step of outputting a quantized section divided into sections,
By the representative value determination step of determining the representative value of the pixel data belonging to each quantization interval, and by setting all the pixel data belonging to the quantization interval in each quantization interval as the representative value in the quantization interval. Quantization step for quantizing each pixel data, and with this configuration, since it is possible to theoretically derive the code amount after compression from the code amount of the original image, the image after compression The size of data can be predicted. Therefore, even in a device such as a printer or a copying machine having a small memory capacity margin, it is possible to avoid the situation where the image data exceeds the memory capacity. Further, by adopting a means of quantizing the interval between the maximum value and the minimum value of the brightness value in the partial area, instead of deleting the high frequency component, for example, the outline part of the line of a line drawing or a character image. As described above, the contour information can be accurately left even in a portion where the brightness changes abruptly. Therefore, it is possible to avoid deterioration of print quality due to reduction of the information amount of the original image (that is, lossy compression).

【0025】請求項7に記載の発明は、請求項6に記載
の画像データ圧縮方法であって、区間算出ステップにお
いては、最大値と最小値の間の区間を2つの量子化区間
に等分割し、量子化ステップにおいては、部分領域の各
画素データを、輝度値が大きい量子化区間の画素データ
と輝度値が小さい量子化区間の画素データとに1ビット
のデータで二値化した二値化画像データと、輝度値が大
きい量子化区間の画素データの代表値及び輝度値が小さ
い量子化区間の画素データの代表値とに変換することを
特徴とするものであり、この構成により、量子化手段に
よる変換後の符号量を(部分領域の画素数)×(1ビッ
ト)+(色数)×(1色の1画素のビット数)とするこ
とができるため、データ圧縮処理後の符号量を効率的に
減少させることができる。
The invention described in claim 7 is the image data compression method according to claim 6, wherein in the interval calculation step, the interval between the maximum value and the minimum value is equally divided into two quantization intervals. Then, in the quantization step, each pixel data of the partial region is binarized by 1-bit data into pixel data in a quantization section having a large luminance value and pixel data in a quantization section having a small luminance value. The image data is converted into a representative value of pixel data in a quantization section having a large luminance value and a representative value of pixel data in a quantization section having a small luminance value. Since the code amount after conversion by the conversion means can be set to (the number of pixels in the partial area) × (1 bit) + (the number of colors) × (the number of bits of one pixel of one color), the code after the data compression processing Can effectively reduce the amount Wear.

【0026】請求項8に記載の発明は、請求項7に記載
の画像データ圧縮方法であって、代表値決定ステップに
おいては、部分領域の画素データのうち、輝度値が大き
い量子化区間に対する画素データの代表値を、部分領域
において最大の輝度値を有する画素データの値とし、部
分領域の画素データのうち、輝度値が小さい量子化区間
に対する画素データの代表値を、部分領域において最小
の輝度値を有する画素データの値とすることを特徴とす
るものであり、この構成により、特に文字や線画からな
る画像については、線の輪郭が強調され、輪郭情報を多
く残すことが可能となり、データ圧縮後の画像データの
画質の低下を防止することが可能となる。
The invention described in claim 8 is the image data compression method according to claim 7, wherein in the representative value determination step, among the pixel data of the partial region, the pixel for the quantization interval having a large luminance value is selected. The representative value of the data is taken as the value of the pixel data having the maximum brightness value in the partial area, and the representative value of the pixel data for the quantization section having the smaller brightness value in the pixel data of the partial area is the minimum brightness value in the partial area. It is characterized in that it is set to the value of pixel data having a value. With this configuration, especially for an image composed of characters and line drawings, the contour of the line is emphasized, and it becomes possible to leave a lot of contour information. It is possible to prevent the deterioration of the image quality of the compressed image data.

【0027】請求項9に記載の発明は、請求項6又は7
に記載の画像データ圧縮方法であって、代表値決定ステ
ップにおいては、部分領域の画素データの輝度値のヒス
トグラムを生成するヒストグラム生成ステップと、ヒス
トグラムに基づき各量子化区間における代表値の値を決
定する代表値抽出ステップと、を有することを特徴とす
るものであり、この構成により、部分領域の各画素の輝
度値のヒストグラムを生成し、当該ヒストグラムにおけ
る輝度値の分布に応じて、代表値を決定するため、原画
像中の部分領域における画像の色変化状態に応じて最適
な代表値を決定することが可能となり、データ圧縮によ
る画質の劣化を最小限に抑えることができる。
The invention according to claim 9 is the invention according to claim 6 or 7.
The image data compression method according to claim 1, wherein in the representative value determining step, a histogram generating step for generating a histogram of the brightness value of the pixel data of the partial region, and a representative value value in each quantization interval based on the histogram are determined. And a representative value extracting step, which is configured to generate a histogram of the brightness value of each pixel of the partial region, and to generate the representative value according to the distribution of the brightness values in the histogram. Therefore, the optimum representative value can be determined according to the color change state of the image in the partial area in the original image, and the deterioration of the image quality due to the data compression can be minimized.

【0028】請求項10に記載の発明は、請求項6乃至
9の何れか一に記載の画像データ圧縮方法であって、部
分画像抽出ステップにおいて、原画像データを分割する
部分領域の大きさを設定する部分領域サイズ設定ステッ
プを有することを特徴とするものであり、この構成によ
り、圧縮する画像の細かさによって、領域サイズを調整
することにより圧縮の際の分解能を自由に設定すること
が可能となり、圧縮する原画像に適合して最適な分解能
でデータ圧縮を行うことが可能となる。
The tenth aspect of the present invention is the image data compression method according to any one of the sixth to ninth aspects, wherein in the partial image extracting step, the size of the partial area for dividing the original image data is set. It is characterized by having a partial area size setting step to be set. With this configuration, it is possible to freely set the resolution for compression by adjusting the area size according to the fineness of the image to be compressed. Therefore, it becomes possible to perform data compression with an optimum resolution in conformity with the original image to be compressed.

【0029】請求項11に記載のプログラムは、コンピ
ュータを請求項1乃至5の何れか一に記載の画像データ
圧縮装置として機能させる構成としたことにより、プロ
グラムをコンピュータで実行させることにより、請求項
1乃至5の何れか一に記載の画像データ圧縮装置と同様
の作用が得られる。
A program according to claim 11 is configured such that the computer is made to function as the image data compression device according to any one of claims 1 to 5, and the program is executed by the computer. The same operation as the image data compression device according to any one of 1 to 5 is obtained.

【0030】請求項12に記載の記録媒体は、請求項1
1に記載のプログラムが記録された構成としたことによ
り、記録媒体に記録されたプログラムをコンピュータに
読み込ませて実行させることにより、請求項1乃至5の
何れか一に記載の画像データ圧縮装置と同様の作用が得
られる。
A recording medium according to claim 12 is the recording medium according to claim 1.
The image data compression apparatus according to claim 1, wherein the program recorded in the recording medium is read by a computer to be executed, and the image data compression apparatus according to claim 1. Similar effects are obtained.

【0031】以下に本発明の一実施の形態について、図
面を参照しながら説明する。
An embodiment of the present invention will be described below with reference to the drawings.

【0032】(実施の形態1)図1は本発明の実施の形
態1に係る画像データ圧縮装置のブロック図である。
(Embodiment 1) FIG. 1 is a block diagram of an image data compression apparatus according to Embodiment 1 of the present invention.

【0033】図1において、画像入力装置1から入力さ
れた原画像データは、画像データ圧縮装置2によって圧
縮された後、圧縮後の画像データが画像出力装置3に出
力される。画像入力装置1は、スキャナ、デジタルカメ
ラ等の画像を取り込んで画像データとして出力する装置
をいう。また、画像出力装置3とは、プリンタ、複写
機、ファクシミリ等の画像を映像画面に表示し、又は印
刷する等によって出力する装置である。
In FIG. 1, the original image data input from the image input device 1 is compressed by the image data compression device 2, and the compressed image data is output to the image output device 3. The image input device 1 is a device such as a scanner or a digital camera that captures an image and outputs it as image data. The image output device 3 is a device that outputs an image of a printer, a copying machine, a facsimile, etc. by displaying it on a video screen or by printing it.

【0034】画像データ圧縮装置2は、画像格納手段
4、部分画像抽出手段5、輝度値計算手段6、区間算出
手段7、代表値決定手段8、量子化手段11、及び部分
領域サイズ決定手段12を有している。
The image data compression device 2 includes an image storage means 4, a partial image extraction means 5, a brightness value calculation means 6, a section calculation means 7, a representative value determination means 8, a quantization means 11, and a partial area size determination means 12. have.

【0035】画像格納手段4は、画像入力装置1から入
力される原画像データ及び圧縮後の画像データを格納す
るものであり、RAMや外部記憶装置等によって構成さ
れる。部分画像抽出手段5は、画像格納手段4に格納さ
れた原画像データを複数の部分領域に分割し、各部分領
域の画素データを抽出する。輝度値計算手段6は、部分
画像抽出手段5が抽出した部分領域の各画素データにつ
いて輝度値を計算する。区間算出手段7は、輝度値計算
手段6から出力された部分領域の各画素データの輝度値
の最大値及び最小値を求め、当該最大値と最小値の間の
区間を複数の区間に分割した量子化区間を出力する。な
お、本実施の形態においては、区間算出手段7は、上記
最大値と最小値の間の区間を2区間に等分するものとす
る。すなわち、区間算出手段7は、上記最大値と最小値
の平均値を計算し、当該平均値を量子化区間を分ける閾
値とする。以下、当該閾値より大きい輝度値の区間を量
子化区間H、当該閾値以下の輝度値の区間を量子化区間
Lという。
The image storage means 4 stores the original image data input from the image input device 1 and the compressed image data, and is composed of a RAM, an external storage device and the like. The partial image extraction means 5 divides the original image data stored in the image storage means 4 into a plurality of partial areas, and extracts pixel data of each partial area. The brightness value calculation means 6 calculates the brightness value for each pixel data of the partial area extracted by the partial image extraction means 5. The section calculation unit 7 obtains the maximum value and the minimum value of the brightness value of each pixel data of the partial area output from the brightness value calculation unit 6, and divides the section between the maximum value and the minimum value into a plurality of sections. Output the quantization interval. In the present embodiment, the section calculating means 7 equally divides the section between the maximum value and the minimum value into two sections. That is, the section calculation means 7 calculates the average value of the maximum value and the minimum value, and uses the average value as a threshold for dividing the quantization section. Hereinafter, a section having a brightness value larger than the threshold is called a quantization section H, and a section having a brightness value not larger than the threshold is called a quantization section L.

【0036】代表値決定手段8は、各量子化区間に属す
る画素データの代表値を決定する。本実施の形態におい
ては、代表値決定手段8は、ヒストグラム生成手段9及
び代表値抽出手段10からなる。ヒストグラム生成手段
9は、輝度値計算手段6から出力される原画像データの
部分領域にある各画素データの輝度値のヒストグラムを
生成する。代表値抽出手段10は、ヒストグラム生成手
段9が生成したヒストグラムに基づき各量子化区間にお
ける代表値の値を決定する。
The representative value determining means 8 determines a representative value of pixel data belonging to each quantization interval. In the present embodiment, the representative value determining means 8 comprises a histogram generating means 9 and a representative value extracting means 10. The histogram generating means 9 generates a histogram of the brightness value of each pixel data in the partial area of the original image data output from the brightness value calculating means 6. The representative value extracting means 10 determines the value of the representative value in each quantization interval based on the histogram generated by the histogram generating means 9.

【0037】量子化手段11は、各量子化区間におい
て、当該量子化区間に属する総ての画素データの値を、
当該量子化区間における代表値とすることにより、各画
素データを量子化することによりデータ圧縮し、画像格
納手段4に格納する。
The quantizing means 11 calculates the values of all the pixel data belonging to the quantization section in each quantization section,
By setting the representative value in the quantization section, each pixel data is quantized to be data-compressed and stored in the image storage unit 4.

【0038】以上のように構成された本実施の形態にお
ける画像データ圧縮装置において、以下その画像圧縮方
法について説明する。
The image compression method of the image data compression apparatus of the present embodiment configured as described above will be described below.

【0039】図2は本発明の実施の形態2に係る画像デ
ータ圧縮方法の全体の処理手順を表すフローチャートで
あり、図3乃至図6は代表値決定手段が各量子化区間に
おいて代表値を決定する処理を表すフローチャートであ
る。
FIG. 2 is a flowchart showing the overall processing procedure of the image data compression method according to the second embodiment of the present invention, and FIGS. 3 to 6 are the representative value determining means determining the representative value in each quantization interval. 7 is a flowchart showing a process to be performed.

【0040】図2において、まず、画像入力装置1は、
原画像データを取り込んで、画像データ圧縮装置2に送
信する。ここで、本実施の形態においては、一例とし
て、原画像データはRGBカラー画像のデータであると
し、各画素の各色のデータは1バイトであるとする。画
像データ圧縮装置2は、入力された原画像データを、い
ったん画像格納手段4に格納する。次に、部分画像抽出
手段5は、画像格納手段4の原画像データをM×N画素
のL個の部分領域Sn(n=1,2,・・・,L)に分
割し、当該部分領域Snの画素データ{Rn(i,j),
n(i,j),Bn(i,j)}(i=1,2,3,
4、j=1,2,3,4)を画像格納手段4から読み込
む(S1)。なお、本実施の形態においては、説明の都
合上、一例として、M=4,N=4とし、各部分領域S
nのサイズは16画素とする。
In FIG. 2, first, the image input apparatus 1 is
The original image data is captured and transmitted to the image data compression device 2. Here, in the present embodiment, as an example, it is assumed that the original image data is RGB color image data and the data of each color of each pixel is 1 byte. The image data compression device 2 temporarily stores the input original image data in the image storage means 4. Next, the partial image extracting means 5 divides the original image data of the image storing means 4 into L partial areas S n (n = 1, 2, ..., L) of M × N pixels, and Pixel data of the area S n {R n (i, j),
G n (i, j), B n (i, j)} (i = 1, 2, 3,
4, j = 1, 2, 3, 4) is read from the image storage means 4 (S1). In the present embodiment, for convenience of description, as an example, M = 4 and N = 4, and each partial region S
The size of n is 16 pixels.

【0041】図7は原画像データと部分画像抽出手段に
より抽出された部分領域の画像の関係を示す模式図であ
る。図7に示すように、原画像データは、R(赤)画
像、G(緑)画像、B(青)画像の3枚の画像の組から
なる。部分画像抽出手段5は、この画像データを4×4
画素の部分領域Snに分割し、R,G,Bのそれぞれの
画像についての4×4画素の部分領域Snの画素データ
を抽出する。
FIG. 7 is a schematic diagram showing the relationship between the original image data and the image of the partial area extracted by the partial image extracting means. As shown in FIG. 7, the original image data consists of a set of three images, an R (red) image, a G (green) image, and a B (blue) image. The partial image extraction means 5 converts this image data into 4 × 4.
Divided into subregions S n of the pixel, and extracts R, G, each of the pixel data of the partial region S n of 4 × 4 pixels of the image of B.

【0042】次に、輝度値計算手段6は、部分画像抽出
手段5が抽出した部分領域SnのM×N×3個の画素デ
ータ{Rn(i,j),Gn(i,j),Bn(i,
j)}より、M×N個の輝度値{Yn(i,j)}を算
出する(S2)。ここで、輝度値Yn(i,j)の計算
式としては、RGBカラー画像の輝度値を求める一般的
に使用される式Yn(i,j)=0.299Rn(i,
j)+0.587Gn(i,j)+0.114Bn(i,
j)が使用される。
Next, the brightness value calculating means 6 has M × N × 3 pieces of pixel data {R n (i, j), G n (i, j) of the partial area S n extracted by the partial image extracting means 5. ), B n (i,
j)}, M × N luminance values {Y n (i, j)} are calculated (S2). Here, as a calculation formula of the brightness value Y n (i, j), a commonly used formula for calculating the brightness value of the RGB color image Y n (i, j) = 0.299R n (i, j)
j) + 0.587G n (i, j) + 0.114B n (i,
j) is used.

【0043】図8は部分領域の各画素データから輝度値
を算出する場合の当該部分領域の画素と輝度値との関係
を表す模式図である。図8に示すように、R,G,Bの
それぞれの4×4画素の部分領域Snの画素データから
上記計算式により輝度値を算出した結果、4×4個の輝
度値が得られる。
FIG. 8 is a schematic diagram showing the relationship between the brightness value and the pixels of the partial area when the brightness value is calculated from each pixel data of the partial area. As shown in FIG. 8, 4 × 4 luminance values are obtained as a result of calculating the luminance value from the pixel data of the partial region S n of 4 × 4 pixels of each of R, G, and B by the above calculation formula.

【0044】次に、区間算出手段6は、輝度値{Y
n(i,j)}をソートして、その最大値Yn,max及び最
小値Yn,minを求め、これから、閾値Yth=(Yn,min
n,max)/2を算出する(S3)。これにより、Y
n(i,j)>Ythの場合には当該画素データ{R
n(i,j),Gn(i,j),Bn(i,j)}は量子
化区間Hに属するものとされ、Yn(i,j)≦Yth
場合には当該画素データ{Rn(i,j),Gn(i,
j),Bn(i,j)}は量子化区間Lに属するものと
される。
Next, the section calculating means 6 determines the brightness value {Y
n (i, j)} is sorted to obtain the maximum value Y n, max and the minimum value Y n, min , and the threshold value Y th = (Y n, min +
Y n, max ) / 2 is calculated (S3). This makes Y
If n (i, j)> Y th , the pixel data {R
n (i, j), G n (i, j), B n (i, j)} is assumed to belong to the quantization interval H, the pixel in the case of Y n (i, j) ≦ Y th Data {R n (i, j), G n (i,
j), B n (i, j)} belong to the quantization interval L.

【0045】次に、ヒストグラム生成手段9は、輝度値
{Yn(i,j)}のヒストグラムを生成し(S4)、
代表値決定手段8は、当該ヒストグラムに基づいて、量
子化区間Hの代表値rH及び量子化区間Lの代表値rL
決定する(S5)。この代表値決定手段8がヒストグラ
ムから代表値rH,rLを決定する処理については、後に
より詳しく説明する。
Next, the histogram generating means 9 generates a histogram of luminance values {Y n (i, j)} (S4),
The representative value determining means 8 determines the representative value r H of the quantization section H and the representative value r L of the quantization section L based on the histogram (S5). The process by which the representative value determining means 8 determines the representative values r H and r L from the histogram will be described later in detail.

【0046】次に、量子化手段11は、部分領域Sn
各画素データ{Rn(i,j),Gn(i,j),B
n(i,j)}を、輝度値{Yn(i,j)}が大きい量
子化区間Hの画素データと輝度値が小さい量子化区間L
の画素データとに1ビットのデータで二値化した二値化
画像データ{bn(i,j)}と、輝度値が大きい量子
化区間Hの画素データの代表値rn,H及び輝度値が小さ
い量子化区間Lの画素データの代表値rn,Lとに変換
し、画像格納手段4に格納する(S6)。
Next, the quantizing means 11 uses the pixel data {R n (i, j), G n (i, j), B of each pixel of the partial area S n.
n (i, j)} is the pixel data of the quantization interval H having a large luminance value {Y n (i, j)} and the quantization interval L having a small luminance value.
Image data {b n (i, j)} that is binarized with 1-bit data, and the representative value r n, H and the brightness of the pixel data of the quantization interval H having a large brightness value. The pixel value is converted into the representative value r n, L of the pixel data in the quantization section L having a small value and stored in the image storage means 4 (S6).

【0047】図9は図8において計算された輝度値と量
子化手段が二値化することによって生成する二値化画像
データとの関係を表す模式図である。この場合、図8の
輝度値の最大値Yn,maxはYn(3,3)=255であり
最小値Yn,minはYn(0,0)=0であり、輝度値{Y
n(i,j)}の分布は2つの極大値を有する分布であ
るため(図8参照)、閾値Ythは127、代表値rn,H
は{Rn(3,3),G n(3,3),Bn(3,
3)}、代表値rn,Lは{Rn(0,0),Gn(0,
0),Bn(0,0)}とされる。そして、二値化画像
データは図9(b)に示したようになる。
FIG. 9 shows the luminance value and quantity calculated in FIG.
A binarized image generated by binarizing by the substituting means
It is a schematic diagram showing the relationship with data. In this case,
Maximum brightness value Yn, maxIs Yn(3,3) = 255
Minimum value Yn, minIs Yn(0,0) = 0, and the luminance value {Y
nThe distribution of (i, j)} is a distribution having two local maxima.
(See FIG. 8)thIs 127, the representative value rn, H
Is {Rn(3,3), G n(3,3), Bn(3,
3)}, representative value rn, LIs {Rn(0,0), Gn(0,
0), Bn(0,0)}. And the binarized image
The data is as shown in FIG. 9 (b).

【0048】以上の動作を総ての部分領域Sn(n=
1,2,・・・,L)について繰り返して行い(S7,
S8)、総ての部分領域Sn(n=1,2,・・・,
L)についての処理が終了すると、画像データ圧縮装置
2は、画像格納手段4に格納された二値化画像データ
{bn(i,j):i=1,2,3,4、j=1,2,
3,4、n=1,2,・・・,L}及び代表値
{rn,H,rn,L:n=1,2,・・・,L}を、圧縮画
像データとして画像出力装置3へ送信する(S9)。
All the partial areas S n (n = n
1, 2, ..., L) is repeated (S7,
S8), all partial areas S n (n = 1, 2, ...,
When the processing for L) is completed, the image data compression apparatus 2 causes the binarized image data {b n (i, j): i = 1, 2, 3, 4, j = stored in the image storage means 4. 1, 2,
3, 4, n = 1, 2, ..., L} and representative values {r n, H , r n, L : n = 1, 2, ..., L} are output as image data as compressed image data. It is transmitted to the device 3 (S9).

【0049】以上のように画像データを圧縮することに
より、本実施の形態の画像データ圧縮装置2において
は、原画像データの部分領域Snにおける画素データの
情報量から圧縮後の情報量を計算することが可能とな
る。例えば、1画素の画素データの情報量を1バイト×
3(色数)=3バイトとすると、4×4=16画素の部
分領域の情報量は48バイトである。これを、上記方法
によりデータ圧縮すると、二値化画像データの情報量が
16ビット(2バイト)、代表値の情報量が6バイトと
なるため、合計8バイトとなる。従って、符号量は1/
6となる。このように、本実施の形態の画像データ圧縮
装置2においては、圧縮後の符号量を理論的に予測する
ことが可能であるため、メモリ容量の余裕が小さい機器
においても、画像データがメモリ容量を超えるという事
態を回避することが可能である。
By compressing the image data as described above, in the image data compression apparatus 2 of the present embodiment, the information amount after compression is calculated from the information amount of the pixel data in the partial area S n of the original image data. It becomes possible to do. For example, the amount of information of pixel data of 1 pixel is 1 byte ×
If 3 (the number of colors) = 3 bytes, the information amount of the partial area of 4 × 4 = 16 pixels is 48 bytes. When this is data-compressed by the above method, the information amount of the binarized image data is 16 bits (2 bytes) and the information amount of the representative value is 6 bytes, so that the total is 8 bytes. Therefore, the code amount is 1 /
It becomes 6. As described above, in the image data compression apparatus 2 according to the present embodiment, since the code amount after compression can be theoretically predicted, even in a device having a small memory capacity margin, the image data has the memory capacity. It is possible to avoid the situation of exceeding.

【0050】次に、代表値決定手段が各量子化区間にお
いて代表値を決定する処理について詳細に説明する。
Next, the process in which the representative value determining means determines the representative value in each quantization interval will be described in detail.

【0051】図2のステップS4において、代表値決定
手段8のヒストグラム生成手段9は、輝度値計算手段6
により計算された部分領域Snの輝度値{Yn(i,
j)}から、輝度値の分布を表すヒストグラム{H
n(Y)}を生成する。このヒストグラムは、輝度値を
ある適当な区間に分けて、横軸に当該輝度値の区間をと
り、縦軸にそれぞれの輝度値の区間内にある画素数をと
ったものである。
In step S4 of FIG. 2, the histogram generating means 9 of the representative value determining means 8 causes the brightness value calculating means 6 to operate.
Luminance value of the calculated partial region S n by {Y n (i,
j)} from the histogram {H
n (Y)} is generated. In this histogram, the brightness value is divided into certain appropriate sections, the horizontal axis represents the brightness value section, and the vertical axis represents the number of pixels in each brightness value section.

【0052】次に、図3において、代表値抽出手段10
は、当該ヒストグラム{Hn(Y)}の極大点(ピー
ク)を探し、極大点が分裂しているか、すなわち、2以
上の極大点があり、それらが離れた位置にある(隣接し
ていない)か否かを判定する(S11)。
Next, referring to FIG. 3, the representative value extracting means 10
Finds a maximum point (peak) of the histogram {H n (Y)}, and the maximum points are divided, that is, there are two or more maximum points and they are at distant positions (not adjacent to each other). ) Or not (S11).

【0053】ここで、極大点が分裂している場合には、
当該部分領域Snの画像は、文字や線画等の輪郭(エッ
ジ)部分を含んでいる可能性が強いため、代表値抽出手
段10は、量子化区間Hの画素データの代表値rH,n
輝度の最大値Yn,maxとし、量子化区間Lの画素データ
の代表値rL,nを輝度の最小値Yn,minとする。
Here, when the maximum points are divided,
Since there is a strong possibility that the image of the partial region S n includes a contour (edge) portion such as a character or a line drawing, the representative value extracting unit 10 causes the representative value extracting unit 10 to represent the representative value r H, n of the pixel data in the quantization interval H. Is defined as the maximum luminance value Y n, max, and the representative value r L, n of the pixel data in the quantization interval L is defined as the minimum luminance value Y n, min .

【0054】すなわち、まず代表値抽出手段10は、部
分領域Snの中の輝度の最大値Yn,m axを取得し、当該最
大輝度値を有する画素データを取得する(S12)。こ
こで、最大輝度値を有する画素データが1個の場合には
(S13)、量子化区間Hの画素データの代表値rn,H
は当該画素データの値に決定される(S19)。しか
し、最大輝度値を有する画素データが2個以上存在する
場合には(S13)、代表値抽出手段10は、まず、そ
れらの画素データのうち、人が視覚的に最も強く認知す
る色である緑(G)の成分が最も大きい画素データを取
得する(S14)。ここで、G成分の最も大きい画素デ
ータが1個の場合には(S15)、代表値抽出手段10
は、当該G成分の最も大きい画素データを量子化区間H
の画素データの代表値rn,Hに決定する(S19)。し
かし、G成分の最も大きい画素データが2個以上ある場
合には(S15)、代表値抽出手段10は、今度は緑の
次に人が視覚的に最も強く認知する色である赤(R)の
成分が最も大きい画素データを取得する(S16)。こ
こで、R成分の最も大きい画素データが1個の場合には
(S17)、当該R成分の最も大きい画素データを量子
化区間Hの画素データの代表値rn,Hに決定する(S1
9)。しかし、R成分の最も大きい画素データが2個以
上ある場合には(S17)、代表値抽出手段10は、今
度は青(B)の成分が最も大きい画素データを取得し
(S18)、当該B成分の最も大きい画素データを量子
化区間Hの画素データの代表値rn,Hに決定する(S1
9)。次に、代表値抽出手段10は、部分領域Snの中
の輝度の最小値Yn,minを取得し、当該最小輝度値を有
する画素データを取得する(S20)。ここで、最小輝
度値を有する画素データが1個の場合には(S21)、
量子化区間Lの画素データの代表値rn,Lは当該画素デ
ータの値に決定される(S27)。しかし、最小輝度値
を有する画素データが2個以上存在する場合には(S2
1)、代表値抽出手段10は、まず、それらの画素デー
タのうち、人が視覚的に最も強く認知する色である緑
(G)の成分が最も小さい画素データを取得する(S2
2)。ここで、G成分の最も小さい画素データが1個の
場合には(S23)、代表値抽出手段10は、当該G成
分の最も小さい画素データを量子化区間Lの画素データ
の代表値rn, Lに決定する(S27)。しかし、G成分
の最も小さい画素データが2個以上ある場合には(S2
3)、代表値抽出手段10は、今度は緑の次に人が視覚
的に最も強く認知する色である赤(R)の成分が最も小
さい画素データを取得する(S24)。ここで、R成分
の最も小さい画素データが1個の場合には(S25)、
当該R成分の最も小さい画素データを量子化区間Lの画
素データの代表値rn,Lに決定する(S27)。しか
し、R成分の最も小さい画素データが2個以上ある場合
には(S25)、代表値抽出手段10は、今度は青
(B)の成分が最も小さい画素データを取得し(S2
6)、当該B成分の最も小さい画素データを量子化区間
Lの画素データの代表値rn,Lに決定する(S27)。
代表値決定手段8は、以上の処理により、決定された代
表値(rn,H,rn,L)を量子化手段11に出力し、処理
を終了する。
[0054] That is, the first representative value extracting unit 10 obtains the maximum value Y n, m ax of luminance in the partial region S n, obtains the pixel data having the maximum luminance value (S12). Here, when there is one pixel data having the maximum brightness value (S13), the representative value r n, H of the pixel data in the quantization interval H
Is determined by the value of the pixel data (S19). However, when there are two or more pieces of pixel data having the maximum luminance value (S13), the representative value extracting unit 10 firstly has a color that is visually most strongly recognized by a person among those pixel data. Pixel data having the largest green (G) component is acquired (S14). Here, when there is one piece of pixel data having the largest G component (S15), the representative value extracting means 10
Represents the pixel data with the largest G component in the quantization interval H.
The representative value r n, H of the pixel data is determined (S19). However, when there are two or more pieces of pixel data having the largest G component (S15), the representative value extracting means 10 is red (R), which is the color visually most strongly recognized by a person next to green. The pixel data having the largest component of is acquired (S16). Here, when the pixel data having the largest R component is one (S17), the pixel data having the largest R component is determined as the representative value r n, H of the pixel data in the quantization interval H (S1).
9). However, when there are two or more pieces of pixel data having the largest R component (S17), the representative value extracting means 10 acquires pixel data having the largest blue (B) component this time (S18), and the B The pixel data having the largest component is determined as the representative value r n, H of the pixel data in the quantization interval H (S1
9). Next, the representative value extraction means 10 acquires the minimum value Y n, min of the brightness in the partial area S n , and acquires the pixel data having the minimum brightness value (S20). Here, when there is one pixel data having the minimum luminance value (S21),
The representative value r n, L of the pixel data in the quantization section L is determined as the value of the pixel data (S27). However, if there are two or more pieces of pixel data having the minimum luminance value (S2
1) First, the representative value extracting unit 10 acquires pixel data having the smallest green (G) component, which is the color that a person visually perceives most strongly, from the pixel data (S2).
2). Here, when the number of pixel data having the smallest G component is one (S23), the representative value extracting unit 10 sets the pixel data having the smallest G component to the representative value r n, of the pixel data of the quantization interval L. It is determined to be L (S27). However, if there are two or more pixel data with the smallest G component (S2
3) The representative value extracting means 10 acquires pixel data having the smallest component of red (R), which is the color visually most strongly recognized by a person next to green (S24). Here, when the pixel data having the smallest R component is one (S25),
The pixel data having the smallest R component is determined as the representative value r n, L of the pixel data in the quantization section L (S27). However, when there are two or more pieces of pixel data having the smallest R component (S25), the representative value extracting unit 10 acquires pixel data having the smallest blue (B) component this time (S2).
6) The pixel data having the smallest B component is determined as the representative value r n, L of the pixel data in the quantization section L (S27).
The representative value determining means 8 outputs the representative value (r n, H , r n, L ) determined by the above processing to the quantizing means 11, and ends the processing.

【0055】ステップS11において、代表値抽出手段
10がヒストグラム{Hn(Y)}の極大点が分裂して
いないと判定した場合、代表値抽出手段10は、次に、
ヒストグラム{Hn(Y)}の極大点は1個であるか否
かを判定する(S30)。
If the representative value extracting means 10 determines in step S11 that the maximum points of the histogram {H n (Y)} are not divided, the representative value extracting means 10 next
It is determined whether the histogram {H n (Y)} has only one maximum point (S30).

【0056】ここで、極大点が1個の場合には、当該部
分領域Snの画像は、当該領域Sn内において単一色であ
るか若しくは殆ど色変化がない可能性が大きい。従っ
て、代表値抽出手段10は、量子化区間H及び量子化区
間Lの代表値rH,n、rL,nを、ともに当該極大点の輝度
値区間内にある画素データの値とする。
Here, when there is one maximum point, the image of the partial area S n is likely to be a single color or to have almost no color change in the area S n . Therefore, the representative value extraction means 10 sets the representative values r H, n and r L, n of the quantization interval H and the quantization interval L as the pixel data values within the brightness value interval of the maximum point.

【0057】すなわち、代表値抽出手段10は、まず、
輝度値分布の極大点の輝度値区間内にある画素データを
取得し(S31)、それらの画素データのうち、人が視
覚的に最も強く認知する色である緑(G)の成分が最も
大きい画素データを取得する(S32)。ここで、G成
分の最も大きい画素データが1個の場合には(S3
3)、代表値抽出手段10は、当該G成分の最も大きい
画素データを量子化区間H及び量子化区間Lの画素デー
タの代表値rn,H、rn,Lに決定する(S37)。しか
し、G成分の最も大きい画素データが2個以上ある場合
には(S33)、代表値抽出手段10は、今度は緑の次
に人が視覚的に最も強く認知する色である赤(R)の成
分が最も大きい画素データを取得する(S34)。ここ
で、R成分の最も大きい画素データが1個の場合には
(S35)、当該R成分の最も大きい画素データを量子
化区間H及び量子化区間Lの画素データの代表値
n,H、rn,Lに決定する(S37)。しかし、R成分の
最も大きい画素データが2個以上ある場合には(S3
5)、代表値抽出手段10は、今度は青(B)の成分が
最も大きい画素データを取得し(S36)、当該B成分
の最も大きい画素データを量子化区間H及び量子化区間
Lの画素データの代表値rn,H、rn,Lに決定する(S3
7)。代表値決定手段8は、以上の処理により、決定さ
れた代表値(rn,H,rn,L)を量子化手段11に出力
し、処理を終了する。
That is, the representative value extracting means 10 first
Pixel data within the luminance value section of the maximum point of the luminance value distribution is acquired (S31), and among these pixel data, the green (G) component, which is the color visually most strongly recognized by a person, is the largest. Pixel data is acquired (S32). Here, when the number of pixel data having the largest G component is one (S3
3), the representative value extracting means 10 determines the pixel data having the largest G component as the representative values r n, H , r n, L of the pixel data in the quantization interval H and the quantization interval L (S37). However, when there are two or more pieces of pixel data having the largest G component (S33), the representative value extracting means 10 in this case has the color red (R), which is the color visually most strongly recognized by a person next to green. The pixel data having the largest component is acquired (S34). Here, when the pixel data having the largest R component is one (S35), the pixel data having the largest R component is represented by the representative values r n, H of the pixel data of the quantization interval H and the quantization interval L, r n, L is determined (S37). However, if there are two or more pieces of pixel data with the largest R component (S3
5) The representative value extracting means 10 obtains the pixel data having the largest blue (B) component this time (S36), and the pixel data having the largest B component is the pixel of the quantization interval H and the quantization interval L. Data representative values r n, H and r n, L are determined (S3
7). The representative value determining means 8 outputs the representative value (r n, H , r n, L ) determined by the above processing to the quantizing means 11, and ends the processing.

【0058】ステップS30において、代表値抽出手段
10が、ヒストグラム{Hn(Y)}の極大点は1個以
上であると判定した場合、代表値抽出手段10は、次
に、輝度値の分散σ2を(数1)により計算する(S3
8)。
In step S30, when the representative value extracting means 10 determines that there is one or more maximum points in the histogram {H n (Y)}, the representative value extracting means 10 then disperses the brightness values. σ 2 is calculated by (Equation 1) (S3
8).

【0059】[0059]

【数1】 [Equation 1]

【0060】そして、代表値抽出手段10は、輝度値の
分散値σ2が所定の閾値σth 2以下か否かを判定する(S
39)。
Then, the representative value extracting means 10 determines whether or not the variance value σ 2 of the brightness values is less than or equal to a predetermined threshold value σ th 2 (S).
39).

【0061】ここで、輝度値の分散値σ2が所定の閾値
σth 2以下の場合には(S39)、当該部分領域Snの画
像は、当該部分領域Sn内における色の変化が比較的小
さいものである可能性が大きい。従って、代表値抽出手
段10は、量子化区間Hの画素データの代表値r
H,nを、量子化区間Hに属する画素データのうちの輝度
値が最小のものの値とし、量子化区間Lの画素データの
代表値rL,nを量子化区間Lに属する画素データのうち
の輝度値が最大のものの値とする。
[0061] Here, when the variance value sigma 2 of the luminance values of the predetermined threshold value sigma th 2 or less (S39), the image of the partial region S n, the color change in the partial region S n comparison It is likely to be small. Therefore, the representative value extracting means 10 determines the representative value r of the pixel data in the quantization interval H.
Let H, n be the value of the smallest luminance value of the pixel data belonging to the quantization interval H, and let the representative value r L, n of the pixel data of the quantization interval L be the value of the pixel data belonging to the quantization interval L. Has the maximum brightness value.

【0062】すなわち、まず、代表値抽出手段10は、
まず、量子化区間Hに属する画素データのうちの輝度値
が最小のものを取得し(S40)、取得した画素データ
の中で、人が視覚的に最も強く認知する色である緑
(G)の成分が最も小さい画素データを取得する(S4
1)。ここで、G成分の最も小さい画素データが1個の
場合には(S42)、代表値抽出手段10は、当該G成
分の最も小さい画素データを量子化区間Hの画素データ
の代表値rn,Hに決定する(S46)。しかし、G成分
の最も小さい画素データが2個以上ある場合には(S4
2)、代表値抽出手段10は、今度は緑の次に人が視覚
的に最も強く認知する色である赤(R)の成分が最も小
さい画素データを取得する(S43)。ここで、R成分
の最も小さい画素データが1個の場合には(S44)、
当該R成分の最も小さい画素データを量子化区間Hの画
素データの代表値rn,Hに決定する(S46)。しか
し、R成分の最も小さい画素データが2個以上ある場合
には(S44)、代表値抽出手段10は、今度は青
(B)の成分が最も小さい画素データを取得し(S4
5)、当該B成分の最も大きい画素データを量子化区間
Hの画素データの代表値rn,Hに決定する(S46)。
次に、代表値抽出手段10は、量子化区間Lに属する画
素データのうちの輝度値が最大のものを取得し(S4
7)、取得した画素データの中で、人が視覚的に最も強
く認知する色である緑(G)の成分が最も大きい画素デ
ータを取得する(S48)。ここで、G成分の最も大き
い画素データが1個の場合には(S49)、代表値抽出
手段10は、当該G成分の最も大きい画素データを量子
化区間Lの画素データの代表値rn,Lに決定する(S5
3)。しかし、G成分の最も大きい画素データが2個以
上ある場合には(S49)、代表値抽出手段10は、今
度は緑の次に人が視覚的に最も強く認知する色である赤
(R)の成分が最も大きい画素データを取得する(S5
0)。ここで、R成分の最も大きい画素データが1個の
場合には(S51)、当該R成分の最も大きい画素デー
タを量子化区間Lの画素データの代表値rn,Lに決定す
る(S53)。しかし、R成分の最も大きい画素データ
が2個以上ある場合には(S51)、代表値抽出手段1
0は、今度は青(B)の成分が最も大きい画素データを
取得し(S52)、当該B成分の最も大きい画素データ
を量子化区間Lの画素データの代表値rn,Lに決定する
(S53)。代表値決定手段8は、以上の処理により、
決定された代表値(rn,H,rn,L)を量子化手段11に
出力し、処理を終了する。
That is, first, the representative value extracting means 10
First, of the pixel data belonging to the quantization interval H, the pixel having the smallest luminance value is acquired (S40), and among the acquired pixel data, green (G), which is the color visually most strongly recognized by a person. The pixel data having the smallest component of is acquired (S4
1). Here, when the number of pixel data having the smallest G component is one (S42), the representative value extracting unit 10 sets the pixel data having the smallest G component to the representative value r n, of the pixel data of the quantization interval H. H is determined (S46). However, if there are two or more pixel data with the smallest G component (S4
2) The representative value extracting means 10 acquires pixel data in which the component of red (R), which is the color visually most strongly recognized by a person next to green, is the smallest (S43). Here, when the number of pixel data having the smallest R component is one (S44),
The pixel data having the smallest R component is determined as the representative value r n, H of the pixel data in the quantization interval H (S46). However, when there are two or more pieces of pixel data having the smallest R component (S44), the representative value extracting unit 10 acquires pixel data having the smallest blue (B) component this time (S4).
5) The pixel data having the largest B component is determined as the representative value r n, H of the pixel data in the quantization interval H (S46).
Next, the representative value extraction unit 10 acquires the pixel data having the largest luminance value among the pixel data belonging to the quantization interval L (S4).
7) Among the acquired pixel data, the pixel data having the largest green (G) component, which is the color visually recognized by the person most strongly, is acquired (S48). Here, when the number of pixel data having the largest G component is one (S49), the representative value extracting unit 10 sets the pixel data having the largest G component to the representative value r n, of the pixel data of the quantization section L. Determine to L (S5
3). However, when there are two or more pieces of pixel data having the largest G component (S49), the representative value extracting unit 10 detects red (R), which is the color visually most strongly recognized by a person next to green. The pixel data having the largest component of is acquired (S5
0). Here, when the number of pixel data having the largest R component is one (S51), the pixel data having the largest R component is determined as the representative value r n, L of the pixel data of the quantization interval L (S53). . However, when there are two or more pieces of pixel data having the largest R component (S51), the representative value extracting unit 1
For 0, this time, the pixel data having the largest blue (B) component is acquired (S52), and the pixel data having the largest B component is determined as the representative value r n, L of the pixel data of the quantization interval L ( S53). The representative value determination means 8 is
The determined representative value (r n, H , r n, L ) is output to the quantizing means 11, and the processing is ended.

【0063】ステップS39において、輝度値の分散値
σ2が所定の閾値σth 2より大きい場合には、当該部分領
域Snの画像は、当該部分領域Sn内における色の変化が
比較的大きいものである可能性が大きい。従って、代表
値抽出手段10は、量子化区間Hの画素データの代表値
H,nを、量子化区間Hに属する画素データのうちの輝
度値が量子化区間Hの中央値のものの値とし、量子化区
間Lの画素データの代表値rL,nを量子化区間Lに属す
る画素データのうちの輝度値が量子化区間Lの中央値の
ものの値とする。
[0063] In step S39, is larger than variance sigma 2 is the predetermined threshold value sigma th 2 of luminance values, the image of the partial region S n, the color change in the partial region S n is relatively large It is likely to be a thing. Therefore, the representative value extracting means 10 sets the representative value r H, n of the pixel data in the quantization section H as the value of the pixel data belonging to the quantization section H whose luminance value is the median value of the quantization section H. The representative value r L, n of the pixel data in the quantization interval L is the value of the pixel data belonging to the quantization interval L whose luminance value is the median value of the quantization interval L.

【0064】すなわち、代表値抽出手段10は、量子化
区間Hに属する画素データの輝度値のうちで最小のもの
n,pk1を取得し(S60)、更に、量子化区間Hに属
する画素データの輝度値のうちで最大のものYn,max
取得する(S61)。そして、量子化区間Hの代表輝度
値Yn,1=(Yn,pk1+Yn,max)/2を計算し、輝度値
がYn,1の画素データを取得する(S62)。次に、代
表値抽出手段10は、それらの取得した画素データのう
ち、人が視覚的に最も強く認知する色である緑(G)の
成分が最も大きい画素データを取得する(S63)。こ
こで、G成分の最も大きい画素データが1個の場合には
(S64)、代表値抽出手段10は、当該G成分の最も
大きい画素データを量子化区間Hの画素データの代表値
n,Hに決定する(S68)。しかし、G成分の最も大
きい画素データが2個以上ある場合には(S64)、代
表値抽出手段10は、今度は緑の次に人が視覚的に最も
強く認知する色である赤(R)の成分が最も大きい画素
データを取得する(S65)。ここで、R成分の最も大
きい画素データが1個の場合には(S66)、当該R成
分の最も大きい画素データを量子化区間Hの画素データ
の代表値rn,Hに決定する(S68)。しかし、R成分
の最も大きい画素データが2個以上ある場合には(S6
6)、代表値抽出手段10は、今度は青(B)の成分が
最も大きい画素データを取得し(S67)、当該B成分
の最も大きい画素データを量子化区間Hの画素データの
代表値rn,Hに決定する(S68)。次に、代表値抽出
手段10は、量子化区間Lに属する画素データの輝度値
のうちで最大のものYn,pk0を取得し(S69)、更
に、量子化区間Lに属する画素データの輝度値のうちで
最小のものYn,minを取得する(S70)。そして、量
子化区間Lの代表輝度値Yn ,0=(Yn,pk0+Yn,min
/2を計算し、輝度値がYn,0の画素データを取得する
(S71)。次に、代表値抽出手段10は、それらの取
得した画素データのうち、人が視覚的に最も強く認知す
る色である緑(G)の成分が最も小さい画素データを取
得する(S72)。ここで、G成分の最も大きい画素デ
ータが1個の場合には(S73)、代表値抽出手段10
は、当該G成分の最も小さい画素データを量子化区間L
の画素データの代表値rn,Lに決定する(S77)。し
かし、G成分の最も小さい画素データが2個以上ある場
合には(S73)、代表値抽出手段10は、今度は緑の
次に人が視覚的に最も強く認知する色である赤(R)の
成分が最も小さい画素データを取得する(S74)。こ
こで、R成分の最も小さい画素データが1個の場合には
(S75)、当該R成分の最も小さい画素データを量子
化区間Lの画素データの代表値rn,Lに決定する(S7
7)。しかし、R成分の最も小さい画素データが2個以
上ある場合には(S75)、代表値抽出手段10は、今
度は青(B)の成分が最も小さい画素データを取得し
(S76)、当該B成分の最も小さい画素データを量子
化区間Lの画素データの代表値rn,Lに決定する(S7
7)。代表値決定手段8は、以上の処理により、決定さ
れた代表値(rn,H,rn,L)を量子化手段11に出力
し、処理を終了する。
That is, the representative value extracting means 10 obtains the smallest luminance value Y n, pk1 of the pixel data belonging to the quantization interval H (S60), and further, the pixel data belonging to the quantization interval H. The maximum luminance value Y n, max is obtained (S61). Then, the representative luminance value Y n, 1 = (Y n, pk1 + Y n, max ) / 2 of the quantization interval H is calculated, and the pixel data having the luminance value Y n, 1 is acquired (S62). Next, the representative value extraction unit 10 acquires pixel data having the largest component of green (G), which is the color visually most strongly recognized by a person, from the acquired pixel data (S63). Here, when the number of pixel data having the largest G component is one (S64), the representative value extracting unit 10 sets the pixel data having the largest G component to the representative value r n, of the pixel data of the quantization interval H. H is determined (S68). However, when there are two or more pieces of pixel data having the largest G component (S64), the representative value extracting unit 10 detects red (R), which is the color visually most strongly recognized by a person next to green. The pixel data having the largest component of is acquired (S65). Here, when the pixel data having the largest R component is one (S66), the pixel data having the largest R component is determined as the representative value r n, H of the pixel data in the quantization interval H (S68). . However, if there are two or more pieces of pixel data with the largest R component (S6
6), the representative value extracting means 10 obtains the pixel data having the largest blue (B) component this time (S67), and sets the pixel data having the largest B component to the representative value r of the pixel data in the quantization interval H. It is determined to be n and H (S68). Next, the representative value extracting means 10 acquires the maximum luminance value Y n, pk0 of the pixel data belonging to the quantization section L (S69), and further, the luminance of the pixel data belonging to the quantization section L. The smallest value Y n, min is obtained (S70). Then, the representative luminance value Y n , 0 = (Y n, pk0 + Y n, min ) of the quantization section L
/ 2 is calculated, and pixel data having a luminance value of Y n, 0 is acquired (S71). Next, the representative value extraction unit 10 acquires pixel data having the smallest component of green (G), which is the color visually most strongly recognized by a person, from the acquired pixel data (S72). Here, when the number of pixel data with the largest G component is one (S73), the representative value extraction means 10
Represents the pixel data having the smallest G component in the quantization interval L.
The representative value r n, L of the pixel data is determined (S77). However, when there are two or more pieces of pixel data having the smallest G component (S73), the representative value extracting means 10 is red (R), which is the color visually most strongly recognized by a person next to green. The pixel data having the smallest component of is acquired (S74). Here, when the number of pixel data having the smallest R component is one (S75), the pixel data having the smallest R component is determined as the representative value r n, L of the pixel data of the quantization interval L (S7).
7). However, when there are two or more pieces of pixel data having the smallest R component (S75), the representative value extracting unit 10 acquires pixel data having the smallest blue (B) component this time (S76), and the B The pixel data having the smallest component is determined as the representative value r n, L of the pixel data in the quantization section L (S7).
7). The representative value determining means 8 outputs the representative value (r n, H , r n, L ) determined by the above processing to the quantizing means 11, and ends the processing.

【0065】以上のような処理により代表値決定手段8
は量子化区間H及び量子化区間Lの代表値rn,H,rn,L
を決定するが、具体的に輝度値の分布(ヒストグラム)
と代表値との関係を示すと図10のようになる。
By the above processing, the representative value determining means 8
Is a representative value r n, H , r n, L of the quantization interval H and the quantization interval L.
The brightness value distribution (histogram)
FIG. 10 shows the relationship between and the representative value.

【0066】図10は輝度値の分布と代表値の値との関
係を示す図である。
FIG. 10 is a diagram showing the relationship between the distribution of luminance values and the values of representative values.

【0067】図10において、(a)はヒストグラム
{Hn(Y)}の極大点(ピーク)が分裂している場合
を表しており、この場合、当該部分領域Snの画像は、
文字や線画等の輪郭(エッジ)部分を含んでいる可能性
が強いため、代表値抽出手段10は、量子化区間Hの画
素データの代表値rH,nを輝度の最大値Yn,maxとし、量
子化区間Lの画素データの代表値rL,nを輝度の最小値
n,minとする。
In FIG. 10, (a) shows the case where the maximum points (peaks) of the histogram {H n (Y)} are divided. In this case, the image of the partial area S n is
Since there is a strong possibility that the portion (edge) such as a character or a line drawing is included, the representative value extracting unit 10 sets the representative value r H, n of the pixel data in the quantization interval H to the maximum luminance value Y n, max. Then, the representative value r L, n of the pixel data in the quantization interval L is set as the minimum value Y n, min of the luminance.

【0068】(b)はヒストグラム{Hn(Y)}の極
大点(ピーク)は分裂しておらず、輝度値の分散値σ2
が所定の閾値σth 2より大きい場合を表しており、この
場合、当該部分領域Snの画像は、当該部分領域Sn内に
おける色の変化が比較的大きいものである可能性が大き
い。従って、代表値抽出手段10は、量子化区間Hの画
素データの代表値rH,nを、量子化区間Hに属する画素
データのうちの輝度値が量子化区間Hの中央値のものの
値とし、量子化区間Lの画素データの代表値rL, nを、
量子化区間Lに属する画素データのうちの輝度値が量子
化区間Lの中央値のものの値とする。
In (b), the maximum point (peak) of the histogram {H n (Y)} is not divided, and the variance value σ 2 of luminance values is
There represents a case where the predetermined threshold value sigma th 2 greater than this case, the image of the partial region S n is the possibility color change in the partial region S n is relatively large is large. Therefore, the representative value extracting means 10 sets the representative value r H, n of the pixel data in the quantization section H as the value of the pixel data belonging to the quantization section H whose luminance value is the median value of the quantization section H. , The representative value r L, n of the pixel data in the quantization section L is
The luminance value of the pixel data belonging to the quantization interval L is the value of the median value of the quantization interval L.

【0069】(c)はヒストグラム{Hn(Y)}の極
大点(ピーク)は分裂しておらず、輝度値の分散値σ2
が所定の閾値σth 2以下の場合を表しており、この場
合、当該部分領域Snの画像は、当該部分領域Sn内にお
ける色の変化が比較的小さいものである可能性が大き
い。従って、代表値抽出手段10は、量子化区間Hの画
素データの代表値rH,nを、量子化区間Hに属する画素
データのうちの輝度値が最小のものの値とし、量子化区
間Lの画素データの代表値rL,nを、量子化区間Lに属
する画素データのうちの輝度値が最大のものの値とす
る。
In (c), the maximum point (peak) of the histogram {H n (Y)} is not divided, and the variance value σ 2 of luminance values is
There represents a case of predetermined threshold value sigma th 2 or less, in this case, the image of the partial region S n is the possibility color change in the partial region S n is relatively small is large. Therefore, the representative value extracting means 10 sets the representative value r H, n of the pixel data in the quantization section H as the value of the pixel data belonging to the quantization section H having the smallest luminance value, and sets the representative value in the quantization section L. Let the representative value r L, n of the pixel data be the value of the pixel data having the largest luminance value among the pixel data belonging to the quantization interval L.

【0070】(d)はヒストグラム{Hn(Y)}の極
大点が1個の場合を表しており、この場合、当該部分領
域Snの画像は、当該領域Sn内において単一色であるか
若しくは殆ど色変化がない可能性が大きい。従って、代
表値抽出手段10は、量子化区間H及び量子化区間Lの
代表値rH,n、rL,nを、ともに当該極大点の輝度値区間
内にある画素データの値とする。
(D) shows a case where the histogram {H n (Y)} has one maximum point. In this case, the image of the partial area S n has a single color in the area S n . Or there is a high possibility that there is almost no color change. Therefore, the representative value extraction means 10 sets the representative values r H, n and r L, n of the quantization interval H and the quantization interval L as the pixel data values within the brightness value interval of the maximum point.

【0071】以上のように、本実施の形態の代表値決定
手段8は、原画像中の部分領域における画像の色変化状
態に応じて最適な代表値を決定することが可能であり、
データ圧縮による画質の劣化を最小限に抑えることがで
きる。また、画像の輪郭の情報を正確に残すことが可能
であるため、原画像の情報量の削減(非可逆圧縮)によ
る印字品質の低下を避けることが可能となる。
As described above, the representative value determining means 8 of the present embodiment can determine the optimum representative value according to the color change state of the image in the partial area in the original image.
It is possible to minimize deterioration of image quality due to data compression. Further, since it is possible to accurately leave the information of the contour of the image, it is possible to avoid the deterioration of the print quality due to the reduction of the information amount of the original image (irreversible compression).

【0072】なお、本実施の形態においては、代表値決
定手段8は、各量子化区間においてヒストグラムに基づ
き代表値を決定する構成としたが、圧縮する画像データ
が文字や線画などに限られている場合には、代表値決定
手段8は、部分画像抽出手段5が抽出した部分領域の画
素データのうち、輝度値が大きい量子化区間Hに対する
画素データの代表値を、当該部分領域において最大の輝
度値を有する画素データの値とし、当該部分領域の画素
データのうち、輝度値が小さい量子化区間Lに対する画
素データの代表値を、当該部分領域において最小の輝度
値を有する画素データの値とするように構成してもよ
い。このように構成することによって、文字や線画の輪
郭部分が強調され、輪郭情報を多く残すことが可能とな
り、データ圧縮後の画像データの画質の低下を防止する
ことが可能となる。
In the present embodiment, the representative value determining means 8 is configured to determine the representative value based on the histogram in each quantization section, but the image data to be compressed is not limited to characters or line drawings. If there is, the representative value determining unit 8 determines the maximum representative value of the pixel data for the quantization interval H having a large luminance value among the pixel data of the partial region extracted by the partial image extracting unit 5 in the partial region. A pixel data value having a brightness value is set, and a representative value of the pixel data for the quantization section L having a small brightness value in the pixel data of the partial region is set as a pixel data value having the minimum brightness value in the partial region. It may be configured to do so. With such a configuration, the contour portion of the character or line drawing is emphasized, a large amount of contour information can be left, and it is possible to prevent deterioration of the image quality of the image data after data compression.

【0073】また、本実施の形態においては、量子化区
間は2区間として説明したが、目的に応じて、量子化区
間を3区間以上とすることも可能である。
Further, in the present embodiment, the quantization interval is explained as two intervals, but it is also possible to set the quantization interval to three intervals or more depending on the purpose.

【0074】更に、本実施の形態では、一例として、部
分画像抽出手段5が抽出する部分領域のサイズを4×4
画素として説明したが、当該部分領域のサイズは、部分
領域サイズ決定手段12により、目的にあわせて変更す
ることが可能である。
Further, in the present embodiment, as an example, the size of the partial area extracted by the partial image extracting means 5 is 4 × 4.
Although described as a pixel, the size of the partial area can be changed by the partial area size determining unit 12 according to the purpose.

【0075】[0075]

【発明の効果】以上のように、本発明の請求項1に記載
の画像データ圧縮装置によれば、圧縮後の符号量の最大
量を理論的に予測することが可能であるため、メモリ容
量の余裕が小さい機器においても、画像データがメモリ
容量を超えるという事態を回避することが可能であると
ともに、画像の輪郭の情報を正確に残すことが可能であ
るため、原画像の情報量の削減(非可逆圧縮)による印
字品質の低下を避けることが可能な画像データ圧縮装置
を提供することができる。
As described above, according to the image data compression apparatus of the first aspect of the present invention, since it is possible to theoretically predict the maximum code amount after compression, the memory capacity is increased. It is possible to avoid the situation where the image data exceeds the memory capacity even in a device with a small margin, and to reduce the amount of information of the original image because the information of the outline of the image can be left accurately. It is possible to provide an image data compression device capable of avoiding deterioration of print quality due to (lossy compression).

【0076】請求項2に記載の発明によれば、データ処
理後の符号量を効率的に減少させることが可能なデータ
圧縮装置を提供することができる。
According to the second aspect of the present invention, it is possible to provide a data compression apparatus capable of efficiently reducing the code amount after data processing.

【0077】請求項3に記載の発明によれば、特に文字
や線画からなる画像について、データ圧縮処理後の画像
に輪郭情報が多く残るため、データ圧縮後の画像データ
の画質の低下を防止することが可能な画像データ圧縮装
置を提供することができる。
According to the third aspect of the present invention, particularly in the case of an image composed of characters and line drawings, a large amount of contour information remains in the image after the data compression processing, so that the deterioration of the image quality of the image data after the data compression is prevented. It is possible to provide an image data compression device capable of performing the above.

【0078】請求項4に記載の発明によれば、原画像中
の部分領域における画像の色変化状態に応じて最適な代
表値を決定することが可能となり、データ圧縮による画
質の劣化を最小限に抑えることが可能な画像データ圧縮
装置を提供することが可能となる。
According to the invention described in claim 4, it is possible to determine the optimum representative value according to the color change state of the image in the partial area in the original image, and the deterioration of the image quality due to the data compression is minimized. It is possible to provide an image data compression device that can suppress the above.

【0079】請求項5に記載の発明によれば、圧縮する
原画像に適合して最適な分解能でデータ圧縮を行うこと
が可能な画像データ圧縮装置を提供することができる。
According to the fifth aspect of the present invention, it is possible to provide an image data compression apparatus which is suitable for an original image to be compressed and can perform data compression with an optimum resolution.

【0080】本発明の請求項6に記載の画像データ圧縮
方法によれば、圧縮後の画像データのサイズが予測可能
なため、メモリ容量の余裕が小さいプリンタ又は複写機
等のような機器であっても、画像データがメモリ容量を
超えるという事態を回避することが可能であり、かつ、
データ圧縮処理後も輪郭の情報を正確に残すことが可能
となるため、非可逆圧縮による印字品質の低下を避ける
ことが可能な画像データ圧縮方法を提供することが可能
となる。
According to the image data compression method of the sixth aspect of the present invention, since the size of the compressed image data can be predicted, it is a device such as a printer or a copying machine having a small memory capacity margin. However, it is possible to avoid the situation where the image data exceeds the memory capacity, and
Since it is possible to accurately leave contour information even after the data compression processing, it is possible to provide an image data compression method capable of avoiding deterioration of print quality due to lossy compression.

【0081】請求項7に記載の発明によれば、データ処
理後の符号量を効率的に減少させることが可能なデータ
圧縮方法を提供することができる。
According to the invention described in claim 7, it is possible to provide a data compression method capable of efficiently reducing the code amount after data processing.

【0082】請求項8に記載の発明によれば、特に文字
や線画からなる画像について、データ圧縮処理後の画像
に輪郭情報が多く残るため、データ圧縮後の画像データ
の画質の低下を防止することが可能な画像データ圧縮方
法を提供することができる。
According to the invention as set forth in claim 8, a large amount of contour information remains in the image after the data compression processing, particularly for an image consisting of characters and line drawings, so that deterioration of the image quality of the image data after data compression is prevented. It is possible to provide a possible image data compression method.

【0083】請求項9に記載の発明によれば、原画像中
の部分領域における画像の色変化状態に応じて最適な代
表値を決定することが可能となり、データ圧縮による画
質の劣化を最小限に抑えることが可能な画像データ圧縮
方法を提供することが可能となる。
According to the invention described in claim 9, the optimum representative value can be determined according to the color change state of the image in the partial area in the original image, and the deterioration of the image quality due to the data compression is minimized. It is possible to provide an image data compression method that can suppress the above.

【0084】請求項10に記載の発明によれば、圧縮す
る原画像に適合して最適な分解能でデータ圧縮を行うこ
とが可能な画像データ圧縮装置を提供することができ
る。
According to the tenth aspect of the present invention, it is possible to provide an image data compression apparatus which can be adapted to the original image to be compressed and can perform data compression with an optimum resolution.

【0085】請求項11に記載のプログラムによれば、
プログラムをコンピュータで実行させることにより、請
求項1乃至5の何れか一に記載の画像データ圧縮装置と
同様の効果が得られる。
According to the program of claim 11,
By causing the computer to execute the program, the same effect as that of the image data compression apparatus according to any one of claims 1 to 5 can be obtained.

【0086】請求項12に記載の記録媒体によれば、記
録媒体に記録されたプログラムをコンピュータに読み込
ませて実行させることにより、請求項1乃至5の何れか
一に記載の画像データ圧縮装置と同様の効果が得られ
る。
According to the recording medium of the twelfth aspect, the image data compression apparatus according to any one of the first to fifth aspects is provided by causing a computer to read and execute the program recorded in the recording medium. The same effect can be obtained.

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

【図1】本発明の実施の形態1に係る画像データ圧縮装
置のブロック図
FIG. 1 is a block diagram of an image data compression device according to a first embodiment of the present invention.

【図2】本発明の実施の形態2に係る画像データ圧縮方
法の全体の処理手順を表すフローチャート
FIG. 2 is a flowchart showing the overall processing procedure of the image data compression method according to the second embodiment of the present invention.

【図3】代表値決定手段が各量子化区間において代表値
を決定する処理を表すフローチャート
FIG. 3 is a flowchart showing a process in which a representative value determining unit determines a representative value in each quantization interval.

【図4】代表値決定手段が各量子化区間において代表値
を決定する処理を表すフローチャート
FIG. 4 is a flowchart showing a process in which a representative value determining unit determines a representative value in each quantization interval.

【図5】代表値決定手段が各量子化区間において代表値
を決定する処理を表すフローチャート
FIG. 5 is a flowchart showing a process in which the representative value determining unit determines a representative value in each quantization interval.

【図6】代表値決定手段が各量子化区間において代表値
を決定する処理を表すフローチャート
FIG. 6 is a flowchart showing a process in which a representative value determining unit determines a representative value in each quantization interval.

【図7】原画像データと部分画像抽出手段により抽出さ
れた部分領域の画像の関係を示す模式図
FIG. 7 is a schematic diagram showing a relationship between original image data and an image of a partial area extracted by a partial image extracting means.

【図8】部分領域の各画素データから輝度値を算出する
場合の当該部分領域の画素と輝度値との関係を表す模式
FIG. 8 is a schematic diagram showing a relationship between pixels in a partial area and the brightness value when the brightness value is calculated from each pixel data of the partial area.

【図9】図8において計算された輝度値と量子化手段が
二値化することによって生成する二値化画像データとの
関係を表す模式図
9 is a schematic diagram showing the relationship between the brightness value calculated in FIG. 8 and the binarized image data generated by binarizing by the quantizing means.

【図10】輝度値の分布と代表値の値との関係を示す図FIG. 10 is a diagram showing a relationship between a distribution of luminance values and a value of a representative value.

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

1 画像入力装置 2 画像データ圧縮装置 3 画像出力装置 4 画像格納手段 5 部分画像抽出手段 6 輝度値計算手段 7 区間算出手段 8 代表値決定手段 9 ヒストグラム生成手段 10 代表値抽出手段 11 量子化手段 12 部分領域サイズ決定手段 1 Image input device 2 Image data compression device 3 Image output device 4 Image storage means 5 Partial image extraction means 6 Luminance value calculation means 7 section calculation means 8 Representative value determination means 9 Histogram generating means 10 Representative value extraction means 11 Quantization means 12 Partial area size determination means

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】原画像データを複数の部分領域に分割し、
各部分領域の画素データを抽出する部分画像抽出手段
と、前記部分画像抽出手段が抽出した部分領域の各画素
データについて輝度値を計算する輝度値計算手段と、前
記輝度値計算手段から出力された部分領域の各画素デー
タの輝度値の最大値及び最小値を求め、前記最大値と前
記最小値の間の区間を複数の区間に分割した量子化区間
を出力する区間算出手段と、前記各量子化区間に属する
画素データの代表値を決定する代表値決定手段と、前記
各量子化区間において、当該量子化区間に属する総ての
画素データを、当該量子化区間における前記代表値とす
ることにより各画素データを量子化する量子化手段と、
を備えたことを特徴とする画像データ圧縮装置。
1. Original image data is divided into a plurality of partial areas,
Output from the partial image extracting means for extracting pixel data of each partial area, a brightness value calculating means for calculating a brightness value for each pixel data of the partial area extracted by the partial image extracting means, and the brightness value calculating means. Section calculating means for obtaining the maximum value and the minimum value of the brightness value of each pixel data of the partial area, and outputting a quantization section obtained by dividing the section between the maximum value and the minimum value into a plurality of sections, A representative value determining unit that determines a representative value of pixel data belonging to a quantization section, and all pixel data belonging to the quantization section in each of the quantization sections are set to the representative value in the quantization section. Quantization means for quantizing each pixel data,
An image data compression device comprising:
【請求項2】前記区間算出手段は、前記最大値と前記最
小値の間の区間を2つの量子化区間に等分割するもので
あり、前記量子化手段は、前記部分領域の各画素データ
を、前記輝度値が大きい量子化区間の画素データと前記
輝度値が小さい量子化区間の画素データとに1ビットの
データで二値化した二値化画像データと、前記輝度値が
大きい量子化区間の画素データの代表値及び前記輝度値
が小さい量子化区間の画素データの代表値とに変換する
ものであることを特徴とする請求項1に記載の画像デー
タ圧縮装置。
2. The section calculating means equally divides a section between the maximum value and the minimum value into two quantization sections, and the quantizing section calculates each pixel data of the partial area. , Binarized image data obtained by binarizing the pixel data in the quantization section having a large luminance value and the pixel data in the quantization section having a small luminance value with 1-bit data, and the quantization section having a large luminance value. 2. The image data compression apparatus according to claim 1, wherein the representative value of the pixel data is converted into the representative value of the pixel data of the quantization section in which the luminance value is small.
【請求項3】前記代表値決定手段は、前記部分領域の画
素データのうち、前記輝度値が大きい量子化区間に対す
る前記画素データの代表値を、前記部分領域において最
大の輝度値を有する画素データの値とし、前記部分領域
の画素データのうち、前記輝度値が小さい量子化区間に
対する前記画素データの代表値を、前記部分領域におい
て最小の輝度値を有する画素データの値とするものであ
ることを特徴とする請求項2に記載の画像データ圧縮装
置。
3. The representative value deciding means sets a representative value of the pixel data for a quantization section having a large luminance value in the pixel data of the partial area, the pixel data having a maximum luminance value in the partial area. Of the pixel data of the partial area, and the representative value of the pixel data for the quantization section having the smaller brightness value is the value of the pixel data having the minimum brightness value in the partial area. The image data compression device according to claim 2.
【請求項4】前記代表値決定手段は、前記部分領域の画
素データの輝度値のヒストグラムを生成するヒストグラ
ム生成手段と、前記ヒストグラムに基づき前記各量子化
区間における代表値の値を決定する代表値抽出手段と、
を有することを特徴とする請求項1又は2に記載の画像
データ圧縮装置。
4. The representative value determining means generates a histogram of luminance values of pixel data of the partial area, and a representative value determining a value of the representative value in each of the quantization intervals based on the histogram. Extraction means,
The image data compression apparatus according to claim 1 or 2, further comprising:
【請求項5】前記部分画像抽出手段が原画像データを分
割する部分領域の大きさを設定する部分領域サイズ設定
手段を有することを特徴とする請求項1乃至4の何れか
一に記載の画像データ圧縮装置。
5. The image according to claim 1, wherein the partial image extracting means has a partial area size setting means for setting a size of a partial area into which the original image data is divided. Data compression device.
【請求項6】原画像データを複数の部分領域に分割し、
各部分領域の画素データを抽出する部分画像抽出ステッ
プと、前記部分画像抽出ステップにおいて抽出した部分
領域の各画素データについて輝度値を計算する輝度値計
算ステップと、前記部分領域の各画素データの輝度値の
最大値及び最小値を求め、前記最大値と前記最小値の間
の区間を複数の区間に分割した量子化区間を出力する区
間算出ステップと、前記各量子化区間に属する画素デー
タの代表値を決定する代表値決定ステップと、前記各量
子化区間において、当該量子化区間に属する総ての画素
データを、当該量子化区間における前記代表値とするこ
とにより各画素データを量子化する量子化ステップと、
を備えたことを特徴とする画像データ圧縮方法。
6. The original image data is divided into a plurality of partial areas,
A partial image extracting step of extracting pixel data of each partial area; a brightness value calculating step of calculating a brightness value for each pixel data of the partial area extracted in the partial image extracting step; and a brightness of each pixel data of the partial area A section calculation step of obtaining the maximum value and the minimum value of the values and outputting a quantization section obtained by dividing the section between the maximum value and the minimum value into a plurality of sections, and a representative of pixel data belonging to each of the quantization sections. A representative value determining step of determining a value, and in each of the quantization intervals, all pixel data belonging to the quantization interval is set to the representative value in the quantization interval, and the quantization is performed to quantize each pixel data. Conversion step,
An image data compression method comprising:
【請求項7】前記区間算出ステップにおいては、前記最
大値と前記最小値の間の区間を2つの量子化区間に等分
割し、前記量子化ステップにおいては、前記部分領域の
各画素データを、前記輝度値が大きい量子化区間の画素
データと前記輝度値が小さい量子化区間の画素データと
に1ビットのデータで二値化した二値化画像データと、
前記輝度値が大きい量子化区間の画素データの代表値及
び前記輝度値が小さい量子化区間の画素データの代表値
とに変換することを特徴とする請求項6に記載の画像デ
ータ圧縮方法。
7. In the section calculating step, a section between the maximum value and the minimum value is equally divided into two quantization sections, and in the quantizing step, each pixel data of the partial area is Binarized image data obtained by binarizing 1-bit data into the pixel data in the quantized section having a large luminance value and the pixel data in the quantized section having a small luminance value,
7. The image data compression method according to claim 6, wherein the image data is compressed into a representative value of pixel data in a quantization section having a large luminance value and a representative value of pixel data in a quantization section having a small luminance value.
【請求項8】前記代表値決定ステップにおいては、前記
部分領域の画素データのうち、前記輝度値が大きい量子
化区間に対する前記画素データの代表値を、前記部分領
域において最大の輝度値を有する画素データの値とし、
前記部分領域の画素データのうち、前記輝度値が小さい
量子化区間に対する前記画素データの代表値を、前記部
分領域において最小の輝度値を有する画素データの値と
することを特徴とする請求項7に記載の画像データ圧縮
方法。
8. In the representative value determining step, among the pixel data of the partial area, a representative value of the pixel data for a quantization section having a large brightness value is set as a pixel having a maximum brightness value in the partial area. Data value,
8. The representative value of the pixel data for the quantization section having the smaller brightness value in the pixel data of the partial area is set to the value of the pixel data having the minimum brightness value in the partial area. The image data compression method described in.
【請求項9】前記代表値決定ステップにおいては、前記
部分領域の画素データの輝度値のヒストグラムを生成す
るヒストグラム生成ステップと、前記ヒストグラムに基
づき前記各量子化区間における代表値の値を決定する代
表値抽出ステップと、を有することを特徴とする請求項
6又は7に記載の画像データ圧縮方法。
9. The representative value determining step includes a histogram generating step of generating a histogram of luminance values of pixel data of the partial area, and a representative determining a value of the representative value in each of the quantization intervals based on the histogram. The image data compression method according to claim 6 or 7, further comprising a value extraction step.
【請求項10】前記部分画像抽出ステップにおいて、原
画像データを分割する部分領域の大きさを設定する部分
領域サイズ設定ステップを有することを特徴とする請求
項6乃至9の何れか一に記載の画像データ圧縮方法。
10. A partial area size setting step of setting the size of a partial area into which the original image data is divided, in the partial image extracting step, according to any one of claims 6 to 9. Image data compression method.
【請求項11】コンピュータを請求項1乃至5の何れか
一に記載の画像データ圧縮装置として機能させるための
プログラム。
11. A program for causing a computer to function as the image data compression device according to claim 1.
【請求項12】請求項11に記載のプログラムが記録さ
れた記録媒体。
12. A recording medium on which the program according to claim 11 is recorded.
JP2002147388A 2002-05-22 2002-05-22 Image data compression equipment and method therefor Pending JP2003338936A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002147388A JP2003338936A (en) 2002-05-22 2002-05-22 Image data compression equipment and method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002147388A JP2003338936A (en) 2002-05-22 2002-05-22 Image data compression equipment and method therefor

Publications (1)

Publication Number Publication Date
JP2003338936A true JP2003338936A (en) 2003-11-28

Family

ID=29705968

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002147388A Pending JP2003338936A (en) 2002-05-22 2002-05-22 Image data compression equipment and method therefor

Country Status (1)

Country Link
JP (1) JP2003338936A (en)

Similar Documents

Publication Publication Date Title
JP4732488B2 (en) Image processing apparatus, image forming apparatus, image reading apparatus, image processing method, image processing program, and computer-readable recording medium
JP2960386B2 (en) Signal adaptive filtering method and signal adaptive filter
US8849021B2 (en) Image processing apparatus, method, and storage medium for high speed compression processing
JP4176114B2 (en) Image compression apparatus, image reading apparatus including the same, image processing apparatus including the image compression apparatus, image forming apparatus including the same, and image compression processing method
JP4773678B2 (en) Document system
EP0833519B1 (en) Segmentation and background suppression in JPEG-compressed images using encoding cost data
MXPA02010002A (en) Enhanced compression of gray level images.
US6714685B2 (en) Image processing system for compressing image data including binary image data and continuous tone image data by a sub-band transform method with a high-compression rate
JPH1051642A (en) Image processor
WO2010035433A1 (en) Image encoding apparatus, digital still camera, digital video camera, image pickup device, printer and image encoding method
JP2004533181A (en) Selective chrominance decimation for digital images
JP2010166520A (en) Image encoding and decoding apparatus
US8023756B2 (en) Image encoding apparatus and method of controlling same
JP4780215B2 (en) Image processing apparatus and image processing program
JP2003110869A (en) Image processor, image forming device, image processing method, program and recording medium
JP3108133B2 (en) Adaptive coding of color document images
JP2003283821A (en) Image processor
KR20170046136A (en) Method for choosing a compression algorithm depending on the image type
JP2003338936A (en) Image data compression equipment and method therefor
JP5757904B2 (en) Image compression device
EP1345449A1 (en) Digital image compression and decompression using block coding
JP4926128B2 (en) Image processing apparatus, image reading apparatus, image forming apparatus, computer program, recording medium, and image processing method
JP3979020B2 (en) Image processing apparatus for sampling compressed image
CN117014557B (en) Compression method and device for document image, electronic equipment and storage medium
JP2010232952A (en) Image processor, and image processing program