JP2002238060A - Image-coding method, image coder, program and recording medium - Google Patents

Image-coding method, image coder, program and recording medium

Info

Publication number
JP2002238060A
JP2002238060A JP2001030963A JP2001030963A JP2002238060A JP 2002238060 A JP2002238060 A JP 2002238060A JP 2001030963 A JP2001030963 A JP 2001030963A JP 2001030963 A JP2001030963 A JP 2001030963A JP 2002238060 A JP2002238060 A JP 2002238060A
Authority
JP
Japan
Prior art keywords
quantization scale
image
block
color
quantization
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
JP2001030963A
Other languages
Japanese (ja)
Inventor
Naoki Morimoto
森本  直樹
Makoto Yamada
誠 山田
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2001030963A priority Critical patent/JP2002238060A/en
Publication of JP2002238060A publication Critical patent/JP2002238060A/en
Pending legal-status Critical Current

Links

Landscapes

  • Color Television Systems (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image coder that enhances a reproduced image of an area of a specific color by quantizing the block of the specific color with a smaller quantization scale and to provide an image coding method, a program for the method and a recording medium for recording the program. SOLUTION: The image coder, that codes each block resulting from dividing an original image by a prescribed pixel number, is provided with a color discriminating means 34 that decides whether or not a color of each block is a prescribed color, a quantization scale revision means 18 that changes the quantization scale of each block, in response to an output of the color decision means 34 so that the quantization scale of the block in a prescribed color is smaller than the quantization scale of the block, whose color is not the prescribed color, and a quantization means 15 that quantizes the image of each block by each quantization scale decided by the quantization scale revision means 18.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、特定の色を有する
特定領域に対する量子化スケールを適応的に変更するこ
とで該色を有する被写体の再生画質を改善する画像符号
化装置および画像符号化方法に関する。さらに、該方法
を実現するプログラムおよび該プログラムを記録した記
録媒体に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image encoding apparatus and an image encoding method for improving the reproduction quality of a subject having a specific color by adaptively changing a quantization scale for a specific area having the specific color. About. Further, the present invention relates to a program for realizing the method and a recording medium on which the program is recorded.

【0002】[0002]

【従来の技術】画像信号を符号化する技術規格は、例え
ば、JPEG、H.26XシリーズおよびMPEGなどがある。
2. Description of the Related Art Technical standards for encoding image signals include, for example, JPEG and H.264. 26X series and MPEG.

【0003】JPEGは、離散コサイン変換(以下、「DC
T」と略記する。)と量子化と可変長符号化とから、カ
ラー静止画を符号化する規格である。
[0003] JPEG is based on discrete cosine transform (hereinafter referred to as "DC
T ”. ), Quantization, and variable-length coding are standards for coding color still images.

【0004】H.26Xシリーズは、テレビ電話やテレビ会
議などのオーディオビジュアル通信の応用を目的とする
ビデオ符号化の規格であり、DCT、量子化および可変長
符号化に、フレーム間の冗長度を削減する前方向の動き
補償フレーム間予測をさらに組み合わせる。
[0004] H. The 26X series is a video coding standard for audio-visual communication applications such as video telephony and video conferencing, and uses DCT, quantization and variable-length coding in the forward direction to reduce redundancy between frames. Further combine motion compensated inter-frame prediction.

【0005】MPEGは、DCT、量子化、可変長符号化およ
び前方向の動き補償フレーム間予測に、双方向の動き補
償フレーム間予測をさらに組み合わせ、そして、ランダ
ム・アクセスを可能とするために、数枚(例えば、15
枚)のフレームデータを一纏まりにした画面のグルー
プ、GOP(Group Of Pictures)構造を採用する。GOP
は、Iピクチャ(intra-coded picture)、Pピクチャ(p
redictive-coded picture)およびBピクチャ(bidirect
ionally predictive-coded picture)で構成される。I
ピクチャは、その情報だけから符号化され、フレーム間
予測を使用することなく生成される画面である。Pピク
チャは、IまたはPピクチャからの予測を行うことによっ
て生成される画面である。Bピクチャは、双方向予測に
よって生成される画面である。
[0005] MPEG combines DCT, quantization, variable length coding, and forward motion compensated interframe prediction with bidirectional motion compensated interframe prediction, and enables random access. Several sheets (for example, 15
Group), a GOP (Group Of Pictures) structure is adopted. GOP
Are I-picture (intra-coded picture), P-picture (p
redictive-coded picture) and B picture (bidirect
ionally predictive-coded picture). I
A picture is a screen that is encoded from only that information and that is generated without using inter-frame prediction. A P picture is a screen generated by performing prediction from an I or P picture. A B picture is a screen generated by bidirectional prediction.

【0006】MPEGは、CD−ROMなどの蓄積メディア向け
である符号化技術を規格化するMPEG−1、放送、通信、
蓄積など、対象とするメディアを選ばない汎用ディジタ
ルビデオ信号と付随するオーディオ信号とを符号化する
技術を規格化するMPEG−2、コンテントのストリーム管
理、シーン合成、コンテント単位の著作権保護など、機
能性の強化および超低ビットレートの符号化技術を規格
化するMPEG−4へと段階的に標準化されている。なかで
も、MPEG−2は、放送やAV機器などに広く利用されてい
る。
[0006] MPEG is MPEG-1, which standardizes encoding technology for storage media such as CD-ROM, broadcast, communication,
Functions such as MPEG-2 that standardizes the technology for encoding general-purpose digital video signals and accompanying audio signals regardless of the target media such as storage, content stream management, scene synthesis, and content-based copyright protection It has been standardized step by step to MPEG-4, which standardizes the encoding technology of enhanced bitrate and ultra-low bit rate. Above all, MPEG-2 is widely used for broadcasting and AV equipment.

【0007】画像信号を符号化する画像符号化装置は、
所定の画素数から成るブロックに分割された画像を各ブ
ロックごとに2次元直交変換によって符号化に適するデ
ータに変換する直交変換回路と、変換後のデータを適当
な量子化スケールで量子化する量子化回路と、量子化回
路の出力を予め定められた符号表に従って可変長符号化
する可変長符号化回路と、画像符号化装置の出力ビット
レートを考慮して量子化スケールを適当な値に制御する
レート制御回路とを備えて基本的に構成される。
[0007] An image coding apparatus for coding an image signal includes:
An orthogonal transformation circuit for transforming an image divided into blocks each having a predetermined number of pixels into data suitable for encoding by two-dimensional orthogonal transformation for each block, and a quantum circuit for quantizing the converted data on an appropriate quantization scale Circuit, a variable-length encoding circuit that performs variable-length encoding on the output of the quantization circuit according to a predetermined code table, and controls the quantization scale to an appropriate value in consideration of the output bit rate of the image encoding device. And a rate control circuit.

【0008】特に、MPEG−2用の画像符号化装置は、画
面並替部、減算部、DCT部、量子化部、可変長符号化
部、バッファメモリ、レート制御部、逆量子化部、逆DC
T部、加算部、フレームメモリおよび動き補償部の各電
子回路を備えて構成される。
[0008] In particular, an image coding apparatus for MPEG-2 includes a screen rearrangement section, a subtraction section, a DCT section, a quantization section, a variable length coding section, a buffer memory, a rate control section, an inverse quantization section, and an inverse quantization section. DC
It is configured to include electronic circuits of a T unit, an addition unit, a frame memory, and a motion compensation unit.

【0009】ビデオカメラから供給された入力ビデオ信
号は、所定の画素数のブロックに分割され、アナログ信
号からディジタル信号に変換された後に、ピクチャの順
序を符号化処理に適した順に並び替えられる。
An input video signal supplied from a video camera is divided into blocks of a predetermined number of pixels, and after being converted from an analog signal to a digital signal, the order of pictures is rearranged in an order suitable for encoding processing.

【0010】画面並替部の出力は、減算部を介してDCT
部においてDCT符号化され、量子化部において所定のビ
ットレートで量子化され、可変長符号化部において可変
長符号、例えば、ハフマン符号で符号化され、そして、
バッファメモリに出力される。バッファメモリは、所定
のビットレートで符号化データを出力する。
[0010] The output of the screen rearranging section is supplied to the DCT via the subtracting section.
DCT encoded in the unit, quantized at a predetermined bit rate in the quantization unit, variable-length code in the variable-length encoding unit, for example, encoded with a Huffman code, and
Output to the buffer memory. The buffer memory outputs encoded data at a predetermined bit rate.

【0011】また、IピクチャおよびPピクチャの場合
は、動き補償部において参照画面として使用されるた
め、量子化部の出力は、逆量子化部にも入力され、逆量
子化された後に逆DCT部において逆DCTが行われる。逆DC
T部の出力は、加算部で動き補償部の出力と加算され、
フレームメモリに入力され、そして、動き補償部に入力
されて順次に処理される。動き補償部は、前方向予測、
後方向予測および両方向予測を行い、加算部および減算
部に出力する。
In the case of I-pictures and P-pictures, the output of the quantization unit is also input to the inverse quantization unit, and is subjected to inverse DCT after inverse quantization since it is used as a reference screen in the motion compensation unit. An inverse DCT is performed in the section. Inverse DC
The output of the T section is added to the output of the motion compensation section by the addition section,
The data is input to the frame memory and then input to the motion compensator to be sequentially processed. The motion compensation unit performs forward prediction,
It performs backward prediction and bidirectional prediction and outputs the result to the addition unit and the subtraction unit.

【0012】減算部は、画像並替部の出力と動き補償予
測部の出力との間で減算を行い、逆量子化部や逆DCT部
などで復号された復号ビデオ信号とビデオ信号との間の
予測誤差を演算する。フレーム内符号化(Iピクチャ)
の場合では、減算部は、減算処理を行わず、単にデータ
が通過する。
The subtraction unit performs a subtraction between the output of the image rearrangement unit and the output of the motion compensation prediction unit, and performs a subtraction between the decoded video signal and the video signal decoded by the inverse quantization unit and the inverse DCT unit. Is calculated. Intra-frame coding (I picture)
In the case of, the subtraction unit does not perform the subtraction processing, and the data simply passes.

【0013】一方、レート制御部は、可変長符号化部で
発生する符号量が可変であるため、バッファメモリを監
視することによって所定のビットレートを保つように、
量子化部の量子化動作を制御する。
On the other hand, since the code amount generated in the variable length coding unit is variable, the rate control unit monitors the buffer memory to maintain a predetermined bit rate.
Controls the quantization operation of the quantization unit.

【0014】レート制御部は、GOPの目標ビット量(GOP
目標ビット量)を設定し、このGOP目標ビット量の中で
ピクチャ単位毎に目標ビット量(ピクチャ目標ビット
量)を割り当てながら、所定の目標ビット量で符号化す
る。ピクチャ内におけるビット割り当ては、マクロブロ
ック(以下、「MB」と略記する。)ごとに量子化スケー
ルを設定することによって行われる。
[0014] The rate control unit is configured to output a target bit amount (GOP) of the GOP.
A target bit amount is set, and a target bit amount (picture target bit amount) is assigned to each picture unit in the GOP target bit amount, and encoding is performed with a predetermined target bit amount. Bit allocation in a picture is performed by setting a quantization scale for each macroblock (hereinafter abbreviated as “MB”).

【0015】すなわち、一般に、次の3つのステップで
上述の処理が行われる。
That is, generally, the above-described processing is performed in the following three steps.

【0016】第1ステップでは、GOP内の各ピクチャに
対する割り当てビット量を、割り当て対象ピクチャを含
めGOP内でまだ符号化されていないピクチャに対して割
り当てられるビット量を基にして配分する。この配分を
GOP内の符号化ピクチャ順に繰り返し、ピクチャごとに
ピクチャ目標ビット量を設定する。
In the first step, the amount of bits allocated to each picture in the GOP is allocated based on the amount of bits allocated to pictures that have not been encoded in the GOP, including the picture to be allocated. This distribution
It repeats in the order of the coded pictures in the GOP, and sets a picture target bit amount for each picture.

【0017】第2ステップは、MB単位に量子化スケール
の基準値を設定する。つまり、第2ステップでは、第1
ステップで求められた各ピクチャに対する割り当てビッ
ト量と実際の発生ビット量とを一致させるため、各ピク
チャタイプごとに独立に設定した3種類の仮想バッファ
の容量を基に、量子化スケールの基準値をMB単位のフィ
ードバック制御で求める。
In the second step, a reference value of the quantization scale is set for each MB. That is, in the second step, the first
In order to match the bit amount allocated to each picture obtained in the step with the actual bit amount generated, the reference value of the quantization scale is set based on the capacity of three types of virtual buffers independently set for each picture type. Determined by feedback control in MB units.

【0018】第3ステップは、視覚特性を反映させるべ
く、MB単位でMBのアクティビティに基づいて量子化スケ
ール値を補正する。フレーム目標ビット量を維持しつ
つ、アクティビティが低いMBでは量子化スケールを基準
値より小さく補正し、アクティビティが高いMBでは量子
化スケールを基準値より大きく補正する。このように視
覚特性、特にアクティビティを考慮した適応量子化が行
われる。
In the third step, the quantization scale value is corrected based on the MB activity in MB units so as to reflect the visual characteristics. While maintaining the frame target bit amount, the quantization scale is corrected to be smaller than the reference value for MBs with low activity, and the quantization scale is corrected to be larger than the reference value for MBs with high activity. In this manner, adaptive quantization is performed in consideration of visual characteristics, particularly activity.

【0019】このようなMPEGについては、例えば、「総
合マルチメディア選書MPEG」(映像情報メディア学会
編、オーム社)に開示されている。
Such an MPEG is disclosed, for example, in "Synthetic Multimedia Selection MPEG" (edited by the Institute of Image Information and Television Engineers, Ohmsha).

【0020】なお、人は、以下(1)〜(3)の視覚特性を持
つことが一般に知られている。
It is generally known that a person has the following visual characteristics (1) to (3).

【0021】(1)視覚感度は、高周波成分の方が低周波
成分に比べ低い。(2)階調の歪みは、白・黒よりも灰色
部分で目立ちやすい。(3)画像の急激な変化に対して知
覚解像度が低下する。
(1) The visual sensitivity of a high-frequency component is lower than that of a low-frequency component. (2) The gradation distortion is more conspicuous in gray parts than in white and black. (3) The perceived resolution is reduced for a sudden change in the image.

【0022】[0022]

【発明が解決しようとする課題】ところで、第3ステッ
プにおける上述の処理方法では、アクティビティのみを
用いて量子化スケールを変更するため、アクティビティ
が高いMBではMBの画像内容に拘わらず常に粗く量子化さ
れ再生画像が劣化してしまう。したがって、たとえ画像
中において撮影者や視聴者の関心が高く重要と考える部
分でも、アクティビティが高ければ、粗く量子化されて
しまうという問題がある。
In the above-described processing method in the third step, the quantization scale is changed using only the activity. Therefore, in an MB having a high activity, the quantization is always coarse regardless of the image content of the MB. And the reproduced image is degraded. Therefore, there is a problem that even if a part of the image that the photographer or the viewer is interested in is high and important, if the activity is high, quantization is coarsely performed.

【0023】アクティビティが高い部分は、例えば、一
般に撮影者などの関心が高い人物の顔の目鼻部分や物体
のエッジ・周辺などである。さらに、差分値が結果的に
拡大されるため、輝度値が高い(明るい)部分もアクテ
ィビティが高い。
The portions having high activity are, for example, the eyes and nose of the face of a person who is generally interested, such as a photographer, and the edge and periphery of an object. Further, since the difference value is consequently enlarged, the activity is also high in a portion where the luminance value is high (bright).

【0024】そこで、本発明は、画像中において細かく
量子化したい部分、すなわち、再生画像の精細度を高く
したい部分を色で指定することができる画像符号化装
置、画像符号化方法、該方法を実現するプログラム、お
よび、該プログラムを記録したコンピュータ読み取り可
能な記録媒体を提供することを目的とする。
Accordingly, the present invention provides an image encoding apparatus, an image encoding method, and an image encoding method capable of designating a portion in an image to be finely quantized, that is, a portion in which the definition of a reproduced image is desired to be increased. It is an object of the present invention to provide a program to be realized and a computer-readable recording medium on which the program is recorded.

【0025】[0025]

【課題を解決するための手段】本発明の第1の手段で
は、原画像を所定の画素数で分割したブロックごとに符
号化する画像符号化装置において、各ブロックの色が所
定の色であるか否かを判定する色判定手段と、所定の色
のブロックにおける量子化スケールが所定の色ではない
ブロックにおける量子化スケールよりも小さくなるよう
に、前記色判定手段の出力に応じて各ブロックの量子化
スケールを変更する量子化スケール変更手段と、前記量
子化スケール変更手段で決定された各量子化スケールで
各ブロックの画像を量子化する量子化手段とを備えて構
成される。
According to a first aspect of the present invention, in an image encoding apparatus for encoding an original image for each block obtained by dividing the original image by a predetermined number of pixels, each block has a predetermined color. Color determination means for determining whether or not each of the blocks has a predetermined color in accordance with an output of the color determination means such that a quantization scale in a block of a predetermined color is smaller than a quantization scale in a block which is not a predetermined color. It is provided with quantization scale changing means for changing the quantization scale, and quantization means for quantizing the image of each block at each quantization scale determined by the quantization scale changing means.

【0026】このような第1の手段において、前記量子
化スケール変更手段は、さらに、前記原画像に割り当て
られた符号化データ量を実質的に維持するように、各ブ
ロックの量子化スケールを変更してもよい。
In the first means, the quantization scale changing means further changes the quantization scale of each block so as to substantially maintain the amount of encoded data allocated to the original image. May be.

【0027】また、このような第1の手段において、前
記色判定手段は、各ブロックについて画素ごとに所定の
色を判定するとともに、ブロック内の全画素数に対する
所定の色の画素が占める割合をさらに判定し、前記量子
化スケール変更手段は、前記割合が大きくなるに従って
量子化スケールが小さくなるように、前記割合に応じて
所定の色のブロックの量子化スケールをさらに変更して
もよい。
In the first means, the color determining means determines a predetermined color for each pixel for each block and determines a ratio of a pixel occupied by the predetermined color to the total number of pixels in the block. In addition, the quantization scale changing means may further change the quantization scale of a block of a predetermined color in accordance with the ratio such that the quantization scale decreases as the ratio increases.

【0028】そして、このような第1の手段において、
前記色判定手段は、ブロック内における全画素に対する
色差信号の平均値を用いて、ブロックの色を判定しても
よい。
Then, in such a first means,
The color determination means may determine the color of the block using an average value of the color difference signals for all pixels in the block.

【0029】さらに、このような第1の手段において、
前記量子化スケール変更手段は、所定の色と判定された
ブロックの周辺ブロックに対する量子化スケールを所定
の色ではないブロックの量子化スケールよりも小さい量
子化スケールにさらに変更してもよい。
Further, in such a first means,
The quantization scale changing unit may further change a quantization scale for a peripheral block of a block determined to be a predetermined color to a quantization scale smaller than a quantization scale of a block that is not a predetermined color.

【0030】また、このような第1の手段において、前
記量子化スケール変更手段は、量子化スケールを変更す
る場合に、さらにブロックが画面中の所定の領域内にあ
る場合に量子化スケールを変更してもよい。
In the first means, the quantization scale changing means may change the quantization scale when the quantization scale is changed and when the block is within a predetermined area on the screen. May be.

【0031】そして、このような第1の手段において、
前記所定の色は、肌色と設定してもよい。
Then, in such a first means,
The predetermined color may be set as a skin color.

【0032】さらに、このような第1の手段において、
画像のアクティビティを求めるアクティビティ演算手段
をさらに備え、前記量子化スケール変更手段は、量子化
スケールを変更する場合に、さらに前記アクティビティ
演算手段からのアクティビティに応じて量子化スケール
を変更してもよい。
Further, in such a first means,
The image processing apparatus may further include activity calculation means for obtaining an image activity, wherein the quantization scale changing means may change the quantization scale according to the activity from the activity calculation means when changing the quantization scale.

【0033】また、このような第1の手段において、各
ブロックの輝度平均値を求める輝度平均値演算手段をさ
らに備え、前記量子化スケール変更手段は、量子化スケ
ールを変更する場合に、さらに前記輝度平均値演算手段
からの輝度平均値に応じて量子化スケールを変更しても
よい。
The first means may further include a luminance average value calculating means for calculating a luminance average value of each block, and the quantization scale changing means may further include a step for changing the quantization scale. The quantization scale may be changed according to the average luminance value from the average luminance value calculation means.

【0034】そして、このような第1の手段において、
予測画像データにおける動きベクトルの残差値を求める
残差値演算手段をさらに備え、前記量子化スケール変更
手段は、量子化スケールを変更する場合に、さらに前記
残差値演算手段からの残差値に応じて量子化スケールを
変更してもよい。
Then, in such a first means,
The image processing apparatus further includes a residual value calculating unit that obtains a residual value of a motion vector in the predicted image data, wherein the quantization scale changing unit further includes a residual value from the residual value calculating unit when the quantization scale is changed. The quantization scale may be changed according to.

【0035】本発明の第2の手段では、所定の画素数か
ら成るブロックに分割された画像を各ブロックごとに2
次元直交変換によって符号化に適するデータに変換する
直交変換手段と、各ブロックの色が所定の色であるか否
かを判定する色判定手段と、所定の色のブロックにおけ
る量子化スケールが所定の色ではないブロックにおける
量子化スケールよりも小さくなるように、前記色判定手
段の出力に応じて各ブロックの量子化スケールを変更す
る量子化スケール変更手段と、前記量子化スケール変更
手段で決定された各量子化スケールで各ブロックの画像
を量子化する量子化手段と、前記量子化手段の出力を予
め定められた符号表に従って可変長符号化する可変長符
号化手段とを備えて画像符号化装置が構成される。
According to the second means of the present invention, an image divided into blocks each having a predetermined number of pixels is divided into two blocks for each block.
Orthogonal transformation means for transforming into data suitable for encoding by dimensional orthogonal transformation, color determination means for determining whether the color of each block is a predetermined color, and a quantization scale for the block of the predetermined color having a predetermined value. The quantization scale changing unit that changes the quantization scale of each block according to the output of the color determination unit so as to be smaller than the quantization scale of the block that is not a color, and the quantization scale changing unit determines the quantization scale. An image encoding apparatus comprising: a quantization unit that quantizes an image of each block at each quantization scale; and a variable-length encoding unit that performs variable-length encoding on an output of the quantization unit according to a predetermined code table. Is configured.

【0036】本発明の第3の手段では、原画像を所定の
画素数で分割したブロックごとに符号化する画像符号化
方法において、各ブロックの色が所定の色であるか否か
を判定する色判定ステップと、所定の色のブロックにお
ける量子化スケールが所定の色ではないブロックにおけ
る量子化スケールよりも小さくなるように、前記色判定
ステップの判断結果に応じて各ブロックの量子化スケー
ルを変更する量子化スケール変更ステップと、 前記量
子化スケール変更ステップで決定された各量子化スケー
ルで各ブロックの画像を量子化する量子化ステップとを
備えて構成される。
According to a third aspect of the present invention, in an image encoding method for encoding an original image for each block obtained by dividing the original image by a predetermined number of pixels, it is determined whether or not each block has a predetermined color. In the color determination step, the quantization scale of each block is changed according to the determination result of the color determination step so that the quantization scale in the block of the predetermined color is smaller than the quantization scale in the block that is not the predetermined color. And a quantization step of quantizing an image of each block with each quantization scale determined in the quantization scale changing step.

【0037】本発明の第4の手段では、コンピュータに
原画像を所定の画素数で分割したブロックごとに符号化
させる画像符号化プログラムにおいて、各ブロックの色
が所定の色であるか否かを判定する色判定ステップと、
所定の色のブロックにおける量子化スケールが所定の
色ではないブロックにおける量子化スケールよりも小さ
くなるように、前記色判定ステップの判断結果に応じて
各ブロックの量子化スケールを変更する量子化スケール
変更ステップと、前記量子化スケール変更ステップで決
定された各量子化スケールで各ブロックの画像を量子化
する量子化ステップとを備えて構成される。
According to a fourth aspect of the present invention, in an image encoding program for causing a computer to encode an original image for each block divided by a predetermined number of pixels, it is determined whether or not each block has a predetermined color. A color determination step for determining;
A quantization scale change that changes the quantization scale of each block according to the result of the color determination step so that the quantization scale of the block of the predetermined color is smaller than the quantization scale of the block that is not the predetermined color. And a quantization step of quantizing an image of each block at each quantization scale determined in the quantization scale changing step.

【0038】本発明の第5の手段では、コンピュータに
原画像を所定の画素数で分割したブロックごとに符号化
させる画像符号化プログラムを記録したコンピュータ読
み取り可能な記録媒体において、各ブロックの色が所定
の色であるか否かを判定する色判定ステップと、所定の
色のブロックにおける量子化スケールが所定の色ではな
いブロックにおける量子化スケールよりも小さくなるよ
うに、前記色判定ステップの判断結果に応じて各ブロッ
クの量子化スケールを変更する量子化スケール変更ステ
ップと、前記量子化スケール変更ステップで決定された
各量子化スケールで各ブロックの画像を量子化する量子
化ステップとを備えて構成される。
According to a fifth aspect of the present invention, in a computer-readable recording medium recording an image encoding program for causing a computer to encode an original image in blocks divided by a predetermined number of pixels, the color of each block is A color determination step of determining whether or not the color is a predetermined color; and a determination result of the color determination step such that a quantization scale of the block of the predetermined color is smaller than a quantization scale of the block which is not the predetermined color. A quantization scale changing step of changing the quantization scale of each block according to the following, and a quantization step of quantizing an image of each block at each quantization scale determined in the quantization scale changing step. Is done.

【0039】本発明の第6の手段では、被写体の映像を
撮影しディジタル映像信号に変換して出力する撮影手段
と、前記撮影手段からの画像データを圧縮符号化する画
像符号化手段と、前記画像符号化手段で符号化された符
号化データを記録媒体に記録する記録手段とを備えるデ
ィジタルカメラにおいて、前記画像符号化手段は、第2
の手段の画像符号化装置であることで構成される。
According to a sixth aspect of the present invention, there is provided a photographing means for photographing an image of a subject, converting the image into a digital video signal, and outputting the digital image signal; an image encoding means for compressing and encoding image data from the photographing means; Recording means for recording the encoded data encoded by the image encoding means on a recording medium, wherein the image encoding means comprises:
Means.

【0040】これら画像符号化装置、画像符号化方法、
画像符号化プログラム、該プログラムを記録した記録媒
体およびディジタルカメラは、画面中における特定の色
の領域を判別することができ、この特定の色の領域を他
の色の領域に比べて細かい量子化スケールで量子化す
る。このため、撮影者や視聴者の関心が高い部分や重要
と考える部分を色で設定することで、このような部分を
細かく量子化することができるので、関心の高い・重要
な部分の画質を向上することができる。
These image encoding apparatuses, image encoding methods,
The image coding program, the recording medium storing the program, and the digital camera can determine a specific color area on the screen, and quantize the specific color area finer than other color areas. Quantize on scale. For this reason, by setting the areas of high interest or important parts of the photographer or viewer with colors, such parts can be finely quantized. Can be improved.

【0041】[0041]

【発明の実施の形態】以下、本発明の実施形態について
図面に基づいて説明する。なお、各図において、同一の
構成については、その説明を省略することがある。
Embodiments of the present invention will be described below with reference to the drawings. In each of the drawings, the description of the same configuration may be omitted.

【0042】(第1の実施形態)図1は、第1の実施形
態における画像符号化装置の構成を示すブロック図であ
る。
(First Embodiment) FIG. 1 is a block diagram showing the configuration of an image coding apparatus according to the first embodiment.

【0043】図1において、第1の実施形態における画
像符号化装置は、画像並替部11、減算部12、スイッ
チ13、DCT部14、量子化部15、可変長符号化部1
6、バッファメモリ17、制御部18、逆量子化部2
1、逆DCT部22、加算部23、フレームメモリ24、
26、動き補償部25、動き検出部27、および肌色成
分検出部34を備えて構成される。
In FIG. 1, an image coding apparatus according to the first embodiment includes an image rearrangement unit 11, a subtraction unit 12, a switch 13, a DCT unit 14, a quantization unit 15, and a variable length coding unit 1.
6, buffer memory 17, control unit 18, inverse quantization unit 2
1, the inverse DCT unit 22, the adding unit 23, the frame memory 24,
26, a motion compensator 25, a motion detector 27, and a skin color component detector 34.

【0044】入力ビデオ信号は、画像並替部11に入力
され、アナログ信号からディジタル信号に変換後に、ピ
クチャの順序を符号化処理に適した順に並び替えられ
る。画像並替部11は、すなわち、IピクチャおよびPピ
クチャを先に符号化し、その後、Bピクチャを符号化す
るのに適した順に並び替える。
The input video signal is input to the image rearranging section 11, and after converting the analog signal into a digital signal, the order of the pictures is rearranged in an order suitable for the encoding process. That is, the image rearranging unit 11 encodes the I picture and the P picture first, and then rearranges the B picture in an order suitable for encoding.

【0045】画像並替部11は、所定の画素数のブロッ
ク、例えば、16×16のMBに分割し、MBごとに出力す
る。この出力は、減算器12およびスイッチ13を介し
てDCT部14に入力され、DCT符号化が行われる。DCT
は、直交変換の1つであり、他に、アダマール(Hadama
rd)変換、カルーネン・レーベ(Karuhnen・Loeve)変
換、フーリエ変換などがある。
The image rearranging section 11 divides the image into blocks each having a predetermined number of pixels, for example, 16 × 16 MBs, and outputs each MB. This output is input to the DCT unit 14 via the subtractor 12 and the switch 13, and DCT coding is performed. DCT
Is one of the orthogonal transformations, and the other is Hadama
rd) transformation, Karhunen-Loeve transformation, Fourier transformation and the like.

