JP2012109846A - Image encoder and camera system - Google Patents

Image encoder and camera system Download PDF

Info

Publication number
JP2012109846A
JP2012109846A JP2010257742A JP2010257742A JP2012109846A JP 2012109846 A JP2012109846 A JP 2012109846A JP 2010257742 A JP2010257742 A JP 2010257742A JP 2010257742 A JP2010257742 A JP 2010257742A JP 2012109846 A JP2012109846 A JP 2012109846A
Authority
JP
Japan
Prior art keywords
component
unit
image data
quantization coefficient
input image
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
JP2010257742A
Other languages
Japanese (ja)
Inventor
Masahiro Hojo
正博 方城
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Original Assignee
Panasonic 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 Panasonic Corp filed Critical Panasonic Corp
Priority to JP2010257742A priority Critical patent/JP2012109846A/en
Publication of JP2012109846A publication Critical patent/JP2012109846A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To eliminate the need of a repetitive compression processing, to suppress an increase of memory capacity and to efficiently suppress an excessive increase of a generated code amount when input image data suddenly changes while occurrence of block noise and mosquito noise due to excessive compression is suppressed.SOLUTION: An image encoder includes: a DCT section 8; a quantization section 9; an encoding section 10; a quantization coefficient calculation necessity determination section 2 determining that calculation of a quantization coefficient is required when previous encoding information shows possibility of the increase of the generated code amount; a DC component acquiring section 3 acquiring a DC component generated from a luminance/color difference signal when the calculation of the quantization coefficient is required; a DC component preserving section 5 preserving the DC components of previous and this input image data; an image change operation section 6 determining a change of input image data by comparison of the DC components of input image data and the previous image data and generating an image change amount; and a quantization coefficient calculating section 7 calculating the quantization coefficient for encoding based on the obtained image change amount and transferring the coefficient to the quantization section.

Description

本発明は、画像入力部、DCT部(離散コサイン変換部)、量子化部および符号化部を備えた画像符号化装置にかかわり、詳しくはシーンチェンジなど入力画像データが急激に変化する場合の発生符号量の過剰な増大を抑制するための技術に関する。適用される製品としては、デジタルスチルカメラ、デジタルビデオカメラ、車載カメラ、ネットワークカメラなどがある。   The present invention relates to an image encoding apparatus including an image input unit, a DCT unit (discrete cosine transform unit), a quantization unit, and an encoding unit, and more specifically, when input image data such as a scene change suddenly changes The present invention relates to a technique for suppressing an excessive increase in code amount. Applicable products include digital still cameras, digital video cameras, in-vehicle cameras, and network cameras.

デジタルビデオカメラやデジタルスチルカメラ、カメラ付き携帯電話端末やカメラ付き携帯電子手帳などの撮像機能を備えた機器において、撮像で得られる動画データや静止画データはそのデータ量が多く、そのまま記録するのでは、容量有限の記録メディアはすぐに記録容量一杯になってしまう。このため、種々の方式で圧縮してデータ量を減らしてから記録するのが一般的である。例えば、圧縮方式としては、動画データの場合にはMPEG(Moving Picture Experts Group)方式などが用いられ、静止画データの場合にはJPEG(Joint Photographic Experts Group)方式などが用いられる。従来の画像圧縮処理装置では、画像を段階的に所定のデータサイズまで圧縮するようにしている。   In devices equipped with an imaging function, such as digital video cameras, digital still cameras, mobile phone terminals with cameras, and portable electronic notebooks with cameras, the amount of video and still image data obtained by imaging is large, so it is recorded as is. Then, a recording medium with a limited capacity will soon fill up the recording capacity. For this reason, recording is generally performed after reducing the amount of data by compressing by various methods. For example, as a compression method, a moving picture experts group (MPEG) method or the like is used for moving image data, and a joint photographic experts group (JPEG) method or the like is used for still image data. In a conventional image compression processing apparatus, an image is compressed step by step to a predetermined data size.

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

しかし、適切な圧縮率を得るために再試行を含めて複数回の圧縮処理を行うのでは所要時間が長くなり、撮像間隔を短く設定できない。また繰り返しの圧縮処理には元画像の全データを保持しておくための大容量のメモリが必要である。   However, in order to obtain an appropriate compression rate, if a plurality of compression processes including retry are performed, the required time becomes long and the imaging interval cannot be set short. In addition, repeated compression processing requires a large-capacity memory for holding all data of the original image.

一度の圧縮処理で所定のデータサイズに抑えるために圧縮率を高めに設定すると、ブロックノイズやモスキートノイズが発生し、画像品質の低下を招く。   If the compression rate is set high to suppress the data size to a predetermined value by a single compression process, block noise and mosquito noise are generated, and image quality is degraded.

また、シーンチェンジなど入力画像データが急激に変化して前回圧縮した画像データと今回圧縮する画像データとで相関が無くなると、圧縮後の符号量が過剰に増大する。符号量が規格上限を超えると、そのフレームを破棄した上で符号化処理をやり直さなければならない。   Also, if the input image data such as a scene change changes suddenly and there is no correlation between the previously compressed image data and the currently compressed image data, the amount of code after compression increases excessively. If the code amount exceeds the upper limit of the standard, the frame must be discarded and the encoding process must be performed again.

なお、特許文献1には手振れ検出部で得られた手振れ検出量に基づいて画像符号化時の符号量を抑圧する技術が開示されているが、これは本発明とはアプローチを異にするものである。   Patent Document 1 discloses a technique for suppressing a code amount at the time of image encoding based on a camera shake detection amount obtained by a camera shake detection unit, but this is a different approach from the present invention. It is.

本発明は、このような事情に鑑みて創作したものであり、繰り返しの圧縮処理を不要化し、メモリ容量の増大を抑制し、過剰な圧縮によるブロックノイズ、モスキートノイズの発生を抑制しつつ、入力画像データが急激に変化した場合に、発生符号量の過剰な増大を効率良く抑制できるようにすることを目的としている。   The present invention has been created in view of such circumstances, eliminating the need for repeated compression processing, suppressing an increase in memory capacity, and suppressing occurrence of block noise and mosquito noise due to excessive compression. An object of the present invention is to efficiently suppress an excessive increase in the amount of generated codes when image data changes rapidly.

本発明は、次のような手段を講じることにより上記の課題を解決する。   The present invention solves the above problems by taking the following measures.

《1》本発明による画像符号化装置は、前提として、外部から画像データを入力する画像入力部と、画像入力部から輝度・色差信号を入力してDC成分(直流成分)を生成するDCT部と、DCT部によるDC成分を入力して量子化する量子化部と、量子化部で量子化された情報を符号化する符号化部とを備えている。   << 1 >> An image encoding apparatus according to the present invention is premised on an image input unit for inputting image data from the outside, and a DCT unit for generating a DC component (DC component) by inputting a luminance / color difference signal from the image input unit. And a quantization unit that inputs and quantizes a DC component by the DCT unit, and an encoding unit that encodes information quantized by the quantization unit.

本発明による画像符号化装置は、上記の前提構成に加えて、それぞれ次のように構成された量子化係数算出要否判定部、DC成分取得部、DC成分保存部、画像変化演算部および量子化係数算出部を備えている。   In addition to the above premise configuration, the image coding apparatus according to the present invention includes a quantization coefficient calculation necessity determination unit, a DC component acquisition unit, a DC component storage unit, an image change calculation unit, and a quantum, each configured as follows. A conversion coefficient calculation unit is provided.

前記の量子化係数算出要否判定部は、保存している前回の符号化情報に基づいて、量子化係数算出部による量子化係数算出を実施するかどうかを判定するものとして構成されている。この量子化係数算出要否判定部は、前回の符号化情報が発生符号量の増大可能性を示しているときは量子化係数算出が必要であると判定し、DC成分取得部、DC成分保存部、画像変化演算部、量子化係数算出部を活性化させる。逆に、前回の符号化情報が発生符号量の増大可能性を示していないときは量子化係数算出は不要であると判定し、このときはDC成分取得部等は不活性状態のままとされる。   The quantization coefficient calculation necessity determination unit is configured to determine whether or not to perform quantization coefficient calculation by the quantization coefficient calculation unit based on the previous encoded information stored. The quantization coefficient calculation necessity determination unit determines that the quantization coefficient calculation is necessary when the previous coding information indicates that the generated code amount may increase, and the DC component acquisition unit and the DC component storage , The image change calculation unit, and the quantization coefficient calculation unit are activated. Conversely, if the previous coding information does not indicate the possibility of increase in the amount of generated code, it is determined that the quantization coefficient calculation is unnecessary, and at this time, the DC component acquisition unit and the like are left in an inactive state. The

前記のDC成分取得部は、活性化されたとき、画像入力部からの輝度・色差信号から生成されたDC成分を取得し、取得したDC成分をDC成分保存部に保存するものとして構成されている。   When activated, the DC component acquisition unit is configured to acquire a DC component generated from the luminance / color difference signal from the image input unit and store the acquired DC component in the DC component storage unit. Yes.

前記のDC成分保存部は、DC成分取得部が取得したDC成分を毎回の入力画像データについて保存するものとして構成されている。ここには、既に符号化した前回の入力画像データのDC成分と今回の入力画像データのDC成分が保存されることになる。   The DC component storage unit is configured to store the DC component acquired by the DC component acquisition unit for each input image data. Here, the DC component of the previous input image data already encoded and the DC component of the current input image data are stored.

