JPH07115668A - Device and method for compressing image - Google Patents

Device and method for compressing image

Info

Publication number
JPH07115668A
JPH07115668A JP26116393A JP26116393A JPH07115668A JP H07115668 A JPH07115668 A JP H07115668A JP 26116393 A JP26116393 A JP 26116393A JP 26116393 A JP26116393 A JP 26116393A JP H07115668 A JPH07115668 A JP H07115668A
Authority
JP
Japan
Prior art keywords
data
code amount
luminance data
image
coefficient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP26116393A
Other languages
Japanese (ja)
Inventor
Masaki Nakagawa
正樹 中河
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP26116393A priority Critical patent/JPH07115668A/en
Publication of JPH07115668A publication Critical patent/JPH07115668A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To reduce the degradation of picture quality without changing the image compression ratio at the time of compressing image data for which the object of especially character images or the like is photographed from a short distance. CONSTITUTION:At the time of a short distance photographing mode, in initial image scanning, the total code amount Hc of quantized and encoded chrominance data is calculated in a chrominance code amount calculation circuit 40, the total code amount Hc of the chrominance data is subtracted 43 from a set total code amount Nt and the total code amount Hyt of luminance data is obtained. Then, in an alphat calculation circuit 44, a coefficient alphat corresponding to the total code amount Hyt of the luminance data is obtained and the coefficient alphat is supplied to a multiplier 33. In second picture scanning, by quantizing and encoding the luminance data by the value of a quantization table 32 multiplied by the coefficient alphat, more code amount in the set total code amount Nt is distributed to the luminance data than the chrominance data.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、画像データを圧縮する
画像圧縮装置及び画像圧縮方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image compression apparatus and image compression method for compressing image data.

【0002】[0002]

【従来の技術】最近、映像機器のデジタル化に伴い、カ
メラの分野においても信号処理のデジタル化が進みつつ
ある。これに付随してデジタル化した映像信号をデジタ
ル信号のまま記録媒体に記録するシステムの開発が活発
になってきている。
2. Description of the Related Art Recently, along with the digitization of video equipment, the digitization of signal processing is also progressing in the field of cameras. Along with this, development of a system for recording a digital video signal as a digital signal on a recording medium has been actively conducted.

【0003】例えば、電子スチルカメラがその一例であ
る。既にフロッピーディスクにアナログ記録する電子ス
チルカメラが市販されているが、ここにきて、メモリカ
ードにデジタル記録する電子スチルカメラが種々開発さ
れている。そしてこの場合、メモリカードの記録容量に
限りがあるため、画像データの圧縮技術が必須になって
くる。
For example, an electronic still camera is one example. Electronic still cameras for analog recording on a floppy disk are already on the market, but various electronic still cameras for digital recording on a memory card have been developed. In this case, since the recording capacity of the memory card is limited, the image data compression technique is essential.

【0004】既に知られている画像データの圧縮方法と
しては、DPCM(Defferencial Pulse Code Modulati
on)による方法や直交変換(例えば、DCT;Discrete
Cosine Transform )を用いた方法等がある。
A known compression method for image data is DPCM (Defferencial Pulse Code Modulati).
on) or orthogonal transform (eg DCT; Discrete
Cosine Transform) and the like.

【0005】今のところ、圧縮率を上げようとする動き
が強く、この限りにおいてはDCTを用いたデータ圧縮
方法が有利であると言われている。また、静止画像の圧
縮符号化方式の国際標準化がISO/CCITTの下部
組織であるJPEG(JointPhotographic Expert Grou
p)によってなされ、その中で一番利用されているベース
ライン方式も、やはりDCTを使った圧縮符号化方式に
なっている。
At present, there is a strong tendency to increase the compression rate, and it is said that the data compression method using DCT is advantageous in this limit. In addition, international standardization of the compression coding method for still images is JPEG (Joint Photographic Expert Grou), which is a subordinate organization of ISO / CCITT.
The baseline method that is used by p) and is the most used among them is also the compression coding method using DCT.

【0006】また、メモリカードはその記録容量に限界
があるにもかかわらず、DCT画像圧縮自体は可変長符
号化であるため、画像圧縮時には符号量制御を行い、記
録枚数を保証するのが通例である。
In addition, although the memory card has a limited recording capacity, the DCT image compression itself is variable-length coding, and therefore it is customary to control the code amount during image compression to guarantee the number of recorded images. Is.

【0007】図2は電子スチルカメラに用いられるDC
T圧縮符号化システムの例を示すブロック図である。同
図に示すように、このシステムはメモリコントローラ
1、フレームメモリ2、DCT演算部3、エンコーダ
4、カードコントローラ5及びメモリカード6を有して
なる。メモリコントローラ1には端子1aよりデジタル
映像信号が供給される。この信号はインターレース方式
の信号であり、ノンインターレース方式の信号に変換す
るため一旦フレームメモリ2に記憶される。その後、8
×8画素を1つのブロックとしてインターレース信号が
ブロック毎に読出され、DCT演算部3に供給される。
DCT演算部3はブロック単位の信号を離散コサイン変
換し、その変換係数をエンコーダ4に供給する。エンコ
ーダ4は供給された変換係数を量子化した後、ハフマン
符号化して圧縮データを生成し、生成した圧縮データを
カードコントローラ5を介してメモリカード6に供給す
る。
FIG. 2 shows a DC used in an electronic still camera.
It is a block diagram which shows the example of T compression encoding system. As shown in the figure, this system comprises a memory controller 1, a frame memory 2, a DCT operation unit 3, an encoder 4, a card controller 5 and a memory card 6. A digital video signal is supplied to the memory controller 1 from the terminal 1a. This signal is an interlaced signal and is temporarily stored in the frame memory 2 for conversion into a non-interlaced signal. Then 8
The interlace signal is read out for each block by using × 8 pixels as one block, and is supplied to the DCT calculation unit 3.
The DCT operation unit 3 performs a discrete cosine transform on the block unit signal and supplies the transform coefficient to the encoder 4. The encoder 4 quantizes the supplied transform coefficient and then Huffman-encodes it to generate compressed data, and supplies the generated compressed data to the memory card 6 via the card controller 5.