【0046】DCT部の出力は、量子化部15に入力さ
れ、制御部18で指定された量子化スケール(量子化ス
テップ)で量子化される。量子化スケールは、量子化特
性のスケーリングを行うことにより発生ビット量を制御
するためのパラメータである。量子化特性は、ブロック
内DCT係数値間での相対的な量子化精度を設定するため
に、8×8のマトリクスで表示され、例えば、イントラ
マクロブロック量子化マトリクスや非イントラマクロブ
ロック量子化マトリクスなどが用意される。本実施形態
では、後述するように、制御部18は、量子化スケール
の基準値refQ(j)にMBの特性を考慮した補正係数Ncolor
(j)を乗じて量子化スケールQ(j)を算出している。制御
部18は、出力ビットレートを制御する回路であり、指
定した量子化スケールを逆量子化部21にも通知する。
The output of the DCT unit is input to the quantization unit 15 and is quantized on the quantization scale (quantization step) specified by the control unit 18. The quantization scale is a parameter for controlling the amount of generated bits by scaling the quantization characteristics. The quantization characteristic is displayed as an 8 × 8 matrix in order to set the relative quantization accuracy between DCT coefficient values in the block. For example, an intra macroblock quantization matrix or a non-intra macroblock quantization matrix Are prepared. In the present embodiment, as will be described later, the control unit 18 uses the correction coefficient Ncolor in consideration of the MB characteristic for the quantization scale reference value refQ (j).
(j) is multiplied to calculate the quantization scale Q (j). The control unit 18 is a circuit that controls the output bit rate, and also notifies the inverse quantization unit 21 of the specified quantization scale.