前記の画像変化演算部は、DC成分保存部から入力画像データのDC成分と既に符号化した前回の入力画像データのDC成分を取得し、両DC成分を比較することで画像変化量を生成し、その画像変化量を量子化係数算出部に渡すものとして構成されている。   The image change calculation unit obtains the DC component of the input image data from the DC component storage unit and the DC component of the previous input image data that has already been encoded, and generates an image change amount by comparing both DC components. The image change amount is passed to the quantization coefficient calculation unit.

前記の量子化係数算出部は、画像変化演算部で得られた画像変化量に基づいて符号化のための量子化係数を算出し、算出した量子化係数を量子化部に渡す。   The quantization coefficient calculation unit calculates a quantization coefficient for encoding based on the image change amount obtained by the image change calculation unit, and passes the calculated quantization coefficient to the quantization unit.

量子化部は、量子化係数算出部から量子化係数を受け取り、受け取った量子化係数でDCT部から入力したDC成分の量子化を行う。   The quantization unit receives the quantization coefficient from the quantization coefficient calculation unit, and quantizes the DC component input from the DCT unit with the received quantization coefficient.

この構成による作用は次のとおりである。量子化係数算出要否判定部は、保存している前回の符号化情報に基づいて、量子化係数算出部による量子化係数算出を実施するかどうかを判定する。すなわち、前回の符号化情報が発生符号量の増大可能性を示しているときは量子化係数算出が必要であると判定し、DC成分取得部、DC成分保存部、画像変化演算部、量子化係数算出部を活性化させる。逆に、前回の符号化情報が発生符号量の増大可能性を示していないときは量子化係数算出は不要であると判定し、このときはDC成分取得部等は不活性状態のままとされる。活性化されたDC成分取得部は、画像入力部からの輝度・色差信号より生成されたDC成分を取得し、取得したDC成分をDC成分保存部に保存する。DC成分保存部には既に符号化した前回の入力画像データのDC成分と今回の入力画像データのDC成分が保存される。画像変化演算部は、DC成分保存部から入力画像データのDC成分と既に符号化した前回の入力画像データのDC成分を取得し、両DC成分を比較することで画像変化量を生成し、量子化係数算出部に渡す。量子化係数算出部は、画像変化演算部で得られた画像変化量に基づいて符号化のための量子化係数を算出し、算出した量子化係数を量子化部に渡す。DCT部は、画像入力部から輝度・色差信号を入力し、DC成分を生成して量子化部へ出力する。量子化部は、DCT部からDC成分を入力するとともに量子化係数算出部から量子化係数を受け取り、受け取った量子化係数でDC成分の量子化を行う。符号化部は、量子化部で量子化された情報を符号化する。そして、その符号化情報を量子化係数算出要否判定部に渡す。   The effect | action by this structure is as follows. The quantization coefficient calculation necessity determination unit determines whether or not to perform the quantization coefficient calculation by the quantization coefficient calculation unit based on the previous encoded information stored. That is, when the previous coding information indicates that the generated code amount may increase, it is determined that the quantization coefficient calculation is necessary, and the DC component acquisition unit, the DC component storage unit, the image change calculation unit, the quantization Activate the coefficient calculator. Conversely, if the previous coding information does not indicate the possibility of increase in the amount of generated code, it is determined that the quantization coefficient calculation is unnecessary, and at this time, the DC component acquisition unit and the like are left in an inactive state. The The activated DC component acquisition unit acquires the DC component generated from the luminance / color difference signal from the image input unit, and stores the acquired DC component in the DC component storage unit. The DC component storage unit stores the previously encoded DC component of the previous input image data and the DC component of the current input image data. The image change calculation unit obtains the DC component of the input image data from the DC component storage unit and the DC component of the previous input image data already encoded, generates an image change amount by comparing both DC components, To the conversion factor calculation unit. The quantization coefficient calculation unit calculates a quantization coefficient for encoding based on the image change amount obtained by the image change calculation unit, and passes the calculated quantization coefficient to the quantization unit. The DCT unit receives the luminance / color difference signal from the image input unit, generates a DC component, and outputs the DC component to the quantization unit. The quantization unit receives the DC component from the DCT unit, receives the quantization coefficient from the quantization coefficient calculation unit, and quantizes the DC component with the received quantization coefficient. The encoding unit encodes the information quantized by the quantization unit. Then, the encoded information is passed to the quantization coefficient calculation necessity determination unit.

ここでのポイントの1つは、量子化係数算出要否判定部による量子化係数算出の要否の判定である。符号化部から受け取った前回の符号化情報が発生符号量の増大可能性を示しているとき、量子化係数算出要否判定部は量子化係数算出が必要であると判定する。そうでないときは量子化係数算出は不要であると判定する。   One of the points here is determination of necessity of quantization coefficient calculation by the quantization coefficient calculation necessity determination unit. When the previous encoding information received from the encoding unit indicates that the generated code amount may increase, the quantization coefficient calculation necessity determination unit determines that the quantization coefficient calculation is necessary. Otherwise, it is determined that the quantization coefficient calculation is unnecessary.

前回の符号化情報が発生符号量の増大可能性を示すとは、例えば前回符号化した量子化係数が一定以下に小さいことである。量子化係数が小さいと、発生符号量が増大する。量子化係数が小さく発生符号量が増大する可能性があるときは、発生符号量を抑制するために、量子化係数算出要否判定部は、DC成分取得部、DC成分保存部、画像変化演算部および量子化係数算出部を活性化する。その結果として、入力画像データのDC成分と既に符号化した前回の入力画像データのDC成分との比較結果である画像変化量に応じて量子化係数を生成する。これがもう1つのポイントである。   The fact that the previous encoded information indicates the possibility of increase in the amount of generated code means that, for example, the previously encoded quantization coefficient is small below a certain level. When the quantization coefficient is small, the generated code amount increases. When the quantization coefficient is small and the generated code amount may increase, the quantization coefficient calculation necessity determination unit includes a DC component acquisition unit, a DC component storage unit, an image change calculation to suppress the generated code amount. And the quantization coefficient calculation unit are activated. As a result, a quantization coefficient is generated according to an image change amount that is a comparison result between the DC component of the input image data and the DC component of the previous input image data that has already been encoded. This is another point.

画像変化量が大きいほど量子化係数をより大きくし、結果として発生符号量の充分な抑制を図る。画像変化量が小さいときは量子化係数を小さくし、結果として発生符号量の抑制は規模が小さくてもかまわない。   The larger the image change amount, the larger the quantization coefficient, and as a result, the generated code amount is sufficiently suppressed. When the image change amount is small, the quantization coefficient may be reduced, and as a result, the generated code amount may be suppressed on a small scale.

以上のようにして、入力画像データが急激に変化した場合に、その変化の規模に応じて量子化係数を大きくするので、発生符号量の過剰な増大を効率良く抑制することが可能となる。   As described above, when the input image data changes abruptly, the quantization coefficient is increased according to the scale of the change, so that it is possible to efficiently suppress an excessive increase in the generated code amount.

《2》上記《1》の構成におけるDC成分取得部が取得するDC成分を生成する手段としては、前記のDCT部とは別に構成されて、画像入力部からの輝度・色差信号に基づいてDC成分を生成するDC成分生成部を備えているという態様がある。このDC成分生成部は、DC成分取得部が活性化されたとき、画像入力部からの輝度・色差信号からDC成分を生成し、DC成分取得部に渡すものとして構成されている。   <2> The means for generating the DC component acquired by the DC component acquisition unit in the configuration of <1> is configured separately from the DCT unit, and is based on the luminance / color difference signal from the image input unit. There is an aspect in which a DC component generation unit that generates components is provided. The DC component generation unit is configured to generate a DC component from the luminance / color difference signal from the image input unit and pass it to the DC component acquisition unit when the DC component acquisition unit is activated.

《3》同じく上記《1》の構成におけるDC成分取得部が取得するDC成分を生成する手段としては、前記のDCT部におけるDC成分生成手段を用いるという態様もある。   << 3 >> Similarly, as a means for generating the DC component acquired by the DC component acquisition section in the configuration of <1>, there is an aspect in which the DC component generation means in the DCT section is used.

上記《2》のように一般的なDCT部とは別の専用のDC成分生成部を備えている場合には、そのDC成分生成部が専用のものであることから、DC成分取得部、DC成分保存部、画像変化演算部および量子化係数算出部での各処理が高速化される。これにより、入力画像データの急激な変化により的確に対応することが可能になる。   When the dedicated DC component generation unit different from the general DCT unit as in << 2 >> is provided, the DC component generation unit is dedicated, so the DC component acquisition unit, DC Each processing in the component storage unit, the image change calculation unit, and the quantization coefficient calculation unit is speeded up. As a result, it is possible to accurately cope with a sudden change in the input image data.

一方、上記《3》のように一般的なDCT部で得られるDC成分をDC成分取得部に渡す構成の場合は、その兼用構成ゆえに専用のDC成分生成部は不要であり、コストアップを抑制する上で有利となる。   On the other hand, in the case of the configuration in which the DC component obtained by the general DCT unit is passed to the DC component acquisition unit as in <3> above, a dedicated DC component generation unit is unnecessary because of the dual configuration, and the cost increase is suppressed. This is advantageous.