【0008】図3はエンコーダ4の構成を示すブロック
図である。同図において、11はDCT演算部3からの
ブロック毎の変換係数を入力する端子である。12はブ
ロック毎の変換係数を量子化するための値をブロック毎
に保持した量子化テーブルである。13は量子化テーブ
ル12の値に、マルチプレクサ21から与えられる係数
(スケールファクタ)を乗算する乗算器である。14は
入力したブロック毎の変換係数を乗算後の量子化テーブ
ル12の値で除算して量子化を行う除算器である。15
は量子化した変換係数をハフマン符号化する符号化部で
ある。16、17、18、19はそれぞれ、符号化部1
4で得た符号化データをグループ毎に積算し、さらにそ
の積算値をグループの数で乗算した結果をグループ総符
号量として求める4つの符号量算出回路である。20は
各符号量算出回路16、17、18、19で求めたグル
ープ総符号量を基に設定総符号量Ntに応じた係数αt
を計算するαt計算回路である。21は乗算器13に与
える係数を切り替えるマルチプレクサである。22は符
号化データを出力する出力端子である。
FIG. 3 is a block diagram showing the configuration of the encoder 4. In the figure, reference numeral 11 is a terminal for inputting the conversion coefficient for each block from the DCT calculation unit 3. Reference numeral 12 is a quantization table that holds, for each block, a value for quantizing the transform coefficient for each block. Reference numeral 13 is a multiplier for multiplying the value of the quantization table 12 by a coefficient (scale factor) given from the multiplexer 21. Reference numeral 14 is a divider that divides the input conversion coefficient for each block by the value of the quantization table 12 after multiplication to perform quantization. 15
Is a coding unit for Huffman coding the quantized transform coefficient. 16, 17, 18, and 19 are encoding units 1 respectively.
4 is a code amount calculation circuit for accumulating the encoded data obtained in 4 for each group and further obtaining the result of multiplying the integrated value by the number of groups as the group total code amount. Reference numeral 20 is a coefficient αt corresponding to the set total code amount Nt based on the group total code amount obtained by the respective code amount calculation circuits 16, 17, 18, and 19.
Is an αt calculation circuit for calculating Reference numeral 21 is a multiplexer for switching the coefficient given to the multiplier 13. Reference numeral 22 is an output terminal for outputting encoded data.

【0009】次にこのエンコーダ4の動作を説明する。
このエンコーダ4では1つの画像を2回スキャンし、最
初のスキャンで画像データの変換係数の最終的な符号化
に必要な係数αtの計算を行い、次のスキャンでこの係
数αtを用いて変換係数の量子化及び符号化を行って圧
縮データを出力する。以下にその動作の詳細を説明す
る。
Next, the operation of the encoder 4 will be described.
The encoder 4 scans one image twice, calculates the coefficient αt necessary for final encoding of the conversion coefficient of the image data in the first scan, and uses the coefficient αt in the next scan to calculate the conversion coefficient. Is quantized and encoded to output compressed data. The details of the operation will be described below.

【0010】最初のスキャンでは、まず画像データの変
換係数の各ブロックを全画像に亘って順次端子11aよ
り入力し、これを除算器14にて、量子化テーブル12
の値に係数を乗じた値で除算し量子化を行う。
In the first scan, first, each block of transform coefficients of image data is sequentially input from the terminal 11a over the entire image, and the divider 14 causes the quantizer table 12 to input this.
Quantization is performed by dividing by the value obtained by multiplying the value of by a coefficient.

【0011】ここで、1画面を構成する画像データの変
換係数は図4に示すように、複数のブロックに分割され
ており、変換係数の各ブロックはG1、G2、G3、G
4の4グループに分類されている。そして乗算器13に
与えられる係数α1、α2、α3、α4(α1<α2<
α3<α4)は、各グループに対応付けられたものがマ
ルチプレクサ21にて選択される。
Here, as shown in FIG. 4, the conversion coefficient of the image data forming one screen is divided into a plurality of blocks, and each block of the conversion coefficient is G1, G2, G3, G.
It is classified into four groups of four. The coefficients α1, α2, α3, α4 (α1 <α2 <
In the case of α3 <α4), the one associated with each group is selected by the multiplexer 21.

【0012】この後、量子化された変換係数を符合化部
14にてハフマン符号化し、符号化データを各グループ
の符号量算出回路16、17、18、19にてグループ
毎に積算する。ここで各グループの積算値は実際の符号
量の1/4であるから、各グループの積算値を4倍し
て、その結果をグループ毎の総符号量N1、N2、N
3、N4として得る。そしてこれらの総符号量N1、N
2、N3、N4はαt計算回路20に入力される。
After that, the quantized transform coefficients are Huffman coded by the coding unit 14, and the coded data are integrated for each group by the code amount calculation circuits 16, 17, 18 and 19 of each group. Here, since the integrated value of each group is ¼ of the actual code amount, the integrated value of each group is multiplied by 4 and the result is the total code amount N1, N2, N for each group.
3, get as N4. Then, the total code amount N1, N
2, N3 and N4 are input to the αt calculation circuit 20.

【0013】ところで、このエンコーダ4には、例えば
図5に示すように、画像データの圧縮率や圧縮画像の画
質を左右する設定総符号量Ntが予め定義される。
By the way, in the encoder 4, for example, as shown in FIG. 5, a set total code amount Nt which influences the compression rate of image data and the image quality of compressed image is defined in advance.

