[go: up one dir, main page]

JP2001112023A - Image compression method - Google Patents

Image compression method

Info

Publication number
JP2001112023A
JP2001112023A JP28937399A JP28937399A JP2001112023A JP 2001112023 A JP2001112023 A JP 2001112023A JP 28937399 A JP28937399 A JP 28937399A JP 28937399 A JP28937399 A JP 28937399A JP 2001112023 A JP2001112023 A JP 2001112023A
Authority
JP
Japan
Prior art keywords
parameter
image
data
image data
color difference
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
JP28937399A
Other languages
Japanese (ja)
Inventor
Yusuke Mizuno
雄介 水野
Toshikazu Kaneko
俊和 金子
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.)
MegaChips Corp
Original Assignee
MegaChips Corp
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 MegaChips Corp filed Critical MegaChips Corp
Priority to JP28937399A priority Critical patent/JP2001112023A/en
Publication of JP2001112023A publication Critical patent/JP2001112023A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Color Television Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To obtain an image compression method that can optimally compress image data. SOLUTION: First image data are received (step S11). Then a prescribed function is used to obtain a parameter of a luminance signal and a parameter of color difference signals are obtained with cross-reference (step S12). Furthermore, an image compression algorithm to which the luminance parameter and the color difference parameter are set is used to compress the image data received in the step S11 (step S13).

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、画像データを圧縮
するための画像圧縮方法に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to an image compression method for compressing image data.

【0002】[0002]

【従来の技術】従来から、DCT(離散コサイン変換)
やウェーブレット変換を用いた画像圧縮アルゴリズムが
ある。これらのアルゴリズムでは、使用者が輝度のパラ
メータと色差のパラメータとを個別に設定して、画像デ
ータを圧縮する。
2. Description of the Related Art Conventionally, DCT (Discrete Cosine Transform)
And an image compression algorithm using a wavelet transform. In these algorithms, a user individually sets a parameter for luminance and a parameter for color difference, and compresses image data.

【0003】[0003]

【発明が解決しようとする課題】以上のように、従来で
は使用者が輝度のパラメータと色差のパラメータとを個
別に設定するので、例えば、圧縮された画像データのデ
ータ量が格納先の記録媒体の記憶容量を越えてしまった
り、画質が悪くなったりすることがあるという問題点が
あった。
As described above, conventionally, the user individually sets the parameters of the luminance and the parameters of the color difference. For example, the data amount of the compressed image data is stored in the storage medium. However, there is a problem that the storage capacity may be exceeded or the image quality may be degraded.

【0004】本発明は、上記の問題点を解決するために
なされたものであり、画像データを常に最適に圧縮する
画像圧縮方法を得ることを目的とする。
[0004] The present invention has been made to solve the above problems, and has as its object to obtain an image compression method for always optimally compressing image data.

【0005】[0005]

【課題を解決するための手段】本発明の請求項1に係る
課題解決手段は、輝度のパラメータと色差のパラメータ
とを設定する画像圧縮アルゴリズムを用いて、画像デー
タを圧縮するための方法であって、前記輝度のパラメー
タと前記色差のパラメータとを所定の関数によって関連
付けて求めることを特徴とする。
According to a first aspect of the present invention, there is provided a method for compressing image data using an image compression algorithm for setting a luminance parameter and a color difference parameter. The luminance parameter and the chrominance parameter are determined in association with each other by a predetermined function.

【0006】本発明の請求項2に係る課題解決手段にお
いて、前記輝度のパラメータと前記色差のパラメータと
は前記画像データ全体の所望の圧縮率に基づいて求めら
れる請求項1記載の画像圧縮方法。
2. The image compression method according to claim 1, wherein said luminance parameter and said color difference parameter are obtained based on a desired compression ratio of the entire image data.

【0007】本発明の請求項3に係る課題解決手段は、
圧縮後の前記画像データの格納先の記憶容量を検出し、
前記輝度のパラメータと前記色差のパラメータとは、前
記検出された記憶容量に基づいて求められる。
[0007] According to a third aspect of the present invention, there is provided:
Detecting the storage capacity of the storage location of the compressed image data,
The luminance parameter and the color difference parameter are obtained based on the detected storage capacity.

【0008】本発明の請求項4に係る課題解決手段は、
前記画像データの圧縮後のデータ量が目標値に達してい
なければ、前記輝度のパラメータと前記色差のパラメー
タとを更新して再び、前記画像データを圧縮する。
[0008] The problem solving means according to claim 4 of the present invention is:
If the data amount of the image data after compression has not reached the target value, the luminance parameter and the color difference parameter are updated, and the image data is compressed again.

【0009】[0009]

【発明の実施の形態】実施の形態1.図1は本発明の実
施の形態1の画像圧縮方法を示すフローチャートであ
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiment 1 FIG. 1 is a flowchart showing an image compression method according to the first embodiment of the present invention.

【0010】画像圧縮方法を行う装置は、例えば、パー
ソナルコンピュータやデジタルカメラのような画像デー
タを扱う装置(以下、「画像処理装置」と称す)であ
る。
An apparatus that performs the image compression method is, for example, an apparatus that handles image data such as a personal computer or a digital camera (hereinafter, referred to as an “image processing apparatus”).