本発明によれば、シーンチェンジなど入力画像データが急激に変化した場合に、その変化の規模に応じてリアルタイムに量子化係数を大きくするので、繰り返しの圧縮処理を不要化し、メモリ容量の増大を抑制し、過剰な圧縮によるブロックノイズ、モスキートノイズの発生を抑制しつつ、発生符号量の過剰な増大を効率良く抑制することができる。   According to the present invention, when input image data such as a scene change suddenly changes, the quantization coefficient is increased in real time according to the scale of the change, so that it is not necessary to perform repeated compression processing and increase the memory capacity. It is possible to efficiently suppress an excessive increase in the amount of generated codes while suppressing generation of block noise and mosquito noise due to excessive compression.

本発明の実施例1における画像符号化装置が組み込まれたカメラシステムの構成を示すブロック図1 is a block diagram showing a configuration of a camera system in which an image encoding device according to Embodiment 1 of the present invention is incorporated. 本発明の実施例1の画像符号化装置の動作を示すフローチャートThe flowchart which shows operation | movement of the image coding apparatus of Example 1 of this invention. 本発明の実施例における入力画像データと比較画像データとのDC成分差分量の算出の説明図Explanatory drawing of calculation of DC component difference amount of input image data and comparison image data in the Example of this invention 本発明の実施例におけるDC成分差分量から量子化係数を算出するグラフThe graph which calculates a quantization coefficient from the DC component difference amount in the Example of this invention 本発明の実施例2における画像符号化装置が組み込まれたカメラシステムの構成を示すブロック図FIG. 5 is a block diagram illustrating a configuration of a camera system in which an image encoding device according to a second embodiment of the present invention is incorporated. 本発明の実施例2の画像符号化装置の動作を示すフローチャートThe flowchart which shows operation | movement of the image coding apparatus of Example 2 of this invention. 本発明の実施例3の画像符号化装置の動作を示すフローチャートThe flowchart which shows operation | movement of the image coding apparatus of Example 3 of this invention.

上記した《1》の構成の本発明の画像符号化装置は、次のような実施の形態においてさらに有利に展開することが可能である。   The image encoding apparatus of the present invention having the above configuration <1> can be further advantageously developed in the following embodiment.

《4》上記《1》〜《3》の構成における前記の量子化係数算出部については、画像変化演算部で得られた画像変化量として前記の両DC成分の差分であるDC成分差分量を生成し、このDC成分差分量に基づいて符号化のための量子化係数を算出するように構成されているという態様がある。これは、量子化係数を算出する上で最も簡単な方式の1つである。   << 4 >> For the quantization coefficient calculation unit in the configurations of the above << 1 >> to << 3 >>, the DC component difference amount that is the difference between the two DC components is used as the image change amount obtained by the image change calculation unit. There is a mode in which a quantization coefficient for encoding is calculated and generated based on the DC component difference amount. This is one of the simplest methods for calculating the quantization coefficient.

《5》上記《1》〜《4》の構成における前記の量子化係数算出要否判定部については、前回の符号化情報として量子化係数を用いることとして、その量子化係数が特定の閾値より大きいときは、量子化係数算出が不要であると判定するように構成されているという態様がある。量子化係数が一定以上に大きいということは、発生符号量の面で余裕があるということになる。つまり、発生符号量を抑制する必要がなく、この場合は量子化係数算出部において量子化係数算出を不動作にする。すなわち、入力画像データが急激に変化した場合でも、量子化係数が大きく発生符号量に余裕がある場合には、量子化係数の更新は行わなくてもよい。   << 5 >> About the quantization coefficient calculation necessity determination part in the configuration of the above << 1 >> to << 4 >>, using the quantization coefficient as the previous encoding information, the quantization coefficient is more than a specific threshold value. When it is large, there is an aspect in which it is configured to determine that calculation of the quantization coefficient is unnecessary. The fact that the quantization coefficient is larger than a certain value means that there is a margin in terms of the amount of generated code. That is, there is no need to suppress the amount of generated codes, and in this case, the quantization coefficient calculation unit disables the quantization coefficient calculation. That is, even when the input image data changes rapidly, the quantization coefficient need not be updated if the quantization coefficient is large and the generated code amount has a margin.

《6》上記《1》〜《5》の構成における前記のDC成分取得部については、入力画像データのDC成分をマクロブロック単位で取得するように構成されているという態様がある。   <6> The DC component acquisition unit in the configurations of <1> to <5> is configured to acquire the DC component of the input image data in units of macroblocks.

《7》同じく上記《1》〜《5》の構成における前記のDC成分取得部については、入力画像データのDC成分をピクチャ単位で取得するように構成されているという態様もある。   <7> Similarly, the DC component acquisition unit in the configurations of the above << 1 >> to << 5 >> may be configured to acquire the DC component of the input image data in units of pictures.

《8》同じく上記《1》〜《5》の構成における前記のDC成分取得部については、入力画像データのDC成分をDCT実行ブロック単位で取得するように構成されているという態様もある。   <8> Similarly, the DC component acquisition unit in the configurations of << 1 >> to << 5 >> may be configured to acquire the DC component of the input image data in units of DCT execution blocks.

上記の《6》〜《8》のように、入力画像データのDC成分をどのような単位で取得するかに関してのDC成分取得部の態様につき、マクロブロック単位でもピクチャ単位でもあるいはDCT実行ブロック単位でも、いずれでもよい。それぞれの単位で取得した入力画像データと既に符号化した前回の入力画像データのDC成分との差分のDC成分差分量が大きいほど量子化係数をより大きくすることにより、入力画像データが急激に変化した場合でも発生符号量を充分に抑制するという作用を的確に達成することが可能となる。   As in the above << 6 >> to << 8 >>, the mode of the DC component acquisition unit with respect to what unit the DC component of the input image data is acquired, in units of macroblocks, pictures, or DCT execution blocks But either is fine. The input image data changes abruptly by increasing the quantization coefficient as the DC component difference amount between the input image data acquired in each unit and the DC component of the previous input image data already encoded increases. Even in this case, it is possible to accurately achieve the effect of sufficiently suppressing the generated code amount.

《9》上記《1》〜《8》の構成における前記のDC成分保存部については、入力画像データのDC成分と比較されるべきDC成分として、既に符号化した前回の入力画像データのDC成分をセットするように構成されているという態様がある。   <9> With respect to the DC component storage unit in the configurations of the above <1> to <8>, the DC component of the previous input image data that has already been encoded as the DC component to be compared with the DC component of the input image data There is an aspect of being configured to set.

《10》同じく上記《1》〜《8》の構成における前記のDC成分保存部については、入力画像データのDC成分と比較されるべきDC成分として、任意フレーム分のDC成分の平均値をセットするように構成されているという態様もある。   << 10 >> For the DC component storage unit in the same configurations of << 1 >> to << 8 >>, an average value of DC components for an arbitrary frame is set as the DC component to be compared with the DC component of the input image data. There is also an aspect of being configured to.

上記の《9》,《10》のように、入力画像データのDC成分と比較されるべきDC成分としてどのようなものをセットするかに関してのDC成分保存部の態様につき、既に符号化した前回の入力画像データのDC成分でもよいし、任意フレーム分のDC成分の平均値でもよい。入力画像データのDC成分と前回符号化したDC成分との差分であるDC成分差分量が大きいほど量子化係数をより大きくすることにより、入力画像データが急激に変化した場合でも発生符号量を充分に抑制するという作用を的確に達成することが可能となる。平均値とする場合には、入力画像データのDC成分と前回符号化したDC成分との差分量の算出が安定したものとなる。   As in the above << 9 >> and << 10 >>, the DC component storage unit regarding the type of DC component to be compared with the DC component to be compared with the input image data is previously encoded. The input image data may be a DC component, or an average value of DC components for an arbitrary frame. The larger the DC component difference amount, which is the difference between the DC component of the input image data and the previously encoded DC component, the larger the quantization coefficient, so that the generated code amount is sufficient even when the input image data changes suddenly. Therefore, it is possible to accurately achieve the effect of suppressing the movement. When the average value is used, the calculation of the difference between the DC component of the input image data and the DC component encoded last time becomes stable.

《11》DC成分取得部が入力画像データのDC成分をマクロブロック単位で取得するとした上記《6》の構成において、前記の画像変化演算部については、入力画像データのDC成分と比較されるべきDC成分の単位をDC成分取得部に合わせてマクロブロック単位にするという態様がある。   <11> In the configuration of <6> in which the DC component acquisition unit acquires the DC component of the input image data in units of macroblocks, the image change calculation unit should be compared with the DC component of the input image data. There is a mode in which the unit of the DC component is made into a macroblock unit in accordance with the DC component acquisition unit.

《12》また、DC成分取得部が入力画像データのDC成分をピクチャ単位で取得するとした上記《7》の構成において、前記の画像変化演算部については、入力画像データのDC成分と比較されるべきDC成分の単位をDC成分取得部に合わせてピクチャ単位にするという態様がある。   << 12 >> In addition, in the configuration of << 7 >> in which the DC component acquisition unit acquires the DC component of the input image data in units of pictures, the image change calculation unit is compared with the DC component of the input image data. There is a mode in which the unit of the power DC component is set to the picture unit in accordance with the DC component acquisition unit.