【0047】量子化部15の出力は、可変長符号化部1
6および逆量子化部21に入力される。可変長符号化部
16は、出現頻度がより高いデータにより短いコードを
割り当てる可変長符号、例えば、ハフマン符号で符号化
され、符号化データは、メモリのバッファメモリ17に
出力される。バッファメモリ17は、所定のビットレー
トで符号化データを画像符号化装置の出力として出力す
る。制御部18は、可変長符号化部16で発生する符号
量が可変であるため、バッファメモリ17を監視するこ
とによって所定のビットレートを保つように、量子化部
15の量子化動作を制御する。
The output of the quantization unit 15 is the variable length coding unit 1
6 and the inverse quantization unit 21. The variable-length encoding unit 16 encodes a variable-length code, for example, a Huffman code that assigns a shorter code to data with a higher appearance frequency, and outputs the encoded data to a buffer memory 17 of a memory. The buffer memory 17 outputs the encoded data at a predetermined bit rate as an output of the image encoding device. The control unit 18 controls the quantization operation of the quantization unit 15 so as to maintain a predetermined bit rate by monitoring the buffer memory 17 because the code amount generated in the variable length coding unit 16 is variable. .

【0048】一方、量子化部15の出力がIピクチャお
よびPピクチャの場合は、動き補償部25で参照画面と
して使用されるため、量子化部15の出力は、逆量子化
部21にも入力される。入力された信号は、制御部18
から通知された量子化スケールで逆量子化された後に逆
DCT部22に入力され、逆DCTが行われる。逆DCT部22
の出力は、加算部23で動き補償部25の出力と加算さ
れ、フレームメモリ24に入力される。そして、画面並
替部11の出力は、フレームメモリ26および動き検出
部27にも入力される。
On the other hand, when the output of the quantization unit 15 is an I picture and a P picture, the output of the quantization unit 15 is also input to the inverse quantization unit 21 because the output is used as a reference screen by the motion compensation unit 25. Is done. The input signal is transmitted to the control unit 18
Inverse after being quantized with the quantization scale notified by
The signal is input to the DCT unit 22 and inverse DCT is performed. Reverse DCT section 22
Is added to the output of the motion compensator 25 by the adder 23, and is input to the frame memory 24. Then, the output of the screen rearranging unit 11 is also input to the frame memory 26 and the motion detecting unit 27.

【0049】動き検出部27は、フレームメモリ26に
蓄積されている比較すべき時間の画像データと画面並替
部11からの現時間の画像データとから、各MBの動きベ
クトル(以下、「MV」と略記する。)をそれぞれ算出
する。例えば、動き検出部27は、各MBに対して予め定
められた探索範囲内で各MBごとに現フレームと予測フレ
ームとのブロックマッチングを行って予測誤差が最小と
なる動き量を検出することでMVを検出する。
The motion detecting section 27 uses the image data of the time to be compared stored in the frame memory 26 and the image data of the current time from the screen rearranging section 11 to determine the motion vector of each MB (hereinafter referred to as “MV”). Is abbreviated as "). For example, the motion detection unit 27 performs block matching between a current frame and a predicted frame for each MB within a predetermined search range for each MB, and detects a motion amount that minimizes a prediction error. Detect MV.

【0050】なお、図1に破線で示すように、フレーム
メモリ26を用いることなく、フレームメモリ24に蓄
積されている比較すべき時間の復号画像データと画面並
替部11からの現時間の画像データとから、各MBのMV
をそれぞれ算出してもよい。
As shown by the broken lines in FIG. 1, the decoded image data of the time to be compared and stored in the frame memory 24 and the image of the current time from the screen rearranging unit 11 are stored without using the frame memory 26. From the data, the MV of each MB
May be calculated respectively.

【0051】動き検出部27で算出されたMVは、動き
補償部25に入力され、フレームメモリ24に蓄積され
ている比較すべき時間の復号画像データに基づいてMVを
用いて予測画像を再構成する。そして、動き補償部25
は、加算部23および減算部12に予測画像を出力す
る。
The MV calculated by the motion detecting section 27 is input to the motion compensating section 25 and reconstructs a predicted image using the MV based on the decoded image data of the time to be compared stored in the frame memory 24. I do. Then, the motion compensation unit 25
Outputs a predicted image to the addition unit 23 and the subtraction unit 12.

【0052】これら逆量子化部21、逆DCT部22、加
算部23、フレームメモリ24、26、動き補償部25
および動き検出部27は、ローカル復号部を構成する。
The inverse quantization section 21, inverse DCT section 22, addition section 23, frame memories 24 and 26, and motion compensation section 25
And the motion detection unit 27 constitutes a local decoding unit.

【0053】減算部12は、画面並替部11の出力(現
時間の画像データ)と動き補償部25の出力(比較すべ
き時間の画像データ)との間で減算を行い、予測誤差を
形成する。フレーム内符号化(Iピクチャ)の場合で
は、スイッチ13により、減算部12は、減算処理を行
わず、単にデータが通過する。
The subtraction unit 12 performs a subtraction between the output of the screen rearranging unit 11 (image data of the current time) and the output of the motion compensation unit 25 (image data of the time to be compared) to form a prediction error. I do. In the case of intra-frame coding (I picture), the switch 13 allows the subtractor 12 to simply pass data without performing the subtraction processing.

【0054】すなわち、スイッチ13は、画面並替部1
1の出力がIピクチャの場合では、スイッチ13-aにお
ける端子bと端子cとを接続し、スイッチ13-bにおける
端子fと端子gとを接続する。スイッチ13は、画面並替
部11の出力がPピクチャおよびBピクチャの場合では、
スイッチ13-aにおける端子aと端子cとを接続し、スイ
ッチ13-bにおける端子eと端子gとを接続する。
That is, the switch 13 is connected to the screen rearranging unit 1.
When the output of 1 is an I picture, the terminal b and the terminal c of the switch 13-a are connected, and the terminal f and the terminal g of the switch 13-b are connected. When the output of the screen rearranging unit 11 is a P picture and a B picture, the switch 13
The terminal a and the terminal c of the switch 13-a are connected, and the terminal e and the terminal g of the switch 13-b are connected.

【0055】さらに、画面並替部11の出力は、肌色成
分検出部34にも入力される。
Further, the output of the screen rearranging section 11 is also input to the skin color component detecting section 34.

【0056】肌色成分検出部34は、MBごとに、色差信
号CbおよびCrに基づいて、MBが肌色であるか否かを判断
する。肌色成分検出部34は、判断の結果を制御部18
に出力する。制御部18は、ピクチャごとに目標ビット
量を設定し、MB単位に量子化スケールの基準値を設定す
る。そして、制御部18は、肌色成分検出部34の出力
に基づいて、量子化スケールを補正する。
The skin color component detecting section 34 determines, for each MB, whether or not the MB is a skin color based on the color difference signals Cb and Cr. The skin color component detection unit 34 outputs the result of the determination to the control unit 18.
Output to The control unit 18 sets a target bit amount for each picture, and sets a quantization scale reference value for each MB. Then, the control unit 18 corrects the quantization scale based on the output of the skin color component detection unit 34.

【0057】次に、画像符号化装置の主な処理を説明す
る。図2は、第1の実施形態における画像符号化装置の
主要な処理を説明するフローチャートである。
Next, main processing of the image encoding apparatus will be described. FIG. 2 is a flowchart illustrating main processing of the image encoding device according to the first embodiment.

【0058】図2において、制御部18は、肌色成分検
出部34の出力h(j)を取り込む(St1)。
In FIG. 2, the control unit 18 takes in the output h (j) of the skin color component detection unit 34 (St1).

【0059】肌色成分検出部34は、例えば、画素の色
差信号Cr、Cbが、式1を満たす場合は、当該画素を肌色
と判断する。図3Aに肌色とする領域を示す。そして、
j番目のMBに属するすべての画素について式1の判断を
行い、肌色と判断された画素の合計数をh(j)として制御
部18に出力する。 k1×Cb≦Cr≦k2×Cb …(1) ここで、k1、k2は、定数であり、肌色の場合には、例えば、k1、k2は、 −0.69≦k1≦−0.45 −2.69≦k2≦−1 …(2) の範囲における何れかの値とする。実験の結果、人種
(白色人種、黄色人種、黒色人種およびこれらの混血)
の違いに拘わらず人の肌色として良好に判定するために
は、k1、k2は、k1=−7/16かつk2=−1とすることが好
ましい。
For example, when the color difference signals Cr and Cb of a pixel satisfy Expression 1, the skin color component detection unit 34 determines that the pixel is a skin color. FIG. 3A shows a region to be a flesh color. And
The determination of Expression 1 is performed for all pixels belonging to the j-th MB, and the total number of pixels determined to be flesh color is output to the control unit 18 as h (j). k1 × Cb ≦ Cr ≦ k2 × Cb (1) Here, k1 and k2 are constants. In the case of flesh color, for example, k1 and k2 are −0.69 ≦ k1 ≦ −0.45 − 2.69 ≦ k2 ≦ −1 (2) Any value in the range. As a result of the experiment, race (white race, yellow race, black race, and their mixed race)
It is preferable that k1 and k2 be set to k1 = −7 / 16 and k2 = −1 in order to determine the skin color of a person well regardless of the difference.

【0060】さらに、この定数を適当に選定することに
より、撮影者や視聴者などの関心の高い対象を任意に設
定することができる。例えば、鯨や海豚などに設定する
場合には、体色である灰色となるようにk1、k2を選定
すればよい。また、例えば、白鳥や鶴などに設定する場
合には、体色の白色となるようにk1、k2を設定すればよ
い。
Further, by appropriately selecting these constants, it is possible to arbitrarily set an object of high interest such as a photographer or a viewer. For example, when setting to whales or sea pigs, k1 and k2 may be selected so that the body color is gray. In addition, for example, in the case of setting to a swan, a crane, or the like, k1 and k2 may be set so that the body color is white.

【0061】外部入力部をさらに備え、撮影者などがk
1、k2を外部入力部から指定することによってk1、k2を
設定することができるようにしてもよい。これにより設
定値を適宜に変更することができるので、撮影者などが
関心の対象を変更したい場合に、その変更に合わせるこ
とができる。
An external input unit is further provided so that
By designating 1, k2 from the external input unit, k1, k2 may be set. As a result, the set value can be appropriately changed, so that when the photographer or the like wants to change the object of interest, the change can be made in accordance with the change.

【0062】そして、このような場合には、例えば、図
3Bに示すように、 k3≦Cb≦k4 k5≦Cr≦k6 …(3) としてもよい。ここで、k3〜k6は、定数である。なお、
式1や式3で所定の色の領域を例示したが、色の領域を
表す式は、指定色の境界を示す線の形状による。
In such a case, for example, as shown in FIG. 3B, k3 ≦ Cb ≦ k4 k5 ≦ Cr ≦ k6 (3) Here, k3 to k6 are constants. In addition,
Although the predetermined color region is exemplified in Expressions 1 and 3, the expression representing the color region depends on the shape of the line indicating the boundary of the designated color.

【0063】図2に戻って、次に、制御部18は、MBの
評価値H(j)を生成する(St2)。例えば、制御部18
は、MBが肌色の領域であるか否かを示す評価値H(j)を式
4に従う規則で決定する。 h(j)>th1_hの場合は、H(j)=a1 th1_h≧h(j)>th2_hの場合は、H(j)=a2 th2_h≧h(j)の場合は、H(j)=a3 …(4)
Returning to FIG. 2, next, the control unit 18 generates an evaluation value H (j) of the MB (St2). For example, the control unit 18
Determines the evaluation value H (j) indicating whether or not the MB is a flesh-colored area according to a rule according to Equation 4. If h (j)> th1_h, H (j) = a1 if th1_h ≧ h (j)> th2_h, then H (j) = a2 th2_h ≧ h (j), then H (j) = a3 … (4)

【0064】次に、制御部18は、St1およびSt2
をピクチャ内のすべてのMBについて実行する(St
3)。次に、制御部18は、発生ビット量を読み取る
(St4)。次に、制御部18は、ピクチャごとに目標
ビット量(ピクチャ目標ビット量)を設定し、MB単位に
量子化スケールの基準値refQ(j)を設定する(St
5)。
Next, the control unit 18 determines whether St1 and St2
Is performed for all MBs in the picture (St
3). Next, the control unit 18 reads the generated bit amount (St4). Next, the control unit 18 sets a target bit amount (picture target bit amount) for each picture, and sets a quantization scale reference value refQ (j) for each MB (St).
5).

【0065】次に、制御部18は、補正係数Ncolor(j)
を式5に従って生成する(St6)。 Ncolor(j)=(R×H(j)+avg_H)/(H(j)+R×avg_H) …(5) 次に、制御部18は、求めた補正係数Ncolor(j)を式6
に用いて当該被写体のMBに対する量子化スケールQ(j)を
補正する(St7)。 Q(j)=refQ(j)×Ncolor(j) …(6) 次に、制御部18は、St6およびSt7をピクチャ内
のすべてのMBについて実行する(St8)。
Next, the control unit 18 sets the correction coefficient Ncolor (j)
Is generated according to Equation 5 (St6). Ncolor (j) = (R × H (j) + avg_H) / (H (j) + R × avg_H) (5) Next, the control unit 18 calculates the obtained correction coefficient Ncolor (j) into Expression 6
To correct the quantization scale Q (j) for the MB of the subject (St7). Q (j) = refQ (j) × Ncolor (j) (6) Next, the control unit 18 executes St6 and St7 for all MBs in the picture (St8).