【0011】まず、画像データを画像処理装置に入力す
る(ステップS11)。画像データの例を図2に示す。
図2の画像データDAは、m×n個のピクセルのデータ
を含み、1ピクセルのデータは赤色のデータ(8ビッ
ト)、緑色のデータ(8ビット)、青色のデータ(8ビ
ット)の合計24ビットからなる。
First, image data is input to an image processing apparatus (step S11). FIG. 2 shows an example of the image data.
The image data DA in FIG. 2 includes m × n pixel data, and one pixel data is a total of 24 data of red data (8 bits), green data (8 bits), and blue data (8 bits). Consists of bits.

【0012】次に、画像圧縮アルゴリズムに必要な輝度
のパラメータと色差のパラメータとを設定する(ステッ
プS12)。
Next, parameters of luminance and parameters of chrominance required for the image compression algorithm are set (step S12).

【0013】輝度のパラメータは例えば輝度のデータの
圧縮率であり、色差のパラメータは例えば色差のデータ
の圧縮率である。圧縮率とは、圧縮前のデータと圧縮後
のデータとの比であり、圧縮率が大きいほど、圧縮デー
タは小さくなる。
The luminance parameter is, for example, a compression ratio of luminance data, and the chrominance parameter is, for example, a compression ratio of chrominance data. The compression ratio is the ratio between the data before compression and the data after compression, and the higher the compression ratio, the smaller the compressed data.

【0014】輝度のパラメータと色差のパラメータとは
所定の関数によって関連付けて求められる。例えば、後
述の図4のように、画像データ全体の圧縮率Xを使用者
が設定し、画像データ全体の圧縮率Xから、所定の関数
(例えば、後述の式1〜7)を用いて輝度のパラメータ
と色差のパラメータとの両方を求めてもよい。あるい
は、使用者が輝度のパラメータのみを設定し、輝度のパ
ラメータから、所定の関数(例えば、後述の式4〜7)
を用いて色差のパラメータを求めてもよい。あるいは、
使用者が色差のパラメータのみを設定し、色差のパラメ
ータから、所定の関数を用いて(例えば、後述の式4〜
7を用いて逆算して)、輝度のパラメータを求めてもよ
い。
The parameter of the luminance and the parameter of the color difference are obtained in association with each other by a predetermined function. For example, as shown in FIG. 4 described later, the user sets the compression ratio X of the entire image data, and calculates the luminance from the compression ratio X of the entire image data using a predetermined function (for example, expressions 1 to 7 described later). And the color difference parameter may be obtained. Alternatively, the user sets only the luminance parameter, and determines a predetermined function (for example, Equations 4 to 7 described later) from the luminance parameter.
May be used to determine the color difference parameter. Or,
The user sets only the color difference parameter, and uses a predetermined function from the color difference parameter (for example, Equations 4 to
7) to determine the luminance parameter.

【0015】次に、ステップS12で輝度のパラメータ
と色差のパラメータとが設定された画像圧縮アルゴリズ
ムによって、画像データを圧縮する(ステップS1
3)。
Next, the image data is compressed by the image compression algorithm in which the luminance parameter and the color difference parameter are set in step S12 (step S1).
3).

【0016】次に、ステップS13によって圧縮された
圧縮データ(以下、圧縮データと称す)を例えばメモリ
ー、ハードディスク、フロッピーディスク等の記録媒体
に格納する(ステップS14)。
Next, the compressed data (hereinafter, referred to as compressed data) compressed in step S13 is stored in a recording medium such as a memory, a hard disk, or a floppy disk (step S14).

【0017】以上のように、実施の形態1では、輝度の
パラメータと色差のパラメータとを所定の関数によって
関連付けて設定する。このように、使用者に代わって画
像処理装置が輝度のパラメータと色差のパラメータとを
適切に設定することができるので、画像データを常に最
適に圧縮することができる。よって、従来の問題点とし
て挙げたような、圧縮された画像データのデータ量が格
納先の記録媒体の記憶容量を越えてしまったり、画質が
悪くなったりすることを防ぐことができる。
As described above, in the first embodiment, the parameters of the luminance and the parameters of the color difference are set in association with each other by the predetermined function. As described above, since the image processing apparatus can appropriately set the luminance parameter and the color difference parameter on behalf of the user, the image data can always be optimally compressed. Therefore, it is possible to prevent the data amount of the compressed image data from exceeding the storage capacity of the storage medium at the storage destination and deteriorating the image quality, which are cited as the conventional problems.

【0018】なお、輝度のパラメータや色差のパラメー
タは、以上の説明では、圧縮率と仮に表した。しかし、
例えば輝度や色差の圧縮データや解像度から圧縮率を算
出することができるので、輝度のパラメータや色差のパ
ラメータを圧縮データと表したり、解像度と表したりし
てもよい。
In the above description, the luminance parameter and the color difference parameter are tentatively expressed as the compression ratio. But,
For example, since a compression ratio can be calculated from compressed data of luminance and color difference and resolution, a parameter of luminance and a parameter of color difference may be expressed as compressed data or resolution.

【0019】実施の形態2.図3は本発明の実施の形態
2の画像圧縮方法を示すフローチャートである。
Embodiment 2 FIG. 3 is a flowchart showing an image compression method according to the second embodiment of the present invention.