《13》また、DC成分取得部が入力画像データのDC成分をDCT実行ブロック単位で取得するとした上記《8》の構成において、前記の画像変化演算部については、入力画像データのDC成分と比較されるべきDC成分の単位をDC成分取得部に合わせてDCT実行ブロック単位にするという態様がある。   << 13 >> Also, in the configuration of <8> above, in which the DC component acquisition unit acquires the DC component of the input image data in units of DCT execution blocks, the image change calculation unit is compared with the DC component of the input image data. There is a mode in which the unit of the DC component to be performed is made into a DCT execution block unit in accordance with the DC component acquisition unit.

上記の《11》〜《13》のように、入力画像データのDC成分と比較されるべきDC成分の単位をどのようなものにするかに関しての画像変化演算部の態様につき、それぞれDC成分取得部に合わせて、マクロブロック単位、ピクチャ単位あるいはDCT実行ブロック単位とすることにより、入力画像データが急激に変化した場合でも発生符号量を充分に抑制するという作用を的確に達成することが可能となる。   As in the above << 11 >> to << 13 >>, the DC component acquisition is performed for each aspect of the image change calculation unit regarding the unit of the DC component to be compared with the DC component of the input image data. In accordance with the section, the macro block unit, the picture unit, or the DCT execution block unit can accurately achieve the effect of sufficiently suppressing the generated code amount even when the input image data changes suddenly. Become.

《14》上記《1》〜《13》の画像符号化装置にかかわる発明をカメラシステムにおいて、次のように展開することが可能である。   << 14 >> The invention relating to the image coding apparatus according to the above << 1 >> to << 13 >> can be developed as follows in a camera system.

すなわち、本発明によるカメラシステムは、撮像信号を輝度・色差信号に変換する撮像装置と、前記撮像装置から輝度・色差信号を入力し画像符号化処理を行う上記の《1》〜《13》のいずれかの画像符号化装置とを具備するものとして構成されている。   That is, a camera system according to the present invention includes an imaging device that converts an imaging signal into a luminance / color difference signal, and the above << 1 >> to << 13 >> in which the luminance / color difference signal is input from the imaging device and image coding processing is performed. One of the image encoding devices is provided.

カメラシステムにおいて、入力画像データが急激に変化した場合に、その変化の規模に応じて量子化係数を大きくするので、発生符号量の過剰な増大を抑制することが可能となる。   In the camera system, when the input image data changes abruptly, the quantization coefficient is increased according to the scale of the change, so that it is possible to suppress an excessive increase in the generated code amount.

以下、本発明の画像符号化装置の実施例について図面を参照しながら説明する。なお、以下の各実施例において、他の実施例と同様の機能を有する構成要素については同一の符号を付して説明を省略する。   Embodiments of an image encoding apparatus according to the present invention will be described below with reference to the drawings. In the following embodiments, components having functions similar to those of the other embodiments are denoted by the same reference numerals, and description thereof is omitted.

(実施例1)
実施例1では、急激なシーンチェンジにおける発生符号量を抑えるために、符号化前に入力画像データのDC成分を取得し、既に符号化した前回の入力画像データのDC成分と比較することで画像の変化量を判断し、DC成分の変化量に基づいて符号化のための量子化係数を算出することで、符号量を抑圧する例について説明する。本実施例は専用のDC成分生成部を備えており、入力画像データのDC成分の取得が符号化前に可能となっている。
Example 1
In the first embodiment, in order to suppress the generated code amount in a sudden scene change, the DC component of the input image data is acquired before encoding, and is compared with the DC component of the previous input image data that has already been encoded. An example in which the amount of code is suppressed by determining the amount of change and calculating the quantization coefficient for encoding based on the amount of change of the DC component will be described. In this embodiment, a dedicated DC component generation unit is provided, and the DC component of the input image data can be acquired before encoding.

図1は本発明の実施例1における画像符号化装置が組み込まれたカメラシステムの構成を示すブロック図である。図1において、20は画像符号化装置、1は画像符号化装置20の外部の撮像装置11から輝度・色差信号を入力する画像入力部、2は符号化部10から前回の符号化で得られた符号化情報を取得し、量子化係数算出を実施するか否かをその符号化情報に従って判定する量子化係数算出要否判定部、3はDC成分生成部4へ入力画像データの輝度・色差信号を出力し、入力画像データのDC成分Anを取得するDC成分取得部、4は画像入力部1からの輝度・色差信号に基づいてDC成分を生成するDC成分生成部、5はDC成分取得部3から取得した入力画像データのDC成分Anを保存し、既に符号化した前回の入力画像データのDC成分An-1と、入力画像データのDC成分Anを出力するDC成分保存部、6はDC成分保存部5から入力画像データのDC成分Anと、比較対象としての既に符号化した前回の入力画像データのDC成分An-1を取得し、画像変化量として2つの画像データのDC成分差分量ΔAn(=An−An-1)を算出する画像変化演算部、7は画像変化演算部6からDC成分差分量ΔAnを取得し、DC成分差分量ΔAnから量子化係数qnを算出する量子化係数算出部、8は量子化係数算出要否判定部2からDCT要求を受け、画像入力部1から輝度・色差信号を取得し、入力画像データのDC成分Anを生成するDCT部、9はDCT部8で生成したDC成分Anを、量子化係数算出部7で算出した量子化係数qnに基づき量子化する量子化部、10は量子化部9から量子化情報を取得して符号化を行い、符号化データを画像処理装置12および記録媒体13に出力する符号化部、11は撮像装置、12は画像処理装置、13は記録媒体である。画像符号化装置20は符号の1ないし10で指示される構成要素群を具備している。カメラシステム30は、撮像装置11と画像符号化装置20を具備している。   FIG. 1 is a block diagram showing a configuration of a camera system in which an image encoding device according to Embodiment 1 of the present invention is incorporated. In FIG. 1, 20 is an image encoding device, 1 is an image input unit that inputs luminance / color difference signals from an imaging device 11 outside the image encoding device 20, and 2 is obtained from the encoding unit 10 in the previous encoding. The quantization coefficient calculation necessity determination unit 3 for determining whether or not to perform the quantization coefficient calculation according to the coding information, and 3 to the DC component generation unit 4 for luminance / color difference of the input image data A DC component acquisition unit that outputs a signal and acquires a DC component An of input image data, 4 is a DC component generation unit that generates a DC component based on a luminance / color difference signal from the image input unit 1, and 5 is a DC component acquisition A DC component storage unit 6 that stores the DC component An of the input image data acquired from the unit 3 and outputs the DC component An-1 of the previous input image data that has already been encoded and the DC component An of the input image data; Input image from DC component storage 5 The DC component An of the data and the DC component An-1 of the previous input image data already encoded as the comparison target are acquired, and the DC component difference amount ΔAn (= An−An−) of the two image data is obtained as the image change amount. 1) an image change calculation unit that calculates 1), 7 obtains a DC component difference amount ΔAn from the image change calculation unit 6, and calculates a quantization coefficient qn from the DC component difference amount ΔAn, 8 is a quantization A DCT unit that receives a DCT request from the coefficient calculation necessity determination unit 2, acquires a luminance / color difference signal from the image input unit 1, and generates a DC component An of the input image data, and 9 is a DC component An generated by the DCT unit 8. Is quantized based on the quantized coefficient qn calculated by the quantized coefficient calculating unit 7, 10 obtains quantization information from the quantizing unit 9, performs encoding, and converts the encoded data into an image processing apparatus 12 and the mark to be output to the recording medium 13 Unit, 11 image pickup device 12 is an image processing apparatus, 13 is a recording medium. The image encoding device 20 includes a group of components indicated by reference numerals 1 to 10. The camera system 30 includes an imaging device 11 and an image encoding device 20.

次に、上記のように構成された本実施例の画像符号化装置の動作を図2のフローチャートに従って説明する。   Next, the operation of the image coding apparatus of the present embodiment configured as described above will be described with reference to the flowchart of FIG.

ステップS1において、画像入力部1は、撮像装置11から入力画像データにおける輝度・色差情報を入力する。   In step S <b> 1, the image input unit 1 inputs luminance / color difference information in the input image data from the imaging device 11.

次いでステップS2において、量子化係数算出要否判定部2は前回符号化した量子化係数qn-1が所定のしきい値以下であるかを判定し、所定のしきい値以下であれば発生符号量が増大する可能性があると判定し、ステップS3に進む。そうでなければ発生符号量が増大することがないと判定し、ステップS14へ進む。ステップS14に進んだ場合、DCT部8は従来通り入力画像データのDCT処理を行い、次いでステップS15において量子化処理を行い、さらにステップS16において符号化処理を行い、処理を終了する。   Next, in step S2, the quantization coefficient calculation necessity determination unit 2 determines whether the previously encoded quantization coefficient qn-1 is equal to or less than a predetermined threshold value. It is determined that the amount may increase, and the process proceeds to step S3. Otherwise, it is determined that the generated code amount does not increase, and the process proceeds to step S14. When the process proceeds to step S14, the DCT unit 8 performs DCT processing of the input image data as usual, then performs quantization processing in step S15, further performs encoding processing in step S16, and ends the processing.