【0014】αt計算回路20は、各符号量算出回路1
6、17、18、19より入力したグループ毎の総符号
量N1、N2、N3、N4及び係数α1、α2、α3、
α4から設定総符号量Ntに対応する係数αtを計算す
る。
The αt calculation circuit 20 includes the code amount calculation circuit 1
6, 17, 18 and 19, the total code amount N1, N2, N3, N4 for each group and the coefficients α1, α2, α3,
A coefficient αt corresponding to the set total code amount Nt is calculated from α4.

【0015】例えば、設定総符号量Ntが図上に示す値
であるとすると、図中A(N2,α2),B(N3,α
3)の2点で近似した直線式からターゲットとする係数
αtを決定できる。
For example, if the set total code amount Nt is the value shown in the figure, A (N2, α2), B (N3, α) in the figure
The target coefficient αt can be determined from the linear equation approximated by the two points of 3).

【0016】次に2回目の画像スキャンを行う。2回目
のスキャンでは、マルチプレクサ21はαt計算回路2
0で求めた係数αtを選択し、これを乗算器13に与え
る。そして、この係数αtで乗算した量子化テーブル1
2の値を用いて、各ブロックの変換係数を除算器14に
て量子化する。その後、量子化された各ブロックの変換
係数を、符号化部15にてハフマン符号化し、エンコー
ダ4の出力端子22より圧縮データとして出力する。
Next, a second image scan is performed. In the second scan, the multiplexer 21 uses the αt calculation circuit 2
The coefficient αt obtained by 0 is selected and given to the multiplier 13. Then, the quantization table 1 multiplied by this coefficient αt
The transform coefficient of each block is quantized by the divider 14 using the value of 2. After that, the quantized transform coefficient of each block is Huffman coded by the coding unit 15, and is output from the output terminal 22 of the encoder 4 as compressed data.

【0017】なお、以上の画像データの量子化、符号化
は、輝度データ及び色データについて同様に行われる。
すなわち、輝度及び色ともに、グループ毎に同じ量子化
テーブルの値を用いて量子化が行われる。
The above-mentioned quantization and coding of image data are similarly performed for luminance data and color data.
That is, for both brightness and color, quantization is performed using the same quantization table value for each group.

【0018】ところで、このような画像圧縮は宿命的に
画質の劣化を伴う。この画質の劣化は、画像データをブ
ロック毎に処理しているために生じるブロック歪みや広
域成分を欠落させるために生じるリンギング等によるも
のである。そしてこの画質の劣化は、特に業務用に電子
スチルカメラを使用して文字の入った被写体を撮影する
場合に問題となって現れ、例えば撮影された文字周辺が
歪んで、文字が判別できなくなることもある。
By the way, such image compression fatally causes deterioration of image quality. This deterioration in image quality is due to block distortion caused by processing the image data block by block, ringing caused by loss of a wide area component, and the like. And this deterioration of image quality becomes a problem especially when photographing a subject with characters using an electronic still camera for professional use, for example, the periphery of the characters photographed is distorted and the characters cannot be distinguished. There is also.

【0019】[0019]

【発明が解決しようとする課題】このように、従来の画
像圧縮装置では画質の劣化が必至であり、文字画像等の
比較的高解像度が要求される画像を圧縮した場合に、文
字が判別できない等の問題が露呈する。
As described above, in the conventional image compression apparatus, the image quality is inevitably deteriorated, and when an image requiring a relatively high resolution such as a character image is compressed, the character cannot be discriminated. The problems such as are exposed.

【0020】本発明はこのような課題を解決するための
ものであり、特に文字画像等の被写体を近距離から撮影
した画像データの圧縮に際して、画像圧縮率を変えるこ
となく、画質の劣化を軽減することのできる画像圧縮装
置及び画像圧縮方法の提供を目的としている。
The present invention is intended to solve such a problem, and particularly when compressing image data obtained by photographing a subject such as a character image from a short distance, deterioration of the image quality is reduced without changing the image compression rate. An object of the present invention is to provide an image compression apparatus and an image compression method that can be performed.

【0021】[0021]

【課題を解決するための手段】本発明の画像圧縮装置は
上記した目的を達成するために、画像データである輝度
データ及び色データを複数のブロックに分割し、ブロッ
ク毎に直交変換して変換係数を得る直交変換手段と、前
記直交変換手段で得たブロック毎の輝度データ及び色デ
ータの変換係数を量子化テーブルを用いて量子化する量
子化手段と、前記量子化手段によって量子化された輝度
データ及び色データの変換係数を符号化する符号化手段
と、前記符号化手段で得た色データの符号化データの総
符号量を積算する積算手段と、前記積算手段で求めた色
データの総符号量を、予め定めた前記画像データの設定
総符号量から減算して輝度データへの配分符号量を求め
る減算手段と、前記減算手段で求めた輝度データへの配
分符号量に応じて、前記輝度データの変換係数を量子化
する前記量子化テーブルの値を決定するテーブル設定手
段とを具備している。
In order to achieve the above-mentioned object, an image compression apparatus of the present invention divides luminance data and color data which are image data into a plurality of blocks, and transforms each block by orthogonal transformation. Orthogonal transformation means for obtaining coefficients, quantization means for quantizing the transformation coefficient of the luminance data and color data for each block obtained by the orthogonal transformation means using a quantization table, and the quantization means for quantizing Encoding means for encoding conversion coefficients of luminance data and color data, integrating means for integrating the total code amount of encoded data of color data obtained by the encoding means, and color data obtained by the integrating means. Depending on the subtraction means for subtracting the total code amount from the preset total code amount of the image data to obtain the distribution code amount to the luminance data, and the distribution code amount to the luminance data obtained by the subtracting means. The transform coefficients of the luminance data is provided with a table setting means for determining a value of the quantization table for quantizing.