【0020】まず、実施の形態1同様、ステップS1
1,S12,S13を行う。
First, as in the first embodiment, step S1
1, S12 and S13 are performed.

【0021】次に、ステップS13によって圧縮された
圧縮データのデータ量が目標値に達しているかどうかを
判断する(ステップS21)。目標値は、例えば、格納
先の記録媒体の記憶容量であり、実施の形態2では予め
設定されている。
Next, it is determined whether or not the data amount of the compressed data compressed in step S13 has reached a target value (step S21). The target value is, for example, the storage capacity of the storage medium at the storage destination, and is set in advance in the second embodiment.

【0022】ステップS21において判断した結果、圧
縮データのデータ量が目標値に達していなければステッ
プS22に移る。ステップS22では、輝度のパラメー
タと色差のパラメータとを更新する。この更新は、更新
用の所定の関数を用いる。例えば、輝度のパラメータと
色差のパラメータとを一次関数を用いて所定値だけ変化
させて更新する。そして、再び、ステップS13を行
う。
If the result of the determination in step S21 is that the data amount of the compressed data has not reached the target value, the operation proceeds to step S22. In step S22, the luminance parameter and the chrominance parameter are updated. This update uses a predetermined function for updating. For example, the luminance parameter and the color difference parameter are updated by changing a predetermined value using a linear function. Then, step S13 is performed again.

【0023】以上のように、圧縮データのデータ量が目
標値に達するまで、フィードバックを繰り返す。フィー
ドバックを繰り返したことによって、圧縮データのデー
タ量が目標値に達していれば、ステップS14に移る。
もし、フィードバックを予め設定された回数だけ繰り返
しても、圧縮データのデータ量が目標値に達していなけ
れば無限ループとなる可能性が高いので、強制的に終了
する。
As described above, the feedback is repeated until the data amount of the compressed data reaches the target value. If the data amount of the compressed data has reached the target value as a result of repeating the feedback, the process proceeds to step S14.
Even if the feedback is repeated a preset number of times, if the data amount of the compressed data does not reach the target value, there is a high possibility that an infinite loop will occur, so the processing is forcibly terminated.

【0024】次に、記録媒体に圧縮データを格納する
(ステップS14)。ここでは、圧縮データが目標値に
達しているので、記録媒体に圧縮データの全てを格納す
ることができる。
Next, the compressed data is stored in the recording medium (step S14). Here, since the compressed data has reached the target value, all of the compressed data can be stored in the recording medium.

【0025】以上のように、圧縮後のデータ量が目標値
に達していなければ、輝度のパラメータと色差のパラメ
ータとを更新して再び、画像データを圧縮する。これに
よって、目標値に達したデータ量の圧縮された画像デー
タを得ることが可能になる。
As described above, if the data amount after compression has not reached the target value, the luminance parameter and the color difference parameter are updated, and the image data is compressed again. This makes it possible to obtain compressed image data of a data amount that has reached the target value.

【0026】実施の形態3.実施の形態3は、図1や図
3のステップS12での輝度のパラメータと色差のパラ
メータとの設定に関する。
Embodiment 3 FIG. The third embodiment relates to the setting of the luminance parameter and the chrominance parameter in step S12 of FIGS.

【0027】例えば、輝度のパラメータと色差のパラメ
ータとを図4のようにして求める。まず、画像データ全
体の所望の圧縮率Xを例えば使用者が設定する(ステッ
プS121)。次に、ステップS121で設定した画像
データ全体の圧縮率Xに基づいて、輝度のパラメータ
(圧縮率)と色差のパラメータ(圧縮率)とを所定の関
数によって関連付けて求める(ステップS122,S1
23)。これによって、画像データ全体のユーザー所望
の圧縮率Xから、輝度のパラメータと色差のパラメータ
とを最適に設定することができる。
For example, a luminance parameter and a color difference parameter are obtained as shown in FIG. First, for example, a user sets a desired compression ratio X of the entire image data (step S121). Next, based on the compression ratio X of the entire image data set in step S121, the luminance parameter (compression ratio) and the chrominance parameter (compression ratio) are determined by associating them with a predetermined function (steps S122 and S1).
23). This makes it possible to optimally set the luminance parameter and the color difference parameter from the user-desired compression ratio X of the entire image data.

【0028】あるいは、輝度のパラメータと色差のパラ
メータとを図5のようにして求めてもよい。圧縮データ
の格納先の記録媒体の記憶容量を検出する(ステップS
121)。例えば記録媒体内に記憶容量を示すROMを
付け、このROMから記憶容量を読み込むことによっ
て、記憶容量を検出してもよいし、記録媒体のアドレス
の最大値を検出することによって、記憶容量を検出して
もよい。次に、検出した記憶容量に基づいて、輝度のパ
ラメータ(圧縮率)と色差のパラメータ(圧縮率)とを
所定の関数によって関連付けて求める(ステップS12
2,S123)。これによって、検出した記憶容量か
ら、輝度のパラメータと色差のパラメータとを最適に設
定することができる。これによって、例えば、記憶容量
が様々であっても、圧縮後の画像データの全てが記憶容
量に確実に格納できるように、しかも、記憶容量に応じ
た最良の画質を保って、画像データを圧縮することがで
きる。
Alternatively, the luminance parameter and the color difference parameter may be obtained as shown in FIG. Detecting the storage capacity of the storage medium where the compressed data is stored (step S
121). For example, a storage capacity ROM may be provided in the recording medium, and the storage capacity may be detected by reading the storage capacity from the ROM, or the storage capacity may be detected by detecting the maximum value of the address of the recording medium. May be. Next, based on the detected storage capacity, the luminance parameter (compression rate) and the color difference parameter (compression rate) are determined in association with each other by a predetermined function (step S12).
2, S123). This makes it possible to optimally set the luminance parameter and the color difference parameter from the detected storage capacity. Thus, for example, even if the storage capacity varies, all the compressed image data can be reliably stored in the storage capacity, and the image data is compressed while maintaining the best image quality according to the storage capacity. can do.

