JP2013017003A - Parameter determination device, imaging device, and program - Google Patents
Parameter determination device, imaging device, and program Download PDFInfo
- Publication number
- JP2013017003A JP2013017003A JP2011147752A JP2011147752A JP2013017003A JP 2013017003 A JP2013017003 A JP 2013017003A JP 2011147752 A JP2011147752 A JP 2011147752A JP 2011147752 A JP2011147752 A JP 2011147752A JP 2013017003 A JP2013017003 A JP 2013017003A
- Authority
- JP
- Japan
- Prior art keywords
- code amount
- encoding
- parameter
- unit
- moving 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.)
- Withdrawn
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
本発明は、パラメータ決定装置、撮像装置およびプログラムに関する。 The present invention relates to a parameter determination device, an imaging device, and a program.
連続して入力される画像を一時的に蓄積し、蓄積した画像より抽出した特徴情報に基づいて、GOP構造を決定して、符号化に必要となるビット量を予測する技術が知られている(例えば、特許文献1参照)。
[先行技術文献]
[特許文献]
[特許文献1]特開2002−199398号公報
A technique is known that temporarily stores continuously input images, determines a GOP structure based on feature information extracted from the stored images, and predicts a bit amount necessary for encoding. (For example, refer to Patent Document 1).
[Prior art documents]
[Patent Literature]
[Patent Document 1] Japanese Patent Application Laid-Open No. 2002-199398
例えば1パスエンコード方式で動画データを符号化すると、各時間で目標ビットレートに近づくよう符号量が調節されるので、画質が不均一となる場合がある。一方、マルチパスエンコード方式によると、符号化するのに膨大な演算資源を要する場合がある。このように、情報量を均一に保ちつつ、少ない演算資源でデータを符号化することができないという課題があった。 For example, when moving image data is encoded by a one-pass encoding method, the amount of code is adjusted so as to approach the target bit rate at each time, so that the image quality may be uneven. On the other hand, according to the multi-pass encoding method, enormous calculation resources may be required for encoding. As described above, there is a problem that data cannot be encoded with a small number of computing resources while keeping the amount of information uniform.
本発明の第1の態様においては、パラメータ決定装置は、第1データの符号量の変化を示す情報を取得する情報取得部と、符号量の変化に基づいて、第1データより後に得られた第2データの符号量を時刻毎に制御する符号化パラメータを決定するパラメータ決定部と、を備える。 In the first aspect of the present invention, the parameter determination device is obtained after the first data based on the information acquisition unit that acquires information indicating the change in the code amount of the first data and the change in the code amount. A parameter determination unit that determines an encoding parameter for controlling the code amount of the second data for each time.
本発明の第2の態様においては、プログラムは、第1データの符号量の変化を示す情報を取得するステップと、符号量の変化に基づいて、第1データより後に得られた第2データの符号量を時刻毎に制御する符号化パラメータを決定するステップと、をコンピュータに実行させる。 In the second aspect of the present invention, the program acquires the information indicating the change in the code amount of the first data, and the second data obtained after the first data based on the change in the code amount. And determining a coding parameter for controlling the amount of code for each time.
なお、上記の発明の概要は、本発明の必要な特徴の全てを列挙したものではない。また、これらの特徴群のサブコンビネーションもまた、発明となりうる。 It should be noted that the above summary of the invention does not enumerate all the necessary features of the present invention. In addition, a sub-combination of these feature groups can also be an invention.
以下、発明の実施の形態を通じて本発明を説明するが、以下の実施形態は特許請求の範囲にかかる発明を限定するものではない。また、実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。 Hereinafter, the present invention will be described through embodiments of the invention, but the following embodiments do not limit the invention according to the claims. In addition, not all the combinations of features described in the embodiments are essential for the solving means of the invention.
図1は、一実施形態にかかる撮影システム50の利用形態の一例を示す。本実施形態において、撮影システム50は、スタジオ60内での撮影に利用される。撮影システム50は、撮像装置10、運台装置20、制御装置30および照明装置40を備える。撮影システム50は、動画を撮影しながらリアルタイムで符号化して、画質が均一な動画データを提供するシステムを提供する。
FIG. 1 shows an example of a usage pattern of an
撮影システム50では、本撮影に先立ち、本撮影と同じ撮影環境でトライアル撮影をひととおり行う。そして、撮像装置10は、トライアル撮影で得られた動画データの符号化情報を考慮して、本撮影で得られた動画データを符号化する場合に適用する符号化パラメータを事前に決定する。例えば、撮像装置10は、トライアル撮影で得られた動画データの符号量の変化を考慮して、撮影の一シーケンスにわたって画質が略一定となるよう、各時間の量子化ステップを決定する。そして、撮像装置10は、本撮影時には、事前に決定した量子化ステップを適用して量子化を施す。撮像装置10によると、トライアル撮影で得られた一シーケンスの動画データから、一シーケンスの全体として最適な量子化ステップを事前に決定することができる。また、本撮影時には、適切な符号量を割り当てるために膨大な演算をしなくて済む。このため、撮像装置10は、動画を撮影しながらリアルタイムで符号化しつつ、画質がより均一な動画データを提供することができる。
Prior to the main shooting, the
制御装置30は、操作入力部32、コントローラ34および制御データ格納部36を有する。制御装置30は、例えば、撮像装置10による撮影環境を制御するコンピュータである。
The
具体的には、制御データ格納部36は、撮像装置10、運台装置20および照明装置40の制御内容を定義した制御データを、記録媒体38から読み出して格納する。例えば、制御データは、照明装置40の発光条件、撮像装置10の撮像条件、撮像装置10の位置および向き等を時間毎に定義する。コントローラ34は、制御データ格納部36に格納された制御データに基づき、撮像装置10、運台装置20および照明装置40を制御する制御信号を送信する。操作入力部32は、トライアル撮影の開始指示、本撮影の開始指示等のユーザ指示を取得する。コントローラ34は、操作入力部32からの指示に応じて、撮像装置10、運台装置20および照明装置40の各機器の制御を開始する。また、コントローラ34は、制御データで定義された情報に従って、各タイミングで制御信号を各機器に送信する。
Specifically, the control
制御装置30は、照明装置40の発光条件を制御する。発光条件としては、照明光の発光タイミング、発光量、色等を例示することができる。例えば、制御装置30は、発光条件を示す制御信号を照明装置40に供給することにより、発光条件を制御する。
The
運台装置20は、撮像装置10の位置および向き等を制御する。例えば、運台装置20は、撮像装置10の位置、パンおよびチルト角等を制御する。具体的には、制御装置30が、運台装置20を駆動する制御信号を運台装置20に供給する。運台装置20は、制御信号に従って動作することにより、撮像装置10の位置および向き等を制御する。
The
また、制御装置30は、撮像装置10の撮像条件を制御する。撮像条件としては、ズーム値、絞り値、露出量、焦点位置等を例示することができる。また、制御装置30は、撮像装置10が備える閃光装置12の発光条件を制御する。制御装置30は、撮像条件および発光条件を示す制御信号を撮像装置10に供給することにより、撮像条件および発光条件を制御する。
Further, the
撮影システム50では、本撮影に先立ち、本撮影と同じ条件でトライアル撮影を行う。例えば、制御装置30は、運台20、撮像装置10および照明装置40を本撮影と同じ動作条件で制御して、トライアル撮影を行う。例えば、制御装置30は、本撮影と同一の制御信号を運台20、撮像装置10および照明装置40に供給して、本撮影と同じ動作条件でトライアル撮影を行う。これにより、撮像装置10は、本撮影と同様の撮影環境下で、トライアル撮影を行うことができる。撮像装置10は、トライアル撮影で得られた動画データを圧縮符号化して記録する。トライアル撮影で得られた圧縮符号化済みの動画データを、予備撮影データと呼ぶ場合がある。また、本撮影で得られた動画を本撮影データと呼ぶ場合がある。
In the photographing
撮像装置10は、トライアル動画データの符号量に基づいて、本撮影用の符号化パラメータを決定する。例えば、撮像装置10は、本撮影における一シーケンス内の時刻毎の量子化ステップを決定する。なお、一シーケンスとは、例えば符号化対象とする動画の撮影を開始してから撮影を終了するまでの期間を示す。撮像装置10は、トライアル動画データの全体の符号量を算出するとともに、目標符号量から符号量の平均値を算出する。撮像装置10は、画質をより均一化し、かつ、一シーケンスの平均の符号量が平均値に近づくように量子化ステップを時刻毎に決定する。撮像装置10は、決定した量子化ステップを記憶して、本撮影時の符号化にリアルタイムに適用する。
The
撮影システム50によれば、本撮影における一シーケンス全体で予測される符号量の変化を見通して、符号量が均一になるように量子化ステップを決定することができる。このため、本撮影時にマルチパスエンコード方式を適用しなくても、最適な量子化ステップで符号化することができる。したがって、撮像装置10は、膨大な演算資源を要することなくリアルタイムに符号化しつつ、画質がより均一な動画データを生成することができる。
According to the
図2は、撮像装置10のブロック構成の一例を示す。撮像装置10は、ズームレンズ、フォーカスレンズ等を含むレンズ系221を備える。被写体からの光束は、光軸219に沿ってレンズ系221に入射して撮像素子231の結像面に被写体像として結像する。主としてレンズ系221および撮像素子231の機能ブロックは、撮像部として機能する。
FIG. 2 shows an example of a block configuration of the
撮像素子231は、レンズ系221を透過して撮像素子231に結像した光学像としての被写体像を光電変換することにより、被写体を撮像する。撮像素子231としては、例えば、CCD、CMOSセンサを用いることができる。撮像素子231で光電変換された被写体像は、A/D変換器232でアナログ信号からデジタル信号に変換される。撮像素子231の電荷読み出し制御およびA/D変換器232の変換制御は、メモリ制御部233の同期制御を受けたタイミング発生部234が供給するクロック信号により、同期が計られる。
The
デジタル信号に変換された被写体像は、画像データとして順次処理される。A/D変換器232によりデジタル信号に変換された画像データは、メモリ制御部233の制御に従い、一旦内部メモリ235に記憶される。内部メモリ235は、高速で読み書きのできるランダムアクセスメモリであり、例えばDRAM、SRAMなどが用いられる。内部メモリ235は、連写撮影、動画撮影において高速に連続して画像データが生成される場合に、画像処理の順番を待つバッファメモリとしての役割を担う。
The subject image converted into the digital signal is sequentially processed as image data. The image data converted into a digital signal by the A /
また、内部メモリ235は、画像処理部237が行う画像処理、圧縮処理において、ワークメモリとしての役割も担う。特に本実施形態においては、内部メモリ235は、動画を符号化する場合に、動画を構成する複数のフレームのフレームデータを記憶する。内部メモリ235は、これらの役割を担うに相当する十分なメモリ容量を備える。
The
システムメモリ236は、電気的に消去・記録可能な不揮発性メモリであり、例えばEEPROM(登録商標)等により構成される。システムメモリ236は、撮像装置10の動作時に必要な定数、変数、プログラム等を、撮像装置10の非動作時にも失われないように記録している。撮像装置10の全体を直接的または間接的に制御するシステム制御部250は、定数、変数、プログラム等を適宜内部メモリ235に展開して、撮像装置10の制御に利用する。
The
画像処理部237は、設定されている撮影モード、ユーザからの指示に則して、画像データを所定の画像フォーマットに変換する。例えば、静止画像としてJPEGファイルを生成する場合、前処理部260が静止画としての画像データに対して色補間処理、ガンマ補正処理、輪郭補償等の画像処理を行った後に、圧縮部270が離散コサイン変換、量子化等を施して圧縮符号化処理をする。また、動画像としてMPEGファイルを生成する場合、所定の画素数に縮小されて生成された連続する静止画としてのフレーム画像に対して、圧縮部270がフレーム内符号化、フレーム間符号化を施して圧縮処理をする。
The
圧縮部270は、符号化パラメータ決定部280が決定した符号化パラメータに従って、フレーム画像を符号化する。本撮影時には、符号化パラメータ決定部280は、予備撮影データに基づき決定した量子化ステップを圧縮部270に供給して、圧縮部270における量子化を制御する。画像処理部237によって処理された静止画像データ、動画像データは、内部メモリ235から記録媒体IF240を介して、記録媒体209に転送されて記録される。
The
画像処理部237は、記録用に処理される画像データに並行して、表示用の画像データを生成する。生成された表示用の画像データは、表示制御部238の制御に従って、D/A変換器239でアナログ信号に変換され、表示部201に表示される。システム制御部250は、撮像装置10の各種設定に関する様々なメニュー項目も、表示部201に表示することができる。
The
外部IF241は、コントローラ34からの制御信号を受信する。例えば、外部IF241は、撮像条件を変更する制御信号を受信して、システム制御部250に供給する。システム制御部250は、制御信号を受信した場合に、受信した制御信号に従って各部を制御することにより、撮像条件を制御する。例えば、システム制御部250は、制御信号に従って、レンズ駆動制御部243を制御して、レンズ系221を制御する。
The external IF 241 receives a control signal from the
撮像装置10は、ユーザからの操作を受け付ける操作部材202を複数備える。システム制御部250は、これら操作部材202が操作されたことを検知して、操作に応じた動作を実行する。
The
レンズ系221は、システム制御部250の統括制御のもと、レンズ駆動制御部243によって制御される。レンズ駆動制御部243は、レンズ系221に含まれるレンズのうち主としてズームレンズを駆動して、被写体像の画角を変更する。また、レンズ駆動制御部243は、レンズ系221に含まれるレンズのうち主としてフォーカスレンズを駆動して、焦点位置を変更する。また、レンズ駆動制御部243は、レンズ系221に含まれる絞り装置を制御して、露出量を制御する。システム制御部250は、ズーミング、フォーカシング、絞りを変更する制御信号を受信した場合に、制御信号に従ってレンズ系221が駆動されるようレンズ駆動制御部243を制御する。
The
電源部208は、撮像装置10の各部に電力を供給する。記録媒体209は、不揮発性の記録媒体であり、電源部208からの電力供給がない場合でも、記録されたデータを保持することができる。
The
図3は、圧縮部270の機能ブロック構成の一例を示す。圧縮部270は、符号化パラメータ決定部280が決定した符号化パラメータに従って動画データを符号化する符号化部の一例である。圧縮部270は、符号化制御部300、減算部310、変換部320、量子化部330、可変長符号化部340、逆量子化部332、逆変換部322、加算部312、デブロッキング部360、フレーム間予測部370、フレーム内予測部350および予測制御部380を含む。ここでは、動画を構成する画像であるフレームを圧縮符号化する場合における各部の動作を説明する。
FIG. 3 shows an example of a functional block configuration of the
減算部310は、圧縮対象のフレームから、予測制御部380から供給される予測画像を減算する。予測画像は、フレーム内予測部350またはフレーム間予測部において生成される動き補償された画像である。
The
変換部320は、減算部310が出力した残差信号に、離散コサイン変換(DCT変換)を施す。本DCT変換において、ブロック毎にDCT係数が算出される。
The
量子化部330は、DCT係数を量子化する。具体的には、量子化部330は、1ブロック内の各DCT係数を、量子化テーブル中の対応する位置の量子化ステップ値で除算する。したがって、量子化部330により不可逆圧縮が行われる。符号化制御部300は、量子化部330における量子化ステップを制御することにより、発生する符号量を制御する。例えば、予測される発生符号量または発生した符号量が予め定められた値よりも大きい場合、量子化ステップの値を大きく設定する。可変長符号化部340は、量子化部330により量子化されたデータに可変長符号化を施す。可変長符号化部340から出力された1フレームの符号化済みデータは内部メモリ235に記憶される。
The
圧縮部270が有する機能ブロックのうち、逆量子化部332、逆変換部322、加算部312、デブロッキング部360、フレーム間予測部370、フレーム内予測部350および予測制御部380の機能ブロックより、動き補償が実現される。逆量子化部332は、量子化部330で量子化に用いた量子化ステップを適用して、逆量子化を行う。逆変換部322は、逆量子化により得られたDCT係数に対して、変換部320で適用したDCT変換の逆変換を行う。加算部312は、逆変換により得られた残差信号を、差分対象のフレームに加算する。デブロッキング部360は、加算処理により得られた画像データに対してブロック・ノイズを低減するデブロッキングフィルタを適用する。フレーム間予測部370は、入力フレームに対してフレーム間予測を行い、動き補償された予測画像を予測制御部380に提供する。フレーム内予測部350は、入力フレームから予測画像を生成して、予測制御部380に提供する。予測制御部380は、予測画像を減算部310に提供する。
Among the functional blocks of the
トライアル撮影で生成された動画データは、圧縮部270で圧縮されて、内部メモリ235に予備撮影データとして一旦記憶され、記録媒体209に転送される。符号化パラメータ決定部280は、記録媒体209から予備撮影データを取得して解析する。符号化パラメータ決定部280は、そして、本撮影用の量子化ステップの値を時間毎に決定して、内部メモリ235に記憶する。本撮影で得られた動画データを圧縮部270で圧縮符号化する場合、符号化制御部300は、内部メモリ235に記憶された量子化ステップの値を各時間に適用して、量子化を行う。
The moving image data generated by the trial shooting is compressed by the
このように、符号化パラメータ決定部280は、予め撮影された動画データである予備撮影データの符号量の変化を示す情報を取得する。具体的には、符号化パラメータ決定部280は、量子化を含む符号化処理が施された予備撮影データを取得する。そして、符号化パラメータ決定部280は、予備撮影データより後に撮影された本動画データの符号量を時刻毎に制御する符号化パラメータを決定する。具体的には、パラメータ決定部280は、符号化パラメータとして、本撮影データを不可逆圧縮する圧縮強度を制御するパラメータを決定する。より具体的には、パラメータ決定部280は、符号化パラメータとして、本撮影データを量子化する量子化ステップの値を決定する。
As described above, the encoding
例えば、符号化パラメータ決定部280は、予備撮影データにおいて発生符号量が多く、値が大きい量子化ステップで量子化された期間には、値が小さい量子化ステップを決定する。一方、発生符号量が少なく、小さい値の量子化ステップで量子化された期間には、値が大きい量子化ステップを決定する。これにより、本撮影で得られた動画データを圧縮符号化する場合に、全体の符号量を著しく増大させることなく、発生符号量が大きい期間の画質が低下することを防ぐことができる。また、予備撮影データに基づいて予め決定された量子化ステップを適用するので、発生符号量を制御するのに要する演算量を著しく低減することができる。このため、本撮影時に1パスエンコード方式を適用することができ、一シーケンスのフレームデータを内部メモリ235に記憶しなくて済む。したがって、膨大な演算資源を要することなく、本撮影で得られた動画データをリアルタイムに圧縮符号化することができる。
For example, the encoding
図4は、一シーケンスの動画撮影における圧縮強度の一例を示す。本図では、一シーケンスで撮影されたフレームに含まれる高周波成分と、フレームを圧縮する圧縮強度の時間発展を模式的に示す。本シーケンスでは、時刻t0で動画撮影が開始され、時刻t5で動画撮影が終了する。本シーケンスにおいて、レンズ系221のズームレンズがワイド端の位置に制御された状態で撮影が開始される。時刻t1からt2までの間に、ワイド端からテレ端へとズーミングが行われ、その後、時刻t3からt4の期間、および、時刻t4からt5までの期間の2段階で、テレ端からワイド端に戻される。
FIG. 4 shows an example of the compression strength in one sequence of moving image shooting. In this figure, the time evolution of the high frequency component contained in the flame | frame image | photographed by one sequence and the compression strength which compresses a flame | frame is shown typically. In this sequence, moving image shooting starts at time t0, and moving image shooting ends at time t5. In this sequence, shooting is started in a state where the zoom lens of the
ワイド端において被写界深度が比較的に深い状態にある場合、フレームには高周波成分が比較的に多く含まれる。一方、テレ端にズーミングすることで被写界深度が浅くなる場合、フレームに含まれる高周波成分は減少する。一方、テレ端からワイド端に戻すと、高周波成分が増加する。本シーケンスで得られた高周波成分の時間発展を、符号400で模式的に示す。
When the depth of field is relatively deep at the wide end, the frame contains a relatively large amount of high-frequency components. On the other hand, when the depth of field becomes shallow by zooming to the tele end, the high-frequency component contained in the frame decreases. On the other hand, when returning from the tele end to the wide end, the high frequency component increases. The time evolution of the high frequency component obtained in this sequence is schematically indicated by
ここで、本シーケンスでトライアル撮影を行い、リアルタイムに符号化した場合における圧縮強度の時間発展を、符号410で模式的に示す。ここでは、量子化部330における圧縮強度を示す。時刻t0からt1までの間、高周波成分は比較的に多いフレームが撮影される。高周波成分が多いほど発生符号量は大きくなるので、時刻t0からt1の期間内では、単位時間に発生する符号量が目標ビットレートを大きく超えないよう、量子化ステップの値を大きく設定する。すなわち、圧縮強度は比較的に高くなる。
Here,
一方、時刻t1からt2までの期間に高周波成分が低下すると、発生符号量が低下する。このため、目標ビットレートに従って量子化ステップの値は次第に小さくなる。すなわち、圧縮強度は減少する。同様に、時刻t3からt4の期間、および、時刻t4からt5の期間は、高周波成分が次第に増加するので、圧縮強度は次第に高くなる。したがって、時刻t0からt1の期間では、圧縮後のフレームの画質が低く、時刻t1からt2にわたって画質が上昇する。また、時刻t3からt5にかけて、フレームの画質は次第に低下する。すなわち、単位時間に発生する符号量に基づくフィードバックにより、ビットレートの変動は比較的にゆるやかとなるが、画質の変動は大きくなる。 On the other hand, when the high frequency component decreases during the period from time t1 to t2, the generated code amount decreases. For this reason, the value of the quantization step gradually decreases according to the target bit rate. That is, the compressive strength decreases. Similarly, in the period from time t3 to t4 and in the period from time t4 to t5, the high-frequency component gradually increases, so that the compression strength gradually increases. Therefore, in the period from time t0 to t1, the image quality of the compressed frame is low, and the image quality increases from time t1 to time t2. In addition, the image quality of the frame gradually decreases from time t3 to t5. That is, the feedback based on the amount of code generated per unit time makes the bit rate fluctuation relatively gradual, but the image quality fluctuation becomes large.
符号化パラメータ決定部280は、予備撮影データの圧縮強度の変化に基づいて、発生符号量が大きくなることが予測される期間には符号量を比較的に多く割り当て、発生符号量が小さくなることが予測される期間には比較的に少ない符号量を割り当てる。具体的には、符号化パラメータ決定部280は、発生符号量が大きくなることが予測される期間には比較的に小さい値の量子化ステップを設定し、発生符号量が小さくなることが予測される期間には比較的に大きい値の量子化ステップを設定する。すなわち、符号化パラメータ決定部280は、本図の符号420で示すように、一シーケンスにわたって圧縮強度の変化が小さくなるよう、各時間の量子化ステップの値を設定する。これにより、本撮影の画質が大きく変動することを未然に防ぐことができる。
The encoding
このように、パラメータ決定部280は、第1期間に適用される圧縮強度に対する第2期間に適用される圧縮強度の比率を、予備撮影データの符号化処理において適用された比率よりも小さくする符号化パラメータを決定する。このため、画質をより時間的に均一化することができる。
As described above, the
なお、本例では、ズーミングにより高周波成分が変動することにより、発生符号量が変動するとして説明した。しかし、発生符号量は、ズーミング変化、焦点位置の変化、撮像装置10の位置の変化、撮像装置10の向きの変化、照明装置40の点滅等、種々の撮影環境の時間変動によっても生じ得る。
In this example, it has been described that the amount of generated code varies as the high frequency component varies due to zooming. However, the generated code amount may also be caused by time variations of various shooting environments such as zooming change, focus position change,
図5は、量子化ステップの制御による符号量の変化を模式的に示す。本図において、横軸は量子化ステップの値であり、縦軸は発生符号量の変化率500を示す変化係数である。発生符号量は、量子化ステップの値に対応する変化係数を符号量に乗じた値によって、予測される。符号化制御部300は、本図に示す変化率と、予備撮影データにおける発生符号量とに基づいて、図4に説明したように符号量の割り当てを時間毎に相対的に変化させつつ、一シーケンスにわたる符号量の合計値が目標符号量に近づくように、量子化ステップの値を時間毎に決定する。すなわち、符号化制御部300は、一シーケンスにわたる符号量の平均値が目標とする符号量の平均値に近づくよう、量子化ステップの値を時間毎に決定する。
FIG. 5 schematically shows changes in the code amount due to the control of the quantization step. In this figure, the horizontal axis represents the value of the quantization step, and the vertical axis represents the change coefficient indicating the
図6は、DCT係数に適用する量子化テーブルの一例をテーブル形式で示す。変換部320で算出されたDCT係数の各周波数成分は、量子化テーブル600の対応する値で除算される。符号化制御部300は、量子化テーブル内の各量子化ステップの値を変更することで、各周波数成分を量子化する量子化ステップの値を時間毎に変化させてよい。例えば、符号化制御部300は、量子化テーブルの全体を時間的に切り替えることで、量子化ステップの値を時間的に変化させてよい。また、符号化制御部300は、量子化テーブルの各量子化ステップの値に乗じる係数である量子化パラメータを時間的に変化させること0で、量子化ステップの値を時間的に変化させてもよい。すなわち、符号化パラメータ決定部280が決定する符号化パラメータとして、量子化テーブル自体や、量子化パラメータ等を例示することができる。
FIG. 6 shows an example of a quantization table applied to DCT coefficients in a table format. Each frequency component of the DCT coefficient calculated by the
図7は、撮影システム50における動作フローの一例を示す。本フローは、操作入力部32に対して一シーンの撮影を開始する指示がなされた場合に、開始される。ステップS702において、コントローラ34は、撮像装置10、運台装置20および照明装置40を制御する制御データを、制御データ格納部36から読み込む。本制御データは、後述する本撮影を行う場合に撮像装置10、運台装置20および照明装置40の各機器の動作を制御するための制御データである。
FIG. 7 shows an example of an operation flow in the
続いて、操作入力部32に対してトライアル撮影を開始するユーザ指示がなされると、コントローラ34は、撮像装置10にトライアル撮影の開始を指示する(ステップS704)。トライアル撮影をしている間、コントローラ34は、撮像装置10、運台装置20および照明装置40の各機器を制御する制御信号を、読み出した制御データに基づいて各機器に送信する。トライアル撮影で得られた動画データは、圧縮部270によりリアルタイムで圧縮符号化される。トライアル撮影では、符号化制御部300は、単位時間あたりの発生符号量に基づくフィードバックにより、量子化ステップの値を制御してよい。
Subsequently, when a user instruction to start trial shooting is given to the
トライアル撮影が完了すると、システム制御部250は、圧縮部270で圧縮された予備撮影データを動画ファイルとして記録媒体209に記録する(ステップS706)。続いて符号化パラメータ決定部280は、記録媒体209に記録された予備動画ファイルを解析して、量子化ステップの値を決定して、内部メモリ235に記憶する(ステップS708)。本処理については、図8に関連して説明する。
When the trial shooting is completed, the
操作入力部32に対して本撮影を開始するユーザ指示がなされると、コントローラ34は、撮像装置10に本撮影の開始を指示する(ステップS710)。本撮影をしている間、コントローラ34は、撮像装置10、運台装置20および照明装置40の各機器を制御する制御信号を、ステップS702で読み出した制御データに基づいて各機器に送信する。したがって、トライアル撮影と略同一の条件で本撮影が行われる。圧縮部270は、本撮影中において、内部メモリ235に記憶された量子化ステップの値を量子化に適用してリアルタイムに圧縮符号化を行う。本処理については、図9に関連して説明する。
When a user instruction to start main shooting is given to the
続いて、本撮影が完了すると、システム制御部250は、圧縮部270で圧縮された本動画データを動画ファイルとして記録媒体209に記録する(ステップS712)。記録媒体209への記録が完了すると、本フローを終了する。
Subsequently, when the main photographing is completed, the
図8は、量子化ステップを決定する処理の一例を示す。すなわち、図7のステップS708における処理フローを示す。ステップS802において、符号化パラメータ決定部280は、予備撮影データの全体の符号量を算出する。続いて、符号化パラメータ決定部280は、予め定められた目標符号量から符号量の平均値を算出する(ステップS804)。
FIG. 8 shows an example of a process for determining the quantization step. That is, the process flow in step S708 of FIG. 7 is shown. In step S802, the encoding
続いて、符号化パラメータ決定部280は、量子化ステップの値を算出する(ステップS806)。具体的には、予測される発生符号量の一シーケンスにわたる符号量の平均値が、ステップS804で算出した符号量の平均値に近づくよう、各時刻の量子化ステップの値を算出する。
Subsequently, the encoding
ここで、ステップS802で算出した全体符号量が、目標符号量よりも予め定められた閾値を超えて小さい場合、本撮影時に適用する圧縮強度が一シーケンスにわたる平均として低くなるよう、量子化ステップの値を算出する。一方、ステップS802で算出した全体符号量が目標符号量よりも予め定められた閾値を超えて大きい場合、本撮影時に適用する圧縮強度が一シーケンスにわたる平均として高くなるよう、量子化ステップの値を算出する。いずれの場合でも、図4に関連して説明したように、符号量が多い期間には小さい値の量子化ステップを決定し、符号量が少ない期間には大きい値の量子化ステップを決定する。これにより、本撮影においてフレームの高周波成分が多くなることが予測される期間や、フレームの画像内容が大きく変化することが予測される期間には十分な符号量を割り当てつつ、一シーケンス内の予測符号量の平均値を目標符号量の平均値に近づけることができる。このように、パラメータ決定部280は、予備撮影データの全体の符号量および目標符号量に基づいて、本動画データの時間毎の圧縮強度を決定する。
Here, when the total code amount calculated in step S802 is smaller than the target code amount by a predetermined threshold value, the quantization step is performed so that the compression strength applied at the time of actual shooting is reduced as an average over one sequence. Calculate the value. On the other hand, when the total code amount calculated in step S802 is larger than the target code amount exceeding a predetermined threshold, the value of the quantization step is set so that the compression strength applied at the time of actual shooting is high as an average over one sequence. calculate. In any case, as described with reference to FIG. 4, a quantization step with a small value is determined during a period when the code amount is large, and a quantization step with a large value is determined during a period when the code amount is small. As a result, a sufficient amount of code is allocated to a period in which a high frequency component of a frame is predicted to increase in the main shooting or a period in which the image content of the frame is predicted to change greatly, and prediction within one sequence is performed. The average value of the code amount can be brought close to the average value of the target code amount. As described above, the
続いて、算出した量子化ステップの値を内部メモリ235に記憶し(ステップS808)、処理を終了する。 Subsequently, the calculated quantization step value is stored in the internal memory 235 (step S808), and the process is terminated.
図9は、本撮影における処理の一例を示す。すなわち、図7のステップ710における処理フローを示す。本フローが開始すると、ステップS902において本撮影を開始する(ステップS902)。動画撮影が開始されると、前処理部260で前処理されたフレームデータが順次に内部メモリ235に蓄積される。圧縮部270は、メモリ制御部233からの制御に従って、内部メモリ235に蓄積されたフレームデータを順次に選択して圧縮符号化を行う(ステップS904)。
FIG. 9 shows an example of processing in actual photographing. That is, the process flow in step 710 of FIG. 7 is shown. When the main flow is started, main photographing is started in step S902 (step S902). When the moving image shooting is started, the frame data preprocessed by the
選択したフレームデータを圧縮符号化する場合に、符号化制御部300は、内部メモリ235に記憶された量子化ステップを量子化に適用した場合の発生符号量と予測符号量との間の差が、予め定められた基準値より小さいか否かを判断する(ステップS906)。予想符号量とは、予備撮影データと、符号化パラメータ決定部280が決定した量子化ステップの値から予測される発生符号量であってよい。
When the selected frame data is compression-encoded, the
発生符号量と予測符号量との間の差が基準値より小さい場合、圧縮部270は、内部メモリ235に記憶した量子化ステップを適用して圧縮符号化を行う(ステップS908)。発生符号量と予測符号量との間の差が基準値以上である場合、符号化制御部300は、現在の発生符号量および目標符号量の平均値に基づき、量子化部330で適用すべき量子化ステップを決定する(ステップS910)。すなわち、符号化制御部300は、主として単位時間あたりの発生符号量に基づくフィードバック制御により、量子化ステップを算出する。
When the difference between the generated code amount and the predicted code amount is smaller than the reference value, the
なお、ステップS906の判断では、発生符号量として許容される予め定められた最大値を、予測符号量として適用してよい。また、ステップS906の判断において、予め定められた期間内で発生した符号量の平均値を、発生符号量として適用してもよい。ステップS906において発生符号量を監視して、予測符号量との間の差が基準値以上である場合には、主として発生符号量および目標符号量に基づき時間単位で量子化ステップの値を決定する。このため、トライアル撮影時と一時的に異なる動作条件で本撮影が行われた場合に、予測した量子化ステップを適用することで符号量が著しく増大してしまうことを未然に防ぐことができる。また、各機器を動作させるタイミングがトライアル撮影時と時間的にズレが生じた場合でも、ズレが解消された場合には、予測した量子化ステップによる量子化制御に戻すことができる。なお、本撮影開始後の発生符号量に基づき、予測符号量を修正して、ステップS906の判断に適用してもよい。また、符号化制御部300は、本撮影開始後の発生符号量等に基づき、本撮影とトライアル撮影との間で対応するタイミングを特定し、特定したタイミングから、内部メモリ235に記憶した量子化ステップの適用を開始してもよい。
In the determination in step S906, a predetermined maximum value allowed as the generated code amount may be applied as the predicted code amount. In addition, in the determination in step S906, an average value of the code amount generated within a predetermined period may be applied as the generated code amount. In step S906, the generated code amount is monitored, and when the difference from the predicted code amount is equal to or larger than the reference value, the value of the quantization step is determined in units of time mainly based on the generated code amount and the target code amount. . For this reason, when the actual shooting is performed under an operation condition temporarily different from that at the time of trial shooting, it is possible to prevent the code amount from being significantly increased by applying the predicted quantization step. Even when the timing at which each device is operated is shifted in time from the time of trial shooting, if the shift is eliminated, the quantization control by the predicted quantization step can be restored. Note that the predicted code amount may be corrected based on the generated code amount after the start of the main photographing and applied to the determination in step S906. In addition, the
このように、符号化制御部300は、本撮影データを符号化パラメータに従って符号化することにより発生する発生符号量が予め定められた予測符号量に適合する場合に、内部メモリ235に記憶された量子化ステップに従って本撮影データを符号化させる。また、符号化制御部300は、発生符号量が予め定められた予測符号量に適合しない場合には、本動画データの符号化する符号化パラメータを発生符号量に応じて制御する。
As described above, the
ステップS908、ステップS910の圧縮符号化処理が完了すると、全フレームの圧縮符号化を完了したか否かを判断する(ステップS912)。全フレームの圧縮符号化を完了した場合、本フローを終了する。全フレームの圧縮符号化が完了していない場合、ステップS904に処理を移行させ、全フレームの圧縮符号化が完了するまで、フレームの選択および符号化処理が行われる。 When the compression encoding process of step S908 and step S910 is completed, it is determined whether or not the compression encoding of all the frames has been completed (step S912). When the compression encoding of all the frames has been completed, this flow ends. If the compression encoding of all frames has not been completed, the process proceeds to step S904, and the frame selection and encoding processing is performed until the compression encoding of all frames is completed.
以上に説明したように、トライアル撮影で得られた予備撮影データから、一シーケンス全体の符号量および符号量の変化を予め算出することができる。したがって、一シーケンス全体の符号量の変化を見通して、本撮影時の各期間の符号量を最適に割り当てることができる。このため、例えば急激なズーミング等が行われる期間に、十分な符号量をリアルタイムに割り当てることができる。一方、例えばテレ端で撮影している期間には、符号量の割り当てをリアルタイムに小さくすることができる。したがって、一シーケンス全体として、発生符号量を目標符号量に近づけつつ、全体的に安定した画質を維持することができる。 As described above, the code amount and the change in the code amount of one sequence can be calculated in advance from preliminary shooting data obtained by trial shooting. Therefore, it is possible to optimally assign the code amount of each period at the time of actual photographing in view of the change in the code amount of the entire sequence. For this reason, for example, a sufficient code amount can be allocated in real time during a period in which rapid zooming or the like is performed. On the other hand, for example, during the period of shooting at the tele end, the code amount allocation can be reduced in real time. Therefore, as a whole sequence, the overall stable image quality can be maintained while the generated code amount approaches the target code amount.
本実施形態の撮像装置10に関連して説明した処理は、撮像装置10の各部、例えばシステム制御部250、画像処理部237等として機能するプロセッサ等が、プログラムに従って動作することにより、実現することができる。すなわち、当該処理を、いわゆるコンピュータ装置によって実現することができる。コンピュータ装置は、上述した処理の実行を制御するプログラムをロードして、読み込んだプログラムに従って動作して、当該処理を実行してよい。コンピュータ装置は、当該プログラムを記憶しているコンピュータ読取可能な記録媒体を読み込むことによって、当該プログラムをロードすることができる。
The processing described in relation to the
本実施形態において、スタジオ撮影用の撮像装置10を取り上げて、撮影システム50の一例を説明した。しかし、撮像装置しては、レンズ交換式の一眼レフカメラ、コンパクトデジタルカメラ、ミラーレス一眼カメラ、ビデオカメラ、撮像機能付きの携帯電話機、撮像機能付きの携帯情報端末等、撮像機能を有する種々の機器を適用の対象とすることができる。
In this embodiment, an example of the
また、本実施形態において動画データを取り上げて説明した。しかし、動画データに限らず、音声データ等の種々のデータを適用の対象とすることができる。すなわち、撮像装置に限らず、録音装置等の電子音声機器を、適用の対象とすることができる。すなわち、第1データの符号量の変化を示す情報を取得して、当該符号量の変化に基づいて、第1データより後に得られた第2データの符号量を時刻毎に制御する符号化パラメータを決定する電子機器を、適用の対象とすることができる。また、パーソナルコンピュータ等のように、動画データ、音声データ等の種々のデータを取り込んで符号化に関する処理を行う電子機器も適用の対象とすることができる。 In the present embodiment, the moving image data is taken up and described. However, not only moving image data but also various data such as audio data can be applied. That is, not only the imaging device but also an electronic audio device such as a recording device can be applied. That is, an encoding parameter that acquires information indicating a change in the code amount of the first data and controls the code amount of the second data obtained after the first data for each time based on the change in the code amount. The electronic device that determines the value can be the target of application. In addition, an electronic device that takes in various data such as moving image data and audio data and performs processing related to encoding, such as a personal computer, can also be applied.
以上、本発明を実施の形態を用いて説明したが、本発明の技術的範囲は上記実施の形態に記載の範囲には限定されない。上記実施の形態に、多様な変更または改良を加えることが可能であることが当業者に明らかである。その様な変更または改良を加えた形態も本発明の技術的範囲に含まれ得ることが、特許請求の範囲の記載から明らかである。 As mentioned above, although this invention was demonstrated using embodiment, the technical scope of this invention is not limited to the range as described in the said embodiment. It will be apparent to those skilled in the art that various modifications or improvements can be added to the above-described embodiment. It is apparent from the scope of the claims that the embodiments added with such changes or improvements can be included in the technical scope of the present invention.
特許請求の範囲、明細書、および図面中において示した装置、システム、プログラム、および方法における動作、手順、ステップ、および段階等の各処理の実行順序は、特段「より前に」、「先立って」等と明示しておらず、また、前の処理の出力を後の処理で用いるのでない限り、任意の順序で実現しうることに留意すべきである。特許請求の範囲、明細書、および図面中の動作フローに関して、便宜上「まず、」、「次に、」等を用いて説明したとしても、この順で実施することが必須であることを意味するものではない。 The order of execution of each process such as operations, procedures, steps, and stages in the apparatus, system, program, and method shown in the claims, the description, and the drawings is particularly “before” or “prior to”. It should be noted that the output can be realized in any order unless the output of the previous process is used in the subsequent process. Regarding the operation flow in the claims, the description, and the drawings, even if it is described using “first”, “next”, etc. for convenience, it means that it is essential to carry out in this order. It is not a thing.
10 撮像装置、20 運台装置、30 制御装置、32 操作入力部、34 コントローラ、36 制御データ格納部、38 記録媒体、40 照明装置、50 撮影システム、60 スタジオ、201 表示部、202 操作部材、208 電源部、209 記録媒体、219 光軸、221 レンズ系、231 撮像素子、232 A/D変換器、233 メモリ制御部、234 タイミング発生部、235 内部メモリ、236 システムメモリ、237 画像処理部、238 表示制御部、239 D/A変換器、240 記録媒体IF、241 外部IF、243 レンズ駆動制御部、270 圧縮部、300 符号化制御部、310 減算部、320 変換部、330 量子化部、340 可変長符号化部、332 逆量子化部、322 逆変換部、312 加算部、360 デブロッキング部、370 フレーム間予測部、350 フレーム内予測部、380 予測制御部、600 量子化テーブル
DESCRIPTION OF
Claims (11)
前記符号量の変化に基づいて、前記第1データより後に得られた第2データの符号量を時刻毎に制御する符号化パラメータを決定するパラメータ決定部と、
を備えるパラメータ決定装置。 An information acquisition unit for acquiring information indicating a change in the code amount of the first data;
A parameter determining unit that determines an encoding parameter for controlling the code amount of the second data obtained after the first data for each time based on the change in the code amount;
A parameter determination device comprising:
前記パラメータ決定部は、前記第1動画データより後に撮影されて得られた第2動画データの符号量を時刻毎に制御する符号化パラメータを決定する
請求項1に記載のパラメータ決定装置。 The information acquisition unit acquires information indicating a change in the code amount of the first moving image data obtained by shooting in advance,
The parameter determination device according to claim 1, wherein the parameter determination unit determines an encoding parameter for controlling a code amount of second moving image data obtained by shooting after the first moving image data for each time.
をさらに備える請求項2に記載のパラメータ決定装置。 The parameter determination apparatus according to claim 2, further comprising an encoding unit that encodes the second moving image data in accordance with the encoding parameter.
請求項2または3に記載のパラメータ決定装置。 The parameter determination device according to claim 2 or 3, wherein the parameter determination unit determines a parameter for controlling a compression strength for irreversibly compressing the second moving image data as the encoding parameter.
前記パラメータ決定部は、第1期間に適用される圧縮強度に対する第2期間に適用される圧縮強度の比率を、前記第1動画データの符号化処理において適用された比率よりも小さくする符号化パラメータを決定する
請求項4に記載のパラメータ決定装置。 The information acquisition unit acquires the first moving image data subjected to an encoding process including quantization,
The parameter determination unit is a coding parameter for reducing a ratio of the compression strength applied in the second period to the compression strength applied in the first period, which is smaller than the ratio applied in the encoding process of the first moving image data. The parameter determination device according to claim 4, wherein the parameter is determined.
請求項4または5に記載のパラメータ決定装置。 The parameter determination device according to claim 4 or 5, wherein the parameter determination unit determines a compression strength for each time of the second moving image data based on an entire code amount and a target code amount of the first moving image data.
請求項2から6のいずれか一項に記載のパラメータ決定装置。 The parameter determination device according to any one of claims 2 to 6, wherein the parameter determination unit determines a value of a quantization step for quantizing the second moving image data as the encoding parameter.
をさらに備える請求項2から7のいずれか一項に記載のパラメータ決定装置。 A code for encoding the second moving image data according to the encoding parameter when a generated code amount generated by encoding the second moving image data according to the encoding parameter matches a predetermined prediction code amount. The parameter determination device according to any one of claims 2 to 7, further comprising an optimization control unit.
請求項8に記載のパラメータ決定装置。 The encoding control unit controls an encoding parameter for controlling a code amount of the second moving image data according to the generated code amount when the generated code amount does not match the predetermined prediction code amount. The parameter determination device according to claim 8.
請求項2から9のいずれか一項に記載のパラメータ決定装置と、
を備える撮像装置。 An imaging unit that performs video imaging to generate the first video data and the second video data;
The parameter determination device according to any one of claims 2 to 9,
An imaging apparatus comprising:
前記符号量の変化に基づいて、前記第1データより後に得られた第2データの符号量を時刻毎に制御する符号化パラメータを決定するステップと、
をコンピュータに実行させるプログラム。 Obtaining information indicating a change in the code amount of the first data;
Determining a coding parameter for controlling the code amount of the second data obtained after the first data for each time based on the change in the code amount;
A program that causes a computer to execute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011147752A JP2013017003A (en) | 2011-07-01 | 2011-07-01 | Parameter determination device, imaging device, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011147752A JP2013017003A (en) | 2011-07-01 | 2011-07-01 | Parameter determination device, imaging device, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2013017003A true JP2013017003A (en) | 2013-01-24 |
Family
ID=47689247
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011147752A Withdrawn JP2013017003A (en) | 2011-07-01 | 2011-07-01 | Parameter determination device, imaging device, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2013017003A (en) |
-
2011
- 2011-07-01 JP JP2011147752A patent/JP2013017003A/en not_active Withdrawn
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9092861B2 (en) | Using motion information to assist in image processing | |
JP5210091B2 (en) | Image processing apparatus, control method therefor, imaging apparatus, and program | |
CN102986211B (en) | Speed control in Video coding | |
US7760953B2 (en) | Image processing apparatus and method, computer program, and storage medium with varied block shapes to execute motion detection | |
JP4817990B2 (en) | IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM | |
US8035699B2 (en) | Image capturing apparatus, control method therefor, and program | |
JPH03267877A (en) | Picture coding method | |
JP2012257198A (en) | Stereoscopic image encoding apparatus, method therefor, and image pickup apparatus having stereoscopic image encoding apparatus | |
JP2007036738A (en) | Motion picture encoding device, method, and program | |
JP2010035133A (en) | Moving image encoding apparatus and moving image encoding method | |
US10091521B2 (en) | Image encoding device, captured image recording system, imaging device, method of encoding image, and image encoding program | |
US8405745B2 (en) | Image processing apparatus, image processing method, and program | |
JP6906324B2 (en) | Coding device, coding method, and program | |
US10244199B2 (en) | Imaging apparatus | |
JP6871727B2 (en) | Imaging equipment, image processing methods, and programs | |
US20070127571A1 (en) | Image processing apparatus and method | |
JP2018082251A (en) | Imaging device, image processing method, and program | |
JP2013017003A (en) | Parameter determination device, imaging device, and program | |
WO2005101850A1 (en) | Image signal processing apparatus and method, recording medium, program and video camera | |
WO2012056896A1 (en) | Image capturing device and image capturing method | |
JP2013017004A (en) | Parameter determination device, imaging device, shooting system, and program | |
JP2018011120A (en) | Imaging apparatus, control method for imaging apparatus, and program | |
JP4626644B2 (en) | Encoding apparatus, encoding method, program, and imaging apparatus | |
JP4834535B2 (en) | Imaging device | |
JP2013123090A (en) | Image processing device, imaging device, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20140902 |