【0066】このように本実施形態に係る画像符号化装
置は、撮影者や視聴者などが関心の高い被写体における
特徴的な色を含むMBを検出することにより、全画像中に
おける当該被写体を判別する。そして、画像符号化装置
は、補正係数を用いて、検出されたMBに対する量子化ス
ケール値を、他のMBより小さい値を割り振ることで、ピ
クチャに割り当てられたピクチャ目標ビット量を実質的
に維持しつつ、特定の被写体の再生画質を改善する。
As described above, the image coding apparatus according to this embodiment discriminates the subject in the entire image by detecting the MB including the characteristic color of the subject of interest to the photographer or the viewer. I do. Then, the image encoding apparatus uses the correction coefficient to allocate the quantization scale value for the detected MB to a value smaller than the other MBs, thereby substantially maintaining the picture target bit amount allocated to the picture. While improving the reproduction image quality of a specific subject.

【0067】ここで、式(4)ないし式(6)による情
報処理は、従来技術で述べた第3ステップに相当する処
理である。th1_h、th2_hは、MB中に存在する式1を満た
す肌色の画素数に応じて補正係数の大きさを決める閾値
であり、本実施形態は、MB中に存在する肌色の画素数に
応じて補正係数を3段階に分けている。a1、a2、a3は、
式4ないし式5を見ると分かるように、補正係数の大き
さに係る値であり、a1は、肌色と判断されたMBに対する
値であるから、式6によって求まる量子化スケール値Q
(j)が小さくなるように設定し、a3は、肌色と判断され
なかったMBに対する値であるから、式6によって求まる
量子化スケール値Q(j)が大きくなるように設定する。a2
は、被写体の輪郭など、MB中の一部が肌色と判断された
MBに対する値であり、a1とa3との中間の値とする。
Here, the information processing by the equations (4) to (6) is processing corresponding to the third step described in the related art. th1_h and th2_h are threshold values for determining the magnitude of the correction coefficient according to the number of skin color pixels existing in the MB and satisfying Expression 1, and the present embodiment corrects according to the number of skin color pixels existing in the MB. The coefficient is divided into three stages. a1, a2, a3 are
As can be seen from equations (4) and (5), it is a value related to the magnitude of the correction coefficient, and a1 is a value for the MB determined to be flesh color.
(j) is set to be small, and a3 is a value for the MB not determined to be a flesh color, so that the quantization scale value Q (j) obtained by Expression 6 is set to be large. a2
Indicates that part of the MB, such as the outline of the subject, was judged to be skin tone
This is a value for MB and is an intermediate value between a1 and a3.

【0068】例えば、th1_h=30、th2_h=10とし、
a1:a2:a3=1:10:100とする。あるいは、例え
ば、th1_h=50、th2_h=30とし、a1:a2:a3=1:
5:200とする。なお、本実施形態では、3段階に分
けているが、2段階や4段階などに分けてもよく、任意
の段数に分けることができる。
For example, assuming that th1_h = 30 and th2_h = 10,
a1: a2: a3 = 1: 10: 100. Alternatively, for example, it is assumed that th1_h = 50 and th2_h = 30, and a1: a2: a3 = 1:
5: 200. In the present embodiment, the data is divided into three stages, but may be divided into two stages, four stages, or the like, and can be divided into an arbitrary number of stages.

【0069】avg_Hは、ピクチャ内におけるH(j)の平均
値であり、Rは、式7に示すように補正係数Ncolor(j)
の範囲を決定する。
Avg_H is the average value of H (j) in the picture, and R is the correction coefficient Ncolor (j) as shown in equation (7).
Determine the range of

【0070】 1/R≦Ncolor(j)≦R …(7) 例えば、R=2とすると、補正係数Ncolorは、0.5〜
2の範囲となる。したがって、精細度を高く補正する場
合と低く補正する場合の範囲を広くした場合には、Rの
値を大きくすればよい。
1 / R ≦ Ncolor (j) ≦ R (7) For example, if R = 2, the correction coefficient Ncolor is 0.5 to
2 range. Therefore, when the range of the case where the definition is corrected to be high and the case where the correction is lowered are widened, the value of R may be increased.

【0071】そして、refQ(j)は、j番目のMBにおける基
準となる量子化スケールであり、式8および式9により
求められる。このrefQ(j)を求める情報処理は、従来技
術に記載した第2ステップに相当する。Iピクチャの場
合は、 refQ(j)=di(j)×31/r …(8-1) di(j)=d0i+B(j-1)−Ti×(j-1)/MBnum …(9-1) Pピクチャの場合は、 refQ(j)=dp(j)×31/r …(8-2) dp(j)=d0p+B(j-1)−Tp×(j-1)/MBnum …(9-2) Bピクチャの場合は、 refQ(j)=db(j)×31/r …(8-2) db(j)=d0b+B(j-1)−Tb×(j-1)/MBnum …(9-3) di(j)、dp(j)、db(j)は、式9で求まる各ピクチャの仮
想バッファ占有量であり、d0i(j)、d0p(j)、d0b(j)は、
各ピクチャにおける仮想バッファ容量の初期値である。
B(j)は、ピクチャの先頭からj番目のMBまでの発生ビッ
ト量である。Ti、Tp、Tbは、従来技術に記載した第1ス
テップで求まる、各ピクチャに対するピクチャ目標ビッ
ト量である。B(j)は、MBnumは、1ピクチャ内のMBの総
数である。rは、フィードバックループの応答速度を制
御するリアクションパラメータであり、ビットレートを
ピクチャレイトで割り、2倍にした値である。
RefQ (j) is a reference quantization scale in the j-th MB, and is obtained by Expressions 8 and 9. The information processing for obtaining refQ (j) corresponds to the second step described in the related art. In the case of an I picture, refQ (j) = di (j) × 31 / r (8-1) di (j) = d0i + B (j-1) −Ti × (j-1) / MBnum (9- 1) In the case of a P picture, refQ (j) = dp (j) × 31 / r (8-2) dp (j) = d0p + B (j−1) −Tp × (j−1) / MBnum (( 9-2) In the case of a B picture, refQ (j) = db (j) × 31 / r (8-2) db (j) = d0b + B (j−1) −Tb × (j−1) / MBnum ... (9-3) di (j), dp (j), and db (j) are the virtual buffer occupancy of each picture obtained by Expression 9, and d0i (j), d0p (j), d0b (j) Is
This is the initial value of the virtual buffer capacity for each picture.
B (j) is the amount of generated bits from the beginning of the picture to the j-th MB. Ti, Tp, and Tb are picture target bit amounts for each picture obtained in the first step described in the related art. In B (j), MBnum is the total number of MBs in one picture. r is a reaction parameter for controlling the response speed of the feedback loop, and is a value obtained by dividing the bit rate by the picture rate and doubling it.

【0072】MBの量子化スケールは、式5、式6、式8
および式9から定められるので、特定の色のMBに対する
量子化スケールを特定の色を除く色のMBに対する量子化
スケールより小さく割り振ったとしても、式5、式6、
式8および式9で生じ得る誤差以内(数パーセント以
内)でピクチャ目標ビット量に維持される。したがっ
て、ピクチャに割り当てられたピクチャ目標ビット量を
実質的に維持しつつ、特定の被写体の再生画質を改善す
る。
The quantization scale of MB is given by Equations 5, 6, and 8.
And Equation 9, even if the quantization scale for a specific color MB is assigned smaller than the quantization scale for a color MB excluding a specific color, Equations 5, 6,
The picture target bit amount is maintained within the error (within several percent) that can occur in Equations 8 and 9. Therefore, the reproduction image quality of a specific subject is improved while substantially maintaining the picture target bit amount allocated to the picture.

【0073】なお、本実施形態では、エンコードに先立
ち画面全体に亘ってMBのH(j)を算出することができる。
このため、画面内平均avg_Hは、時間的に1つ手前のピ
クチャにおけるavg_Hではなく、当該ピクチャのavg_Hを
使用することができる。したがって、動きの激しい映像
に対しても特定の被写体に追随することができる。
In this embodiment, H (j) of MB can be calculated over the entire screen before encoding.
For this reason, the average avg_H in the screen can use not the avg_H of the immediately preceding picture but the avg_H of the picture. Therefore, it is possible to follow a specific subject even with a rapidly moving image.

【0074】また、上述の実施形態では、肌色成分検出
部34は、式1により画素単位で肌色であるか否かを判
断した。そして、肌色成分検出部34は、MBが、その結
果に応じ式4により、a1、a2およびa3を用いてどの程度
の割合で肌色の領域内にあるMBであるか否かを評価し
た。一方、この処理において、画像符号化装置は、式1
の代わりに式10を用い、式4の代わりに式11を用い
る肌色成分検出部34を備える構成としてもよい。
In the above-described embodiment, the flesh-color component detection unit 34 determines whether or not the skin color is a pixel-by-pixel unit according to Equation 1. Then, the flesh-color component detection unit 34 evaluated the percentage of the MB in the flesh-colored area using a1, a2, and a3 according to Equation 4 according to the result. On the other hand, in this processing, the image encoding device calculates
Expression 10 may be used instead of, and a flesh color component detection unit 34 that uses Expression 11 instead of Expression 4 may be provided.

【0075】 k1×[Cb]≦[Cr]≦k2×[Cb] …(11) ここで、[Cb]は、MB内における全画素についてのCbの
平均値である。[Cr]は、MB内における全画素について
のCbの平均値である。 MBが式11を満たす場合には、H(j)=a1 MBが式11を満たさない場合には、H(j)=a3 …(12)
K1 × [Cb] ≦ [Cr] ≦ k2 × [Cb] (11) Here, [Cb] is the average value of Cb for all pixels in the MB. [Cr] is the average value of Cb for all pixels in the MB. If MB satisfies Equation 11, H (j) = a1 If MB does not satisfy Equation 11, H (j) = a3 (12)

【0076】このように画素単位ではなく、MB単位で肌
色の領域であるか否かを判断するため、肌色成分検出部
34は、式4のH(j)=a2の場合のような中間の判断をす
ることはできないが、回路構成を簡略化することがで
き、処理時間も短縮することができる。
As described above, in order to determine whether or not a pixel is in a flesh color area in MB units, not in pixel units, the flesh color component detection unit 34 determines the intermediate value as in the case of H (j) = a2 in equation (4). Although no judgment can be made, the circuit configuration can be simplified and the processing time can be shortened.

【0077】特に、被写体の輪郭部分を含むMBに対し、
前後のMBは、被写体内か被写体外かの何れかであること
が多いので、肌色成分検出部34は、通常、式1および
式4で判断するようにし、MBがH(j)=a2であった場合
に、次のMBを式11および式12で判断するようにす
る。そして、肌色成分検出部34は、H(j)=a3となるMB
が連続した場合に再び式1および式4で判断するように
する。この際に連続したMBについて評価を再度行うよう
にする。このようにすれば、式1および式4のみを用い
た場合と同様な画質改善効果で処理時間を短縮すること
ができる。
In particular, for an MB including a contour portion of a subject,
Since the front and rear MBs are often either inside or outside the subject, the flesh color component detection unit 34 normally makes a determination using Equations 1 and 4, and when MB is H (j) = a2 If there is, the next MB is determined by Expressions 11 and 12. Then, the flesh-color component detection unit 34 sets the MB in which H (j) = a3.
Are determined again by the equations (1) and (4) when. At this time, the evaluation is performed again for consecutive MBs. In this way, the processing time can be reduced with the same image quality improvement effect as when only Expressions 1 and 4 are used.

【0078】そして、肌色成分検出部34の処理を次の
ように改良してもよい。前述した人間の視覚特性から、
着目する被写体の周辺部分における画質劣化が大きい場
合には、その画質劣化が目立つものである。そこで、MB
が肌色の領域に属する場合、すなわち、H(j)=a1またはH
(j)=a2である場合に、肌色成分検出部34は、当該MBを
中心とする周辺8個のMBも強制的に、a3の場合よりも再
生画像が改善するように補正係数Ncolor(j)を割り当て
るようにする。つまり、この場合をa4とすると、a4は、
a1<a2≦a4<a3となる。例えば、a4は、a1:a2:a4:a3
=1:10:10:100やa1:a2:a4:a3=1:1
0:30:100などのように設定される。
Then, the processing of the skin color component detecting section 34 may be improved as follows. From the aforementioned human visual characteristics,
When the image quality deterioration in the peripheral portion of the subject of interest is large, the image quality deterioration is conspicuous. So, MB
Belongs to the skin color area, that is, H (j) = a1 or H
When (j) = a2, the skin color component detection unit 34 forcibly also corrects the eight peripheral MBs around the MB so that the reproduced image is improved as compared with the case of a3. ). In other words, if this case is a4, a4 is
a1 <a2 ≦ a4 <a3. For example, a4 is a1: a2: a4: a3
= 1: 10: 10: 100 or a1: a2: a4: a3 = 1: 1
0: 30: 100 is set.

【0079】このように処理することによって、画像符
号化装置は、撮影者などが関心の高い被写体などの境界
や境界周辺における誤検出を減らしたり、再生画像の劣
化を低減することができるので、視覚上の画質を改善す
ることができる。
By performing such processing, the image coding apparatus can reduce erroneous detection at the boundary of the subject or the like near the photographer or the like, or reduce the deterioration of the reproduced image. Visual quality can be improved.

【0080】さらに、肌色成分検出部34の処理を次の
ように改良してもよい。一般に、人間の心理として、撮
影者は、画面の中央に関心の高い被写体などを位置さ
せ、視聴者も画面の中央に関心を寄せることが多い。そ
こで、肌色成分検出部34は、式1や式11の判断に、
MBの位置を考慮して補正係数の処理を行うようにする。
例えば、式4の代わりに、式13を用いる。 h(j)>th3_hかつs1≦MB_x≦s2かつs3≦MB_y≦s4の場合は、 H(j)=a5 h(j)>th3_hの場合は、H(j)=a6 th3_h≧h(j)の場合は、H(j)=a7 …(13)
Further, the processing of the skin color component detecting section 34 may be improved as follows. Generally, as a human psychology, a photographer often places a subject of interest in the center of a screen, and a viewer often focuses on the center of the screen. Therefore, the skin color component detection unit 34 determines whether
The processing of the correction coefficient is performed in consideration of the position of the MB.
For example, Equation 13 is used instead of Equation 4. When h (j)> th3_h and s1 ≦ MB_x ≦ s2 and s3 ≦ MB_y ≦ s4, H (j) = a5 When h (j)> th3_h, H (j) = a6 th3_h ≧ h (j) In the case of, H (j) = a7 (13)