【0029】特に、図3のアルゴリズムと図4のアルゴ
リズムとを組み合わせた場合、圧縮データのデータ量が
記録媒体の記憶容量に最も近く、かつ、記憶容量を超え
ないように、圧縮率Xを微調整しながら1バイト単位で
圧縮データを小さくしていくことが可能になる。
In particular, when the algorithm of FIG. 3 and the algorithm of FIG. 4 are combined, the compression ratio X is adjusted so that the amount of compressed data is closest to the storage capacity of the recording medium and does not exceed the storage capacity. The compressed data can be reduced in units of 1 byte while adjusting.

【0030】実施の形態4.実施の形態4では、画像圧
縮アルゴリズムについて説明する。
Embodiment 4 Embodiment 4 describes an image compression algorithm.

【0031】図6は、図1のステップS13で用いる画
像圧縮アルゴリズムを示すフローチャートである。
FIG. 6 is a flowchart showing the image compression algorithm used in step S13 of FIG.

【0032】まず、画像データに対してウェーブレット
変換を行う(ステップS131)。
First, a wavelet transform is performed on the image data (step S131).

【0033】ウェーブレット変換は、近年、DCT(離
散コサイン変換)に代わって注目されている。ウェーブ
レット変換は、DCT同様、画像データを周波数成分に
変換する直交変換の一つである。ウェーブレット変換
は、画像の周波数成分を高域と低域とに分割し、次に、
画像を垂直方向に分割し、そして、画像を水平方向に分
割する。ウェーブレット変換は、DCTと比べて、ブロ
ック歪みが目立たなく、ノイズも比較的小さいと言われ
ている。ウェーブレット変換やDCTを用いる画像圧縮
アルゴリズムでは、RGB形式の画像データを圧縮する
のではなく、RGB形式の画像データをYCbCr(Y
UVと同じ)形式に変換し、YCbCr形式の画像デー
タを圧縮する。YCbCrのうち、Yは輝度(明暗の度
合い)を示し、Cbは緑から青までの中間色の色差(青
い度合い)を示し、Crは緑から赤までの中間色の色差
(赤い度合い)を示す。輝度Yのデータ量をYD、色差
Cbのデータ量をCbD、色差Crのデータ量をCrD
とする。YD:CbD:CrDのフィーマットは、例え
ば、4:2:0、4:2:2、4:4:4、4:1:1
のように設定される。4:2:0の場合は、4:2:2
の場合と比較して、データ量が小さくなるが、復元され
た画像の画質が悪くなる。4:1:1の場合は、4:
4:4の場合と比較して画質が悪くなる。
The wavelet transform has recently attracted attention in place of DCT (discrete cosine transform). The wavelet transform is one of orthogonal transforms for transforming image data into frequency components, similarly to DCT. The wavelet transform divides the frequency components of the image into high and low frequencies, and then
Split the image vertically and then split the image horizontally. It is said that the wavelet transform has less noticeable block distortion and smaller noise than DCT. An image compression algorithm using wavelet transform or DCT does not compress image data in RGB format, but converts image data in RGB format into YCbCr (Y
(Same as UV) format and compress the YCbCr format image data. Of YCbCr, Y indicates luminance (degree of lightness and darkness), Cb indicates a color difference between intermediate colors from green to blue (blueness), and Cr indicates a color difference between green to red (degree of redness). The data amount of the luminance Y is YD, the data amount of the color difference Cb is CbD, and the data amount of the color difference Cr is CrD.
And The format of YD: CbD: CrD is, for example, 4: 2: 0, 4: 2: 2, 4: 4: 4, 4: 1: 1.
Is set as follows. In the case of 4: 2: 0, 4: 2: 2
Although the data amount is smaller than in the case of (1), the image quality of the restored image deteriorates. In the case of 4: 1: 1, 4:
The image quality is worse than in the case of 4: 4.

【0034】次に、ステップS131によって得られた
データを量子化する(ステップS132)。また、量子
化は、ステップS12によって設定された圧縮率に基づ
いて行われる。この圧縮率によって、圧縮データのデー
タ量が決まる。量子化は、例えば、ウェーブレット変換
ではTCQ(Trellis Coded Quantization)、WSQ
(ウェーブレット/スカラー量子化)あるいはEZW
(Embedded Zerotree Wavelet)等のような手法を適用
すればよい。
Next, the data obtained in step S131 is quantized (step S132). The quantization is performed based on the compression ratio set in step S12. The amount of compressed data is determined by the compression ratio. For quantization, for example, TCQ (Trellis Coded Quantization), WSQ
(Wavelet / scalar quantization) or EZW
(Embedded Zerotree Wavelet) or the like may be applied.

【0035】次に、ステップS132によって量子化さ
れたデータを符号化する(ステップS133)。符号化
は、例えば、ブロック符号化(ハフマン符号)あるいは
非ブロック符号(算術符号)等のような手法を適用すれ
ばよい。
Next, the data quantized in step S132 is encoded (step S133). For encoding, for example, a method such as block encoding (Huffman code) or non-block code (arithmetic code) may be applied.

【0036】次に、ステップS133によって符号化さ
れたデータを所定のフォーマットに整える。この所定の
フォーマットに整えられたデータが圧縮データとなる
(ステップS134)。
Next, the data encoded in step S133 is arranged in a predetermined format. The data adjusted to the predetermined format becomes compressed data (step S134).

【0037】図7は、ウェーブレット変換の場合のステ
ップS12での輝度のパラメータと色差のパラメータと
を求めるためのフローチャートである。
FIG. 7 is a flowchart for obtaining a luminance parameter and a color difference parameter in step S12 in the case of wavelet transform.

【0038】図7のフローチャートは、図4に対応する
ステップS121,S122,S123を含む。図7に
おいて、ステップS121はステップS121a,S1
21bを含み、ステップS122はステップS122
a,S122bを含み、ステップS123はステップS
123a,S123b,S123cを含む。
The flowchart of FIG. 7 includes steps S121, S122, and S123 corresponding to FIG. In FIG. 7, step S121 includes steps S121a and S1.
21b, and step S122 includes step S122.
a, S122b, and step S123 is step S123.
123a, S123b, and S123c.

【0039】まず、画像データ全体の画像の圧縮率Xを
入力する(ステップS121a)。
First, the compression ratio X of the image of the entire image data is input (step S121a).

【0040】次に、1ピクセルあたりの解像度B(bp
p(=ビット/ピクセル))を圧縮率Xから求める(ス
テップS121b)。例えば、式1を用いて求めればよ
い。
Next, the resolution per pixel B (bp)
p (= bit / pixel)) is obtained from the compression ratio X (step S121b). For example, it may be obtained using Expression 1.