ステップS2において量子化係数qn-1が所定のしきい値以下で発生符号量が増大する可能性があると判定して進んだステップS3においては、DC成分取得部3はDC成分生成部4へ入力画像データの輝度・色差信号を出力し、DCTの結果得られたDC成分を取得する。   In step S3, when it is determined that there is a possibility that the generated code amount may increase when the quantization coefficient qn-1 is equal to or smaller than the predetermined threshold value in step S2, the DC component acquisition unit 3 goes to the DC component generation unit 4. A luminance / color difference signal of the input image data is output, and a DC component obtained as a result of DCT is acquired.

次いでステップS4において、DC成分取得部3はDC成分取得単位を判断し、DC成分取得単位がDCT実行ブロック単位であれば、ステップS5にてDC成分生成部4に対し輝度・色差信号を出力し、入力画像データのDC成分AnをDCT実行ブロック単位で取得する。DC成分取得単位がマクロブロック単位であれば、ステップS6にてDC成分生成部4に対し輝度・色差信号を出力し、入力画像データのDC成分Anをマクロブロック単位で取得する。また、DC成分取得単位がピクチャ単位であれば、ステップS7にてDC成分生成部4に対し輝度・色差信号を出力し、入力画像データのDC成分Anをピクチャ単位で取得する。   Next, in step S4, the DC component acquisition unit 3 determines a DC component acquisition unit. If the DC component acquisition unit is a DCT execution block unit, the luminance / color difference signal is output to the DC component generation unit 4 in step S5. The DC component An of the input image data is acquired in units of DCT execution blocks. If the DC component acquisition unit is a macroblock unit, a luminance / color difference signal is output to the DC component generation unit 4 in step S6, and the DC component An of the input image data is acquired in macroblock units. If the DC component acquisition unit is a picture unit, a luminance / color difference signal is output to the DC component generation unit 4 in step S7, and the DC component An of the input image data is acquired for each picture.

続くステップS8において、DC成分保存部5は、入力画像データのDC成分Anと比較されるべきDC成分として、既に符号化した前回の入力画像データのDC成分An-1をセットする。   In subsequent step S8, the DC component storage unit 5 sets the DC component An-1 of the previous input image data that has already been encoded as the DC component to be compared with the DC component An of the input image data.

次いでステップS9において、画像変化演算部6は“DC成分を比較する単位”(DC成分比較単位)を判断し、DCT実行ブロック単位の場合、ステップS10に進む。   Next, in step S9, the image change calculation unit 6 determines a “unit for comparing DC components” (DC component comparison unit). If the unit is a DCT execution block unit, the process proceeds to step S10.

ステップS10においては、入力画像データのDC成分Anと既に符号化した前回の入力画像データのDC成分An-1との差分をDCT実行ブロック単位でとり、差分の累計を、入力画像データと既に符号化した前回の入力画像データのDC成分の差分であるDC成分差分量ΔAnとし、ステップS13に進む。   In step S10, the difference between the DC component An of the input image data and the DC component An-1 of the previous input image data that has already been encoded is taken in units of DCT execution blocks, and the accumulated difference is already encoded with the input image data. The DC component difference amount ΔAn, which is the difference between the DC components of the previous input image data, is set, and the process proceeds to step S13.

DC成分比較単位がマクロブロック単位であれば、ステップS11において、入力画像データのDC成分Anと既に符号化した前回の入力画像データのDC成分An-1との差分をマクロブロック単位でとり、差分の累計をDC成分差分量ΔAnとし、ステップS13に進む。   If the DC component comparison unit is a macroblock unit, in step S11, the difference between the DC component An of the input image data and the DC component An-1 of the previous input image data that has already been encoded is taken in macroblock units, and the difference is calculated. Is the DC component difference amount ΔAn, and the process proceeds to step S13.

DC成分比較単位がピクチャ単位であれば、ステップS12において、入力画像データのDC成分Anと既に符号化した前回の入力画像データのDC成分An-1との差分をピクチャ単位でとり、差分の累計をDC成分差分量ΔAnとし、ステップS13に進む。   If the DC component comparison unit is a picture unit, in step S12, the difference between the DC component An of the input image data and the DC component An-1 of the previous input image data that has already been encoded is taken in units of pictures, and the difference is accumulated. Is the DC component difference amount ΔAn, and the process proceeds to step S13.

次いでステップS13において、量子化係数算出部7は、DC成分差分量ΔAnを判断して、このDC成分差分量ΔAnが大きい場合はシーンチェンジしたと判定し、符号化する量子化係数qnを増加させ、DC成分差分量ΔAnが小さい場合はシーンが変わっていないと判定し、符号化する量子化係数qnを増加させないという条件のもとで、DC成分差分量ΔAnから量子化係数qnを算出し、ステップS15に進む。   Next, in step S13, the quantization coefficient calculation unit 7 determines the DC component difference amount ΔAn, determines that the scene change has occurred when the DC component difference amount ΔAn is large, and increases the quantization coefficient qn to be encoded. When the DC component difference amount ΔAn is small, it is determined that the scene has not changed, and the quantization coefficient qn is calculated from the DC component difference amount ΔAn under the condition that the quantization coefficient qn to be encoded is not increased. Proceed to step S15.

次いでステップS15において、量子化部9は、算出した量子化係数qnに基づき入力画像データの量子化を行う。   Next, in step S15, the quantization unit 9 quantizes the input image data based on the calculated quantization coefficient qn.

次いでステップS16において、符号化部10は量子化部9から入力した量子化情報に基づき符号化を行う。   Next, in step S <b> 16, the encoding unit 10 performs encoding based on the quantization information input from the quantization unit 9.

次に、図3を用いて入力画像データと比較画像データとのDC成分差分量ΔAnの算出方法について説明する。   Next, a method for calculating the DC component difference amount ΔAn between the input image data and the comparison image data will be described with reference to FIG.

入力画像データ、比較画像データのDC成分比較単位をDCT実行ブロック単位の(a)〜(r)とした場合、DCT実行ブロック単位で対となる入力画像データ(a)と比較画像データ(b)とのDC成分の差分絶対値を算出し、それと同様に、それぞれ対となる入力画像データ(c)と比較画像データ(d)とのDC成分の差分絶対値、入力画像データ(e)と比較画像データ(f)とのDC成分の差分絶対値、入力画像データ(g)と比較画像データ(h)とのDC成分の差分絶対値、入力画像データ(i)と比較画像データ(j)とのDC成分の差分絶対値、入力画像データ(k)と比較画像データ(l)とのDC成分の差分絶対値、入力画像データ(m)と比較画像データ(n)とのDC成分の差分絶対値、入力画像データ(o)と比較画像データ(p)とのDC成分の差分絶対値、入力画像データ(q)と比較画像データ(r)とのDC成分の差分絶対値を算出し、これらの差分絶対値の累計を入力画像データと比較画像データとのDC成分差分量ΔAnとする。   When the DC component comparison unit of the input image data and the comparison image data is (a) to (r) of the DCT execution block unit, the input image data (a) and the comparison image data (b) that are paired in the DCT execution block unit. Similarly, the difference absolute value of the DC component between the input image data (c) and the comparison image data (d), which are paired with each other, is compared with the input image data (e). DC component absolute difference between image data (f), DC component absolute difference between input image data (g) and comparison image data (h), input image data (i) and comparison image data (j) DC component difference absolute value, input image data (k) and comparison image data (l) DC component difference absolute value, input image data (m) and comparison image data (n) DC component absolute difference Value, input image data (o) The difference absolute value of the DC component between the comparison image data (p) and the difference absolute value of the DC component between the input image data (q) and the comparison image data (r) are calculated, and the total of these difference absolute values is calculated as the input image. The DC component difference amount ΔAn between the data and the comparison image data is used.

次に、図4を用いて量子化係数qnの算出方法を説明する。   Next, a method for calculating the quantization coefficient qn will be described with reference to FIG.

入力画像データと比較画像データとのDC成分差分量ΔAnに対して閾値A0〜Akを持たせ、DC成分差分量ΔAnがその閾値以内であったら、予め用意しているその閾値と対比した量子化係数qnの係数B0〜Bnを設定する。DC成分差分量ΔAnが大きいほど、シーン変化量が大きいと見なせるため、DC成分差分量ΔAnの大きさに応じて量子化係数qnの値を大きくすることで、発生符号量を抑制することが可能となる。   A threshold value A0 to Ak is given to the DC component difference amount ΔAn between the input image data and the comparison image data, and if the DC component difference amount ΔAn is within the threshold value, the quantization is compared with the prepared threshold value. Coefficients B0 to Bn of the coefficient qn are set. As the DC component difference amount ΔAn is larger, it can be considered that the scene change amount is larger. Therefore, the generated code amount can be suppressed by increasing the value of the quantization coefficient qn according to the magnitude of the DC component difference amount ΔAn. It becomes.

以上のように本実施例によれば、シーンチェンジのように入力画像データが急激に変化した場合に、その変化の規模に応じて量子化係数を大きくするので、発生符号量の過剰な増大を効率良く抑制することができる。併せて、一般的なDCT部8から独立した専用のDC成分生成部4を備えているので、各部の処理が高速化され、入力画像データの急激な変化により的確に対応することができる。   As described above, according to the present embodiment, when the input image data changes suddenly as in a scene change, the quantization coefficient is increased according to the scale of the change. It can be suppressed efficiently. In addition, since the dedicated DC component generation unit 4 independent from the general DCT unit 8 is provided, the processing of each unit is speeded up, and it is possible to accurately cope with a sudden change in input image data.