【0081】ここで、上述と同様に、th3_hは、MB中に
存在する式1を満たす肌色の画素数に応じて補正係数の
大きさを決める閾値であり、a5、a6およびa7は、a5≦a6
<a7である任意の定数である。MBの位置をxy直交座標で
表した場合において、MB_xは、MBのx軸方向の位置であ
り、MB_yは、MBのy軸方向の位置である。s1、s2、s3お
よびs4は、任意の定数である。
Here, similarly to the above, th3_h is a threshold value for determining the magnitude of the correction coefficient in accordance with the number of pixels of the skin color that satisfies Expression 1 existing in the MB, and a5, a6 and a7 satisfy a5 ≦ a5. a6
<A7 is an arbitrary constant. When the position of the MB is represented by xy orthogonal coordinates, MB_x is the position of the MB in the x-axis direction, and MB_y is the position of the MB in the y-axis direction. s1, s2, s3 and s4 are arbitrary constants.

【0082】このように処理することによって、ピクチ
ャ目標ビット量を実質的に維持しつつ、画面中に予約し
た予約領域内(s1≦MB_x≦s2かつs3≦MB_y≦s4)に特定
の色の領域がある場合には、当該色の領域の画質を効率
的に改善することができる。例えば、予約領域を画面の
中央に設定することによって、多数の人物が写っている
場合に、主役の画質のみを効率的に改善することができ
る。
By performing the above processing, a specific color area is set in the reserved area (s1 ≦ MB_x ≦ s2 and s3 ≦ MB_y ≦ s4) reserved in the screen while substantially maintaining the picture target bit amount. If there is, the image quality of the color area can be efficiently improved. For example, by setting the reserved area at the center of the screen, when a large number of people are shown, only the main image quality can be efficiently improved.

【0083】次に、画像復号装置について説明する。Next, the image decoding apparatus will be described.

【0084】図4は、画像復号装置のブロック図を示す
図である。画像復号装置は、メモリのバッファメモリ4
1、可変長符号復号部42、逆量子化部43、逆DCT部
44、加算部45、フレームメモリ48、動き補償部4
9および画面並替部46の各電子回路を備えて構成され
る。
FIG. 4 is a block diagram showing an image decoding apparatus. The image decoding device includes a buffer memory 4 of a memory.
1, variable length code decoding section 42, inverse quantization section 43, inverse DCT section 44, addition section 45, frame memory 48, motion compensation section 4
9 and the electronic circuits of the screen rearranging section 46.

【0085】符号化データ(ビデオエレメンタリストー
ム)は、一旦バッファメモリ41に蓄積され、可変長復
号部42に入力される。可変長復号部42は、マクロブ
ロック符号化情報が復号され、符号化モード、MV、量子
化スケールを含む量子化情報および量子化DCT係数が分
離される。MVなどは、動き補償部49に出力される。量
子化DCT係数は、量子化スケールに基づいて逆量子化部
43でDCT係数に復元され、逆DCT部44で画素空間デー
タに変換される。加算部45は、逆量子化部44の出力
と動き補償部49の出力とを加算するが、Iピクチャを
復号する場合には、加算しない。画面内のすべてのMBが
復号され、画面は、画面並替部46で元の入力順序に並
べ替えられて、アナログ信号に変換されて出力される。
また、加算器45の出力は、IピクチャおよびPピクチャ
の場合には、その後の復号処理で参照画面として使用さ
れるため、フレームメモリ48に蓄積され、動き補償部
49に出力される。
The encoded data (video elementary stream) is temporarily stored in the buffer memory 41 and input to the variable length decoding unit 42. The variable length decoding unit 42 decodes the macroblock encoded information, and separates the quantized information including the encoding mode, the MV, and the quantization scale, and the quantized DCT coefficients. The MV and the like are output to the motion compensation unit 49. The quantized DCT coefficients are restored to DCT coefficients by the inverse quantization unit 43 based on the quantization scale, and are converted to pixel space data by the inverse DCT unit 44. The addition unit 45 adds the output of the inverse quantization unit 44 and the output of the motion compensation unit 49, but does not add the I-picture when decoding it. All MBs in the screen are decoded, and the screen is rearranged in the original input order by the screen rearranging unit 46, converted into an analog signal, and output.
In addition, in the case of an I picture and a P picture, the output of the adder 45 is used as a reference screen in a subsequent decoding process, and is therefore stored in the frame memory 48 and output to the motion compensation unit 49.

【0086】なお、画像復号装置は、再生画像をなめら
かにするために、破線で示すフィルタ(FIL)47で画
面並替部46の出力を処理するようにしてもよい。FIL
47は、隣接MB間の信号レベルに大きな差があるため
に、再生画像がモザイク状になる場合に、そのレベル差
をなだらかにする。
The image decoding apparatus may process the output of the screen rearranging section 46 with a filter (FIL) 47 indicated by a broken line in order to smooth the reproduced image. FIL
47 smoothes the level difference when a reproduced image is mosaic due to a large difference in signal level between adjacent MBs.

【0087】このような画像符号化装置および画像復号
装置は、画像圧縮伸張装置として、カメラ一体型ディジ
タル記録再生装置やディジタルスチルカメラなど画像を
取り込み画像信号を処理する画像装置に備えることがで
きる。さらに、本発明は、画像圧縮処理および画像伸張
処理の何れか一方または両方を実現するプログラムを記
録した記録媒体を介して該プログラムをコンピュータに
インストールすることで、コンピュータを画像符号化装
置、画像復号装置または画像圧縮伸張装置にすることも
できる。
Such an image encoding device and an image decoding device can be provided as an image compression / decompression device in an image device that captures an image and processes an image signal, such as a camera-integrated digital recording / reproducing device or a digital still camera. Further, the present invention installs the program in a computer via a recording medium in which the program for implementing one or both of the image compression process and the image decompression process is recorded, so that the computer can be used as an image encoding device, an image decoding device, and the like. It can also be a device or an image compression / decompression device.

【0088】以下、一例として、本発明に係る画像符号
化装置を備えるカメラ一体型ディジタル記録再生装置に
ついて説明する。
Hereinafter, as an example, a camera-integrated digital recording / reproducing apparatus equipped with the image encoding apparatus according to the present invention will be described.

【0089】図5は、カメラ一体型ディジタル記録再生
装置の構成を示すブロック図である。
FIG. 5 is a block diagram showing the structure of a camera-integrated digital recording / reproducing apparatus.

【0090】図5において、カメラ一体型ディジタル記
録再生装置は、ビデオ符号器111、オーディオ符号器
112、ビデオ復号器113、オーディオ復号器11
4、ファイル生成器115、ファイル復号器116、メ
モリ117、120、メモリコントローラ118、シス
テム制御マイコン119、エラー訂正符号/復号器12
1、ドライブ制御マイコン122、データ変復調器12
3、磁界変調ドライバ124、操作部126、サーボ回
路130、モータ131、磁界ヘッド132および光ピ
ックアップ133を備えて構成される。
In FIG. 5, a camera-integrated digital recording / reproducing apparatus includes a video encoder 111, an audio encoder 112, a video decoder 113, and an audio decoder 11.
4. File generator 115, file decoder 116, memories 117 and 120, memory controller 118, system control microcomputer 119, error correction code / decoder 12
1, drive control microcomputer 122, data modem 12
3, a magnetic field modulation driver 124, an operation unit 126, a servo circuit 130, a motor 131, a magnetic field head 132, and an optical pickup 133.

【0091】ビデオ信号は、ビデオ入力端子からビデオ
符号器111に供給され、圧縮符号化される。オーディ
オ信号は、オーディオ入力端子からオーディオ符号器1
12に供給され、圧縮符号化される。ビデオ入力端子に
は、例えば、図示しない光学系によって被写体の撮像光
がCCD(Charge Coupled Device)などの撮像素子に供給さ
れることによってビデオ信号を生成するビデオカメラ
で、撮影された画像がビデオ信号として供給される。オ
ーディオ入力端子には、マイクロホンで集音された音声
がオーディオ信号として供給される。
The video signal is supplied from a video input terminal to a video encoder 111, and is compressed and encoded. The audio signal is sent from the audio input terminal to the audio encoder 1
12 and compression-encoded. For example, an image captured by a video camera that generates a video signal by supplying imaging light of a subject to an imaging element such as a CCD (Charge Coupled Device) by an optical system (not shown) is input to the video input terminal. Supplied as Audio collected by the microphone is supplied to the audio input terminal as an audio signal.

【0092】ビデオ符号器111は、本発明に係る画像
符号化装置が利用される。
As the video encoder 111, the image encoding device according to the present invention is used.

【0093】オーディオ符号器112は、例えば、MPEG
/Audioレイヤ1/レイヤ2の場合では、サブバンド符
号化部および適応量子化ビット割り当て部などの各電子
回路を備えて構成される。オーディオ信号は、サブバン
ド符号化部で32帯域のサブバンド信号に分割され、適
応量子化ビット割り当て部で心理聴覚重み付けに従って
量子化され、ビットストリームに形成された後に出力さ
れる。なお、符号化品質を向上させるために、MPEG/Au
dioレイヤ3の場合では、さらに、適応ブロック長変形
離散コサイン変換部、折り返し歪み削減バタフライ部、
非線形量子化部および可変長符号化部などが導入され
る。
The audio encoder 112 is, for example, an MPEG
In the case of / Audio layer 1 / layer 2, each electronic circuit such as a subband encoding unit and an adaptive quantization bit allocating unit is provided. The audio signal is divided into 32 sub-band signals by the sub-band encoding unit, quantized by the adaptive quantization bit allocation unit according to the psychological auditory weighting, formed into a bit stream, and output. In order to improve coding quality, MPEG / Au
In the case of dio layer 3, the adaptive block length modified discrete cosine transform unit, the aliasing reduction butterfly unit,
A non-linear quantization unit and a variable length coding unit are introduced.

【0094】ビデオ符号器111の出力およびオーディ
オ符号器112の出力がファイル生成器115に供給さ
れる。ファイル生成器115は、特定のハードウェア構
成を使用することなく動画、音声およびテキストなどを
同期して再生することができるコンピュータソフトウェ
アにより扱うことができるファイル構造を持つように、
ビデオエレメンタリストリームおよびオーディオエレメ
ンタリストームのデータ構造を変換する。このようなソ
フトウェアは、例えば、QuickTime(クイック・タイ
ム)である。そして、ファイル生成器115は、符号化
ビデオデータと符号化オーディオデータとを多重化す
る。ファイル生成器115は、システム制御マイコン1
19によって制御される。
The output of the video encoder 111 and the output of the audio encoder 112 are supplied to a file generator 115. The file generator 115 has a file structure that can be handled by computer software that can play back video, audio, text, etc. synchronously without using a specific hardware configuration.
Convert the data structure of the video elementary stream and the audio elementary stream. Such software is, for example, QuickTime. Then, the file generator 115 multiplexes the encoded video data and the encoded audio data. The file generator 115 is provided by the system control microcomputer 1
19.

【0095】ファイル生成器115の出力であるQuickT
imeムービーファイルは、メモリコントローラ118を
介してメモリ117に順次に書き込まれる。メモリコン
トローラ118は、システム制御マイコン119から記
録媒体140へのデータ書き込みが要求されると、メモ
リ117からQuickTimeムービーファイルを読み出す。
QuickT which is the output of the file generator 115
The ime movie file is sequentially written to the memory 117 via the memory controller 118. The memory controller 118 reads a QuickTime movie file from the memory 117 when the system control microcomputer 119 requests data writing to the recording medium 140.

【0096】ここで、QuickTimeムービー符号化の転送
レートは、記録媒体140への書き込みデータの転送レ
ートより低い転送レート、例えば、1/2に設定され
る。よって、QuickTimeムービーファイルが連続的にメ
モリ117に書き込まれるのに対し、メモリ117から
のQuickTimeムービーファイルの読み出しは、メモリ1
17がオーバーフローまたはアンダーフローしないよう
に、システム制御マイコン119によって監視されなが
ら間欠的に行われる。
Here, the transfer rate of the QuickTime movie encoding is set to a transfer rate lower than the transfer rate of the write data to the recording medium 140, for example, 1 /. Therefore, while the QuickTime movie file is continuously written to the memory 117, the reading of the QuickTime movie file from the memory 117 is performed in the memory 1
17 is monitored intermittently by the system control microcomputer 119 so as not to overflow or underflow.

【0097】メモリ117から読み出されたQuickTime
ムービーファイルは、メモリコントローラ118からエ
ラー訂正符号/復号器121に供給される。エラー訂正
符号/復号器121は、このQuickTimeムービーファイ
ルを一旦メモリ120に書き込み、インターリーブ(in
terleaved)およびエラー訂正符号の冗長データの生成
を行う。エラー訂正符号/復号器121は、冗長データ
が付加されたデータをメモリ120から読み出し、これ
をデータ変復調器123に供給する。
QuickTime read from memory 117
The movie file is supplied from the memory controller 118 to the error correction code / decoder 121. The error correction encoder / decoder 121 writes the QuickTime movie file into the memory 120 once, and interleaves (in
terleaved) and redundant data of an error correction code. The error correction code / decoder 121 reads out the data to which the redundant data has been added from the memory 120 and supplies the data to the data modulator / demodulator 123.

【0098】データ変復調器123は、デジタルデータ
を記録媒体140に記録する際に、再生時のクロック抽
出を容易とし、符号間干渉などの問題が生じないよう
に、データを変調する。例えば、(1,7)RLL(ru
n length limited)符号やトレリス符号などを利用する
ことができる。
When recording digital data on the recording medium 140, the data modulator / demodulator 123 modulates data so as to facilitate clock extraction during reproduction and to prevent problems such as intersymbol interference. For example, (1,7) RLL (ru
(n length limited) code or trellis code.

【0099】データ変復調器123の出力は、磁界変調
ドライバ124および光ピックアップ133に供給され
る。磁界変調ドライバ124は、入力信号に応じて、磁
界ヘッド132を駆動して記録媒体140に磁界を印加
する。光ピックアップ133は、入力信号に応じて記録
用のレーザビームを記録媒体140に照射する。このよ
うにして、記録媒体140にデータが記録される。
The output of the data modulator / demodulator 123 is supplied to the magnetic field modulation driver 124 and the optical pickup 133. The magnetic field modulation driver 124 applies a magnetic field to the recording medium 140 by driving the magnetic field head 132 according to the input signal. The optical pickup 133 irradiates the recording medium 140 with a recording laser beam according to an input signal. In this way, data is recorded on the recording medium 140.

【0100】記録媒体140は、書き換え可能な光ディ
スク、例えば、光磁気ディスク(MO、magneto-optical
disk)、相変化型ディスクなどである。記録媒体140
は、モータ131によって、線速度一定(CLV)、角速
度一定(CAV)またはゾーンCLV(ZCLV)で回転される。
The recording medium 140 is a rewritable optical disk, for example, a magneto-optical disk (MO, magneto-optical disk).
disk), phase change type disks, and the like. Recording medium 140
Is rotated by a motor 131 at a constant linear velocity (CLV), a constant angular velocity (CAV), or a zone CLV (ZCLV).