【0041】B=24/X……(式1) あるいは、式2を用いて求めてもよい。B = 24 / X (Equation 1) Alternatively, it may be obtained by using Equation 2.

【0042】B=D/S……(式2) なお、Dは圧縮データのデータ量(バイト数×8)、S
は図2に示したようなm×n個のピクセルの総データ量
(ビット)である。
B = D / S (Equation 2) where D is the amount of compressed data (the number of bytes × 8),
Is the total data amount (bits) of m × n pixels as shown in FIG.

【0043】次に、輝度の圧縮率KRを例えば式3を用
いて求める(ステップS122a)。
Next, the luminance compression ratio KR is determined using, for example, Equation 3 (step S122a).

【0044】KR=α1×Bα2……(式3) なお、α1,α2はそれぞれ予め設定された定数であ
る。
KR = α1 × Bα 2 (Equation 3) Note that α1 and α2 are preset constants.

【0045】次に、輝度のデータ量の目標値KS(バイ
ト)を例えば式4を用いて求める(ステップS122
b)。
Next, a target value KS (byte) of the luminance data amount is obtained by using, for example, Equation 4 (step S122).
b).

【0046】 KS=β1×KRβ2×S/8……(式4) なお、β1,β2はそれぞれ予め設定された定数であ
る。
KS = β1 × KRβ 2 × S / 8 (Equation 4) Here, β1 and β2 are constants set in advance.

【0047】次に、色差データのデータ量の目標値CS
(バイト)を例えば式5を用いて求める(ステップS1
23a)。
Next, the target value CS of the data amount of the color difference data
(Byte) is obtained using, for example, Equation 5 (Step S1)
23a).

【0048】 CS=(S×3/X−KS)/2……(式5) なお、式5で求める目標値CSは、Cb、Crのどちら
か1つ分のデータ量である。したがって、(S×3/X
−KS)を2で割っている。
CS = (S × 3 / X−KS) / 2 (Equation 5) Note that the target value CS obtained by Equation 5 is the data amount of one of Cb and Cr. Therefore, (S × 3 / X
-KS) divided by 2.

【0049】次に、色差1ピクセルあたりの色差解像度
P(bpp)を例えば式6を用いて求める(ステップS
123b)。
Next, the color difference resolution P (bpp) per pixel of the color difference is obtained using, for example, Equation 6 (step S).
123b).

【0050】P=CS×(S/Y)×8……(式6) なお、CS×(S/Y)を8倍しているのはビット単位
だからである。また、YはYD:CbD:CrD=4:
2:0のとき4、YD:CbD:CrD=4:1:1の
ときも4、YD:CbD:CrD=4:2:2のとき
2、YD:CbD:CrD=4:4:4のとき1であ
る。
P = CS × (S / Y) × 8 (Equation 6) CS × (S / Y) is multiplied by 8 because it is a bit unit. Y is YD: CbD: CrD = 4:
4 when 2: 0, 4 when YD: CbD: CrD = 4: 1: 1, 2 when YD: CbD: CrD = 4: 2: 2, 2 when YD: CbD: CrD = 4: 4: 4 When it is 1.