【0022】[0022]

【作用】本発明では、画像データである輝度データ及び
色データを2回入力して画像圧縮を行う。最初の入力画
像に対しては、これを直交変換、量子化、符号化した
後、色データの符号化データの総符号量を算出し、算出
した色データの総符号量を、予め定めた画像データの設
定総符号量から減算して輝度データへの配分符号量を求
める。そしてこの輝度データへの配分符号量に応じて、
輝度データの変換係数を量子化する量子化テーブルの値
を決定する。この後、2回目の画像入力を行って、設定
後の量子化テーブルの値を用いて輝度データの変換係数
の量子化、符号化を行い、圧縮データとして出力する。
これにより、輝度データと色データのどちらも同じ量子
化テーブルの値を用いて量子化・符号化する方式に比
べ、色データよりも輝度データに多くの符号量を配分で
きるようになり、圧縮率を変更することなく、例えば文
字画像等の近距離撮影した画像の画質向上を図ることが
できる。
In the present invention, luminance data and color data, which are image data, are input twice to perform image compression. For the first input image, this is orthogonally transformed, quantized, and coded, then the total code amount of the coded data of the color data is calculated, and the calculated total code amount of the color data is set to a predetermined image. The distribution code amount to the brightness data is obtained by subtracting from the set total code amount of the data. Then, according to the distribution code amount to this luminance data,
The value of the quantization table for quantizing the conversion coefficient of the luminance data is determined. After that, the second image input is performed, the conversion coefficient of the luminance data is quantized and encoded using the value of the quantization table after the setting, and output as compressed data.
This makes it possible to allocate a larger amount of code to luminance data than to color data, as compared to a method in which both luminance data and color data are quantized / encoded using the same quantization table values. It is possible to improve the image quality of a short-distance shot image such as a character image without changing the.

【0023】[0023]

【実施例】以下、本発明の実施例を図面を参照して説明
する。
Embodiments of the present invention will be described below with reference to the drawings.

【0024】図1は本発明に係る一実施例の画像圧縮装
置における、特にエンコーダ(量子化・符号化回路)の
構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of an encoder (quantization / encoding circuit) in an image compression apparatus according to an embodiment of the present invention.

【0025】同図において、31はDCT演算部からの
ブロック毎の画像データの変換係数を入力する端子であ
る。32はブロック毎の変換係数を量子化するための値
をブロック毎に保持した量子化テーブルである。33は
量子化テーブル32の値に第2マルチプレクサ45から
選択的に与えられた係数(スケールファクタ)を乗算す
る乗算器である。34は入力したブロック毎の変換係数
を係数乗算後の量子化テーブル32の値で除算して量子
化を行う除算器である。35は量子化した変換係数をハ
フマン符号化する符号化部である。36、37、38、
39はそれぞれ、符号化部34で得た符号化データをグ
ループ毎に積算し、さらにその積算値をグループの数で
乗算した結果をグループ毎の総符号量N1 、N2 、N3
、N4 として求める4つの符号量算出回路である。こ
れらの符号量算出回路36、37、38、39は、近距
離撮影モード時、各グループの輝度データの総符号量の
みを算出し、その他の時は各グループの輝度データ及び
色データの総符号量を計算するように動作する。40は
符号化部35で得た色データの符号化データを積算し、
その積算値を色データの総符号量Hc として求める色符
号量算出回路である。41は図示しない被写体と撮像手
段である電子スチルカメラとの距離を検出して、この距
離が所定距離以内である場合に近距離撮影モード選択信
号S1 を各符号量算出回路36、37、38、39及び
第1、第2マルチプレクサ42、45に出力する近距離
検出回路である。42は近距離撮影モード選択信号S1
を入力した時、色符号量算出回路40の出力を選択し、
その他の場合は“0”を選択して減算器43に与える第
1マルチプレクサである。43は予め全体の画像データ
(輝度データ及び色データ)に対して定めた設定総符号
量Ntから第1マルチプレクサ42で選択された値を減
算する減算器であり、近距離撮影モード時は設定総符号
量Ntから色データの総符号量Hc を減算してその結果
を輝度データの総符号量Hytとして求める。44は2回
目に入力する画像データの量子化で用いる係数αtを計
算するαt計算回路である。このαt計算回路44は、
減算器43の出力Nyt、各符号量算出回路36、37、
38、39の出力N1 、N2 、N3 、N4 、及び一回目
の画像スキャンで画像データの量子化に適用した係数α
1、α2、α3、α4を用いて係数αtの計算を行う。
すなわち、近距離撮影モード時は輝度データの総符号量
Hytを基に、その他の時は画像データ(輝度データ及び
色データ)全体に対して定められた設定総符号量Ntを
基に係数αtの計算が行われる。なお、係数αtの計算
は、従来の技術(図5)で説明したように、α1、α
2、α3、α4とN1 、N2 、N3 、N4 との関係を示
す表からの直線近似によって行われる。45は乗算器3
3に与える係数を切り換える第2マルチプレクサであ
る。そして46は符号化データを出力する出力端子であ
る。
In the figure, reference numeral 31 is a terminal for inputting the conversion coefficient of the image data for each block from the DCT calculation section. Reference numeral 32 is a quantization table holding a value for quantizing the transform coefficient for each block for each block. A multiplier 33 multiplies the value in the quantization table 32 by a coefficient (scale factor) selectively given from the second multiplexer 45. Reference numeral 34 is a divider that divides the input transform coefficient for each block by the value of the quantization table 32 after the coefficient multiplication to perform quantization. Reference numeral 35 is an encoding unit for Huffman encoding the quantized transform coefficient. 36, 37, 38,
Reference numeral 39 indicates the total code amount N1, N2, N3 for each group obtained by multiplying the coded data obtained by the coding unit 34 for each group and further multiplying the integrated value by the number of groups.
, N4 as four code amount calculation circuits. These code amount calculation circuits 36, 37, 38, 39 calculate only the total code amount of the luminance data of each group in the short-distance shooting mode, and in other cases, the total code of the luminance data and color data of each group. Works to calculate quantity. 40 integrates the coded data of the color data obtained by the coding unit 35,
A color code amount calculation circuit for obtaining the integrated value as a total code amount Hc of color data. Reference numeral 41 detects a distance between a subject (not shown) and an electronic still camera which is an image pickup means. 39 and the short distance detection circuit for outputting to the first and second multiplexers 42 and 45. 42 is a close-up photography mode selection signal S1
, The output of the color code amount calculation circuit 40 is selected,
In other cases, the first multiplexer selects "0" and supplies it to the subtractor 43. Reference numeral 43 denotes a subtracter that subtracts the value selected by the first multiplexer 42 from the set total code amount Nt set in advance for the entire image data (luminance data and color data). The total code amount Hc of the color data is subtracted from the code amount Nt and the result is obtained as the total code amount Hyt of the luminance data. Reference numeral 44 is an αt calculation circuit for calculating the coefficient αt used in the quantization of the image data input the second time. This αt calculation circuit 44
The output Nyt of the subtractor 43, the code amount calculation circuits 36 and 37,
38, 39 outputs N1, N2, N3, N4 and the coefficient α applied to the quantization of the image data in the first image scan
The coefficient αt is calculated using 1, α2, α3, and α4.
That is, the coefficient αt of the coefficient αt is based on the total code amount Hyt of the luminance data in the short-distance shooting mode, and based on the set total code amount Nt determined for the entire image data (luminance data and color data) at other times. Calculation is done. Note that the coefficient αt is calculated by α1, α as described in the conventional technique (FIG. 5).
2, α3, α4 and N1, N2, N3, N4 are linearly approximated from a table. 45 is a multiplier 3
3 is a second multiplexer that switches the coefficient to be given to 3; An output terminal 46 outputs the encoded data.