(実施例2)
図5は本発明の実施例2における画像符号化装置が組み込まれたカメラシステムの構成を示すブロック図である。実施例2では、システムコストを抑えるために図1の構成からDC成分生成部4を削除している。代わりに、DC成分取得部5に与えるDC成分をDCT部8から送出するようになっている。
(Example 2)
FIG. 5 is a block diagram showing a configuration of a camera system in which an image encoding device according to the second embodiment of the present invention is incorporated. In the second embodiment, the DC component generation unit 4 is deleted from the configuration of FIG. 1 in order to reduce the system cost. Instead, the DC component supplied to the DC component acquisition unit 5 is sent from the DCT unit 8.

本実施例の画像符号化装置の動作を図6のフローチャートに従って説明する。   The operation of the image coding apparatus according to the present embodiment will be described with reference to the flowchart of FIG.

ステップS21において、画像入力部1は、撮像装置11から入力画像データにおける輝度・色差情報を入力する。   In step S <b> 21, the image input unit 1 inputs luminance / color difference information in the input image data from the imaging device 11.

次いでステップS22において、量子化係数算出要否判定部2は前回符号化した量子化係数qn-1が所定のしきい値以下であるかを判定し、所定のしきい値以下であれば発生符号量が増大する可能性があると判定し、ステップS23に進む。そうでなければ発生符号量が増大することがないと判定し、ステップS34へ進む。ステップS34に進んだ場合、DCT部8は従来通り入力画像データのDCT処理を行い、次いでステップS35において量子化処理を行い、さらにステップS36において符号化処理を行い、処理を終了する。   Next, in step S22, the quantization coefficient calculation necessity determination unit 2 determines whether the previously encoded quantization coefficient qn-1 is equal to or less than a predetermined threshold value. It is determined that the amount may increase, and the process proceeds to step S23. Otherwise, it is determined that the generated code amount does not increase, and the process proceeds to step S34. When the process proceeds to step S34, the DCT unit 8 performs DCT processing of the input image data as usual, then performs quantization processing in step S35, further performs encoding processing in step S36, and ends the processing.

ステップS22において量子化係数qn-1が所定のしきい値以下で発生符号量が増大する可能性があると判定して進んだステップS23においては、DC成分取得部3はDCT部8へDCT要求を発行し、DCTの結果得られたDC成分を取得する。このステップS23は図2のステップS3とは相違する。それは、図1のDC成分生成部4が本実施例にはなく、代わりにDCT部8を利用しているからである。   In step S23, the DC component acquisition unit 3 requests the DCT unit 8 to send a DCT request in step S23, which proceeds after determining that there is a possibility that the generated code amount may increase when the quantization coefficient qn-1 is equal to or smaller than the predetermined threshold value in step S22. To obtain the DC component obtained as a result of DCT. This step S23 is different from step S3 in FIG. This is because the DC component generation unit 4 in FIG. 1 is not in the present embodiment, and instead uses the DCT unit 8.

次いでステップS24において、DC成分取得部3はDC成分取得単位を判断し、DC成分取得単位がマクロブロック単位であれば、ステップS26にてDC成分取得部3から入力画像データのDC成分Anをマクロブロック単位で取得する。DC成分取得単位がDCT実行ブロック単位であれば、ステップS25にてDC成分取得部3から入力画像データのDC成分AnをDCT実行ブロック単位で取得する。DC成分取得単位がピクチャ単位であれば、ステップS27にてDC成分取得部3から入力画像データのDC成分Anをピクチャ単位で取得する。   Next, in step S24, the DC component acquisition unit 3 determines a DC component acquisition unit. If the DC component acquisition unit is a macroblock unit, the DC component An of the input image data is macro-converted from the DC component acquisition unit 3 in step S26. Get in blocks. If the DC component acquisition unit is a DCT execution block unit, the DC component An of the input image data is acquired from the DC component acquisition unit 3 in DCT execution block units in step S25. If the DC component acquisition unit is a picture unit, in step S27, the DC component An of the input image data is acquired from the DC component acquisition unit 3 in picture units.

続くステップS28において、DC成分保存部5は、入力画像データのDC成分Anと比較されるべきDC成分として、既に符号化した前回の入力画像データのDC成分An-1をセットする。   In subsequent step S28, the DC component storage unit 5 sets the previously encoded DC component An-1 of the previous input image data as the DC component to be compared with the DC component An of the input image data.

次いでステップS29において、画像変化演算部6はDC成分比較単位を判断し、マクロブロック単位の場合、ステップS31に進む。   Next, in step S29, the image change calculation unit 6 determines a DC component comparison unit. If the unit is a macroblock unit, the process proceeds to step S31.

ステップS31においては、入力画像データのDC成分Anと既に符号化した前回の入力画像データのDC成分An-1との差分をマクロブロック単位でとり、差分の累計を、入力画像データと既に符号化した前回の入力画像データのDC成分の差分であるDC成分差分量ΔAnとし、ステップS33に進む。   In step S31, the difference between the DC component An of the input image data and the DC component An-1 of the previous input image data that has already been encoded is taken in macroblock units, and the accumulated difference is already encoded with the input image data. The DC component difference amount ΔAn that is the difference between the DC components of the previous input image data is set, and the process proceeds to step S33.

DC成分比較単位がDCT実行ブロック単位であれば、ステップS30において、入力画像データのDC成分Anと既に符号化した前回の入力画像データのDC成分An-1との差分をDCT実行ブロック単位でとり、差分の累計をDC成分差分量ΔAnとし、ステップS33に進む。   If the DC component comparison unit is a DCT execution block unit, in step S30, the difference between the DC component An of the input image data and the DC component An-1 of the previous input image data that has already been encoded is calculated in units of the DCT execution block. The accumulated difference is set as the DC component difference amount ΔAn, and the process proceeds to step S33.

DC成分比較単位がピクチャ単位であれば、ステップS32において、入力画像データのDC成分Anと既に符号化した前回の入力画像データのDC成分An-1との差分をピクチャ単位でとり、差分の累計をDC成分差分量ΔAnとし、ステップS33に進む。   If the DC component comparison unit is a picture unit, in step S32, the difference between the DC component An of the input image data and the DC component An-1 of the previous input image data that has already been encoded is taken in units of pictures, and the difference is accumulated. Is the DC component difference amount ΔAn, and the process proceeds to step S33.

次いでステップS33において、量子化係数算出部7は、DC成分差分量ΔAnを判断して、このDC成分差分量ΔAnが大きい場合はシーンチェンジしたと判定し、符号化する量子化係数qnを増加させ、DC成分差分量ΔAnが小さい場合はシーンが変わっていないと判定し、符号化する量子化係数qnを増加させないという条件のもとで、DC成分差分量ΔAnから量子化係数qnを算出し、ステップS35に進む。   Next, in step S33, the quantization coefficient calculation unit 7 determines the DC component difference amount ΔAn, determines that the scene has changed when the DC component difference amount ΔAn is large, and increases the quantization coefficient qn to be encoded. When the DC component difference amount ΔAn is small, it is determined that the scene has not changed, and the quantization coefficient qn is calculated from the DC component difference amount ΔAn under the condition that the quantization coefficient qn to be encoded is not increased. Proceed to step S35.

次いでステップS35において、量子化部9は、算出した量子化係数qnに基づき入力画像データの量子化を行う。   Next, in step S35, the quantization unit 9 quantizes the input image data based on the calculated quantization coefficient qn.

次いでステップS36において、符号化部10は量子化部9から入力した量子化情報に基づき符号化を行う。   Next, in step S <b> 36, the encoding unit 10 performs encoding based on the quantization information input from the quantization unit 9.

以上のように本実施例によれば、シーンチェンジのように入力画像データが急激に変化した場合に、実施例1と同様、その変化の規模に応じて量子化係数を大きくするので、発生符号量の過剰な増大を効率良く抑制することができる。併せて、一般的なDCT部8で得られるDC成分をDC成分取得部3に渡すように構成してあるので、実施例1の場合の専用のDC成分生成部4は不要となり、その分、コストアップを抑制することができる。   As described above, according to the present embodiment, when the input image data changes suddenly as in a scene change, the quantization coefficient is increased according to the scale of the change as in the first embodiment. An excessive increase in the amount can be efficiently suppressed. In addition, since the DC component obtained by the general DCT unit 8 is configured to be passed to the DC component acquisition unit 3, the dedicated DC component generation unit 4 in the case of the first embodiment is not necessary. Cost increase can be suppressed.

(実施例3)
図7は本発明の実施例3における画像符号化装置の動作を示すフローチャートである。本実施例では、比較されるべきDC成分として、任意フレーム分のDC成分の平均値をセットするようになっている。この点で実施例1,2とは異なっている。
(Example 3)
FIG. 7 is a flowchart showing the operation of the image coding apparatus according to the third embodiment of the present invention. In this embodiment, an average value of DC components for an arbitrary frame is set as a DC component to be compared. This is different from the first and second embodiments.