【0051】次に、色差圧縮率CRを例えば式7を用い
て求める(ステップS123c)。
Next, the color difference compression ratio CR is determined using, for example, Equation 7 (step S123c).

【0052】CR=γ1×Pγ2……(式7) なお、γ1,γ2はそれぞれ予め定められた定数であ
る。
CR = γ1 × Pγ 2 (Equation 7) Note that γ1 and γ2 are predetermined constants.

【0053】実施の形態4では、上記式1〜7が輝度の
パラメータと色差のパラメータとを関連付ける所定の関
数である。
In the fourth embodiment, the above equations 1 to 7 are predetermined functions for associating the luminance parameter with the chrominance parameter.

【0054】なお、図7のフローチャートは、図4に代
えて、記録媒体の記憶容量を検出する図5のフローチャ
ートに対応させて考えても良い。この場合のステップS
121aでは、例えば、画像データ全体の圧縮率を次の
ように求めればよい。すなわち、圧縮データの格納先の
記録媒体の記憶容量を検出し、この検出した記憶容量と
図3のステップS11で入力した画像データのデータ量
との比から、画像データ全体の圧縮率を求めればよい。
Note that the flowchart of FIG. 7 may correspond to the flowchart of FIG. 5 for detecting the storage capacity of the recording medium instead of FIG. Step S in this case
In 121a, for example, the compression ratio of the entire image data may be obtained as follows. That is, the storage capacity of the storage medium where the compressed data is stored is detected, and the compression ratio of the entire image data is obtained from the ratio between the detected storage capacity and the data amount of the image data input in step S11 of FIG. Good.

【0055】また、ウェーブレット変換に代えて、DC
T等でもよい。DCTは、例えばJPEGに適用される
画像圧縮アルゴリズムで用いられる。DCTを用いた画
像圧縮アルゴリズムでは、画像内のピクセルのブロック
単位(例えば8×8ピクセル)を直交変換することによ
って、周波数成分を示す係数を生成している。
Also, instead of the wavelet transform, DC
T or the like may be used. DCT is used in an image compression algorithm applied to JPEG, for example. In an image compression algorithm using DCT, a coefficient indicating a frequency component is generated by orthogonally transforming a block unit (for example, 8 × 8 pixels) of pixels in an image.

【0056】また、ウェーブレット変換やDCTを用い
た場合において、圧縮後のデータのYD:CbD:Cr
Dが圧縮前のデータのデータのYD:CbD:CrDに
等しくなるように、画像データを圧縮しても、圧縮デー
タを復元した画像が必ず最適な画質になるとは限らな
い。例えば、ステップS11で入力した画像データのう
ち、人物の画質が落ちたり、背景の画質が落ちたりす
る。
In the case where the wavelet transform or DCT is used, the compressed data YD: CbD: Cr
Even if the image data is compressed so that D becomes equal to YD: CbD: CrD of the data before compression, the image obtained by reconstructing the compressed data does not always have the optimum image quality. For example, of the image data input in step S11, the image quality of a person is reduced, or the image quality of a background is reduced.

【0057】そこで、例えば、α1,α2,β1,β
2,γ1,γ2の人物用の値と背景用の値とを画像処理
装置に予め設定しておく。画像処理装置に例えば切換ス
イッチを設けておいて、ユーザーが背景よりも人物の画
質を落としたくなければ切換スイッチによって人物用の
値を選択する。これによって、人物の画質が落ちないよ
うに、画像データを圧縮することができる。よって、図
8に示すように、画像データの圧縮前のYD:CbD:
CrDと画像データの圧縮後のYD:CbD:CrDと
が異なっても画質が落ちないこともある。
Therefore, for example, α1, α2, β1, β
The values of 2, 2, γ1 and γ2 for the person and the value for the background are set in the image processing apparatus in advance. For example, a changeover switch is provided in the image processing apparatus. If the user does not want to lower the image quality of the person than the background, the value for the person is selected by the changeover switch. As a result, the image data can be compressed so that the image quality of the person does not deteriorate. Therefore, as shown in FIG. 8, YD: CbD:
Even if CrD and YD: CbD: CrD after compression of the image data are different, the image quality may not deteriorate.

【0058】また、以上の説明では、ウェーブレット変
換やDCTを用いた画像圧縮アルゴリズムを図1のステ
ップS13に適用する場合を説明したが、図3のステッ
プS13に適用しても良い。この場合、図3のステップ
S22では、図9のような漸近的な指数関数F(=a×
b)を用いて、輝度のパラメータ(圧縮率KR=F
(X))を更新してもよい。Xは画像データ全体の圧縮
率である。色差のパラメータ(圧縮率CR)も、図9の
ような指数関数を用いて更新する。ステップS22に移
るごとに、画像データ全体の圧縮率Xを変化させて、輝
度のパラメータと色差のパラメータとを更新する。ま
た、指数関数が複雑であり計算量や計算速度に問題があ
れば、指数関数に代えて図10のような数段階の直線
(一次関数)を用いた近似式を用いてもよい。
In the above description, the case where the image compression algorithm using the wavelet transform or DCT is applied to step S13 in FIG. 1 may be applied, but may be applied to step S13 in FIG. In this case, in step S22 of FIG. 3, an asymptotic exponential function F (= a ×
X b ) using the luminance parameter (compression rate KR = F
(X)) may be updated. X is the compression ratio of the entire image data. The color difference parameter (compression rate CR) is also updated using an exponential function as shown in FIG. Each time the process proceeds to step S22, the compression ratio X of the entire image data is changed, and the luminance parameter and the color difference parameter are updated. Further, if the exponential function is complicated and there is a problem in the amount of calculation or the calculation speed, an approximate expression using several stages of straight lines (linear function) as shown in FIG. 10 may be used instead of the exponential function.