【0026】次に本実施例の動作を説明する。まず近距
離検出回路41にて、被写体と電子スチルカメラとの距
離検出を行い、これから行う撮影が近距離撮影かどうか
を検出する。そして近距離撮影であることを検出する
と、近距離検出回路41は近距離撮影モード選択信号S
1 を各符号量算出回路36、37、38、39及び第
1、第2マルチプレクサ42、45に出力する。
Next, the operation of this embodiment will be described. First, the short-distance detection circuit 41 detects the distance between the subject and the electronic still camera, and detects whether or not the shooting to be performed is short-distance shooting. Then, when it is detected that the short-distance photographing is performed, the short-distance detecting circuit 41 outputs the short-distance photographing mode selection signal S.
1 is output to each of the code amount calculation circuits 36, 37, 38, 39 and the first and second multiplexers 42, 45.

【0027】次に近距離撮影時の動作を説明する。最初
の画像スキャンでは、まず輝度データの変換係数の各ブ
ロックを全画像に亘って順次端子31に入力し、これを
除算器34にて、量子化テーブル32の値に係数を乗じ
た値で除算し量子化を行う。このとき係数は、入力端子
31に入力されるブロックのグループに同期して第2マ
ルチプレクサ45からα1、α2、α3、α4(α1<
α2<α3<α4)がそれぞれ供給される。
Next, the operation at the time of short-distance shooting will be described. In the first image scanning, first, each block of the conversion coefficient of the luminance data is sequentially input to the terminal 31 over the entire image, and this is divided by the divider 34 by the value obtained by multiplying the value of the quantization table 32 by the coefficient. And quantize. At this time, the coefficients are synchronized with the group of blocks input to the input terminal 31 from the second multiplexer 45 by α1, α2, α3, α4 (α1 <
α2 <α3 <α4) are respectively supplied.

【0028】この後、量子化された輝度データの変換係
数を符合化部35にてハフマン符号化し、符号化データ
を各グループの符号量算出回路36、37、38、39
にてグループ毎に積算する。ここで各グループの積算値
は実際の符号量の1/4であるから、各グループの積算
値を4倍して、その結果をグループ毎の符号量N1、N
2、N3、N4としてそれぞれαt計算回路44に入力
する。
After that, the conversion coefficient of the quantized luminance data is Huffman coded by the coding unit 35, and the coded data is coded by the code amount calculation circuits 36, 37, 38, 39 of each group.
Will be added for each group. Here, since the integrated value of each group is 1/4 of the actual code amount, the integrated value of each group is multiplied by 4 and the result is the code amount N1, N for each group.
2, N3, and N4 are input to the αt calculation circuit 44, respectively.

【0029】近距離撮影モード時は、近距離検出回路4
1から各符号量算出回路36、37、38、39に近距
離撮影モード選択信号S1 が入力されることで、各符号
量算出回路36、37、38、39の動作は以上の輝度
データの総符号量計算のみで終了となる。
In the short distance shooting mode, the short distance detection circuit 4
By inputting the short-distance shooting mode selection signal S1 from 1 to each of the code amount calculation circuits 36, 37, 38, 39, the operation of each code amount calculation circuit 36, 37, 38, 39 is performed by the above-mentioned brightness data. Only code amount calculation ends.

【0030】次に色データの変換係数の各ブロックを全
画像に亘って順次端子31に入力し、これを除算器34
にて、量子化テーブル32の値に係数α4を乗じた値で
除算し量子化を行う。この係数α4は4つのグループの
中で最も圧縮率の高くなる係数である。
Next, each block of color data conversion coefficients is sequentially input to the terminal 31 over the entire image, and this is divided by the divider 34.
Then, the value in the quantization table 32 is divided by a value obtained by multiplying the coefficient α4 to perform quantization. The coefficient α4 is the coefficient having the highest compression rate in the four groups.