ステップS41において、画像入力部1は、撮像装置11から入力画像データにおける輝度・色差情報を入力する。   In step S <b> 41, the image input unit 1 inputs luminance / color difference information in the input image data from the imaging device 11.

次いでステップS42において、量子化係数算出要否判定部2は前回符号化した量子化係数qn-1が所定のしきい値以下であるかを判定し、所定のしきい値以下であれば発生符号量が増大する可能性があると判定し、ステップS43に進む。そうでなければ発生符号量が増大することがないと判定し、ステップS54へ進む。ステップS54に進んだ場合、DCT部8は従来通り入力画像データのDCT処理を行い、次いでステップS55において量子化処理を行い、さらにステップS56において符号化処理を行い、処理を終了する。   Next, in step S42, the quantization coefficient calculation necessity determination unit 2 determines whether the previously encoded quantization coefficient qn-1 is equal to or less than a predetermined threshold value. It is determined that the amount may increase, and the process proceeds to step S43. Otherwise, it is determined that the generated code amount does not increase, and the process proceeds to step S54. When the process proceeds to step S54, the DCT unit 8 performs DCT processing of the input image data as usual, then performs quantization processing in step S55, further performs encoding processing in step S56, and ends the processing.

ステップS42において量子化係数qn-1が所定のしきい値以下で発生符号量が増大する可能性があると判定して進んだステップS43においては、DC成分取得部3はDCT部8へDCT要求を発行し、DCTの結果得られたDC成分を取得する。   In step S43, the DC component acquisition unit 3 sends a DCT request to the DCT unit 8 in step S43, which proceeds after determining that there is a possibility that the generated code amount may increase when the quantization coefficient qn-1 is equal to or smaller than a predetermined threshold value in step S42. To obtain the DC component obtained as a result of DCT.

次いでステップS44において、DC成分取得部3はDC成分取得単位を判断し、DC成分取得単位がピクチャ単位であれば、ステップS47にてDC成分取得部3より入力画像データのDC成分Anをピクチャ単位で取得する。DC成分取得単位がDCT実行ブロック単位であれば、ステップS45にてDC成分取得部3より入力画像データのDC成分AnをDCT実行ブロック単位で取得する。また、DC成分取得単位がマクロブロック単位であれば、ステップS46にてDC成分取得部3より入力画像データのDC成分Anをマクロブロック単位で取得する。   Next, in step S44, the DC component acquisition unit 3 determines the DC component acquisition unit. If the DC component acquisition unit is a picture unit, the DC component An of the input image data is converted from the DC component acquisition unit 3 to the picture unit in step S47. Get in. If the DC component acquisition unit is a DCT execution block unit, the DC component An of the input image data is acquired from the DC component acquisition unit 3 in the DCT execution block unit in step S45. If the DC component acquisition unit is a macroblock unit, the DC component An of the input image data is acquired from the DC component acquisition unit 3 in macroblock units in step S46.

続くステップS48において、DC成分保存部5は、入力画像データのDC成分Anと比較されるべきDC成分として、任意フレーム分のDC成分の平均値をセットする。   In subsequent step S48, the DC component storage unit 5 sets an average value of DC components for an arbitrary frame as a DC component to be compared with the DC component An of the input image data.

次いでステップS49において、画像変化演算部6はDC成分比較単位を判断し、ピクチャ単位の場合、ステップS52に進む。   Next, in step S49, the image change calculation unit 6 determines a DC component comparison unit. If the unit is a picture unit, the process proceeds to step S52.

ステップS52においては、入力画像データのDC成分Anと既に符号化した前回の入力画像データのDC成分An-1との差分をピクチャ単位でとり、差分の累計を、入力画像データと既に符号化した前回の入力画像データのDC成分の差分であるDC成分差分量ΔAnとし、ステップS53に進む。   In step S52, the difference between the DC component An of the input image data and the DC component An-1 of the previous input image data that has already been encoded is taken in picture units, and the accumulated difference is already encoded with the input image data. The DC component difference amount ΔAn that is the difference between the DC components of the previous input image data is set, and the process proceeds to step S53.

DC成分比較単位がDCT実行ブロック単位であれば、ステップS50において、入力画像データのDC成分Anと既に符号化した前回の入力画像データのDC成分An-1との差分をDCT実行ブロック単位でとり、差分の累計をDC成分差分量ΔAnとし、ステップS53に進む。   If the DC component comparison unit is a DCT execution block unit, in step S50, the difference between the DC component An of the input image data and the DC component An-1 of the previous input image data that has been encoded is calculated in units of the DCT execution block. The accumulated difference is set as the DC component difference amount ΔAn, and the process proceeds to step S53.

DC成分比較単位がマクロブロック単位であれば、ステップS51において、入力画像データのDC成分Anと既に符号化した前回の入力画像データのDC成分An-1との差分をマクロブロック単位でとり、差分の累計をDC成分差分量ΔAnとし、ステップS53に進む。   If the DC component comparison unit is a macroblock unit, in step S51, the difference between the DC component An of the input image data and the DC component An-1 of the previous input image data that has already been encoded is calculated in macroblock units. Is the DC component difference amount ΔAn, and the process proceeds to step S53.

次いでステップS53において、量子化係数算出部7は、DC成分差分量ΔAnを判断して、このDC成分差分量ΔAnが大きい場合はシーンチェンジしたと判定し、符号化する量子化係数qnを増加させ、DC成分差分量ΔAnが小さい場合はシーンが変わっていないと判定し、符号化する量子化係数qnを増加させないという条件のもとで、DC成分差分量ΔAnから量子化係数qnを算出し、ステップS55に進む。   Next, in step S53, the quantization coefficient calculation unit 7 determines the DC component difference amount ΔAn, determines that the scene has changed when the DC component difference amount ΔAn is large, and increases the quantization coefficient qn to be encoded. When the DC component difference amount ΔAn is small, it is determined that the scene has not changed, and the quantization coefficient qn is calculated from the DC component difference amount ΔAn under the condition that the quantization coefficient qn to be encoded is not increased. Proceed to step S55.

次いでステップS55において、量子化部9は、算出した量子化係数qnに基づき入力画像データの量子化を行う。   Next, in step S55, the quantization unit 9 quantizes the input image data based on the calculated quantization coefficient qn.

次いでステップS56において、符号化部10は量子化部9から入力した量子化情報に基づき符号化を行う。   In step S56, the encoding unit 10 performs encoding based on the quantization information input from the quantization unit 9.

以上のように本実施例によれば、平均値を採用するので、仮に入力画像データのDC成分Anの値が異常になった場合でも、入力画像データのDC成分Anと前回符号化したDC成分との差分量を安定して算出することできる。   As described above, according to the present embodiment, since the average value is adopted, even if the value of the DC component An of the input image data becomes abnormal, the DC component An of the input image data and the DC component previously encoded are used. Can be calculated stably.

本発明の画像符号化装置の技術は、シーンチェンジなど入力画像データが急激に変化した場合でも、その変化の規模に応じてリアルタイムに量子化係数を大きくするので、繰り返しの圧縮処理を不要化し、メモリ容量の増大を抑制し、過剰な圧縮によるブロックノイズ、モスキートノイズの発生を抑制しつつ、発生符号量の過剰な増大を効率良く抑制するものであり、例えばデジタルビデオカメラやデジタルスチルカメラ、カメラ付き携帯電話端末やカメラ付き携帯電子手帳などの撮像機能を備えた機器において有用である。   The technology of the image coding apparatus of the present invention increases the quantization coefficient in real time according to the scale of the change even when the input image data such as a scene change suddenly changes, thereby eliminating the need for repeated compression processing, It suppresses an increase in memory capacity, suppresses the generation of block noise and mosquito noise due to excessive compression, and efficiently suppresses an excessive increase in the amount of generated codes. For example, digital video cameras, digital still cameras, cameras It is useful in devices having an imaging function such as a mobile phone terminal with a camera and a portable electronic notebook with a camera.

1 画像入力部
2 量子化係数算出要否判定部
3 DC成分取得部
4 DC成分生成部
5 DC成分保存部
6 画像変化演算部
7 量子化係数算出部
8 DCT部
9 量子化部
10 符号化部
11 撮像装置
12 画像処理装置
13 記録媒体
20 画像符号化装置
30 カメラシステム
DESCRIPTION OF SYMBOLS 1 Image input part 2 Quantization coefficient calculation necessity judgment part 3 DC component acquisition part 4 DC component generation part 5 DC component preservation | save part 6 Image change calculation part 7 Quantization coefficient calculation part 8 DCT part 9 Quantization part 10 Encoding part DESCRIPTION OF SYMBOLS 11 Imaging device 12 Image processing device 13 Recording medium 20 Image encoding device 30 Camera system

Claims (14)