【0059】なお、画像圧縮アルゴリズムは、DCTや
ウェーブレット変換を用いたもの以外でもよく、輝度の
パラメータと色差のパラメータとを要するものであれば
よい。
The image compression algorithm may be other than the one using DCT or wavelet transform, and may be any algorithm that requires a luminance parameter and a color difference parameter.

【0060】[0060]

【発明の効果】請求項1記載の発明によれば、輝度のパ
ラメータと色差のパラメータとを、所定の関数によって
関連付けて、自動的に設定することができるので、常に
最適な圧縮データを得ることができる。
According to the first aspect of the present invention, the parameters of the luminance and the parameters of the color difference can be automatically set in association with each other by a predetermined function, so that optimal compressed data can always be obtained. Can be.

【0061】請求項2記載の発明によれば、画像データ
の全体の所望の圧縮率から、輝度のパラメータと色差の
パラメータとを最適に設定することができる。
According to the second aspect of the present invention, the luminance parameter and the color difference parameter can be set optimally from the desired compression ratio of the entire image data.

【0062】請求項3記載の発明によれば、記憶容量に
応じて、輝度のパラメータと色差のパラメータとを最適
に設定することができる。これによって、例えば、記憶
容量が様々であっても、圧縮後の画像データが記憶容量
に確実に格納できるように、しかも、記憶容量に応じた
最良の画質を保って、画像データを圧縮することができ
る。
According to the third aspect of the present invention, it is possible to optimally set the luminance parameter and the color difference parameter according to the storage capacity. Thus, for example, even if the storage capacity is various, it is possible to compress the image data so that the compressed image data can be reliably stored in the storage capacity, and further, keep the best image quality according to the storage capacity. Can be.

【0063】請求項4記載の発明によれば、圧縮後のデ
ータ量が目標値に達していなければ、輝度のパラメータ
と色差のパラメータとを更新して再び、画像データを圧
縮する。これによって、目標値のデータ量の圧縮された
画像データを得ることが可能になる。
According to the fourth aspect of the present invention, if the data amount after compression has not reached the target value, the luminance parameter and the color difference parameter are updated, and the image data is compressed again. This makes it possible to obtain compressed image data of a target data amount.

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

【図1】 本発明の実施の形態1の画像圧縮方法を示す
フローチャートである。
FIG. 1 is a flowchart illustrating an image compression method according to a first embodiment of the present invention.

【図2】 画像データの一例を示す概念図である。FIG. 2 is a conceptual diagram illustrating an example of image data.

【図3】 本発明の実施の形態2の画像圧縮方法を示す
フローチャートである。
FIG. 3 is a flowchart illustrating an image compression method according to a second embodiment of the present invention.

【図4】 本発明の実施の形態3の画像圧縮方法の一部
を示すフローチャートである。
FIG. 4 is a flowchart showing a part of the image compression method according to the third embodiment of the present invention.

【図5】 本発明の実施の形態3の画像圧縮方法の一部
を示すフローチャートである。
FIG. 5 is a flowchart showing a part of an image compression method according to Embodiment 3 of the present invention.

【図6】 本発明の実施の形態4の画像圧縮アルゴリズ
ムを示すフローチャートである。
FIG. 6 is a flowchart illustrating an image compression algorithm according to the fourth embodiment of the present invention.

【図7】 本発明の実施の形態4の画像圧縮方法の一部
を示すフローチャートである。
FIG. 7 is a flowchart showing a part of the image compression method according to the fourth embodiment of the present invention.

【図8】 本発明の実施の形態4の画像データの圧縮前
後のデータ量の一例を示す概念図である。
FIG. 8 is a conceptual diagram illustrating an example of a data amount before and after compression of image data according to Embodiment 4 of the present invention.

【図9】 本発明の実施の形態4のパラメータの更新用
の関数の一例を表すグラフである。
FIG. 9 is a graph illustrating an example of a function for updating a parameter according to the fourth embodiment of the present invention.

【図10】 本発明の実施の形態4のパラメータの更新
用の関数の一例を表すグラフである。
FIG. 10 is a graph illustrating an example of a function for updating a parameter according to the fourth embodiment of the present invention.

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

DA 画像データ YD,CbD,CrD データ量 DA image data YD, CbD, CrD data amount