【0031】この後、量子化された色データの変換係数
を符合化部35にてハフマン符号化し、符号化データを
色符号量算出回路40にて積算し、その積算結果である
色データの総符号量Hc を第1マルチプレクサ42に入
力する。ここで第1マルチプレクサ42は、近距離撮影
モード選択信号S1 の入力によって色符号量算出回路4
0の出力Hc を選択し、これを減算器43に与える。す
ると減算器43は、この色データの総符号量Hc を設定
総符号量Ntから減算し、その結果を輝度データの総符
号量Hytとしてαt計算回路44に入力する。
After that, the conversion coefficient of the quantized color data is Huffman coded by the coding unit 35, the coded data is integrated by the color code amount calculation circuit 40, and the total of the color data as the integration result is obtained. The code amount Hc is input to the first multiplexer 42. Here, the first multiplexer 42 receives the short distance shooting mode selection signal S1 and receives the color code amount calculation circuit 4
The output Hc of 0 is selected and given to the subtractor 43. Then, the subtractor 43 subtracts the total code amount Hc of the color data from the set total code amount Nt, and inputs the result to the αt calculation circuit 44 as the total code amount Hyt of the luminance data.

【0032】αt計算回路44は、入力した輝度データ
の総符号量Hyt、グループ毎の輝度データの総符号量N
1、N2、N3、N4、及び係数α1、α2、α3、α
4をパラメータとして、2回目に入力する輝度データの
量子化で用いる係数αtを計算する。ここで、輝度デー
タの総符号量Hytは、設定総符号量Ntから色データの
総符号量Hc を減算して求めた値であり、色データの総
符号量Hc は圧縮率の最も高い係数α4を用いて量子化
した結果から導出される値である。したがって、輝度デ
ータと色データのどちらも同じ係数を用いて量子化を行
う従来方式に比べ、輝度データに設定総符号量Ntのう
ちの多くの符号量を配分できることになる。換言すれ
ば、色データの符号量の一部を輝度データの符号量に割
り振ったことになる。
The αt calculation circuit 44 calculates the total code amount Hyt of the input luminance data and the total code amount N of the luminance data of each group.
1, N2, N3, N4 and coefficients α1, α2, α3, α
Using 4 as a parameter, the coefficient αt used in the quantization of the luminance data input the second time is calculated. Here, the total code amount Hyt of the luminance data is a value obtained by subtracting the total code amount Hc of the color data from the set total code amount Nt, and the total code amount Hc of the color data is the coefficient α4 having the highest compression rate. Is a value derived from the result of quantization using. Therefore, as compared with the conventional method in which the same coefficient is used for both the luminance data and the color data, a larger code amount of the set total code amount Nt can be distributed to the luminance data. In other words, a part of the code amount of color data is allocated to the code amount of luminance data.

【0033】次に、2回目の画像スキャンが行われる。
この時の輝度データの量子化に際しては、第2マルチプ
レクサ45にて、αt計算回路44が求めた係数αtが
選択されて乗算器33に与えられる。この後、前記同様
に、輝度データの量子化、符号化を行ってその符号化デ
ータを出力端子46より出力する。
Next, the second image scan is performed.
At the time of quantizing the luminance data at this time, the coefficient αt calculated by the αt calculation circuit 44 is selected by the second multiplexer 45 and given to the multiplier 33. Thereafter, the luminance data is quantized and encoded in the same manner as described above, and the encoded data is output from the output terminal 46.

【0034】また、続いて入力される色データの量子化
に際しては、第2マルチプレクサ45にて、圧縮率が最
も高い係数α4が選択されて乗算器33に与えられる。
この後、前記同様に、色データの量子化、符号化を行っ
てその符号化データを出力端子46より出力する。
When the color data to be subsequently input is quantized, the coefficient α4 having the highest compression rate is selected by the second multiplexer 45 and given to the multiplier 33.
After that, the color data is quantized and encoded in the same manner as described above, and the encoded data is output from the output terminal 46.

【0035】次に近距離撮影時以外の動作を説明する。
この場合は従来と同様の動作が行われる。すなわち、各
符号量算出回路36、37、38、39に近距離撮影モ
ード選択信号S1 が入力されないことで、各符号量算出
回路36、37、38、39はそれぞれ、輝度データ及
び色データの符号化データに対して総符号量の計算を行
って、その結果N1、N2、N3、N4をαt計算回路
44に出力する。
Next, operations other than short-distance shooting will be described.
In this case, the same operation as the conventional one is performed. That is, since the short-distance shooting mode selection signal S1 is not input to the code amount calculation circuits 36, 37, 38, 39, the code amount calculation circuits 36, 37, 38, 39 respectively code the luminance data and the color data. The total code amount is calculated for the encoded data, and the results N1, N2, N3, and N4 are output to the αt calculation circuit 44.

【0036】またこの時、第1マルチプレクサ42は
“0”の値を選択して減算器43に入力することで、減
算器43からαt計算回路44へは設定総符号量Ntが
そのまま入力されることになる。
At this time, the first multiplexer 42 selects a value of "0" and inputs it to the subtractor 43, so that the set total code amount Nt is directly input from the subtractor 43 to the αt calculation circuit 44. It will be.

【0037】これにより、αt計算回路44にて、輝度
データ及び色データの量子化で共通に用いられる係数α
tが計算され、2回目の画像スキャンで入力した輝度デ
ータ及び色データの変換係数に対して、この係数αtを
用いて量子化が行われる。
As a result, the coefficient α commonly used in the quantization of the luminance data and the color data in the αt calculation circuit 44.
t is calculated, and the conversion coefficient of the luminance data and the color data input in the second image scan is quantized using this coefficient αt.