【0101】ドライブ制御マイコン122は、システム
制御マイコン119の要求に応じて、サーボ回路130
に信号を出力する。サーボ回路130は、この出力に応
じて、モータ131および光ピックアップ133を制御
することによって、ドライブ全体を制御する。例えば、
サーボ回路130は、光ピックアップ133に対し、記
録媒体140の径方向の移動サーボ、トラッキングサー
ボおよびフォーカスサーボを行い、モータ131に対
し、回転数を制御する。
The drive control microcomputer 122 responds to a request from the system control microcomputer 119 by using the servo circuit 130.
Output the signal. The servo circuit 130 controls the entire drive by controlling the motor 131 and the optical pickup 133 according to the output. For example,
The servo circuit 130 performs radial servo, tracking servo, and focus servo of the recording medium 140 with respect to the optical pickup 133, and controls the rotation speed of the motor 131.

【0102】また、システム制御マイコン119には、
ユーザが所定の指示を入力する操作部126が接続され
る。例えば、上述したk1、k2を可変にすることができる
画像符号化装置である場合には、これらの数値を入力す
る。
The system control microcomputer 119 includes:
An operation unit 126 for a user to input a predetermined instruction is connected. For example, in the case of an image coding apparatus capable of making k1 and k2 variable, these numerical values are input.

【0103】一方、再生の際には、光ピックアップ13
3は、再生用の出力でレーザビームを記録媒体140に
照射し、その反射光を光ピックアップ133内の光検出
器で受光することによって、再生信号を得る。この場合
において、ドライブ制御マイコン122は、光ピックア
ップ133内の光検出器の出力信号からトラッキングエ
ラーおよびフォーカスエラーを検出し、読み取りのレー
ザビームがトラック上に位置し、トラック上に合焦する
ように、サーボ回路130によって光ピックアップ13
3を制御する。さらに、ドライブ制御マイコン122
は、記録媒体140上における所望の位置のデータを再
生するために、光ピックアップの径方向における移動も
制御する。所望の位置は、記録時と同様にシステム制御
マイコン119によって、ドライブ制御マイコン122
に信号が与えられ、決定される。
On the other hand, at the time of reproduction, the optical pickup 13
Reference numeral 3 irradiates the recording medium 140 with a laser beam at an output for reproduction, and receives the reflected light with a photodetector in the optical pickup 133 to obtain a reproduction signal. In this case, the drive control microcomputer 122 detects a tracking error and a focus error from the output signal of the photodetector in the optical pickup 133, and adjusts the read laser beam so as to be positioned on the track and focused on the track. The optical pickup 13 by the servo circuit 130
3 is controlled. Further, the drive control microcomputer 122
Controls the movement of the optical pickup in the radial direction in order to reproduce data at a desired position on the recording medium 140. The desired position is determined by the drive control microcomputer 122 by the system control microcomputer 119 in the same manner as during recording.
Are given and determined.

【0104】光ピックアップ133の再生信号は、デー
タ変復調器123に供給され、復調される。復調された
データは、エラー訂正符号/復号器121に供給され、
再生データを一旦メモリ120に格納し、デインターリ
ーブ(deinterleaved)およびエラー訂正が行われる、
エラー訂正後のQuickTimeムービーファイルは、メモリ
コントローラ118を介してメモリ117に格納され
る。
The reproduction signal of the optical pickup 133 is supplied to the data modulator / demodulator 123 and demodulated. The demodulated data is supplied to an error correction code / decoder 121,
The reproduced data is temporarily stored in the memory 120 and subjected to deinterleaving and error correction.
The QuickTime movie file after the error correction is stored in the memory 117 via the memory controller 118.

【0105】メモリ117に格納されたQuickTimeムー
ビーファイルは、システム制御マイコン119の要求に
応じて、ファイル復号器116に出力される。システム
制御マイコン119は、ビデオ信号およびオーディオ信
号を連続再生するために、記録媒体140の再生信号が
メモリ117に格納されるデータ量と、メモリ117か
ら読み出されてファイル復号器116に供給されるデー
タ量とを監視することによって、メモリ117がオーバ
ーフローまたはアンダーフローしないようにメモリコン
トローラ118およびドライブ制御マイコン122を制
御する。こうして、システム制御マイコン119は、記
録媒体140から間欠的にデータを読み出す。
The QuickTime movie file stored in the memory 117 is output to the file decoder 116 in response to a request from the system control microcomputer 119. The system control microcomputer 119 reads the reproduction signal of the recording medium 140 from the memory 117 and reads the reproduction signal from the memory 117 and supplies it to the file decoder 116 in order to continuously reproduce the video signal and the audio signal. By monitoring the data amount, the memory controller 118 and the drive control microcomputer 122 are controlled so that the memory 117 does not overflow or underflow. Thus, the system control microcomputer 119 reads data from the recording medium 140 intermittently.

【0106】ファイル復号器116は、システム制御マ
イコン119の制御下で、QuickTimeムービーファイル
をビデオエレメンタリストリームとオーディオエレメン
タリファイルとに分離する。ビデオエレメンタリストリ
ームは、ビデオ復号器113に供給され、圧縮符号化の
復号が行われ、ビデオ出力となってビデオ出力端子から
出力される。オーディオエレメンタリストリームは、オ
ーディオ復号器114に供給され、圧縮符号化の復号が
行われてオーディオ出力となってオーディオ出力端子か
ら出力される。ここで、ファイル復号器116は、ビデ
オエレメンタリストリームとオーディオエレメンタリス
トリームとが同期するように出力する。
The file decoder 116 separates a QuickTime movie file into a video elementary stream and an audio elementary file under the control of the system control microcomputer 119. The video elementary stream is supplied to the video decoder 113, where it is subjected to compression encoding decoding, and is output as a video output from a video output terminal. The audio elementary stream is supplied to the audio decoder 114, where the audio elementary stream is subjected to compression encoding and decoding, and is output as an audio output from an audio output terminal. Here, the file decoder 116 outputs the video elementary stream and the audio elementary stream so that they are synchronized.

【0107】ビデオ復号器113は、上述の画像復号装
置を備えて構成される。
The video decoder 113 includes the above-described image decoding device.

【0108】オーディオ復号器114は、例えば、MPEG
/Audioレイヤ1/レイヤ2の場合では、ビットストリ
ーム分解部、逆量子化部およびサブバンド合成フィルタ
バンク部などの各電子回路を備えて構成される。入力さ
れたオーディオエレメンタリストリームは、ビットスト
リーム分解部でヘッダと補助情報と量子化サブバンド信
号とに分離され、量子化サブバンド信号は、逆量子化部
で割り当てられたビット数で逆量子化され、サブバンド
合成フィルタバンクで合成された後に、出力される。
The audio decoder 114 is, for example, an MPEG
In the case of / Audio Layer 1 / Layer 2, each of the electronic circuits includes a bit stream decomposition unit, an inverse quantization unit, and a subband synthesis filter bank unit. The input audio elementary stream is separated into a header, auxiliary information, and a quantized sub-band signal by a bit stream decomposing unit, and the quantized sub-band signal is dequantized by the number of bits allocated by the dequantizing unit. After being synthesized by the sub-band synthesis filter bank, it is output.

【0109】このようなカメラ一体型記録再生装置で
は、撮影者や視聴者の関心が高い部分や重要と考える部
分を色で指定し、当該色の領域の再生画像を改善するこ
とができる。例えば、肌色を指定することができ、肌色
を指定した場合には、人物の領域を高精細度にすること
ができる。
In such a camera-integrated recording / reproducing apparatus, a portion of high interest or important to the photographer or viewer can be designated by a color, and the reproduced image of the color region can be improved. For example, a flesh color can be specified, and when a flesh color is specified, the area of a person can be made to have high definition.

【0110】(第2の実施形態)第2の実施形態は、画
素の色だけでなく、MBの他の特徴も用いて画質を改善す
る画像符号化装置である。他の特徴は、例えば、アクテ
ィビティ、輝度平均値および動きベクトルの残差値など
がある。評価値は、画素の色、アクティビティ、輝度平
均値および残差量のうちから、画素の色とアクティビテ
ィとの組み合わせのように2個の要素を選択する組み合
わせ、画素の色とアクティビティと輝度平均値と組み合
わせのように3個の要素を選択する組み合わせ、そし
て、画素の色、アクティビティ、輝度平均値および残差
量の組み合わせがあるが、第2の実施形態は、画素の
色、アクティビティ、輝度平均値および残差量から評価
値V(j)を作る場合である。
(Second Embodiment) The second embodiment is an image coding apparatus for improving the image quality by using not only the color of the pixel but also other features of the MB. Other features include, for example, activity, average luminance value, and residual value of the motion vector. The evaluation value is a combination of selecting two elements such as a combination of a pixel color and an activity from a pixel color, an activity, a luminance average value and a residual amount, and a pixel color, an activity and a luminance average value. There is a combination of selecting three elements like a combination and a combination of a pixel color, an activity, a luminance average value, and a residual amount. In the second embodiment, a pixel color, an activity, a luminance average This is a case where the evaluation value V (j) is created from the value and the residual amount.

【0111】図6は、第2の実施形態における画像符号
化装置の構成を示すブロック図である。
FIG. 6 is a block diagram showing a configuration of an image coding apparatus according to the second embodiment.

【0112】図6において、第2の実施形態の画像符号
化装置は、画像並替部11、減算部12、スイッチ1
3、DCT部14、量子化部15、可変長符号化部16、
バッファメモリ17、制御部18、逆量子化部21、逆
DCT部22、加算部23、フレームメモリ24、26、
動き補償部25、動き検出部27、残差演算部28、フ
レームコンプレキシティ演算部31、アクティビティ演
算部32、DC成分演算部33および肌色成分検出部34
を備えて構成される。すなわち、第2の実施形態におけ
る画像符号化装置は、第1の実施形態における画像符号
化装置に対し、MBの他の特徴を検出するために、残差演
算部28、フレームコンプレキシティ演算部31、アク
ティビティ演算部32およびDC成分演算部33をさらに
備える構成である。このため、これら相違する構成を除
く構成は、第1の実施形態と同様なのでその説明を省略
し、以下にこれら相違する構成のみを説明する。なお、
図1と同様に、フレームメモリ26を用いることなく、
フレームメモリ24の復号画像データから、各MVを算
出する場合を破線で示している。
In FIG. 6, the image encoding apparatus according to the second embodiment includes an image rearranging section 11, a subtracting section 12, a switch 1
3, DCT section 14, quantization section 15, variable length coding section 16,
Buffer memory 17, control unit 18, inverse quantization unit 21, inverse
DCT section 22, adder section 23, frame memories 24, 26,
Motion compensator 25, motion detector 27, residual calculator 28, frame complexity calculator 31, activity calculator 32, DC component calculator 33, and skin color component detector 34
It is comprised including. That is, the image encoding device according to the second embodiment is different from the image encoding device according to the first embodiment in that a residual operation unit 28, a frame complexity operation unit 31, an activity calculator 32 and a DC component calculator 33. For this reason, the configuration other than these different configurations is the same as that of the first embodiment, and therefore the description thereof will be omitted, and only the different configurations will be described below. In addition,
As in FIG. 1, without using the frame memory 26,
The case where each MV is calculated from the decoded image data in the frame memory 24 is indicated by a broken line.

【0113】残差演算部28は、PピクチャおよびBピク
チャの各MBにおいて、動き検出部27の出力に基づき、
モーション・ベクトル(motion vector、以下「MV」
と略記する。)の残差値を算出する。j番目のMBに対す
る残差値をBd(j)とする。
The residual operation unit 28 determines the size of each MB of the P picture and the B picture based on the output of the motion detection unit 27.
Motion vector (MV)
Abbreviated. ) Is calculated. Let Bd (j) be the residual value for the j-th MB.

【0114】アクティビティ演算部32は、原画の輝度
信号画素値に基づいて、画像の複雑さを表す量であるア
クティビティを式14ないし式16を用いて算出する。
The activity calculation unit 32 calculates the activity representing the complexity of the image based on the luminance signal pixel value of the original image by using Expressions 14 to 16.

【0115】[0115]

【数1】 (Equation 1)

【0116】[0116]

【数2】 (Equation 2)

【0117】[0117]

【数3】 (Equation 3)

【0118】ここで、act(j)は、j番目のMBに対するア
クティビティである。Pkは、原画の輝度信号ブロック
内画素値である。式14で最小値を採るのは、MB内の一
部だけでも平坦部分がある場合に量子化スケールを細か
くするためである。
Here, act (j) is the activity for the j-th MB. Pk is a pixel value in the luminance signal block of the original image. The reason for taking the minimum value in Equation 14 is to reduce the quantization scale when there is a flat portion even in only a part of the MB.

【0119】DC成分演算部33は、MBごとに、式17
に従って輝度平均値を求め、輝度平均値を制御部18に
出力する。
The DC component calculation unit 33 calculates the equation (17) for each MB.
, And outputs the average luminance value to the control unit 18.

【0120】[0120]

【数4】 ここで、DC(j)は、j番目のMBに対する輝度平均値、Yi
は、輝度値を256段階で量子化した場合、MBにおいて
i番目の画素に対する輝度値である。
(Equation 4) Here, DC (j) is a luminance average value for the j-th MB, Yi
Is the luminance value for the i-th pixel in the MB when the luminance value is quantized in 256 steps.

【0121】アクティビティ演算部32がMBごとに値を
算出するの対し、フレームコンプレキシティ演算部31
は、隣接する画素間の輝度を比べることで、フレームご
とに画像の複雑さを表す量を算出する。
While the activity calculation unit 32 calculates a value for each MB, the frame complexity calculation unit 31
Calculates the amount representing the complexity of the image for each frame by comparing the luminance between adjacent pixels.

【0122】制御部18は、これら肌色成分検出部34
の出力値h(j)、アクティビティact(j)、残差値Bd(j)お
よび輝度平均値DC(j)に基づいて評価値V(j)を求める。
制御部18は、評価値V(j)に基づいて、補正係数Nv(j)
を求め、量子化部15および逆量子化部21に出力す
る。
The control unit 18 controls the skin color component detection unit 34
The evaluation value V (j) is obtained based on the output value h (j), the activity act (j), the residual value Bd (j), and the average luminance value DC (j).
The control unit 18 calculates a correction coefficient Nv (j) based on the evaluation value V (j).
And outputs it to the quantization unit 15 and the inverse quantization unit 21.

【0123】図7は、第2の実施形態における画像符号
化装置の主要な処理を説明するフローチャートである。
FIG. 7 is a flowchart for explaining main processing of the image coding apparatus according to the second embodiment.