外部から画像データを入力する画像入力部と、
前記画像入力部から輝度・色差信号を入力してDC成分を生成するDCT部と、
入力されてくる量子化係数を用いて前記DCT部から入力したDC成分を量子化する量子化部と、
前記量子化部で量子化された情報を符号化する符号化部と、
前記符号化部から受け取った前回の符号化情報が発生符号量の増大可能性を示しているときは量子化係数算出が必要であると判定し、前記前回の符号化情報が発生符号量の増大可能性を示していないときは量子化係数算出は不要であると判定する量子化係数算出要否判定部と、
前記量子化係数算出の要否判定が必要であるとされるとき、
前記画像入力部からの輝度・色差信号から生成されるDC成分を取得するDC成分取得部と、
前記DC成分取得部が取得した既に符号化した前回の入力画像データのDC成分と今回の入力画像データのDC成分を保存するDC成分保存部と、
前記DC成分保存部から入力画像データのDC成分と既に符号化した前回の入力画像データのDC成分を取得し、両DC成分を比較することで画像変化量を生成する画像変化演算部と、
前記画像変化演算部で得られた画像変化量に基づいて符号化のための量子化係数を算出し、算出した量子化係数を前記量子化部に渡す量子化係数算出部とを備えた画像符号化装置。
An image input unit for inputting image data from the outside;
A DCT unit for inputting a luminance / color difference signal from the image input unit to generate a DC component;
A quantization unit that quantizes a DC component input from the DCT unit using an input quantization coefficient;
An encoding unit for encoding the information quantized by the quantization unit;
When the previous encoded information received from the encoding unit indicates that the generated code amount may increase, it is determined that quantization coefficient calculation is necessary, and the previous encoded information increases the generated code amount. A quantization coefficient calculation necessity determination unit that determines that the calculation of the quantization coefficient is unnecessary when the possibility is not indicated;
When the necessity determination of the quantization coefficient calculation is required,
A DC component acquisition unit for acquiring a DC component generated from a luminance / color difference signal from the image input unit;
A DC component storage unit that stores the DC component of the previous input image data encoded by the DC component acquisition unit and the DC component of the current input image data;
An image change calculation unit that obtains the DC component of the input image data and the DC component of the previous input image data that has already been encoded from the DC component storage unit, and generates an image change amount by comparing both DC components;
An image code comprising: a quantization coefficient for encoding based on an image change amount obtained by the image change calculation unit; and a quantization coefficient calculation unit that passes the calculated quantization coefficient to the quantization unit Device.
前記DC成分取得部が取得する前記DC成分を生成する手段として、前記DCT部とは別に構成されて、前記画像入力部からの輝度・色差信号に基づいて前記DC成分を生成するDC成分生成部を備えている請求項1に記載の画像符号化装置。   As a means for generating the DC component acquired by the DC component acquisition unit, a DC component generation unit that is configured separately from the DCT unit and generates the DC component based on a luminance / color difference signal from the image input unit. The image encoding device according to claim 1, comprising: 前記DC成分取得部が取得する前記DC成分を生成する手段として、前記DCT部におけるDC成分生成手段を用いる請求項1に記載の画像符号化装置。   The image coding apparatus according to claim 1, wherein a DC component generation unit in the DCT unit is used as the unit that generates the DC component acquired by the DC component acquisition unit. 前記量子化係数算出部は、前記画像変化演算部で得られた画像変化量として前記両DC成分の差分であるDC成分差分量を生成し、このDC成分差分量に基づいて符号化のための量子化係数を算出するように構成されている請求項1から請求項3までのいずれか1項に記載の画像符号化装置。   The quantization coefficient calculation unit generates a DC component difference amount that is a difference between the two DC components as the image change amount obtained by the image change calculation unit, and performs encoding for encoding based on the DC component difference amount. The image coding device according to any one of claims 1 to 3, wherein the image coding device is configured to calculate a quantization coefficient. 前記量子化係数算出要否判定部は、前回符号化した量子化係数が特定の閾値より大きいときは量子化係数算出が不要であると判定するように構成されている請求項1から請求項4までのいずれか1項に記載の画像符号化装置。   5. The quantization coefficient calculation necessity determination unit is configured to determine that calculation of a quantization coefficient is unnecessary when a previously encoded quantization coefficient is greater than a specific threshold value. The image encoding device according to any one of the above. 前記DC成分取得部は、入力画像データのDC成分をマクロブロック単位で取得するように構成されている請求項1から請求項5までのいずれか1項に記載の画像符号化装置。   The image coding apparatus according to any one of claims 1 to 5, wherein the DC component acquisition unit is configured to acquire a DC component of input image data in units of macroblocks. 前記DC成分取得部は、入力画像データのDC成分をピクチャ単位で取得するように構成されている請求項1から請求項5までのいずれか1項に記載の画像符号化装置。   The image encoding device according to any one of claims 1 to 5, wherein the DC component acquisition unit is configured to acquire a DC component of input image data in units of pictures. 前記DC成分取得部は、入力画像データのDC成分をDCT実行ブロック単位で取得するように構成されている請求項1から請求項5までのいずれか1項に記載の画像符号化装置。   The image coding apparatus according to any one of claims 1 to 5, wherein the DC component acquisition unit is configured to acquire a DC component of input image data in units of DCT execution blocks. 前記DC成分保存部は、入力画像データのDC成分と比較されるべきDC成分として、既に符号化した前回の入力画像データのDC成分をセットするように構成されている請求項1から請求項8までのいずれか1項に記載の画像符号化装置。   The DC component storage unit is configured to set the DC component of the previous input image data that has already been encoded as the DC component to be compared with the DC component of the input image data. The image encoding device according to any one of the above. 前記DC成分保存部は、入力画像データのDC成分と比較されるべきDC成分として、任意フレーム分のDC成分の平均値をセットするように構成されている請求項1から請求項8までのいずれか1項に記載の画像符号化装置。   The DC component storage unit is configured to set an average value of DC components for an arbitrary frame as a DC component to be compared with a DC component of input image data. The image encoding device according to claim 1. 前記画像変化演算部は、入力画像データのDC成分と比較されるべきDC成分の単位をマクロブロック単位にする請求項6に記載の画像符号化装置。   The image coding apparatus according to claim 6, wherein the image change calculation unit sets a unit of a DC component to be compared with a DC component of input image data as a macroblock unit. 前記画像変化演算部は、入力画像データのDC成分と比較されるべきDC成分の単位をピクチャ単位にする請求項7に記載の画像符号化装置。   The image coding apparatus according to claim 7, wherein the image change calculation unit sets a unit of a DC component to be compared with a DC component of input image data as a picture unit. 前記画像変化演算部は、入力画像データのDC成分と比較されるべきDC成分の単位をDCT実行ブロック単位にする請求項8に記載の画像符号化装置。   The image coding apparatus according to claim 8, wherein the image change calculation unit uses a DC component unit to be compared with a DC component of input image data as a DCT execution block unit. 撮像信号を輝度・色差信号に変換する撮像装置と、前記撮像装置から輝度・色差信号を入力し画像符号化処理を行う請求項1から請求項13までのいずれか1項に記載の画像符号化装置とを具備するカメラシステム。   The image coding apparatus according to any one of claims 1 to 13, wherein the image coding apparatus converts an image pickup signal into a luminance / color difference signal, and the image coding process is performed by inputting the luminance / color difference signal from the image pickup apparatus. And a camera system.
JP2010257742A 2010-11-18 2010-11-18 Image encoder and camera system Pending JP2012109846A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010257742A JP2012109846A (en) 2010-11-18 2010-11-18 Image encoder and camera system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010257742A JP2012109846A (en) 2010-11-18 2010-11-18 Image encoder and camera system

Publications (1)

Publication Number Publication Date
JP2012109846A true JP2012109846A (en) 2012-06-07

Family

ID=46494981

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010257742A Pending JP2012109846A (en) 2010-11-18 2010-11-18 Image encoder and camera system

Country Status (1)

Country Link
JP (1) JP2012109846A (en)

Similar Documents

Publication Publication Date Title
US9414086B2 (en) Partial frame utilization in video codecs
JP5893002B2 (en) Rate control in video coding.
JP4641892B2 (en) Moving picture encoding apparatus, method, and program
JP4682102B2 (en) Image coding apparatus and image coding method
JP5173409B2 (en) Encoding device and moving image recording system provided with encoding device
JP2008283560A (en) Information processing apparatus and method thereof
JP6149707B2 (en) Moving picture coding apparatus, moving picture coding method, moving picture coding program, and moving picture photographing apparatus
JPWO2006098226A1 (en) Encoding device and moving image recording system provided with encoding device
JP2012034213A (en) Image processing device, image processing system and image processing method
JP2005159419A (en) Apparatus and method of processing image, computer program and computer-readable storage medium
JP6875821B2 (en) Image coding device, imaging device, image coding method and program
JP2009267689A (en) Moving image coding device, and moving image coding method
KR20050089838A (en) Video encoding with skipping motion estimation for selected macroblocks
US20110176027A1 (en) Method and device for compressing moving image
WO2019001283A1 (en) Method and apparatus for controlling encoding resolution ratio
JP4686280B2 (en) Video encoding device
JP6929044B2 (en) Imaging device, control method of imaging device, and program
JP5943733B2 (en) Image encoding apparatus, control method therefor, and program
JP6875566B2 (en) Moving image prediction coding device, moving image prediction decoding device, moving image prediction coding method, moving image prediction decoding method and moving image prediction decoding program
US20070297517A1 (en) Entropy encoding and decoding apparatuses, and entropy encoding and decoding methods
JP2012109846A (en) Image encoder and camera system
KR101319916B1 (en) Motion estimation method and apparatus, and image encoding method and apparatus using the same
JP2008199521A (en) Image processing apparatus and method thereof
JP2018191136A (en) Encoding device, encoding method and program
JP4747109B2 (en) Calculation amount adjustment device