【0038】かくして本実施例の画像圧縮装置によれ
ば、文字画像撮影等の近距離撮影を行う場合は、高い圧
縮率の係数を用いて色データの量子化を行うことで色デ
ータに配分する符号量をできるだけ押え、その分輝度デ
ータへの符号配分量を増やすことで、圧縮率を変えるこ
となく画質の向上を図ることができる。
Thus, according to the image compression apparatus of the present embodiment, when performing short-distance shooting such as character image shooting, color data is quantized by using a coefficient having a high compression ratio and distributed to the color data. By suppressing the code amount as much as possible and increasing the code distribution amount to the luminance data by that amount, it is possible to improve the image quality without changing the compression rate.

【0039】なお、本発明はこの実施例に限定されるも
のではなく、その主旨を逸脱しない範囲で種々変形して
実施することができる。
The present invention is not limited to this embodiment, and various modifications can be made without departing from the spirit of the invention.

【0040】例えば、前記実施例では、近距離検出回路
41で近距離撮影を自動的に検出する構造にしたが、近
距離撮影モードを選択する切り換えスイッチを設け、人
為的に近距離撮影モードを設定するようにしてもよい。
For example, in the above-described embodiment, the short-distance detection circuit 41 automatically detects short-distance photographing, but a changeover switch for selecting the short-distance photographing mode is provided to artificially change the short-distance photographing mode. It may be set.

【0041】また本実施例では、符号量制御のために画
像データを4つのグループに別けたが、本発明はこれに
限定されるものではなく、量子化テーブルの値によって
符号量を制御できる構造の画像圧縮装置の範囲で適用可
能である。
In this embodiment, the image data is divided into four groups for controlling the code amount. However, the present invention is not limited to this, and the code amount can be controlled by the value of the quantization table. It is applicable in the range of the image compression device.

【0042】[0042]

【発明の効果】以上説明したように本発明の画像圧縮装
置及び画像圧縮方法によれば、特に文字画像等の被写体
を近距離から撮影した画像データを圧縮する際に、色デ
ータに配分する符号量を低く抑え、その分輝度データに
多くの符号量を配分することで、画像圧縮率を変えるこ
となく、画質の劣化を大幅に軽減することができる。
As described above, according to the image compressing apparatus and the image compressing method of the present invention, a code to be distributed to color data when compressing image data obtained by photographing a subject such as a character image from a short distance. By suppressing the amount to be low and allocating a large amount of code to the luminance data by that amount, deterioration of the image quality can be significantly reduced without changing the image compression rate.

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

【図1】本発明に係る一実施例の画像圧縮装置におけ
る、特にエンコーダ(量子化・符号化回路)の構成を示
すブロック図である。
FIG. 1 is a block diagram showing a configuration of an encoder (quantization / encoding circuit) in an image compression apparatus according to an embodiment of the present invention.

【図2】従来の電子スチルカメラに用いられるDCT圧
縮符号化システムの例を示すブロック図である。
FIG. 2 is a block diagram showing an example of a DCT compression encoding system used in a conventional electronic still camera.

【図3】図2のDCT圧縮符号化システムのエンコーダ
の構成を示すブロック図である。
FIG. 3 is a block diagram showing a configuration of an encoder of the DCT compression encoding system in FIG.

【図4】画像データのグループ分けを示す図である。FIG. 4 is a diagram showing grouping of image data.

【図5】量子化テーブルに与えられる係数と符合量との
関係を示す図である。
FIG. 5 is a diagram showing a relationship between a coefficient given to a quantization table and a code amount.

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