フロントページの続き Fターム(参考) 5C057 AA01 AA07 EA02 EA07 EL01 EM07 EM09 EM16 GG03 5C059 MA00 MA23 MA24 MC11 ME02 ME11 PP16 SS11 TA60 TC15 TC38 TD06 TD14 UA02 5C078 AA09 BA53 BA57 CA02 CA27 DA00 DA01 5J064 AA01 BA16 BC02 BC27 BD03Continued on the front page F-term (reference) 5C057 AA01 AA07 EA02 EA07 EL01 EM07 EM09 EM16 GG03 5C059 MA00 MA23 MA24 MC11 ME02 ME11 PP16 SS11 TA60 TC15 TC38 TD06 TD14 UA02 5C078 AA09 BA53 BA57 CA02 CA27 DA00 A01 BA01 BA0

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 輝度のパラメータと色差のパラメータと
を要する画像圧縮アルゴリズムを用いて、画像データを
圧縮するための方法であって、 前記輝度のパラメータと前記色差のパラメータとを所定
の関数によって関連付けて求めることを特徴とする画像
圧縮方法。
1. A method for compressing image data using an image compression algorithm requiring a luminance parameter and a chrominance parameter, wherein the luminance parameter and the chrominance parameter are associated by a predetermined function. An image compression method characterized by:
【請求項2】 前記輝度のパラメータと前記色差のパラ
メータとは前記画像データ全体の所望の圧縮率に基づい
て求められる請求項1記載の画像圧縮方法。
2. The image compression method according to claim 1, wherein the luminance parameter and the color difference parameter are obtained based on a desired compression ratio of the entire image data.
【請求項3】 圧縮後の前記画像データの格納先の記憶
容量を検出し、前記輝度のパラメータと前記色差のパラ
メータとは、前記検出された記憶容量に基づいて求めら
れる請求項1記載の画像圧縮方法。
3. The image according to claim 1, wherein a storage capacity of a storage location of the compressed image data is detected, and the luminance parameter and the color difference parameter are obtained based on the detected storage capacity. Compression method.
【請求項4】 前記画像データの圧縮後のデータ量が目
標値に達していなければ、前記輝度のパラメータと前記
色差のパラメータとを更新して再び、前記画像データを
圧縮する請求項1から3までのいずれかに記載の画像圧
縮方法。
4. The method according to claim 1, wherein, if the data amount of the image data after compression does not reach a target value, the luminance parameter and the color difference parameter are updated and the image data is compressed again. The image compression method according to any one of the above.
JP28937399A 1999-10-12 1999-10-12 Image compression method Pending JP2001112023A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28937399A JP2001112023A (en) 1999-10-12 1999-10-12 Image compression method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28937399A JP2001112023A (en) 1999-10-12 1999-10-12 Image compression method

Publications (1)

Publication Number Publication Date
JP2001112023A true JP2001112023A (en) 2001-04-20

Family

ID=17742380

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28937399A Pending JP2001112023A (en) 1999-10-12 1999-10-12 Image compression method

Country Status (1)

Country Link
JP (1) JP2001112023A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006333254A (en) * 2005-05-27 2006-12-07 Fujifilm Holdings Corp Moving image real time communication terminal, and method and program for controlling moving image real time communication terminal
JP2013214995A (en) * 2005-04-13 2013-10-17 Thomson Licensing Methods and apparatus for video decoding

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013214995A (en) * 2005-04-13 2013-10-17 Thomson Licensing Methods and apparatus for video decoding
JP2013214994A (en) * 2005-04-13 2013-10-17 Thomson Licensing Methods and apparatus for video encoding
JP2013214997A (en) * 2005-04-13 2013-10-17 Thomson Licensing Methods and apparatus for video decoding
JP2013214996A (en) * 2005-04-13 2013-10-17 Thomson Licensing Methods and apparatus for video encoding
JP2015109680A (en) * 2005-04-13 2015-06-11 トムソン ライセンシングThomson Licensing Method and apparatus for video encoding
US10123046B2 (en) 2005-04-13 2018-11-06 Thomson Licensing Method and apparatus for video decoding
JP2006333254A (en) * 2005-05-27 2006-12-07 Fujifilm Holdings Corp Moving image real time communication terminal, and method and program for controlling moving image real time communication terminal

Similar Documents

Publication Publication Date Title
JPH0595536A (en) High efficiency coded signal processor
JP2001512651A (en) Calculation method of quantization matrix for each frame
JP3504005B2 (en) Data compression method
JP4144357B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium
JP2000125136A (en) Image data compression device and its method
US6738074B2 (en) Image compression system and method
JPH09200758A (en) Image encoder
US20030053115A1 (en) Image compression appartatus, image depression apparatus and method thereof
US20050041875A1 (en) Motion image processing apparatus, computer-readable recording medium recorded with program code for causing a computer to process motion image, and motion image processing method
JP3900155B2 (en) Image processing apparatus, image processing method and image processing program, and quantization control apparatus, quantization control method and quantization control program
JP2001112023A (en) Image compression method
JPWO2002080575A1 (en) Image processing apparatus, image processing method, image processing program, and recording medium
JP2003204436A (en) Image coding equipment and program thereof
JP2004186934A (en) Image processing system, image forming device, image processing method, and program
JP2922598B2 (en) Image coding method
US6687412B1 (en) Method and system for generating image compression quantization matrices
JP3402212B2 (en) Digital data compression method
EP1345449A1 (en) Digital image compression and decompression using block coding
JPH04167868A (en) Coding device and coding method for picture
US7623720B2 (en) Image processing apparatus and method
JP2006304198A (en) Image compressing device
JP2633118B2 (en) Image data compression apparatus and method
JP3958033B2 (en) Method and system for compressing moving picture information
JP6812214B2 (en) Image coding device, image coding method, and program
JP3016805B2 (en) Image data compression method