【0124】図7において、制御部18は、肌色成分検
出部34の出力h(j)を取り込む(St11)。次に、制
御部18は、アクティビティ演算部31が算出したアク
ティビティact(j)を取り込む(St12)。次に、制御
部18は、当該MBがイントラ処理をするMBか否かを判断
する(St13)。判断の結果、イントラ処理するMBの
場合では、制御部18は、残差演算部28が算出した残
差値Bd(j)を取り込み(St14)、St15の処理を
行う。一方、判断の結果、イントラ処理しないMBの場合
では、制御部18は、St15の処理を行う。
In FIG. 7, the control unit 18 takes in the output h (j) of the skin color component detection unit 34 (St11). Next, the control unit 18 fetches the activity act (j) calculated by the activity calculation unit 31 (St12). Next, the control unit 18 determines whether or not the MB is an MB for performing the intra process (St13). As a result of the determination, in the case of the MB to be subjected to the intra process, the control unit 18 fetches the residual value Bd (j) calculated by the residual calculation unit 28 (St14), and performs the process of St15. On the other hand, as a result of the determination, if the MB is not subjected to the intra process, the control unit 18 performs the process of St15.

【0125】次に、制御部18は、DC成分演算部33が
算出したDC(j)を取り込む(St15)。
Next, the controller 18 takes in the DC (j) calculated by the DC component calculator 33 (St15).

【0126】次に、制御部18は、MBの評価値V(j)を式
18に基づいて生成する(St16)。 h(j)≧th_h の場合は、V(j)=act(j)×b1 …(18-1) h(j)<th_h、かつ、th_DClo ≦DC(j)≦th_DCup、かつBd(j) ≧th_Bd の場合は、V(j)=act(j)×b2 …(18-2) h(j)<th_h、かつ、th_DClo ≦DC(j)≦th_DCup、かつBd(j) <th_Bd の場合は、V(j)=act(j)×b3 …(18-3) h(j)<th_h、かつ、DC(j)>th_DCup、 または、 h(j)<th_h、かつ、DC(j)<th_DClo の場合は、V(j)=act(j) …(18-4) …(18)
Next, the control unit 18 generates an evaluation value V (j) of the MB based on Expression 18 (St16). When h (j) ≧ th_h, V (j) = act (j) × b1 (18-1) h (j) <th_h, and th_DClo ≦ DC (j) ≦ th_DCup, and Bd (j) When ≧ th_Bd, V (j) = act (j) × b2 (18-2) When h (j) <th_h, and when th_DClo ≦ DC (j) ≦ th_DCup, and when Bd (j) <th_Bd V (j) = act (j) × b3 (18-3) h (j) <th_h and DC (j)> th_DCup, or h (j) <th_h and DC (j) In the case of <th_DClo, V (j) = act (j) (18-4) (18)

【0127】ここで、th_hは、肌色と判別するための閾
値である。b1、b2およびb3は、視覚特性を考慮して、0
<b1<b2<b3<1を満たす任意の定数とする。すなわ
ち、MBが肌色ならば、アクティビティなど他の条件に拘
わらず、評価値V(j)を最も小さい値b1とし(式18-
1)、ある明るさの範囲で残差が大きいところは、ノイ
ズが目立ちやすいことから評価値V(j)を次に小さい値b2
とし(式18-2)、それ以外の残差値の範囲では、評価
値V(j)をb3とする(式18-3)。例えば、b1=0.5、b2
=0.7、b3=0.8とする。
Here, th_h is a threshold value for determining a skin color. b1, b2 and b3 are 0 in consideration of visual characteristics.
<B1 <b2 <b3 <1 Any constant that satisfies <1. That is, if MB is a skin color, the evaluation value V (j) is set to the smallest value b1 regardless of other conditions such as the activity (Equation 18-
1) When the residual is large in a certain brightness range, the evaluation value V (j) is set to the next smaller value b2 because the noise is conspicuous.
(Equation 18-2), and in the other range of the residual value, the evaluation value V (j) is set to b3 (Equation 18-3). For example, b1 = 0.5, b2
= 0.7 and b3 = 0.8.

【0128】制御部18は、St11ないしSt16を
フレーム内のすべてのMBについて実行する(St1
7)。次に、制御部18は、発生ビット量を読み取る
(St18)。次に、制御部18は、ピクチャごとにピ
クチャ目標ビット量を設定し、MB単位に量子化スケール
の基準値を設定する(St19)。
The control unit 18 executes St11 to St16 for all MBs in the frame (St1
7). Next, the control unit 18 reads the generated bit amount (St18). Next, the control unit 18 sets a picture target bit amount for each picture, and sets a quantization scale reference value for each MB (St19).

【0129】次に、制御部18は、補正係数Nv(j)を式
19に従って生成する(St20)。 Nv(j)=(R×V(j)+avg_V)/(V(j)+R×avg_V) …(19) ここで、avg_Vは、ピクチャ内におけるV(j)の平均値で
あり、Rは、式7で示した第1の実施形態と同様に補正
係数Nv(j)の範囲を決定する。
Next, the control unit 18 generates a correction coefficient Nv (j) according to Equation 19 (St20). Nv (j) = (R × V (j) + avg_V) / (V (j) + R × avg_V) (19) where avg_V is the average value of V (j) in the picture, and R is The range of the correction coefficient Nv (j) is determined as in the first embodiment shown in Expression 7.

【0130】次に、制御部18は、求めた補正係数Nv
(j)を式20に用いて当該被写体のMBに対する量子化ス
ケールQ(j)を補正する(St21)。 Q(j)=refQ(j)×Nv(j) …(20)
Next, the control section 18 determines the correction coefficient Nv
Using (j) in Expression 20, the quantization scale Q (j) for the MB of the subject is corrected (St21). Q (j) = refQ (j) × Nv (j) (20)

【0131】次に、制御部18は、St20およびSt
21をフレーム内のすべてのMBについて実行させる(S
t22)。
Next, the control unit 18 sets St20 and St
21 for all MBs in the frame (S
t22).

【0132】このように本実施形態に係る画像符号化装
置は、撮影者や視聴者などが関心の高い被写体における
特徴的な色を含むMBを検出することにより、全画像中に
おける当該被写体を判別する。そして、画像符号化装置
は、視覚特性に基づいて求めた補正係数を用いて、検出
されたMBに対する量子化スケール値を視覚特性に応じて
割り振ることで、特定の被写体の再生画質を第1の実施
形態の場合に比べより改善する。
As described above, the image encoding apparatus according to the present embodiment detects the MB including the characteristic color of the subject of interest to the photographer, the viewer, and the like, thereby determining the subject in the entire image. I do. Then, the image encoding device allocates a quantization scale value for the detected MB in accordance with the visual characteristic using the correction coefficient obtained based on the visual characteristic, thereby setting the reproduction image quality of the specific subject to the first. It is more improved than the case of the embodiment.

【0133】[0133]

【発明の効果】本発明は、特定の色を設定することで画
像中において細かく量子化したい部分を特定することが
できる。本発明は、撮影者や視聴者の関心が高い部分や
重要と考える部分を色で設定することで、このような部
分を細かく量子化することができるので、関心の高い・
重要な部分の画質を向上することができる。
According to the present invention, it is possible to finely specify a portion to be quantized in an image by setting a specific color. According to the present invention, by setting, by color, a portion that the photographer or viewer is interested in or a portion that is considered important, such a portion can be quantized finely.
The image quality of important parts can be improved.

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

【図1】第1の実施形態における画像符号化装置の構成
を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of an image encoding device according to a first embodiment.

【図2】第1の実施形態における画像符号化装置の主要
な処理を説明するフローチャートである。
FIG. 2 is a flowchart illustrating main processing of the image encoding device according to the first embodiment.

【図3】色差信号空間における特定の色とその領域と関
係を示す図である。
FIG. 3 is a diagram showing a relationship between a specific color and its area in a color difference signal space.

【図4】画像復号装置の構成を示すブロック図である。FIG. 4 is a block diagram illustrating a configuration of an image decoding device.

【図5】カメラ一体型ディジタル記録再生装置の構成を
示すブロック図である。
FIG. 5 is a block diagram showing a configuration of a camera-integrated digital recording / reproducing apparatus.

【図6】第2の実施形態における画像符号化装置の構成
を示すブロック図である。
FIG. 6 is a block diagram illustrating a configuration of an image encoding device according to a second embodiment.

【図7】第2の実施形態における画像符号化装置の主要
な処理を説明するフローチャートである。
FIG. 7 is a flowchart illustrating main processing of an image encoding device according to a second embodiment.

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

11・・・画面並替部、12・・・減算部、13・・・
スイッチ、14・・・離散コサイン変換部、15・・・
量子化部、16・・・可変長符号化部、17・・・バッ
ファメモリ、18・・・制御部、21・・・逆量子化
部、22・・・逆離散コサイン変換部、23・・・加算
部、24、26・・・フレームメモリ、25・・・動き
補償部、27・・・動き検出部、28・・・残差演算
部、31・・・フレームコンプレキシティ演算部、32
・・・アクティビティ演算部、33・・・直流成分演算
部、34・・・肌色成分検出部
11 ... screen rearrangement unit, 12 ... subtraction unit, 13 ...
Switch, 14 ... discrete cosine transform unit, 15 ...
Quantization unit, 16: variable length coding unit, 17: buffer memory, 18: control unit, 21: inverse quantization unit, 22: inverse discrete cosine transform unit, 23 ... Addition units, 24, 26: Frame memory, 25: Motion compensation unit, 27: Motion detection unit, 28: Residual operation unit, 31: Frame complexity operation unit, 32
... Activity calculator, 33 ... DC component calculator, 34 ... Skin color component detector

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5C057 AA01 EA02 EA07 EF00 EG08 EL01 EM08 EM09 EM13 EM16 GG01 GH03 GH05 GJ09 GM01 5C059 KK02 MA00 MA22 MA23 MC11 MC38 ME02 NN01 PP16 SS14 SS20 TA46 TB07 TC10 TC11 TC34 TD03 TD05 TD12 UA02 UA33  ──────────────────────────────────────────────────続 き Continued on the front page F-term (reference) 5C057 AA01 EA02 EA07 EF00 EG08 EL01 EM08 EM09 EM13 EM16 GG01 GH03 GH05 GJ09 GM01 5C059 KK02 MA00 MA22 MA23 MC11 MC38 ME02 NN01 PP16 SS14 SS20 TA46 TB07 TC10 TDTC TC TC TC

Claims (15)