31…入力端子、32…量子化テーブル、33…乗算
器、34…除算器、35…符号化部、36、37、3
8、39…符号量算出回路、40…色符号量算出回路、
41…近距離検出回路、42…第1マルチプレクサ、4
3…減算器、44…αt計算回路、45…第2マルチプ
レクサ、46…出力端子。
31 ... Input terminal, 32 ... Quantization table, 33 ... Multiplier, 34 ... Divider, 35 ... Encoding section, 36, 37, 3
8, 39 ... Code amount calculation circuit, 40 ... Color code amount calculation circuit,
41 ... Short range detection circuit, 42 ... First multiplexer, 4
3 ... Subtractor, 44 ... αt calculation circuit, 45 ... Second multiplexer, 46 ... Output terminal.

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 H04N 1/41 C 7/30 ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI Technical display location H04N 1/41 C 7/30

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 画像データである輝度データ及び色デー
タを複数のブロックに分割し、ブロック毎に直交変換し
て変換係数を得る直交変換手段と、 前記直交変換手段で得たブロック毎の輝度データ及び色
データの変換係数を量子化テーブルを用いて量子化する
量子化手段と、 前記量子化手段によって量子化された輝度データ及び色
データの変換係数を符号化する符号化手段と、 前記符号化手段で得た色データの符号化データの総符号
量を積算する積算手段と、 前記積算手段で求めた色データの総符号量を、予め定め
た前記画像データの設定総符号量から減算して輝度デー
タへの配分符号量を求める減算手段と、 前記減算手段で求めた輝度データへの配分符号量に応じ
て、前記輝度データの変換係数を量子化する前記量子化
テーブルの値を決定するテーブル設定手段とを具備する
ことを特徴とする画像圧縮装置。
1. Brightness data and color data which are image data are divided into a plurality of blocks, and orthogonal transformation means for obtaining transformation coefficients by orthogonal transformation for each block, and luminance data for each block obtained by the orthogonal transformation means And a quantization means for quantizing the conversion coefficient of the color data using a quantization table, an encoding means for encoding the conversion coefficient of the luminance data and the color data quantized by the quantization means, and the encoding A totalizing means for integrating the total code amount of the coded data of the color data obtained by the means, and the total code amount of the color data obtained by the integrating means, by subtracting from the preset total code amount of the image data. Subtracting means for obtaining the distribution code amount to the luminance data, and determining the value of the quantization table for quantizing the conversion coefficient of the luminance data according to the distribution code amount to the luminance data obtained by the subtracting means. Image compression apparatus characterized by comprising a table setting means for.
【請求項2】 請求項1記載の画像圧縮装置において、 前記色データの変換係数を量子化する量子化テーブルの
値は、この量子化テーブルを用いて量子化、符号化され
た色データの符合量が、前記輝度データの変換係数を量
子化、符号化して得られる符合量より少なくなるように
設定されていることを特徴とする画像圧縮装置。
2. The image compression apparatus according to claim 1, wherein the value of the quantization table for quantizing the conversion coefficient of the color data is the code of the color data quantized and coded using this quantization table. An image compression apparatus, wherein the amount is set to be smaller than a code amount obtained by quantizing and encoding the transform coefficient of the luminance data.
【請求項3】 画像データである輝度データ及び色デー
タを入力する工程と、 入力した輝度データ及び色データを複数のブロックに分
割し、ブロック毎に直交変換を行って変換係数を得る工
程と、 ブロック毎の輝度データ及び色データの変換係数を量子
化テーブルを用いて量子化する工程と、 量子化された輝度データ及び色データの変換係数を符号
化する工程と、 色データの符号化データの総符号量を算出する工程と、 算出された色データの総符号量を、予め定めた前記画像
データの設定総符号量から減算して輝度データへの配分
符号量を求める工程と、 輝度データへの配分符号量に応じて、輝度データの変換
係数を量子化する前記量子化テーブルの値を決定する工
程と、 前記量子化テーブルの値決定後、前記入力した画像デー
タを再度入力して、輝度データ及び色データ毎に直交変
換、量子化、及び符号化を行って圧縮データを得る工程
とを有することを特徴とする画像圧縮方法。
3. A step of inputting luminance data and color data, which are image data, a step of dividing the inputted luminance data and color data into a plurality of blocks, and orthogonal transforming each block to obtain a transform coefficient. The step of quantizing the conversion coefficient of the luminance data and the color data for each block using the quantization table, the step of encoding the quantized conversion coefficient of the luminance data and the color data, and the step of encoding the encoded data of the color data A step of calculating a total code amount, a step of subtracting the calculated total code amount of the color data from a preset total code amount of the image data to obtain a distributed code amount to the luminance data, and a step of calculating the luminance data Deciding the value of the quantization table for quantizing the conversion coefficient of the luminance data according to the distribution code amount of, and after inputting the input image data again after the value of the quantization table is decided. And force, image compression method characterized by having orthogonal transform every luminance data and color data, and obtaining a compressed data by performing quantization and coding.
JP26116393A 1993-10-19 1993-10-19 Device and method for compressing image Withdrawn JPH07115668A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26116393A JPH07115668A (en) 1993-10-19 1993-10-19 Device and method for compressing image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26116393A JPH07115668A (en) 1993-10-19 1993-10-19 Device and method for compressing image

Publications (1)

Publication Number Publication Date
JPH07115668A true JPH07115668A (en) 1995-05-02

Family

ID=17357997

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26116393A Withdrawn JPH07115668A (en) 1993-10-19 1993-10-19 Device and method for compressing image

Country Status (1)

Country Link
JP (1) JPH07115668A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6424739B1 (en) 1997-06-25 2002-07-23 Sanyo Electric Co., Ltd. Image data compression apparatus capable of reducing false color
JP2003179926A (en) * 1999-06-14 2003-06-27 Nikon Corp Method for compression encoding, recording medium recording compression coding program, and electronic camera for conducting method for compression coding
KR100853931B1 (en) * 2006-03-15 2008-08-25 후지쯔 가부시끼가이샤 Video coding apparatus and recording medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6424739B1 (en) 1997-06-25 2002-07-23 Sanyo Electric Co., Ltd. Image data compression apparatus capable of reducing false color
JP2003179926A (en) * 1999-06-14 2003-06-27 Nikon Corp Method for compression encoding, recording medium recording compression coding program, and electronic camera for conducting method for compression coding
KR100853931B1 (en) * 2006-03-15 2008-08-25 후지쯔 가부시끼가이샤 Video coding apparatus and recording medium

Similar Documents

Publication Publication Date Title
US5291282A (en) Image data coding apparatus and method capable of controlling amount of codes
KR0150955B1 (en) Compressive and extensive method of an image for bit-fixing and the apparatus thereof
JP3085465B2 (en) Image data encoding apparatus and encoding method
KR0183688B1 (en) Image encoding method and device
US7489348B2 (en) Digital camera for recording a still image while shooting moving image
US5764806A (en) Image encoding method and apparatus
US5729633A (en) Picture data compression coding device and method thereof
US5592302A (en) Coding method for coding pixel blocks and apparatus therefor
JP3773585B2 (en) Image encoding device
JPH07154798A (en) Method and device for picture encoding
JPH0595536A (en) High efficiency coded signal processor
JPH05505077A (en) Digital image coding method using random scanning of image frames
JPH10271530A (en) Image data compression coder, method therefor and digital camera
US6005982A (en) Image compression and expansion device
JP3222780B2 (en) Image compression device
JPH07115668A (en) Device and method for compressing image
JP2959831B2 (en) Image data encoding device
JP2793402B2 (en) Image coding device
JPH07312751A (en) Method and device for compressing and coding image data
JP2766528B2 (en) Electronic camera image data processing device
JP3450357B2 (en) Image processing apparatus and method
JP3192133B2 (en) Electronic camera device
JP3038022B2 (en) Electronic camera device
JP3144727B2 (en) Digital electronic still camera
JP3055954B2 (en) Electronic still camera

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20001226