Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5355226B2 - Encoding apparatus, encoding method, and program - Google Patents
[go: Go Back, main page]

JP5355226B2 - Encoding apparatus, encoding method, and program - Google Patents

Encoding apparatus, encoding method, and program Download PDF

Info

Publication number
JP5355226B2
JP5355226B2 JP2009129797A JP2009129797A JP5355226B2 JP 5355226 B2 JP5355226 B2 JP 5355226B2 JP 2009129797 A JP2009129797 A JP 2009129797A JP 2009129797 A JP2009129797 A JP 2009129797A JP 5355226 B2 JP5355226 B2 JP 5355226B2
Authority
JP
Japan
Prior art keywords
face
size
excluded
exclusion
importance
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.)
Expired - Fee Related
Application number
JP2009129797A
Other languages
Japanese (ja)
Other versions
JP2010278797A5 (en
JP2010278797A (en
Inventor
幸史 小林
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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2009129797A priority Critical patent/JP5355226B2/en
Publication of JP2010278797A publication Critical patent/JP2010278797A/en
Publication of JP2010278797A5 publication Critical patent/JP2010278797A5/en
Application granted granted Critical
Publication of JP5355226B2 publication Critical patent/JP5355226B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

本発明は、画像内に存在する複数の顔の相対的な重要度に基づいて符号量の制御を行うことができる符号化装置に関する。 The present invention relates to an encoding apparatus and the like that can control the amount of code based on the relative importance of a plurality of faces existing in an image.

特開2007−201980号公報JP 2007-201980 A

近年、撮像素子の画素数が増え、1920画素×1080画素といった高解像度映像(HD映像)を扱う製品が次々と開発されている。そういったHD映像の動画像データを扱うデジタルビデオカメラが商品化されている。民生用のデジタルビデオカメラでは一般に、記録データ量を削減するために動画像データを圧縮符号化した上で、フラッシュメモリ又はハードディスク等の記録媒体に記録する。   In recent years, the number of pixels of the image sensor has increased, and products that handle high-resolution video (HD video) of 1920 pixels × 1080 pixels have been developed one after another. Digital video cameras that handle such HD video data have been commercialized. In general, a consumer digital video camera compresses and encodes moving image data in order to reduce the amount of recording data, and then records the data on a recording medium such as a flash memory or a hard disk.

動画像圧縮方式として、MPEG−2やH.264が広く知られている。これらの動画像圧縮方式では、視覚的に重要である画像領域に重点的に符号量を割り当てることにより、効率的で高画質化なデータ圧縮を実現している。   As a moving image compression system, MPEG-2 or H.264 is used. H.264 is widely known. In these moving image compression systems, efficient and high-quality data compression is realized by assigning code amounts to image areas that are visually important.

視覚的に重要である画像領域の一つとして、人物の顔が挙げられる。符号化前に顔部分を検出し、検出された顔部分に対してより多くの符号量を割り当てることで、高画質化を実現できる。   One of the image areas that are visually important is the face of a person. Image quality can be improved by detecting a face part before encoding and assigning a larger amount of code to the detected face part.

ただし、同じように顔として検出された領域であっても、視覚的に重要な顔と重要ではない顔があると考えられる。例えば、運動会などで自分の子供を中心に撮影を行っている場合、自分の子供の顔は非常に重要な顔であるが、その背景として映っている他人の顔はさほど重要ではない。重要な顔かどうかを判定する手法として、顔のサイズ情報、位置情報又は傾き情報などから重要度を計算する方法が知られている(特許文献1参照)。   However, even in a region that is detected as a face in the same way, it is considered that there are visually important faces and unimportant faces. For example, when taking a picture centering on a child at an athletic meet or the like, the face of the child is a very important face, but the face of the other person shown as the background is not so important. As a method for determining whether or not the face is important, a method of calculating importance from face size information, position information, or tilt information is known (see Patent Document 1).

従来の方法は、顔の絶対的な重要度を算出するものであり、その絶対的な重要度に応じて符号の割当量を決定している。従って、従来例では、相対的に重要度が低い場合でも高画質化の対象としてしまうことがあり、その結果、全体として符号化効率を損なうことがある。   The conventional method calculates the absolute importance of the face, and determines the code allocation amount according to the absolute importance. Therefore, in the conventional example, even when the importance is relatively low, the image quality may be targeted, and as a result, the coding efficiency may be impaired as a whole.

本発明は、このような不都合を解消し、画像内に存在する複数の顔の相対的な重要度に基づいて割当て符号量を決定することができるようにすることを目的とする。 An object of the present invention is to eliminate such inconveniences and to determine an assigned code amount based on the relative importance of a plurality of faces existing in an image .

本発明に係る符号化装置は、画像データを符号化するための符号化装置であって、前記画像データから顔領域を検出する検出手段と、前記検出手段によって検出された複数の顔領域の中から第1のサイズよりも小さいサイズの顔領域を除外する第1の除外手段と、前記第1の除外手段によって除外されなかった顔領域の数が2以上である場合に、前記第1の除外手段によって除外されなかった顔の中から最も重要度の高い顔を決定し、前記最も重要度の高い顔のサイズに基づいて第2のサイズを決定し、前記第1の除外手段によって除外されなかった顔の中から前記第2のサイズよりも小さい顔を除外する第2の除外手段と、前記最も重要度の高い顔のサイズと、前記第2の除外手段によって除外されなかった顔のサイズとに基づいて、前記第2の除外手段によって除外されなかった顔についての重要度を決定する重要度決定手段と、前記第2の除外手段によって除外されなかった顔についての重要度に基づいて、前記第2の除外手段によって除外されなかった顔の領域についての量子化ステップサイズを制御する制御手段とを有することを特徴とする。
本発明に係る符号化方法は、画像データを符号化するための符号化方法であって、前記画像データから顔領域を検出する検出ステップと、前記検出ステップにおいて検出された複数の顔領域の中から第1のサイズよりも小さいサイズの顔領域を除外する第1の除外ステップと、前記第1の除外ステップにおいて除外されなかった顔領域の数が2以上である場合に、前記第1の除外ステップにおいて除外されなかった顔の中から最も重要度の高い顔を決定し、前記最も重要度の高い顔のサイズに基づいて第2のサイズを決定し、前記第1の除外ステップにおいて除外されなかった顔の中から前記第2のサイズよりも小さい顔を除外する第2の除外ステップと、前記最も重要度の高い顔のサイズと、前記第2の除外ステップにおいて除外されなかった顔のサイズとに基づいて、前記第2の除外ステップにおいて除外されなかった顔についての重要度を決定する重要度決定ステップと、前記第2の除外ステップにおいて除外されなかった顔についての重要度に基づいて、前記第2の除外ステップにおいて除外されなかった顔の領域についての量子化ステップサイズを制御する制御ステップとを有することを特徴とする。
本発明に係るプログラムの一つは、画像データを符号化するための符号化装置としてコンピュータを機能させるためのプログラムであって、前記画像データから顔領域を検出する検出手段と、前記検出手段によって検出された複数の顔領域の中から第1のサイズよりも小さいサイズの顔領域を除外する第1の除外手段と、前記第1の除外手段によって除外されなかった顔領域の数が2以上である場合に、前記第1の除外手段によって除外されなかった顔の中から最も重要度の高い顔を決定し、前記最も重要度の高い顔のサイズに基づいて第2のサイズを決定し、前記第1の除外手段によって除外されなかった顔の中から前記第2のサイズよりも小さい顔を除外する第2の除外手段と、前記最も重要度の高い顔のサイズと、前記第2の除外手段によって除外されなかった顔のサイズとに基づいて、前記第2の除外手段によって除外されなかった顔についての重要度を決定する重要度決定手段と、前記第2の除外手段によって除外されなかった顔についての重要度に基づいて、前記第2の除外手段によって除外されなかった顔の領域についての量子化ステップサイズを制御する制御手段として前記コンピュータを機能させるためのプログラムである。
本発明に係るプログラムの一つは、画像データを符号化するための符号化方法をコンピュータに実行させるためのプログラムであって、前記画像データから顔領域を検出する検出ステップと、前記検出ステップにおいて検出された複数の顔領域の中から第1のサイズよりも小さいサイズの顔領域を除外する第1の除外ステップと、前記第1の除外ステップにおいて除外されなかった顔領域の数が2以上である場合に、前記第1の除外ステップにおいて除外されなかった顔の中から最も重要度の高い顔を決定し、前記最も重要度の高い顔のサイズに基づいて第2のサイズを決定し、前記第1の除外ステップにおいて除外されなかった顔の中から前記第2のサイズよりも小さい顔を除外する第2の除外ステップと、前記最も重要度の高い顔のサイズと、前記第2の除外ステップにおいて除外されなかった顔のサイズとに基づいて、前記第2の除外ステップにおいて除外されなかった顔についての重要度を決定する重要度決定ステップと、前記第2の除外ステップにおいて除外されなかった顔についての重要度に基づいて、前記第2の除外ステップにおいて除外されなかった顔の領域についての量子化ステップサイズを制御する制御ステップとを前記コンピュータに実行させるためのプログラムである。
Engaging Ru marks Goka apparatus of the present invention is an encoding apparatus for encoding image data, a detecting means for detecting a face region from the image data, a plurality of face areas detected by said detecting means The first exclusion means for excluding a face area having a size smaller than the first size from the above, and the number of face areas not excluded by the first exclusion means is two or more. The face with the highest importance is determined from the faces not excluded by the exclusion means, the second size is determined based on the size of the face with the highest importance, and the face is excluded by the first exclusion means A second exclusion means for excluding faces smaller than the second size from the faces that have not been selected, the size of the most important face, and the face that has not been excluded by the second exclusion means Based on size and above Importance determining means for determining the importance of the face not excluded by the two exclusion means, and the importance of the face not excluded by the second exclusion means by the second exclusion means And a control means for controlling a quantization step size for a face area that has not been excluded .
Engaging Ru marks Goka method according to the present invention, there is provided a coding method for encoding image data, a detection step of detecting a face region from the image data, a plurality of face areas detected in said detecting step A first excluding step of excluding a face area having a size smaller than the first size from the above, and the number of face areas not excluded in the first excluding step is two or more. The face having the highest importance is determined from the faces not excluded in the exclusion step, the second size is determined based on the size of the face having the highest importance, and the face is excluded in the first exclusion step. A second exclusion step of excluding a face smaller than the second size from the faces that have not been processed, the size of the most important face, and the face that has not been excluded in the second exclusion step The importance level determining step for determining the importance level for the face that is not excluded in the second exclusion step, and the importance level for the face that is not excluded in the second exclusion step. And a control step for controlling a quantization step size for a face region that is not excluded in the second exclusion step .
One of the programs according to the present invention is a program for causing a computer to function as an encoding device for encoding image data, the detection means for detecting a face area from the image data, and the detection means A first exclusion means for excluding a face area having a size smaller than the first size from the plurality of detected face areas; and the number of face areas not excluded by the first exclusion means is two or more. In some cases, the most important face is determined from the faces that are not excluded by the first exclusion means, the second size is determined based on the size of the most important face, A second exclusion means for excluding faces smaller than the second size from the faces not excluded by the first exclusion means; the size of the most important face; and the second exclusion means Therefore, based on the size of the face that has not been excluded, importance determining means for determining the importance of the face that has not been excluded by the second excluding means, and the face that has not been excluded by the second excluding means Is a program for causing the computer to function as a control unit that controls a quantization step size for a face area that is not excluded by the second exclusion unit.
One of the programs according to the present invention is a program for causing a computer to execute an encoding method for encoding image data. In the detection step for detecting a face area from the image data, and in the detection step, A first exclusion step of excluding a face region having a size smaller than the first size from a plurality of detected face regions; and the number of face regions not excluded in the first exclusion step is two or more. In some cases, the most important face is determined from the faces not excluded in the first exclusion step, a second size is determined based on the size of the most important face, A second excluding step of excluding faces smaller than the second size from the faces not excluded in the first excluding step; and the size of the most important face. And an importance level determining step for determining an importance level for the face not excluded in the second exclusion step based on the size of the face not excluded in the second exclusion step; For causing the computer to execute a control step of controlling a quantization step size for a face region not excluded in the second exclusion step based on the importance of the face not excluded in the exclusion step It is a program.

本発明によれば、画像内に存在する複数の顔の相対的な重要度に基づいて割当て符号量を決定することができる。 According to the present invention, the allocated code amount can be determined based on the relative importance of a plurality of faces existing in an image .

本発明の一実施例の概略構成ブロック図である。It is a schematic block diagram of one Example of this invention. 本実施例の顔重要度判定装置の概略構成ブロック図である。It is a schematic block diagram of the face importance degree determination apparatus of the present embodiment. 本実施例の顔重要度判定処理の動作フローチャートである。It is an operation | movement flowchart of the face importance degree determination process of a present Example. 顔重要度判定の一画像例である。It is an example of a face importance degree determination. 顔重要度判定の別の画像例である。It is another image example of face importance determination. 顔重要度判定処理の別の動作フローチャートである。It is another operation | movement flowchart of a face importance determination process.

以下、図面を参照して、本発明の実施例を詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

図1は、本発明の一実施例である画像符号化装置の概略構成ブロック図である。入力端子10には、図示しないカメラによる撮影画像データが入力する。顔重要度判定装置12は、入力端子からの入力画像データから人間の顔を検出し、各顔の重要度を判定する。そして、顔重要度判定装置12は、判定した顔重要度に従い重要でない顔を除外した顔検出結果を量子化制御部14に供給する。   FIG. 1 is a block diagram of a schematic configuration of an image encoding apparatus according to an embodiment of the present invention. Image data taken by a camera (not shown) is input to the input terminal 10. The face importance level determination device 12 detects a human face from input image data from an input terminal, and determines the importance level of each face. Then, the face importance level determination device 12 supplies the quantization control unit 14 with a face detection result that excludes an unimportant face according to the determined face importance level.

入力端子10からの入力画像データは、フレーム単位でフレームバッファ16に格納される。参照フレームバッファ20は、フレーム間予測符号化の参照画像データを記憶する。動き予測部18は、フレームバッファ16の入力画像データと参照フレームバッファ20の参照画像データとの間でブロックマッチングをとり、動きベクトルを算出する。動き予測部18は、算出した動きベクトルに従い参照画像データを画面内で移動した予測画像データを生成し、入力画像データと予測画像データとの差分(差分画像データ)を計算し、直交変換部22に供給する。直交変換部22は、差分画像データに対して離散コサイン変換を行い、変換係数を量子化部24に供給する。量子化部24は、直交変換部22からの変換係数を量子化制御部14により指定される量子化ステップサイズで量子化する。量子化された変換係数は、エントロピー符号化部26に供給され、局所復号画像の作成のために逆量子化部28に供給される。   Input image data from the input terminal 10 is stored in the frame buffer 16 in units of frames. The reference frame buffer 20 stores reference image data for interframe predictive coding. The motion prediction unit 18 performs block matching between the input image data of the frame buffer 16 and the reference image data of the reference frame buffer 20, and calculates a motion vector. The motion prediction unit 18 generates predicted image data in which the reference image data is moved within the screen according to the calculated motion vector, calculates a difference (difference image data) between the input image data and the predicted image data, and the orthogonal transform unit 22. To supply. The orthogonal transform unit 22 performs discrete cosine transform on the difference image data and supplies transform coefficients to the quantization unit 24. The quantization unit 24 quantizes the transform coefficient from the orthogonal transform unit 22 with a quantization step size specified by the quantization control unit 14. The quantized transform coefficient is supplied to the entropy encoding unit 26 and is supplied to the inverse quantization unit 28 for creating a locally decoded image.

エントロピー符号化部26は、量子化された変換係数を、ジグザグスキャンまたはオルタネートスキャン等により可変長符号化して符号データを生成する。エントロピー符号化部26はまた,動きベクトル、量子化ステップサイズ及びマクロブロック分割情報などの符号化方式情報を可変長符号化したものを符号データに付加して、符号化ストリームを生成する。エントロピー符号化部26は更に、マクロブロックごとの発生符号量を算出し、量子化制御部14に送る。   The entropy encoding unit 26 performs variable length encoding on the quantized transform coefficient by zigzag scanning, alternate scanning, or the like to generate code data. The entropy encoding unit 26 also adds a variable length encoded encoding method information such as a motion vector, a quantization step size, and macroblock division information to the code data to generate an encoded stream. The entropy encoding unit 26 further calculates the generated code amount for each macroblock and sends it to the quantization control unit 14.

量子化制御部14は、顔重要度判定装置12からの顔検出情報を参照し、量子化対象のマクロブロックが顔領域であるか否かに従い,異なる符号化を適用する。具体的には、当該マクロブロックが顔領域ではない場合、量子化制御部14は,エントロピー符号化部26からの発生符号量に従い、目標とする符号量になる量子化ステップサイズを量子化部24に設定する。当該マクロブロックが顔領域である場合、量子化制御部14は,顔重要度に応じて通常の処理よりも細かい量子化ステップサイズを量子化部24に設定する。量子化ステップサイズを細かくすることにより、顔領域に対して符号量をより多く割り当てることになり、画質の劣化を抑制できる。   The quantization control unit 14 refers to the face detection information from the face importance degree determination device 12 and applies different encoding according to whether or not the macroblock to be quantized is a face region. Specifically, when the macroblock is not a face region, the quantization control unit 14 determines the quantization step size that becomes the target code amount according to the generated code amount from the entropy encoding unit 26. Set to. When the macroblock is a face region, the quantization control unit 14 sets a quantization step size finer than that of normal processing in the quantization unit 24 according to the importance of the face. By making the quantization step size finer, a larger amount of code is allocated to the face area, and image quality deterioration can be suppressed.

逆量子化部28は、量子化部24からの量子化された変換係数を逆量子化し、ローカルデコード用の変換係数を生成し、逆直交変換部30に供給する。逆直交変換部30は、逆量子化部28からの変換係数に逆離散コサイン変換を行い、差分画像データを生成して動き補償部32に供給する。動き補償部32は、動きベクトル位置の参照画像を参照フレームバッファ20から読み出し、差分画像データを加算する。動き補償部32からの画像データは、デブロッキングフィルタ34に出力される。デブロッキングフィルタ34では、動き補償部32からの画像データにデブロッキングフィルタをかける。デブロッキングフィルタ後の画像データが、ローカルで復号化された画像データとして参照フレームバッファ20に格納される。   The inverse quantization unit 28 inversely quantizes the quantized transform coefficient from the quantization unit 24, generates a transform coefficient for local decoding, and supplies the transform coefficient to the inverse orthogonal transform unit 30. The inverse orthogonal transform unit 30 performs inverse discrete cosine transform on the transform coefficient from the inverse quantization unit 28, generates difference image data, and supplies the difference image data to the motion compensation unit 32. The motion compensation unit 32 reads the reference image at the motion vector position from the reference frame buffer 20 and adds the difference image data. The image data from the motion compensation unit 32 is output to the deblocking filter 34. The deblocking filter 34 applies a deblocking filter to the image data from the motion compensation unit 32. The image data after the deblocking filter is stored in the reference frame buffer 20 as locally decoded image data.

図2は、顔重要度判定装置12の概略構成ブロック図を示す。顔検出部40は、入力画像データから顔領域を検出し、検出された顔領域の個数と各顔のサイズ情報を最重要顔判定部42と顔重要度算出部44に供給する。最重要顔判定部42は、検出された顔のサイズ情報から最大サイズの一つの顔を最重要な顔として選択し、その顔サイズを顔基準サイズとして顔重要度算出部44に供給する。顔重要度算出部44は、顔基準サイズとそのほかの顔のサイズとを比較し、最重要の顔に対する相対サイズによって顔重要度を算出する。顔重要度算出部44はまた、最重要の顔のサイズに対する相対サイズで、ある一定以上小さいサイズの顔は、重要な顔ではないと判定して、顔検出結果から除外する。   FIG. 2 shows a schematic block diagram of the face importance degree determination device 12. The face detection unit 40 detects a face area from the input image data, and supplies the number of detected face areas and the size information of each face to the most important face determination unit 42 and the face importance degree calculation unit 44. The most important face determination unit 42 selects one face having the maximum size from the detected face size information as the most important face, and supplies the face size as a face reference size to the face importance degree calculation unit 44. The face importance degree calculation unit 44 compares the face reference size with the sizes of other faces, and calculates the face importance degree based on the relative size with respect to the most important face. The face importance calculation unit 44 also determines that a face having a size smaller than a certain size relative to the size of the most important face is not an important face, and excludes it from the face detection result.

図3は、顔重要度判定装置12の動作フローチャートを示す。まず、顔検出部40が、入力画像から顔である領域を検出する(S1)。顔が一つも検出されない場合、又は顔が一つだけ検出された場合には、それをそのまま顔検出の結果として処理を終了する(S2)。   FIG. 3 shows an operation flowchart of the face importance degree determination device 12. First, the face detection unit 40 detects a region that is a face from the input image (S1). If no face is detected, or if only one face is detected, the process ends as it is as a result of face detection (S2).

検出された顔が複数ある場合、最重要顔判定部42が、全ての顔のサイズを比較し、最も大きいサイズの顔が最も手前に存在している顔であると考え、これを最重要の顔であると判定する。この顔のサイズを顔基準サイズとする(S3)。次に、顔重要度算出部44が、最重要と判定された顔以外の顔のサイズ(size)を取得する(S4)。最重要以外の顔のサイズ(size)が、基準の顔基準サイズ(base_size)に対する一定割合(α)より小さい場合(S5)、重要ではない顔であると判定し、顔検出結果から除外する(S6)。   When there are a plurality of detected faces, the most important face determination unit 42 compares the sizes of all the faces, considers that the face with the largest size is the closest face, and regards this as the most important face. Judged to be a face. This face size is set as the face reference size (S3). Next, the face importance degree calculation unit 44 acquires the size (size) of a face other than the face determined to be the most important (S4). If the size (size) of the face other than the most important is smaller than a certain ratio (α) with respect to the reference face reference size (base_size) (S5), it is determined that the face is not important and is excluded from the face detection result ( S6).

例えば、基準の顔サイズをbase_size、判定を行う顔のサイズをsize、除外する大きさの割合をα(<1)とすると、
size<base_size×α
の場合、顔検出結果から除外する。他方、
size>=base_size×α
の場合、顔検出結果として維持する。
For example, if the base face size is base_size, the size of the face to be judged is size, and the ratio of excluded sizes is α (<1),
size <base_size × α
In this case, it is excluded from the face detection result. On the other hand,
size> = base_size × α
In this case, the face detection result is maintained.

なお、ここでいうサイズは、顔の面積であってもよいし、顔の縦方向や横方向の長さ又は対角線の長さなど、顔の大きさを表すものであれば何を用いてもよい。   The size referred to here may be the area of the face, and any size may be used as long as it represents the size of the face, such as the length of the face in the vertical and horizontal directions or the length of the diagonal line. Good.

除外されなかった顔に対して、顔重要度算出部44が、顔基準サイズからの相対サイズにより顔重要度を算出する(S7)。例えば、顔重要度を1〜10(10が最重要)で評価するとした場合、顔重要度を下記式(1)により算出する。すなわち、
顔重要度
=[10×(sizebase_size×α)/(base_size×(1-α))] (1)
ここで、[]は整数に切り上げる演算を示す。
For the faces that are not excluded, the face importance degree calculation unit 44 calculates the face importance degree based on the relative size from the face reference size (S7). For example, when the face importance is evaluated from 1 to 10 (10 is the most important), the face importance is calculated by the following formula (1). That is,
Face importance = [10 × (size base_size × α) / (base_size × (1-α))] (1)
Here, [] indicates an operation rounded up to an integer.

全ての顔について(S8)、ステップS4〜S7を繰り返す。こうすることにより、顔として検出されたが、相対的に重要ではない顔を除外でき、また、残った顔について、相対的な顔重要度を算出できる。   Steps S4 to S7 are repeated for all faces (S8). By doing so, faces that are detected as faces but are not relatively important can be excluded, and relative face importance can be calculated for the remaining faces.

図4は、顔検出部40の顔検出結果と、顔重要度算出部44による除外の例を示す。図4では、顔検出から除外する判定基準として、基準の顔サイズからの大きさの割合が1/2より小さい場合に、顔検出結果から除外するとする。すなわち、α=1/2とする。   FIG. 4 shows a face detection result of the face detection unit 40 and an example of exclusion by the face importance degree calculation unit 44. In FIG. 4, it is assumed that, as a criterion for exclusion from face detection, when the ratio of the size from the reference face size is smaller than 1/2, it is excluded from the face detection result. That is, α = ½.

ステップS1により、入力画像の中にある顔が検出される。図4では、顔50と顔52の2つの顔が検出される。ここで顔50のサイズをsize1、顔52のサイズをsize2とし、
size1>size2×2 (2)
が成立するものとする。
In step S1, a face in the input image is detected. In FIG. 4, two faces, a face 50 and a face 52, are detected. Here, the size of the face 50 is size1, the size of the face 52 is size2,
size1> size2 × 2 (2)
Is assumed to hold.

画像の中に複数の顔が存在するので(S2)、最も大きい顔である顔50を最重要の顔と判定し、そのサイズであるsize1を顔基準サイズとする(S3)。すなわち、base_size=size1となる。   Since there are a plurality of faces in the image (S2), the largest face 50 is determined as the most important face, and its size size1 is set as the face reference size (S3). That is, base_size = size1.

次に、基準の顔以外である顔52のサイズを取得する(S4)。すなわち、size=size2とする。顔検出結果から除外するかどうかを判定するために、sizeとbase_size×αを比較すると、
size<base_size×α
が成立する。この結果から、顔52は相対的に重要ではないと判定され、顔検出結果から除外される。この結果、図4に示す画像例では、顔検出結果は重要度の高い顔50のみとなる。顔50は最重要の顔なので、顔重要度は10と評価される。
Next, the size of the face 52 other than the reference face is acquired (S4). That is, size = size2. To determine whether to exclude from face detection results, when comparing size with base_size × α,
size <base_size × α
Is established. From this result, the face 52 is determined to be relatively unimportant, and is excluded from the face detection result. As a result, in the image example shown in FIG. 4, the face detection result is only the face 50 with high importance. Since the face 50 is the most important face, the face importance degree is evaluated as 10.

図5は、集合写真のような場合の顔検出判定の例を示す。顔検出から除外される条件は、図4の例の場合と同じく、α=1/2とする。図5に示す例では、顔検出部40は、4つの顔60,62,64,66を検出する。これらの顔60〜66のサイズを、それぞれsize3,size4,size5,size6とし、
size3>size4=size5=size6=size2=size3×9/10 (3)
が成立するものとする。また、顔62,64,66のサイズは、図4で説明した顔52のそれと絶対的なサイズが同じであるとする。
FIG. 5 shows an example of face detection determination in the case of a group photo. The condition excluded from the face detection is set to α = ½ as in the example of FIG. In the example illustrated in FIG. 5, the face detection unit 40 detects four faces 60, 62, 64, 66. The size of these faces 60-66 is size3, size4, size5, size6, respectively.
size3> size4 = size5 = size6 = size2 = size3 × 9/10 (3)
Is assumed to hold. The sizes of the faces 62, 64, and 66 are assumed to be the same as those of the face 52 described with reference to FIG.

5つの顔60〜66の大きさを比較し、最大の顔である顔60のサイズsize3を顔基準サイズbase_sizeとする。基準の顔以外の顔の一つである顔62のサイズsize4を取得し、sizeに代入する。sizeとbase_size×αの大きさを比較すると、
size>=base_size×α
が成立する。この条件から、顔62は相対的に重要であると判定され、顔検出結果から除外されない。
The sizes of the five faces 60 to 66 are compared, and the size size3 of the face 60 that is the largest face is set as the face reference size base_size. The size size4 of the face 62, which is one of the faces other than the reference face, is acquired and substituted into size. Comparing size with base_size × α,
size> = base_size × α
Is established. From this condition, the face 62 is determined to be relatively important and is not excluded from the face detection result.

次に、式(1)に基づき、顔重要度を算出する。α=1/2、および式(3)の関係から、size=base_size×9/10を式(1)に代入すると、
顔重要度
=[((base_size×9/10base_size×1/2)/(base_size×(1-1/2)))×10]
=8
という結果が得られる。
Next, the face importance degree is calculated based on the formula (1). From the relationship of α = 1/2 and equation (3), substituting size = base_size × 9/10 into equation (1)
Face importance = [(((base_size × 9/10 base_size × 1/2) / (base_size × (1-1 / 2))) × 10]
= 8
The result is obtained.

顔64,66についても同様の処理を行う。その結果、顔64,66は、顔検出結果からは除外されず、これらの顔重要度は8と算出される。   Similar processing is performed for the faces 64 and 66. As a result, the faces 64 and 66 are not excluded from the face detection results, and the importance of these faces is calculated as 8.

以上の結果として、顔重要度判定装置12は、全ての顔60,62,64,66を相対的に重要な顔と判定する。   As a result of the above, the face importance degree determination device 12 determines that all the faces 60, 62, 64, 66 are relatively important faces.

図4に示す例と図5に示す例を比較すると、絶対的な顔のサイズは顔52,62,64,66で同じである。しかし、相対的なサイズの違いにより、顔52は顔検出結果から除外され、顔62,64,66は重要な顔として顔検出結果に残されることになる。図4に示す例では、手前の人物が重要で、後ろの人物は重要ではないという判定になる。図5に示す例では、絶対的な顔の大きさは小さいものの、全ての顔の重要度が高いという判定になる。 Comparing the example shown in FIG. 4 with the example shown in FIG. 5, the absolute face size is the same for the faces 52, 62, 64 and 66. However, due to the difference in relative size, the face 52 is excluded from the face detection result, and the faces 62, 64, and 66 are left as important faces in the face detection result. In the example shown in FIG. 4, it is determined that the front person is important and the back person is not important. In the example shown in FIG. 5, although the absolute face size is small, it is determined that the importance of all the faces is high.

このように、絶対的な顔のサイズによらず、相対的な顔のサイズに応じて重要度判定を行うことにより、相対的に重要ではない顔を除外でき、重要な顔のみを抽出できる。そして、重要な顔領域には顔重要度に応じて量子化ステップサイズを細かくして符号化を行い、また、顔検出結果から除外された顔領域に対して他の画像部分と同じ条件で符号化を行う。これにより、符号化効率を保ちつつ、高画質化を実現できる。   In this way, by determining the importance according to the relative face size regardless of the absolute face size, relatively unimportant faces can be excluded, and only important faces can be extracted. The important face area is encoded with a smaller quantization step size according to the importance of the face, and the face area excluded from the face detection result is encoded under the same conditions as other image parts. To do. Thereby, high image quality can be realized while maintaining encoding efficiency.

ハードウェア構成による実施例を説明したが、本発明は、その一部又は全部をコンピュータソフトエアにより実現できることは明らかである。   Although the embodiment according to the hardware configuration has been described, it is obvious that the present invention can be realized in part or in whole by computer software.

顔基準サイズに対して相対的に小さいサイズの顔を除外することに加え、絶対的に小さいサイズの顔を除外してもよい。図6は、そのように変更した、顔重要度判定装置12の別の動作フローチャートを示す。   In addition to excluding a face having a relatively small size with respect to the face reference size, a face having an absolutely small size may be excluded. FIG. 6 shows another operation flowchart of the face importance degree determination device 12 modified as described above.

まず、顔検出部40が、入力画像から顔である領域を検出する(S21)。検出された顔領域に対し、最小サイズminimum_sizeより小さいものを顔検出結果から除外する(S22)。この除外後に、顔が一つも残っていない場合、又は顔が一つだけ残る場合には、それをそのまま顔検出の結果として処理を終了する(S23)。   First, the face detection unit 40 detects a region that is a face from the input image (S21). For the detected face area, those smaller than the minimum size minimum_size are excluded from the face detection result (S22). If no faces remain after this exclusion, or if only one face remains, the process ends as it is as a result of face detection (S23).

残りの顔が複数ある場合(S23)、最重要顔判定部42が、残る顔の中から、最大サイズの顔を最重要の顔であると判定する。この顔のサイズを顔基準サイズとする(S24)。   When there are a plurality of remaining faces (S23), the most important face determination unit 42 determines that the largest size face is the most important face from the remaining faces. This face size is set as the face reference size (S24).

顔重要度算出部44が、最重要と判定された顔以外の顔のサイズ(size)を取得する(S25)。最重要以外の顔のサイズ(size)が顔基準サイズ(base_size)に対する一定割合(α)より小さい場合(S26)、重要ではない顔であると判定し、顔検出結果から除外する(S27)。最重要以外の顔のサイズ(size)が、基準の顔基準サイズ(base_size)に対する一定割合(α)以上となるものに対して(S26)、顔基準サイズからの相対サイズにより顔重要度を算出する(S28)。   The face importance degree calculation unit 44 acquires the size (size) of a face other than the face determined to be the most important (S25). When the size (size) of the face other than the most important is smaller than a fixed ratio (α) with respect to the face reference size (base_size) (S26), it is determined that the face is not important and is excluded from the face detection result (S27). When the size of the face other than the most important (size) is equal to or greater than a certain ratio (α) to the reference face reference size (base_size) (S26), the face importance is calculated based on the relative size from the face reference size. (S28).

全ての顔について(S29)、ステップS25〜S28を繰り返す。   Steps S25 to S28 are repeated for all faces (S29).

図6に示す処理によれば、最重要の顔のサイズからの相対的サイズと、絶対的サイズの両面から、重要ではない顔を除外するので、符号化効率と重要な顔領域の高画質化を更に改善できる。   According to the processing shown in FIG. 6, since the non-important face is excluded from both the relative size from the size of the most important face and the absolute size, the encoding efficiency and the image quality improvement of the important face area are improved. Can be further improved.

12 顔重要度判定装置
14 量子化制御部
16 フレームバッファ
18 動き予測部
22 直交変換部
24 量子化部
26 エントロピー符号化部
DESCRIPTION OF SYMBOLS 12 Face importance determination apparatus 14 Quantization control part 16 Frame buffer 18 Motion estimation part 22 Orthogonal transformation part 24 Quantization part 26 Entropy encoding part

Claims (8)

画像データを符号化するための符号化装置であって、
前記画像データから顔領域を検出する検出手段と、
前記検出手段によって検出された複数の顔領域の中から第1のサイズよりも小さいサイズの顔領域を除外する第1の除外手段と、
前記第1の除外手段によって除外されなかった顔領域の数が2以上である場合に、前記第1の除外手段によって除外されなかった顔の中から最も重要度の高い顔を決定し、前記最も重要度の高い顔のサイズに基づいて第2のサイズを決定し、前記第1の除外手段によって除外されなかった顔の中から前記第2のサイズよりも小さい顔を除外する第2の除外手段と、
前記最も重要度の高い顔のサイズと、前記第2の除外手段によって除外されなかった顔のサイズとに基づいて、前記第2の除外手段によって除外されなかった顔についての重要度を決定する重要度決定手段と、
前記第2の除外手段によって除外されなかった顔についての重要度に基づいて、前記第2の除外手段によって除外されなかった顔の領域についての量子化ステップサイズを制御する制御手段と
を有することを特徴とする符号化装置。
An encoding device for encoding image data ,
Detecting means for detecting a face region from the image data;
First exclusion means for excluding a face area having a size smaller than the first size from a plurality of face areas detected by the detection means;
When the number of face areas that are not excluded by the first exclusion means is two or more, the face having the highest importance is determined from the faces that are not excluded by the first exclusion means, Second exclusion means for determining a second size based on the size of the face having high importance, and excluding faces smaller than the second size from the faces not excluded by the first exclusion means When,
The importance of determining the importance of the face not excluded by the second exclusion means based on the size of the face having the highest importance and the size of the face not excluded by the second exclusion means A degree determination means;
Control means for controlling a quantization step size for a face area not excluded by the second exclusion means based on the importance of the face not excluded by the second exclusion means;
Marks Goka device you further comprising a.
前記第2の除外手段は、前記第1の除外手段によって除外されなかった顔の中から最も大きいサイズの顔として選択された顔を前記最も重要度の高い顔として決定することを特徴とする請求項1に記載の符号化装置。The second exclusion means determines a face selected as the face of the largest size from the faces not excluded by the first exclusion means as the face with the highest importance. Item 4. The encoding device according to Item 1. 前記第2のサイズは、前記最も重要度の高い顔のサイズと所定の割合とに基づいて決定されることを特徴とする請求項1または2に記載の符号化装置。3. The encoding apparatus according to claim 1, wherein the second size is determined based on a size of the most important face and a predetermined ratio. 4. 前記重要度定手段は、前記第2の除外手段によって除外されなかった顔のサイズが前記最も重要度の高い顔のサイズよりも小さくなるに従って、前記第2の除外手段によって除外されなかった顔についての重要度を低くすることを特徴とする請求項1からのいずれか1項に記載の符号化装置。 The significance decision means, according to the size of not excluded face is smaller than the size of the face of high the least important by the second exclusion means, not excluded by the second exclusion means face It marks Goka device according to any one of claims 1 to 3, characterized in the lower that importance for. 記制御手段は、前記第2の除外手段によって除外されなかった顔についての重要度が高くなるに従って前記第2の除外手段によって除外されなかった顔の領域についての量子化ステップサイズを小さくすることを特徴とする請求項1から4のいずれか1項に記載の符号化装置。 Before SL control means, the importance of not excluded face by said second exclusion means according higher due, the quantization step size for the region of the not excluded by the second exclusion means face marks Goka device according to claim 1 in any one of 4, characterized in that to reduce. 画像データを符号化するための符号化方法であって、
前記画像データから顔領域を検出する検出ステップと、
前記検出ステップにおいて検出された複数の顔領域の中から第1のサイズよりも小さいサイズの顔領域を除外する第1の除外ステップと、
前記第1の除外ステップにおいて除外されなかった顔領域の数が2以上である場合に、前記第1の除外ステップにおいて除外されなかった顔の中から最も重要度の高い顔を決定し、前記最も重要度の高い顔のサイズに基づいて第2のサイズを決定し、前記第1の除外ステップにおいて除外されなかった顔の中から前記第2のサイズよりも小さい顔を除外する第2の除外ステップと、
前記最も重要度の高い顔のサイズと、前記第2の除外ステップにおいて除外されなかった顔のサイズとに基づいて、前記第2の除外ステップにおいて除外されなかった顔についての重要度を決定する重要度決定ステップと、
前記第2の除外ステップにおいて除外されなかった顔についての重要度に基づいて、前記第2の除外ステップにおいて除外されなかった顔の領域についての量子化ステップサイズを制御する制御ステップと
を有することを特徴とする符号化方法。
An encoding method for encoding image data , comprising:
A detection step of detecting a face region from the image data;
A first excluding step of excluding a face area having a size smaller than the first size from the plurality of face areas detected in the detecting step;
When the number of face regions that are not excluded in the first exclusion step is 2 or more, a face having the highest importance is determined from the faces that are not excluded in the first exclusion step, A second exclusion step of determining a second size based on the size of the face of high importance and excluding faces smaller than the second size from the faces not excluded in the first exclusion step When,
The importance of determining the importance of the face not excluded in the second exclusion step based on the size of the most important face and the size of the face not excluded in the second exclusion step A degree determination step;
A control step for controlling a quantization step size for a face region not excluded in the second exclusion step based on the importance of the face not excluded in the second exclusion step;
Marks Goka how to, comprising a.
画像データを符号化するための符号化装置としてコンピュータを機能させるためのプログラムであって、A program for causing a computer to function as an encoding device for encoding image data,
前記画像データから顔領域を検出する検出手段と、Detecting means for detecting a face region from the image data;
前記検出手段によって検出された複数の顔領域の中から第1のサイズよりも小さいサイズの顔領域を除外する第1の除外手段と、First exclusion means for excluding a face area having a size smaller than the first size from a plurality of face areas detected by the detection means;
前記第1の除外手段によって除外されなかった顔領域の数が2以上である場合に、前記第1の除外手段によって除外されなかった顔の中から最も重要度の高い顔を決定し、前記最も重要度の高い顔のサイズに基づいて第2のサイズを決定し、前記第1の除外手段によって除外されなかった顔の中から前記第2のサイズよりも小さい顔を除外する第2の除外手段と、When the number of face areas that are not excluded by the first exclusion means is two or more, the face having the highest importance is determined from the faces that are not excluded by the first exclusion means, Second exclusion means for determining a second size based on the size of the face having high importance, and excluding faces smaller than the second size from the faces not excluded by the first exclusion means When,
前記最も重要度の高い顔のサイズと、前記第2の除外手段によって除外されなかった顔のサイズとに基づいて、前記第2の除外手段によって除外されなかった顔についての重要度を決定する重要度決定手段と、The importance of determining the importance of the face not excluded by the second exclusion means based on the size of the face having the highest importance and the size of the face not excluded by the second exclusion means A degree determination means;
前記第2の除外手段によって除外されなかった顔についての重要度に基づいて、前記第2の除外手段によって除外されなかった顔の領域についての量子化ステップサイズを制御する制御手段Control means for controlling the quantization step size for the face area not excluded by the second exclusion means based on the importance of the face not excluded by the second exclusion means
として前記コンピュータを機能させるためのプログラム。A program for causing the computer to function as
画像データを符号化するための符号化方法をコンピュータに実行させるためのプログラムであって、A program for causing a computer to execute an encoding method for encoding image data,
前記画像データから顔領域を検出する検出ステップと、A detection step of detecting a face region from the image data;
前記検出ステップにおいて検出された複数の顔領域の中から第1のサイズよりも小さいサイズの顔領域を除外する第1の除外ステップと、A first excluding step of excluding a face area having a size smaller than the first size from the plurality of face areas detected in the detecting step;
前記第1の除外ステップにおいて除外されなかった顔領域の数が2以上である場合に、前記第1の除外ステップにおいて除外されなかった顔の中から最も重要度の高い顔を決定し、前記最も重要度の高い顔のサイズに基づいて第2のサイズを決定し、前記第1の除外ステップにおいて除外されなかった顔の中から前記第2のサイズよりも小さい顔を除外する第2の除外ステップと、When the number of face regions that are not excluded in the first exclusion step is 2 or more, a face having the highest importance is determined from the faces that are not excluded in the first exclusion step, A second exclusion step of determining a second size based on the size of the face of high importance and excluding faces smaller than the second size from the faces not excluded in the first exclusion step When,
前記最も重要度の高い顔のサイズと、前記第2の除外ステップにおいて除外されなかった顔のサイズとに基づいて、前記第2の除外ステップにおいて除外されなかった顔についての重要度を決定する重要度決定ステップと、The importance of determining the importance of the face not excluded in the second exclusion step based on the size of the most important face and the size of the face not excluded in the second exclusion step A degree determination step;
前記第2の除外ステップにおいて除外されなかった顔についての重要度に基づいて、前記第2の除外ステップにおいて除外されなかった顔の領域についての量子化ステップサイズを制御する制御ステップ  A control step for controlling a quantization step size for a face region not excluded in the second exclusion step based on the importance of the face not excluded in the second exclusion step.
とを前記コンピュータに実行させるためのプログラム。For causing the computer to execute.
JP2009129797A 2009-05-29 2009-05-29 Encoding apparatus, encoding method, and program Expired - Fee Related JP5355226B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009129797A JP5355226B2 (en) 2009-05-29 2009-05-29 Encoding apparatus, encoding method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009129797A JP5355226B2 (en) 2009-05-29 2009-05-29 Encoding apparatus, encoding method, and program

Publications (3)

Publication Number Publication Date
JP2010278797A JP2010278797A (en) 2010-12-09
JP2010278797A5 JP2010278797A5 (en) 2012-07-05
JP5355226B2 true JP5355226B2 (en) 2013-11-27

Family

ID=43425337

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009129797A Expired - Fee Related JP5355226B2 (en) 2009-05-29 2009-05-29 Encoding apparatus, encoding method, and program

Country Status (1)

Country Link
JP (1) JP5355226B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7638191B2 (en) 2021-10-18 2025-03-03 三菱電機株式会社 Imaging device, image analysis system, encoding method, and encoding program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0281590A (en) * 1988-09-19 1990-03-22 Toshiba Corp Moving picture encoding system
US6496607B1 (en) * 1998-06-26 2002-12-17 Sarnoff Corporation Method and apparatus for region-based allocation of processing resources and control of input image formation
JP2008227918A (en) * 2007-03-13 2008-09-25 Ricoh Co Ltd Imaging device

Also Published As

Publication number Publication date
JP2010278797A (en) 2010-12-09

Similar Documents

Publication Publication Date Title
US8098731B2 (en) Intraprediction method and apparatus using video symmetry and video encoding and decoding method and apparatus
CN101573984B (en) Method and apparatus for estimating motion vectors using multiple motion vector predictors, encoder, decoder and decoding method
CN101416524B (en) Dynamic selection of motion estimation search range and extended motion vector range
US9591313B2 (en) Video encoder with transform size preprocessing and methods for use therewith
US20070098067A1 (en) Method and apparatus for video encoding/decoding
US9294765B2 (en) Video encoder with intra-prediction pre-processing and methods for use therewith
JP2007235291A (en) Adaptive quantization apparatus and adaptive quantization program
US20140233645A1 (en) Moving image encoding apparatus, method of controlling the same, and program
US9438925B2 (en) Video encoder with block merging and methods for use therewith
JP5441812B2 (en) Video encoding apparatus and control method thereof
JP5100572B2 (en) Encoder
US9654775B2 (en) Video encoder with weighted prediction and methods for use therewith
US10666970B2 (en) Encoding apparatus, encoding method, and storage medium
JP5649296B2 (en) Image encoding device
JP5355226B2 (en) Encoding apparatus, encoding method, and program
JP5295089B2 (en) Image encoding device
WO2012165428A1 (en) Video encoding device
JP5171658B2 (en) Image encoding device
JP2008187220A (en) Motion picture encoder
JP6200220B2 (en) Image processing apparatus, encoding apparatus, decoding apparatus, and program
JP4222046B2 (en) Signal processing apparatus and method, recording medium, and program
JP6239838B2 (en) Moving picture encoding apparatus, control method thereof, and imaging apparatus
JP2007110409A (en) Image processing apparatus and program for causing computer to execute image processing method
JP5521859B2 (en) Moving picture coding apparatus and method
JP6012307B2 (en) Moving picture coding apparatus, control method therefor, and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120521

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120521

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121205

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130108

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130311

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130730

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130827

R151 Written notification of patent or utility model registration

Ref document number: 5355226

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: R3D03

LAPS Cancellation because of no payment of annual fees