【特許請求の範囲】[Claims] 【請求項1】 原画像を所定の画素数で分割したブロッ
クごとに符号化する画像符号化装置において、 各ブロックの色が所定の色であるか否かを判定する色判
定手段と、 所定の色のブロックにおける量子化スケールが所定の色
ではないブロックにおける量子化スケールよりも小さく
なるように、前記色判定手段の出力に応じて各ブロック
の量子化スケールを変更する量子化スケール変更手段
と、 前記量子化スケール変更手段で決定された各量子化スケ
ールで各ブロックの画像を量子化する量子化手段とを備
えることを特徴とする画像符号化装置。
1. An image coding apparatus for coding an original image for each block obtained by dividing the original image by a predetermined number of pixels, comprising: a color determination unit configured to determine whether a color of each block is a predetermined color; Quantization scale changing means for changing the quantization scale of each block according to the output of the color determination means, so that the quantization scale in the color block is smaller than the quantization scale in the block which is not the predetermined color, An image encoding device comprising: a quantization unit that quantizes an image of each block at each quantization scale determined by the quantization scale changing unit.
【請求項2】 前記量子化スケール変更手段は、さら
に、前記原画像に割り当てられた符号化データ量を実質
的に維持するように、各ブロックの量子化スケールを変
更することを特徴とする請求項1に記載の画像符号化装
置。
2. The quantization scale changing means further changes a quantization scale of each block so as to substantially maintain the amount of encoded data assigned to the original image. Item 2. The image encoding device according to Item 1.
【請求項3】 前記色判定手段は、各ブロックについて
画素ごとに所定の色を判定するとともに、ブロック内の
全画素数に対する所定の色の画素が占める割合をさらに
判定し、 前記量子化スケール変更手段は、前記割合が大きくなる
に従って量子化スケールが小さくなるように、前記割合
に応じて所定の色のブロックの量子化スケールをさらに
変更することを特徴とする請求項1に記載の画像符号化
装置。
3. The method according to claim 1, wherein the color determining unit determines a predetermined color for each pixel for each block, and further determines a ratio of a pixel of the predetermined color to the total number of pixels in the block. 2. The image coding apparatus according to claim 1, wherein the means further changes the quantization scale of the block of a predetermined color in accordance with the ratio such that the quantization scale decreases as the ratio increases. apparatus.
【請求項4】 前記色判定手段は、ブロック内における
全画素に対する色差信号の平均値を用いて、ブロックの
色を判定することを特徴とする請求項1に記載の画像符
号化装置。
4. The image coding apparatus according to claim 1, wherein the color determination unit determines the color of the block using an average value of the color difference signals for all pixels in the block.
【請求項5】 前記量子化スケール変更手段は、所定の
色と判定されたブロックの周辺ブロックに対する量子化
スケールを所定の色ではないブロックの量子化スケール
よりも小さい量子化スケールにさらに変更することを特
徴とする請求項1に記載の画像符号化装置。
5. The quantization scale changing means further changes a quantization scale for a peripheral block of a block determined to be a predetermined color to a quantization scale smaller than a quantization scale of a block which is not a predetermined color. The image encoding device according to claim 1, wherein:
【請求項6】 前記量子化スケール変更手段は、量子化
スケールを変更する場合に、さらにブロックが画面中の
所定の領域内にある場合に量子化スケールを変更するこ
とを特徴とする請求項1に記載の画像符号化装置。
6. The quantization scale changing unit changes the quantization scale when changing the quantization scale and when the block is within a predetermined area on the screen. An image encoding device according to claim 1.
【請求項7】 前記所定の色は、肌色であることを特徴
とする請求項1に記載の画像符号化装置。
7. The image encoding apparatus according to claim 1, wherein the predetermined color is a flesh color.
【請求項8】 画像のアクティビティを求めるアクティ
ビティ演算手段をさらに備え、 前記量子化スケール変更手段は、量子化スケールを変更
する場合に、さらに前記アクティビティ演算手段からの
アクティビティに応じて量子化スケールを変更すること
を特徴とする請求項1に記載の画像符号化装置。
8. An image processing apparatus further comprising: activity calculating means for obtaining an image activity; wherein the quantization scale changing means changes the quantization scale according to the activity from the activity calculating means when changing the quantization scale. The image encoding device according to claim 1, wherein
【請求項9】 各ブロックの輝度平均値を求める輝度平
均値演算手段をさらに備え、 前記量子化スケール変更手段は、量子化スケールを変更
する場合に、さらに前記輝度平均値演算手段からの輝度
平均値に応じて量子化スケールを変更することを特徴と
する請求項1に記載の画像符号化装置。
9. The image processing apparatus according to claim 1, further comprising: a brightness average value calculating unit that calculates a brightness average value of each block; wherein the quantization scale changing unit further includes a brightness average value from the brightness average value calculating unit when the quantization scale is changed. 2. The image encoding apparatus according to claim 1, wherein the quantization scale is changed according to the value.
【請求項10】 予測画像データにおける動きベクトル
の残差値を求める残差値演算手段をさらに備え、 前記量子化スケール変更手段は、量子化スケールを変更
する場合に、さらに前記残差値演算手段からの残差値に
応じて量子化スケールを変更することを特徴とする請求
項1に記載の画像符号化装置。
10. A residual value calculating means for calculating a residual value of a motion vector in predicted image data, wherein the quantization scale changing means further changes the residual value when changing a quantization scale. 2. The image coding apparatus according to claim 1, wherein the quantization scale is changed according to a residual value from the image data.
【請求項11】 所定の画素数から成るブロックに分割
された画像を各ブロックごとに2次元直交変換によって
符号化に適するデータに変換する直交変換手段と、 各ブロックの色が所定の色であるか否かを判定する色判
定手段と、 所定の色のブロックにおける量子化スケールが所定の色
ではないブロックにおける量子化スケールよりも小さく
なるように、前記色判定手段の出力に応じて各ブロック
の量子化スケールを変更する量子化スケール変更手段
と、 前記量子化スケール変更手段で決定された各量子化スケ
ールで各ブロックの画像を量子化する量子化手段と、 前記量子化手段の出力を予め定められた符号表に従って
可変長符号化する可変長符号化手段とを備えることを特
徴とする画像符号化装置。
11. An orthogonal transformation means for transforming an image divided into blocks each having a predetermined number of pixels into data suitable for encoding by two-dimensional orthogonal transformation for each block, and the color of each block is a predetermined color. Color determination means for determining whether or not each of the blocks has a predetermined color in accordance with an output of the color determination means such that a quantization scale in a block of a predetermined color is smaller than a quantization scale in a block which is not a predetermined color. Quantization scale changing means for changing a quantization scale; quantization means for quantizing an image of each block at each quantization scale determined by the quantization scale changing means; and an output of the quantization means being predetermined. And a variable-length coding unit for performing variable-length coding according to the obtained code table.
【請求項12】 原画像を所定の画素数で分割したブロ
ックごとに符号化する画像符号化方法において、 各ブロックの色が所定の色であるか否かを判定する色判
定ステップと、 所定の色のブロックにおける量子化スケールが所定の色
ではないブロックにおける量子化スケールよりも小さく
なるように、前記色判定ステップの判断結果に応じて各
ブロックの量子化スケールを変更する量子化スケール変
更ステップと、 前記量子化スケール変更ステップで決定された各量子化
スケールで各ブロックの画像を量子化する量子化ステッ
プとを備えることを特徴とする画像符号化方法。
12. An image encoding method for encoding an original image for each block obtained by dividing the original image by a predetermined number of pixels, comprising: a color determination step of determining whether a color of each block is a predetermined color; A quantization scale changing step of changing the quantization scale of each block according to the result of the color determination step so that the quantization scale in the color block is smaller than the quantization scale in the block that is not the predetermined color; A quantization step of quantizing an image of each block with each quantization scale determined in the quantization scale changing step.
【請求項13】 コンピュータに原画像を所定の画素数
で分割したブロックごとに符号化させる画像符号化プロ
グラムにおいて、 各ブロックの色が所定の色であるか否かを判定する色判
定ステップと、 所定の色のブロックにおける量子化スケールが所定の色
ではないブロックにおける量子化スケールよりも小さく
なるように、前記色判定ステップの判断結果に応じて各
ブロックの量子化スケールを変更する量子化スケール変
更ステップと、 前記量子化スケール変更ステップで決定された各量子化
スケールで各ブロックの画像を量子化する量子化ステッ
プとを備えることを特徴とする画像符号化プログラム。
13. An image encoding program for causing a computer to encode an original image for each block obtained by dividing the original image by a predetermined number of pixels, a color determining step of determining whether a color of each block is a predetermined color, A quantization scale change that changes the quantization scale of each block according to the result of the color determination step so that the quantization scale of the block of the predetermined color is smaller than the quantization scale of the block that is not the predetermined color. And a quantization step of quantizing an image of each block at each quantization scale determined in the quantization scale changing step.
【請求項14】 コンピュータに原画像を所定の画素数
で分割したブロックごとに符号化させる画像符号化プロ
グラムを記録したコンピュータ読み取り可能な記録媒体
において、 各ブロックの色が所定の色であるか否かを判定する色判
定ステップと、 所定の色のブロックにおける量子化スケールが所定の色
ではないブロックにおける量子化スケールよりも小さく
なるように、前記色判定ステップの判断結果に応じて各
ブロックの量子化スケールを変更する量子化スケール変
更ステップと、 前記量子化スケール変更ステップで決定された各量子化
スケールで各ブロックの画像を量子化する量子化ステッ
プとを備える画像符号化プログラムを記録したことを特
徴とする記録媒体。
14. A computer-readable recording medium in which an image encoding program for causing a computer to encode an original image in blocks divided by a predetermined number of pixels is recorded, and whether a color of each block is a predetermined color or not. A color determination step of determining whether the quantization scale of a block of a predetermined color is smaller than a quantization scale of a block that is not a predetermined color. A quantization scale changing step of changing the quantization scale, and an image encoding program comprising a quantization step of quantizing an image of each block at each quantization scale determined in the quantization scale changing step. Characteristic recording medium.
【請求項15】 被写体の映像を撮影しディジタル映像
信号に変換して出力する撮影手段と、前記撮影手段から
の画像データを圧縮符号化する画像符号化手段と、前記
画像符号化手段で符号化された符号化データを記録媒体
に記録する記録手段とを備えるディジタルカメラにおい
て、 前記画像符号化手段は、請求項11に記載の画像符号化
装置であることを特徴とするディジタルカメラ。
15. An image capturing means for capturing an image of a subject, converting the image into a digital video signal and outputting the digital image signal, an image encoding means for compressively encoding image data from the image capturing means, and encoding by the image encoding means. A digital camera comprising: a recording unit that records encoded data on a recording medium, wherein the image encoding unit is the image encoding device according to claim 11.
JP2001030963A 2001-02-07 2001-02-07 Image-coding method, image coder, program and recording medium Pending JP2002238060A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001030963A JP2002238060A (en) 2001-02-07 2001-02-07 Image-coding method, image coder, program and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001030963A JP2002238060A (en) 2001-02-07 2001-02-07 Image-coding method, image coder, program and recording medium

Publications (1)

Publication Number Publication Date
JP2002238060A true JP2002238060A (en) 2002-08-23

Family

ID=18895110

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001030963A Pending JP2002238060A (en) 2001-02-07 2001-02-07 Image-coding method, image coder, program and recording medium

Country Status (1)

Country Link
JP (1) JP2002238060A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006246376A (en) * 2005-03-07 2006-09-14 Ricoh Co Ltd Unit and method for processing image, program, and information recording medium
JP2007295370A (en) * 2006-04-26 2007-11-08 Sony Corp Encoding device and method, and program
JP2009005238A (en) * 2007-06-25 2009-01-08 Sony Computer Entertainment Inc Coder and encoding method
JP2009005239A (en) * 2007-06-25 2009-01-08 Sony Computer Entertainment Inc Encoder and encoding method
JP2009130723A (en) * 2007-11-26 2009-06-11 Sony Corp Encoder, encoding method, program, and, imaging apparatus
JP2009135902A (en) * 2007-10-29 2009-06-18 Canon Inc Encoding device, control method of the encoding device, and computer program
JP2009212749A (en) * 2008-03-04 2009-09-17 Mega Chips Corp Encoder
JP2009212721A (en) * 2008-03-03 2009-09-17 Nec Corp Video image providing device and video image providing method
JP2010166263A (en) * 2009-01-14 2010-07-29 Canon Inc Image processor, image processing method, and program
JP2010206751A (en) * 2009-03-06 2010-09-16 Toshiba Corp Moving image compression coding device
US8126277B2 (en) 2007-02-28 2012-02-28 Sanyo Electric Co., Ltd. Image processing method, image processing apparatus and image pickup apparatus using the same
JP2018050256A (en) * 2016-09-23 2018-03-29 日本電信電話株式会社 Video encoding method, video encoding apparatus, and video encoding program

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06133303A (en) * 1992-10-21 1994-05-13 Nippon Telegr & Teleph Corp <Ntt> Moving picture coder
JPH06225340A (en) * 1992-07-24 1994-08-12 Matsushita Electric Ind Co Ltd High definition video encoding system having color sensitive quantization
JPH07154798A (en) * 1993-05-31 1995-06-16 Canon Inc Method and device for picture encoding
JPH10164581A (en) * 1996-12-03 1998-06-19 Sony Corp Method and device for coding image signal and signal-recording medium
JPH10302396A (en) * 1997-04-30 1998-11-13 Sony Corp Signal coding method, signal coding device, signal recording medium, and signal transmitting method
WO1999022518A1 (en) * 1997-10-28 1999-05-06 Siemens Aktiengesellschaft Method and device for processing a digitized image
WO2000000932A1 (en) * 1998-06-26 2000-01-06 Sarnoff Corporation Method and apparatus for block classification and adaptive bit allocation
JP2000013608A (en) * 1998-06-23 2000-01-14 Ricoh Co Ltd Image processing method
JP2000078588A (en) * 1998-08-31 2000-03-14 Sharp Corp Moving picture encoding device
WO2000018131A1 (en) * 1998-09-18 2000-03-30 Sarnoff Corporation Intra-frame quantizer selection for video compression

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06225340A (en) * 1992-07-24 1994-08-12 Matsushita Electric Ind Co Ltd High definition video encoding system having color sensitive quantization
JPH06133303A (en) * 1992-10-21 1994-05-13 Nippon Telegr & Teleph Corp <Ntt> Moving picture coder
JPH07154798A (en) * 1993-05-31 1995-06-16 Canon Inc Method and device for picture encoding
JPH10164581A (en) * 1996-12-03 1998-06-19 Sony Corp Method and device for coding image signal and signal-recording medium
JPH10302396A (en) * 1997-04-30 1998-11-13 Sony Corp Signal coding method, signal coding device, signal recording medium, and signal transmitting method
WO1999022518A1 (en) * 1997-10-28 1999-05-06 Siemens Aktiengesellschaft Method and device for processing a digitized image
JP2001522174A (en) * 1997-10-28 2001-11-13 シーメンス アクチエンゲゼルシヤフト Digital image processing method and processing apparatus
JP2000013608A (en) * 1998-06-23 2000-01-14 Ricoh Co Ltd Image processing method
WO2000000932A1 (en) * 1998-06-26 2000-01-06 Sarnoff Corporation Method and apparatus for block classification and adaptive bit allocation
JP2000078588A (en) * 1998-08-31 2000-03-14 Sharp Corp Moving picture encoding device
WO2000018131A1 (en) * 1998-09-18 2000-03-30 Sarnoff Corporation Intra-frame quantizer selection for video compression

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4656497B2 (en) * 2005-03-07 2011-03-23 株式会社リコー Image processing apparatus, image processing method, program, and information recording medium
JP2006246376A (en) * 2005-03-07 2006-09-14 Ricoh Co Ltd Unit and method for processing image, program, and information recording medium
JP2007295370A (en) * 2006-04-26 2007-11-08 Sony Corp Encoding device and method, and program
US8126277B2 (en) 2007-02-28 2012-02-28 Sanyo Electric Co., Ltd. Image processing method, image processing apparatus and image pickup apparatus using the same
JP2009005238A (en) * 2007-06-25 2009-01-08 Sony Computer Entertainment Inc Coder and encoding method
JP2009005239A (en) * 2007-06-25 2009-01-08 Sony Computer Entertainment Inc Encoder and encoding method
JP2009135902A (en) * 2007-10-29 2009-06-18 Canon Inc Encoding device, control method of the encoding device, and computer program
JP2009130723A (en) * 2007-11-26 2009-06-11 Sony Corp Encoder, encoding method, program, and, imaging apparatus
JP4626644B2 (en) * 2007-11-26 2011-02-09 ソニー株式会社 Encoding apparatus, encoding method, program, and imaging apparatus
US8340174B2 (en) 2007-11-26 2012-12-25 Sony Corporation Image processing device and image processing method
JP2009212721A (en) * 2008-03-03 2009-09-17 Nec Corp Video image providing device and video image providing method
JP2009212749A (en) * 2008-03-04 2009-09-17 Mega Chips Corp Encoder
JP2010166263A (en) * 2009-01-14 2010-07-29 Canon Inc Image processor, image processing method, and program
JP2010206751A (en) * 2009-03-06 2010-09-16 Toshiba Corp Moving image compression coding device
US8520742B2 (en) 2009-03-06 2013-08-27 Kabushiki Kaisha Toshiba Moving image compression-coding device, method of compression-coding moving image, and H.264 moving image compression-coding device
JP2018050256A (en) * 2016-09-23 2018-03-29 日本電信電話株式会社 Video encoding method, video encoding apparatus, and video encoding program

Similar Documents

Publication Publication Date Title
US8175149B2 (en) Method and apparatus for controlling bitrate of scalable video stream
US8254702B2 (en) Image compression method and image processing apparatus
JP3788823B2 (en) Moving picture encoding apparatus and moving picture decoding apparatus
US20060045381A1 (en) Image processing apparatus, shooting apparatus and image display apparatus
JP2001245303A (en) Moving picture coder and moving picture coding method
JP2002058029A (en) Device and method for encoding moving picture and medium recording program
JP4817990B2 (en) IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JPH06153152A (en) Moving picture coding device and method
JP2002238060A (en) Image-coding method, image coder, program and recording medium
TWI247546B (en) A video encoding method which carries out the encoding of P frame or B frame by utilizing I frame
JP2000350211A (en) Method and device for encoding moving picture
US7593463B2 (en) Video signal coding method and video signal encoder
JP3551666B2 (en) Moving picture coding method and moving picture coding apparatus
JP2003179921A (en) Coded image decoding apparatus
JP3511893B2 (en) Video signal encoding method and apparatus
JPH05183872A (en) Device and method for moving picture encoding
JP2003023637A (en) Image coding method and image coding device
JPH09130748A (en) Image signal processing unit and recording/reproducing device
JPH10108197A (en) Image coder, image coding control method, and medium storing image coding control program
JPH11289515A (en) Picture signal processor and its method, picture signal recorder and its method and recording medium
JP3307367B2 (en) Variable transfer rate coding device
JPH0918873A (en) Image encoding method and device and image recording medium
JP3922581B2 (en) Variable transfer rate encoding method and apparatus
JP4195978B2 (en) Video signal encoding apparatus and method, and recording medium
JP4747109B2 (en) Calculation amount adjustment device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071205

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100824

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100831

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101026

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110315

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110705