JP2013017003A - Parameter determination device, imaging device, and program - Google Patents

Parameter determination device, imaging device, and program Download PDF

Info

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
Application number
JP2011147752A
Other languages
Japanese (ja)
Inventor
Yutaka Tsuda
豊 津田
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.)
Nikon Corp
Original Assignee
Nikon 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 Nikon Corp filed Critical Nikon Corp
Priority to JP2011147752A priority Critical patent/JP2013017003A/en
Publication of JP2013017003A publication Critical patent/JP2013017003A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To uniformly maintain an information amount while encoding data with few computational resources.SOLUTION: A parameter determination device comprises: an information acquisition unit that acquires information indicating a change in a code amount of first data; and a parameter determination unit that determines an encoding parameter for controlling, at each time, a code amount of second data obtained after the first data on the basis of the change in the code amount. A program causes a computer to execute: a step for acquiring information indicating a change in a code amount of first data; and a step for determining an encoding parameter for controlling, at each time, a code amount of second data obtained after the first data on the basis of the change in the code amount.

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.

一実施形態にかかる撮影システム50の利用形態の一例を示す。An example of the usage form of the imaging system 50 according to the embodiment is shown. 撮像装置10のブロック構成の一例を示す。2 shows an example of a block configuration of the imaging apparatus 10. 圧縮部270の機能ブロック構成の一例を示す。An example of a functional block configuration of the compression unit 270 is shown. 一シーケンスの動画撮影における圧縮強度の一例を示す。An example of the compression strength in moving image shooting of one sequence is shown. 量子化ステップによる符号量の変化を模式的に示す。The change of the code amount by a quantization step is typically shown. DCT係数に適用する量子化テーブルの一例をテーブル形式で示す。An example of a quantization table applied to DCT coefficients is shown in a table format. 撮影システム50における動作フローの一例を示す。An example of an operation flow in the imaging system 50 is shown. 量子化ステップを決定する処理の一例を示す。An example of the process which determines a quantization step is shown. 本撮影における処理の一例を示す。An example of processing in actual photographing will be shown.

以下、発明の実施の形態を通じて本発明を説明するが、以下の実施形態は特許請求の範囲にかかる発明を限定するものではない。また、実施形態の中で説明されている特徴の組み合わせの全てが発明の解決手段に必須であるとは限らない。   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 imaging system 50 according to an embodiment. In the present embodiment, the shooting system 50 is used for shooting in the studio 60. The imaging system 50 includes an imaging device 10, a carriage device 20, a control device 30, and a lighting device 40. The photographing system 50 provides a system that provides moving image data with uniform image quality by encoding a moving image in real time.

撮影システム50では、本撮影に先立ち、本撮影と同じ撮影環境でトライアル撮影をひととおり行う。そして、撮像装置10は、トライアル撮影で得られた動画データの符号化情報を考慮して、本撮影で得られた動画データを符号化する場合に適用する符号化パラメータを事前に決定する。例えば、撮像装置10は、トライアル撮影で得られた動画データの符号量の変化を考慮して、撮影の一シーケンスにわたって画質が略一定となるよう、各時間の量子化ステップを決定する。そして、撮像装置10は、本撮影時には、事前に決定した量子化ステップを適用して量子化を施す。撮像装置10によると、トライアル撮影で得られた一シーケンスの動画データから、一シーケンスの全体として最適な量子化ステップを事前に決定することができる。また、本撮影時には、適切な符号量を割り当てるために膨大な演算をしなくて済む。このため、撮像装置10は、動画を撮影しながらリアルタイムで符号化しつつ、画質がより均一な動画データを提供することができる。   Prior to the main shooting, the shooting system 50 performs trial shooting in the same shooting environment as the main shooting. Then, the imaging apparatus 10 determines in advance encoding parameters to be applied when encoding moving image data obtained by actual shooting in consideration of encoding information of moving image data obtained by trial shooting. For example, the imaging apparatus 10 determines the quantization step for each time so that the image quality becomes substantially constant over one shooting sequence in consideration of the change in the code amount of moving image data obtained by trial shooting. Then, the imaging apparatus 10 performs quantization by applying a predetermined quantization step during the main photographing. According to the imaging apparatus 10, an optimal quantization step as a whole of one sequence can be determined in advance from one sequence of moving image data obtained by trial shooting. In addition, at the time of actual photographing, it is not necessary to perform enormous calculations in order to allocate an appropriate code amount. For this reason, the imaging device 10 can provide moving image data with more uniform image quality while encoding a moving image in real time.

制御装置30は、操作入力部32、コントローラ34および制御データ格納部36を有する。制御装置30は、例えば、撮像装置10による撮影環境を制御するコンピュータである。   The control device 30 includes an operation input unit 32, a controller 34, and a control data storage unit 36. The control device 30 is, for example, a computer that controls the shooting environment of the imaging device 10.

具体的には、制御データ格納部36は、撮像装置10、運台装置20および照明装置40の制御内容を定義した制御データを、記録媒体38から読み出して格納する。例えば、制御データは、照明装置40の発光条件、撮像装置10の撮像条件、撮像装置10の位置および向き等を時間毎に定義する。コントローラ34は、制御データ格納部36に格納された制御データに基づき、撮像装置10、運台装置20および照明装置40を制御する制御信号を送信する。操作入力部32は、トライアル撮影の開始指示、本撮影の開始指示等のユーザ指示を取得する。コントローラ34は、操作入力部32からの指示に応じて、撮像装置10、運台装置20および照明装置40の各機器の制御を開始する。また、コントローラ34は、制御データで定義された情報に従って、各タイミングで制御信号を各機器に送信する。   Specifically, the control data storage unit 36 reads out control data defining control contents of the imaging device 10, the carriage device 20, and the lighting device 40 from the recording medium 38 and stores the control data. For example, the control data defines the light emission conditions of the illumination device 40, the imaging conditions of the imaging device 10, the position and orientation of the imaging device 10, etc. for each time. The controller 34 transmits a control signal for controlling the imaging device 10, the carriage device 20, and the lighting device 40 based on the control data stored in the control data storage unit 36. The operation input unit 32 acquires user instructions such as a trial shooting start instruction and a main shooting start instruction. In response to an instruction from the operation input unit 32, the controller 34 starts control of each device of the imaging device 10, the carriage device 20, and the lighting device 40. Further, the controller 34 transmits a control signal to each device at each timing in accordance with information defined by the control data.

制御装置30は、照明装置40の発光条件を制御する。発光条件としては、照明光の発光タイミング、発光量、色等を例示することができる。例えば、制御装置30は、発光条件を示す制御信号を照明装置40に供給することにより、発光条件を制御する。   The control device 30 controls the light emission conditions of the lighting device 40. Examples of the light emission conditions include the light emission timing of the illumination light, the light emission amount, and the color. For example, the control device 30 controls the light emission conditions by supplying a control signal indicating the light emission conditions to the illumination device 40.

運台装置20は、撮像装置10の位置および向き等を制御する。例えば、運台装置20は、撮像装置10の位置、パンおよびチルト角等を制御する。具体的には、制御装置30が、運台装置20を駆動する制御信号を運台装置20に供給する。運台装置20は、制御信号に従って動作することにより、撮像装置10の位置および向き等を制御する。   The carriage device 20 controls the position and orientation of the imaging device 10. For example, the carriage device 20 controls the position, pan, tilt angle, and the like of the imaging device 10. Specifically, the control device 30 supplies a control signal for driving the gantry device 20 to the gantry device 20. The gantry device 20 operates according to the control signal to control the position and orientation of the imaging device 10.

また、制御装置30は、撮像装置10の撮像条件を制御する。撮像条件としては、ズーム値、絞り値、露出量、焦点位置等を例示することができる。また、制御装置30は、撮像装置10が備える閃光装置12の発光条件を制御する。制御装置30は、撮像条件および発光条件を示す制御信号を撮像装置10に供給することにより、撮像条件および発光条件を制御する。   Further, the control device 30 controls the imaging conditions of the imaging device 10. Examples of the imaging condition include a zoom value, an aperture value, an exposure amount, and a focal position. Further, the control device 30 controls the light emission conditions of the flash device 12 included in the imaging device 10. The control device 30 controls the imaging condition and the light emission condition by supplying a control signal indicating the imaging condition and the light emission condition to the imaging device 10.

撮影システム50では、本撮影に先立ち、本撮影と同じ条件でトライアル撮影を行う。例えば、制御装置30は、運台20、撮像装置10および照明装置40を本撮影と同じ動作条件で制御して、トライアル撮影を行う。例えば、制御装置30は、本撮影と同一の制御信号を運台20、撮像装置10および照明装置40に供給して、本撮影と同じ動作条件でトライアル撮影を行う。これにより、撮像装置10は、本撮影と同様の撮影環境下で、トライアル撮影を行うことができる。撮像装置10は、トライアル撮影で得られた動画データを圧縮符号化して記録する。トライアル撮影で得られた圧縮符号化済みの動画データを、予備撮影データと呼ぶ場合がある。また、本撮影で得られた動画を本撮影データと呼ぶ場合がある。   In the photographing system 50, prior to the main photographing, the trial photographing is performed under the same conditions as the main photographing. For example, the control device 30 performs trial shooting by controlling the carriage 20, the imaging device 10, and the illumination device 40 under the same operating conditions as the main shooting. For example, the control device 30 supplies the same control signal as that for the main photographing to the carriage 20, the imaging device 10, and the lighting device 40, and performs the trial photographing under the same operation conditions as the main photographing. Thereby, the imaging device 10 can perform trial shooting under the same shooting environment as the main shooting. The imaging device 10 compresses and records moving image data obtained by trial shooting. The compressed and encoded moving image data obtained by trial shooting may be referred to as preliminary shooting data. In addition, a moving image obtained by actual shooting may be referred to as actual shooting data.

撮像装置10は、トライアル動画データの符号量に基づいて、本撮影用の符号化パラメータを決定する。例えば、撮像装置10は、本撮影における一シーケンス内の時刻毎の量子化ステップを決定する。なお、一シーケンスとは、例えば符号化対象とする動画の撮影を開始してから撮影を終了するまでの期間を示す。撮像装置10は、トライアル動画データの全体の符号量を算出するとともに、目標符号量から符号量の平均値を算出する。撮像装置10は、画質をより均一化し、かつ、一シーケンスの平均の符号量が平均値に近づくように量子化ステップを時刻毎に決定する。撮像装置10は、決定した量子化ステップを記憶して、本撮影時の符号化にリアルタイムに適用する。   The imaging device 10 determines a coding parameter for main shooting based on the code amount of the trial moving image data. For example, the imaging device 10 determines a quantization step for each time in one sequence in the main photographing. Note that one sequence indicates a period from the start of shooting a moving image to be encoded to the end of shooting. The imaging device 10 calculates the total code amount of the trial moving image data and calculates an average value of the code amount from the target code amount. The imaging apparatus 10 determines the quantization step for each time so that the image quality is made more uniform and the average code amount of one sequence approaches the average value. The imaging device 10 stores the determined quantization step and applies it in real time to the encoding at the time of actual photographing.

撮影システム50によれば、本撮影における一シーケンス全体で予測される符号量の変化を見通して、符号量が均一になるように量子化ステップを決定することができる。このため、本撮影時にマルチパスエンコード方式を適用しなくても、最適な量子化ステップで符号化することができる。したがって、撮像装置10は、膨大な演算資源を要することなくリアルタイムに符号化しつつ、画質がより均一な動画データを生成することができる。   According to the imaging system 50, it is possible to determine the quantization step so that the code amount is uniform by looking at the change in the code amount predicted for the entire sequence in the main imaging. For this reason, it is possible to perform encoding with an optimal quantization step without applying a multi-pass encoding method at the time of actual photographing. Therefore, the imaging device 10 can generate moving image data with more uniform image quality while encoding in real time without requiring a huge amount of computing resources.

図2は、撮像装置10のブロック構成の一例を示す。撮像装置10は、ズームレンズ、フォーカスレンズ等を含むレンズ系221を備える。被写体からの光束は、光軸219に沿ってレンズ系221に入射して撮像素子231の結像面に被写体像として結像する。主としてレンズ系221および撮像素子231の機能ブロックは、撮像部として機能する。   FIG. 2 shows an example of a block configuration of the imaging apparatus 10. The imaging apparatus 10 includes a lens system 221 that includes a zoom lens, a focus lens, and the like. The light flux from the subject enters the lens system 221 along the optical axis 219 and forms an image of the subject on the imaging surface of the image sensor 231. The functional blocks of the lens system 221 and the image sensor 231 mainly function as an imaging unit.

撮像素子231は、レンズ系221を透過して撮像素子231に結像した光学像としての被写体像を光電変換することにより、被写体を撮像する。撮像素子231としては、例えば、CCD、CMOSセンサを用いることができる。撮像素子231で光電変換された被写体像は、A/D変換器232でアナログ信号からデジタル信号に変換される。撮像素子231の電荷読み出し制御およびA/D変換器232の変換制御は、メモリ制御部233の同期制御を受けたタイミング発生部234が供給するクロック信号により、同期が計られる。   The image pickup device 231 picks up a subject by photoelectrically converting a subject image as an optical image that is transmitted through the lens system 221 and formed on the image pickup device 231. As the image sensor 231, for example, a CCD or CMOS sensor can be used. The subject image photoelectrically converted by the image sensor 231 is converted from an analog signal to a digital signal by the A / D converter 232. The charge readout control of the image sensor 231 and the conversion control of the A / D converter 232 are synchronized by a clock signal supplied from the timing generation unit 234 that receives the synchronization control of the memory control unit 233.

デジタル信号に変換された被写体像は、画像データとして順次処理される。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 / D converter 232 is temporarily stored in the internal memory 235 under the control of the memory control unit 233. The internal memory 235 is a random access memory that can be read and written at high speed, and for example, a DRAM, an SRAM, or the like is used. The internal memory 235 serves as a buffer memory that waits for the order of image processing when image data is continuously generated at high speed in continuous shooting and moving image shooting.

また、内部メモリ235は、画像処理部237が行う画像処理、圧縮処理において、ワークメモリとしての役割も担う。特に本実施形態においては、内部メモリ235は、動画を符号化する場合に、動画を構成する複数のフレームのフレームデータを記憶する。内部メモリ235は、これらの役割を担うに相当する十分なメモリ容量を備える。   The internal memory 235 also serves as a work memory in image processing and compression processing performed by the image processing unit 237. In particular, in the present embodiment, the internal memory 235 stores frame data of a plurality of frames constituting a moving image when the moving image is encoded. The internal memory 235 has a sufficient memory capacity corresponding to these roles.

システムメモリ236は、電気的に消去・記録可能な不揮発性メモリであり、例えばEEPROM(登録商標)等により構成される。システムメモリ236は、撮像装置10の動作時に必要な定数、変数、プログラム等を、撮像装置10の非動作時にも失われないように記録している。撮像装置10の全体を直接的または間接的に制御するシステム制御部250は、定数、変数、プログラム等を適宜内部メモリ235に展開して、撮像装置10の制御に利用する。   The system memory 236 is an electrically erasable / recordable nonvolatile memory, and is configured by, for example, an EEPROM (registered trademark). The system memory 236 records constants, variables, programs, and the like necessary for the operation of the imaging apparatus 10 so that they are not lost even when the imaging apparatus 10 is not operating. The system control unit 250 that directly or indirectly controls the entire imaging apparatus 10 expands constants, variables, programs, and the like in the internal memory 235 as appropriate, and uses them for controlling the imaging apparatus 10.

画像処理部237は、設定されている撮影モード、ユーザからの指示に則して、画像データを所定の画像フォーマットに変換する。例えば、静止画像としてJPEGファイルを生成する場合、前処理部260が静止画としての画像データに対して色補間処理、ガンマ補正処理、輪郭補償等の画像処理を行った後に、圧縮部270が離散コサイン変換、量子化等を施して圧縮符号化処理をする。また、動画像としてMPEGファイルを生成する場合、所定の画素数に縮小されて生成された連続する静止画としてのフレーム画像に対して、圧縮部270がフレーム内符号化、フレーム間符号化を施して圧縮処理をする。   The image processing unit 237 converts the image data into a predetermined image format in accordance with the set shooting mode and instructions from the user. For example, when generating a JPEG file as a still image, the preprocessing unit 260 performs image processing such as color interpolation processing, gamma correction processing, and contour compensation on image data as a still image, and then the compression unit 270 performs discrete processing. A compression encoding process is performed by performing cosine transform, quantization, and the like. In addition, when generating an MPEG file as a moving image, the compression unit 270 performs intra-frame encoding and inter-frame encoding on a frame image as a continuous still image generated by being reduced to a predetermined number of pixels. To compress.

圧縮部270は、符号化パラメータ決定部280が決定した符号化パラメータに従って、フレーム画像を符号化する。本撮影時には、符号化パラメータ決定部280は、予備撮影データに基づき決定した量子化ステップを圧縮部270に供給して、圧縮部270における量子化を制御する。画像処理部237によって処理された静止画像データ、動画像データは、内部メモリ235から記録媒体IF240を介して、記録媒体209に転送されて記録される。   The compression unit 270 encodes the frame image according to the encoding parameter determined by the encoding parameter determination unit 280. At the time of actual shooting, the encoding parameter determination unit 280 supplies the quantization step determined based on the preliminary shooting data to the compression unit 270 and controls the quantization in the compression unit 270. Still image data and moving image data processed by the image processing unit 237 are transferred from the internal memory 235 to the recording medium 209 via the recording medium IF 240 and recorded.

画像処理部237は、記録用に処理される画像データに並行して、表示用の画像データを生成する。生成された表示用の画像データは、表示制御部238の制御に従って、D/A変換器239でアナログ信号に変換され、表示部201に表示される。システム制御部250は、撮像装置10の各種設定に関する様々なメニュー項目も、表示部201に表示することができる。   The image processing unit 237 generates image data for display in parallel with the image data processed for recording. The generated image data for display is converted into an analog signal by the D / A converter 239 under the control of the display control unit 238 and displayed on the display unit 201. The system control unit 250 can also display various menu items related to various settings of the imaging apparatus 10 on the display unit 201.

外部IF241は、コントローラ34からの制御信号を受信する。例えば、外部IF241は、撮像条件を変更する制御信号を受信して、システム制御部250に供給する。システム制御部250は、制御信号を受信した場合に、受信した制御信号に従って各部を制御することにより、撮像条件を制御する。例えば、システム制御部250は、制御信号に従って、レンズ駆動制御部243を制御して、レンズ系221を制御する。   The external IF 241 receives a control signal from the controller 34. For example, the external IF 241 receives a control signal for changing the imaging condition and supplies the control signal to the system control unit 250. When receiving a control signal, the system control unit 250 controls the imaging conditions by controlling each unit according to the received control signal. For example, the system control unit 250 controls the lens system 221 by controlling the lens drive control unit 243 according to the control signal.

撮像装置10は、ユーザからの操作を受け付ける操作部材202を複数備える。システム制御部250は、これら操作部材202が操作されたことを検知して、操作に応じた動作を実行する。   The imaging apparatus 10 includes a plurality of operation members 202 that receive operations from the user. The system control unit 250 detects that the operation member 202 has been operated, and executes an operation corresponding to the operation.

レンズ系221は、システム制御部250の統括制御のもと、レンズ駆動制御部243によって制御される。レンズ駆動制御部243は、レンズ系221に含まれるレンズのうち主としてズームレンズを駆動して、被写体像の画角を変更する。また、レンズ駆動制御部243は、レンズ系221に含まれるレンズのうち主としてフォーカスレンズを駆動して、焦点位置を変更する。また、レンズ駆動制御部243は、レンズ系221に含まれる絞り装置を制御して、露出量を制御する。システム制御部250は、ズーミング、フォーカシング、絞りを変更する制御信号を受信した場合に、制御信号に従ってレンズ系221が駆動されるようレンズ駆動制御部243を制御する。   The lens system 221 is controlled by the lens drive control unit 243 under the overall control of the system control unit 250. The lens drive control unit 243 mainly drives the zoom lens among the lenses included in the lens system 221 to change the angle of view of the subject image. Further, the lens drive control unit 243 mainly drives the focus lens among the lenses included in the lens system 221 to change the focal position. In addition, the lens drive control unit 243 controls the aperture device included in the lens system 221 to control the exposure amount. When receiving a control signal for changing zooming, focusing, or aperture, the system control unit 250 controls the lens drive control unit 243 so that the lens system 221 is driven according to the control signal.

電源部208は、撮像装置10の各部に電力を供給する。記録媒体209は、不揮発性の記録媒体であり、電源部208からの電力供給がない場合でも、記録されたデータを保持することができる。   The power supply unit 208 supplies power to each unit of the imaging device 10. The recording medium 209 is a nonvolatile recording medium, and can hold recorded data even when there is no power supply from the power supply unit 208.

図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 compression unit 270. The compression unit 270 is an example of an encoding unit that encodes moving image data in accordance with the encoding parameter determined by the encoding parameter determination unit 280. The compression unit 270 includes an encoding control unit 300, a subtraction unit 310, a conversion unit 320, a quantization unit 330, a variable length encoding unit 340, an inverse quantization unit 332, an inverse conversion unit 322, an addition unit 312, and a deblocking unit 360. , An inter-frame prediction unit 370, an intra-frame prediction unit 350, and a prediction control unit 380. Here, the operation of each unit in the case of compressing and encoding a frame that is an image constituting a moving image will be described.

減算部310は、圧縮対象のフレームから、予測制御部380から供給される予測画像を減算する。予測画像は、フレーム内予測部350またはフレーム間予測部において生成される動き補償された画像である。   The subtraction unit 310 subtracts the prediction image supplied from the prediction control unit 380 from the compression target frame. The predicted image is a motion-compensated image generated in the intra-frame prediction unit 350 or the inter-frame prediction unit.

変換部320は、減算部310が出力した残差信号に、離散コサイン変換(DCT変換)を施す。本DCT変換において、ブロック毎にDCT係数が算出される。   The transform unit 320 performs discrete cosine transform (DCT transform) on the residual signal output from the subtractor 310. In this DCT transform, a DCT coefficient is calculated for each block.

量子化部330は、DCT係数を量子化する。具体的には、量子化部330は、1ブロック内の各DCT係数を、量子化テーブル中の対応する位置の量子化ステップ値で除算する。したがって、量子化部330により不可逆圧縮が行われる。符号化制御部300は、量子化部330における量子化ステップを制御することにより、発生する符号量を制御する。例えば、予測される発生符号量または発生した符号量が予め定められた値よりも大きい場合、量子化ステップの値を大きく設定する。可変長符号化部340は、量子化部330により量子化されたデータに可変長符号化を施す。可変長符号化部340から出力された1フレームの符号化済みデータは内部メモリ235に記憶される。   The quantization unit 330 quantizes the DCT coefficient. Specifically, the quantization unit 330 divides each DCT coefficient in one block by the quantization step value at the corresponding position in the quantization table. Therefore, lossy compression is performed by the quantization unit 330. The encoding control unit 300 controls the amount of generated code by controlling the quantization step in the quantization unit 330. For example, when the predicted generated code amount or the generated code amount is larger than a predetermined value, the value of the quantization step is set to be large. The variable length coding unit 340 performs variable length coding on the data quantized by the quantization unit 330. One frame of encoded data output from the variable length encoding unit 340 is stored in the internal memory 235.

圧縮部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 compression unit 270, from the functional blocks of the inverse quantization unit 332, the inverse transformation unit 322, the addition unit 312, the deblocking unit 360, the inter-frame prediction unit 370, the intra-frame prediction unit 350, and the prediction control unit 380 Motion compensation is realized. The inverse quantization unit 332 performs inverse quantization by applying the quantization step used for quantization by the quantization unit 330. The inverse transform unit 322 performs the inverse transform of the DCT transform applied by the transform unit 320 on the DCT coefficient obtained by the inverse quantization. The adder 312 adds the residual signal obtained by the inverse transformation to the difference target frame. The deblocking unit 360 applies a deblocking filter that reduces block noise to the image data obtained by the addition process. The inter-frame prediction unit 370 performs inter-frame prediction on the input frame, and provides a motion-compensated predicted image to the prediction control unit 380. The intra-frame prediction unit 350 generates a prediction image from the input frame and provides the prediction image to the prediction control unit 380. The prediction control unit 380 provides the prediction image to the subtraction unit 310.

トライアル撮影で生成された動画データは、圧縮部270で圧縮されて、内部メモリ235に予備撮影データとして一旦記憶され、記録媒体209に転送される。符号化パラメータ決定部280は、記録媒体209から予備撮影データを取得して解析する。符号化パラメータ決定部280は、そして、本撮影用の量子化ステップの値を時間毎に決定して、内部メモリ235に記憶する。本撮影で得られた動画データを圧縮部270で圧縮符号化する場合、符号化制御部300は、内部メモリ235に記憶された量子化ステップの値を各時間に適用して、量子化を行う。   The moving image data generated by the trial shooting is compressed by the compression unit 270, temporarily stored as preliminary shooting data in the internal memory 235, and transferred to the recording medium 209. The encoding parameter determination unit 280 acquires the preliminary shooting data from the recording medium 209 and analyzes it. Then, the encoding parameter determination unit 280 determines the value of the quantization step for main photographing every time and stores it in the internal memory 235. When the compression unit 270 compresses and encodes the moving image data obtained in the actual shooting, the encoding control unit 300 performs quantization by applying the quantization step value stored in the internal memory 235 to each time. .

このように、符号化パラメータ決定部280は、予め撮影された動画データである予備撮影データの符号量の変化を示す情報を取得する。具体的には、符号化パラメータ決定部280は、量子化を含む符号化処理が施された予備撮影データを取得する。そして、符号化パラメータ決定部280は、予備撮影データより後に撮影された本動画データの符号量を時刻毎に制御する符号化パラメータを決定する。具体的には、パラメータ決定部280は、符号化パラメータとして、本撮影データを不可逆圧縮する圧縮強度を制御するパラメータを決定する。より具体的には、パラメータ決定部280は、符号化パラメータとして、本撮影データを量子化する量子化ステップの値を決定する。   As described above, the encoding parameter determination unit 280 acquires information indicating a change in the code amount of the pre-shooting data that is the moving image data shot in advance. Specifically, the encoding parameter determination unit 280 acquires preliminary shooting data that has been subjected to encoding processing including quantization. Then, the encoding parameter determination unit 280 determines an encoding parameter for controlling the code amount of the moving image data captured after the preliminary capturing data for each time. Specifically, the parameter determination unit 280 determines a parameter for controlling the compression strength for irreversibly compressing the main shooting data as the encoding parameter. More specifically, the parameter determination unit 280 determines a value of a quantization step for quantizing the main photographing data as an encoding parameter.

例えば、符号化パラメータ決定部280は、予備撮影データにおいて発生符号量が多く、値が大きい量子化ステップで量子化された期間には、値が小さい量子化ステップを決定する。一方、発生符号量が少なく、小さい値の量子化ステップで量子化された期間には、値が大きい量子化ステップを決定する。これにより、本撮影で得られた動画データを圧縮符号化する場合に、全体の符号量を著しく増大させることなく、発生符号量が大きい期間の画質が低下することを防ぐことができる。また、予備撮影データに基づいて予め決定された量子化ステップを適用するので、発生符号量を制御するのに要する演算量を著しく低減することができる。このため、本撮影時に1パスエンコード方式を適用することができ、一シーケンスのフレームデータを内部メモリ235に記憶しなくて済む。したがって、膨大な演算資源を要することなく、本撮影で得られた動画データをリアルタイムに圧縮符号化することができる。   For example, the encoding parameter determination unit 280 determines a quantization step having a small value during a period in which the generated code amount is large in the preliminary shooting data and is quantized by a quantization step having a large value. On the other hand, a quantization step having a large value is determined in a period in which the generated code amount is small and quantization is performed by a quantization step having a small value. As a result, when the moving image data obtained by the actual photographing is compression-encoded, it is possible to prevent the image quality during the period in which the generated code amount is large from decreasing without significantly increasing the entire code amount. In addition, since the quantization step determined in advance based on the preliminary shooting data is applied, the amount of calculation required to control the generated code amount can be significantly reduced. Therefore, the one-pass encoding method can be applied at the time of actual photographing, and one sequence of frame data need not be stored in the internal memory 235. Therefore, it is possible to compress and encode the moving image data obtained by the actual photographing in real time without requiring a huge amount of computing resources.

図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 lens system 221 is controlled to the wide end position. Zooming is performed from the wide end to the tele end from time t1 to t2, and then from the tele end to the wide end in two stages from time t3 to t4 and from time t4 to t5. Returned.

ワイド端において被写界深度が比較的に深い状態にある場合、フレームには高周波成分が比較的に多く含まれる。一方、テレ端にズーミングすることで被写界深度が浅くなる場合、フレームに含まれる高周波成分は減少する。一方、テレ端からワイド端に戻すと、高周波成分が増加する。本シーケンスで得られた高周波成分の時間発展を、符号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 reference numeral 400.

ここで、本シーケンスでトライアル撮影を行い、リアルタイムに符号化した場合における圧縮強度の時間発展を、符号410で模式的に示す。ここでは、量子化部330における圧縮強度を示す。時刻t0からt1までの間、高周波成分は比較的に多いフレームが撮影される。高周波成分が多いほど発生符号量は大きくなるので、時刻t0からt1の期間内では、単位時間に発生する符号量が目標ビットレートを大きく超えないよう、量子化ステップの値を大きく設定する。すなわち、圧縮強度は比較的に高くなる。   Here, reference numeral 410 schematically shows the temporal development of the compression strength when trial shooting is performed in this sequence and encoding is performed in real time. Here, the compression strength in the quantization unit 330 is shown. From time t0 to t1, a frame with a relatively high frequency component is captured. Since the amount of generated code increases as the number of high frequency components increases, the value of the quantization step is set large so that the amount of code generated per unit time does not greatly exceed the target bit rate during the period from time t0 to t1. That is, the compressive strength is relatively high.

一方、時刻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 parameter determination unit 280 allocates a relatively large amount of code during a period in which the generated code amount is predicted to increase based on a change in the compression strength of the preliminary shooting data, and the generated code amount decreases. A relatively small amount of code is allocated during a period in which the value is predicted. Specifically, the encoding parameter determination unit 280 sets a relatively small quantization step during a period in which the generated code amount is predicted to increase, and the generated code amount is predicted to decrease. A relatively large quantization step is set during the period. That is, the encoding parameter determination unit 280 sets the value of the quantization step for each time so that the change in compression strength is reduced over one sequence, as indicated by reference numeral 420 in the figure. As a result, it is possible to prevent the image quality of the main shooting from fluctuating greatly.

このように、パラメータ決定部280は、第1期間に適用される圧縮強度に対する第2期間に適用される圧縮強度の比率を、予備撮影データの符号化処理において適用された比率よりも小さくする符号化パラメータを決定する。このため、画質をより時間的に均一化することができる。   As described above, the parameter determination unit 280 is a code that makes the ratio of the compression strength applied in the second period to the compression strength applied in the first period smaller than the ratio applied in the pre-shooting data encoding process. Determine optimization parameters. For this reason, the image quality can be made more uniform over time.

なお、本例では、ズーミングにより高周波成分が変動することにより、発生符号量が変動するとして説明した。しかし、発生符号量は、ズーミング変化、焦点位置の変化、撮像装置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, image pickup device 10 position change, image pickup device 10 orientation change, and lighting device 40 blinking.

図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 change rate 500 of the generated code amount. The generated code amount is predicted by a value obtained by multiplying the code amount by a change coefficient corresponding to the value of the quantization step. Based on the rate of change shown in the figure and the amount of generated code in the preliminary shooting data, the encoding control unit 300 changes the allocation of the amount of code relative to each other as described in FIG. The value of the quantization step is determined for each time so that the total value of the code amount over the sequence approaches the target code amount. That is, the encoding control unit 300 determines the quantization step value for each time so that the average value of the code amount over one sequence approaches the average value of the target code amount.

図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 conversion unit 320 is divided by a corresponding value in the quantization table 600. The encoding control unit 300 may change the value of the quantization step for quantizing each frequency component by changing the value of each quantization step in the quantization table. For example, the encoding control unit 300 may change the value of the quantization step with time by switching the entire quantization table with time. Also, the encoding control unit 300 may change the quantization step value with time by changing the quantization parameter, which is a coefficient by which the value of each quantization step in the quantization table is multiplied, to 0. Good. That is, examples of the encoding parameter determined by the encoding parameter determination unit 280 include the quantization table itself and the quantization parameter.

図7は、撮影システム50における動作フローの一例を示す。本フローは、操作入力部32に対して一シーンの撮影を開始する指示がなされた場合に、開始される。ステップS702において、コントローラ34は、撮像装置10、運台装置20および照明装置40を制御する制御データを、制御データ格納部36から読み込む。本制御データは、後述する本撮影を行う場合に撮像装置10、運台装置20および照明装置40の各機器の動作を制御するための制御データである。   FIG. 7 shows an example of an operation flow in the imaging system 50. This flow is started when the operation input unit 32 is instructed to start shooting one scene. In step S <b> 702, the controller 34 reads control data for controlling the imaging device 10, the carriage device 20, and the lighting device 40 from the control data storage unit 36. The main control data is control data for controlling the operations of the imaging device 10, the carriage device 20, and the lighting device 40 when performing the main photographing described later.

続いて、操作入力部32に対してトライアル撮影を開始するユーザ指示がなされると、コントローラ34は、撮像装置10にトライアル撮影の開始を指示する(ステップS704)。トライアル撮影をしている間、コントローラ34は、撮像装置10、運台装置20および照明装置40の各機器を制御する制御信号を、読み出した制御データに基づいて各機器に送信する。トライアル撮影で得られた動画データは、圧縮部270によりリアルタイムで圧縮符号化される。トライアル撮影では、符号化制御部300は、単位時間あたりの発生符号量に基づくフィードバックにより、量子化ステップの値を制御してよい。   Subsequently, when a user instruction to start trial shooting is given to the operation input unit 32, the controller 34 instructs the imaging device 10 to start trial shooting (step S704). During the trial shooting, the controller 34 transmits a control signal for controlling each device of the imaging device 10, the carriage device 20, and the lighting device 40 to each device based on the read control data. The moving image data obtained by trial shooting is compressed and encoded in real time by the compression unit 270. In the trial shooting, the encoding control unit 300 may control the value of the quantization step by feedback based on the generated code amount per unit time.

トライアル撮影が完了すると、システム制御部250は、圧縮部270で圧縮された予備撮影データを動画ファイルとして記録媒体209に記録する(ステップS706)。続いて符号化パラメータ決定部280は、記録媒体209に記録された予備動画ファイルを解析して、量子化ステップの値を決定して、内部メモリ235に記憶する(ステップS708)。本処理については、図8に関連して説明する。   When the trial shooting is completed, the system control unit 250 records the preliminary shooting data compressed by the compression unit 270 as a moving image file on the recording medium 209 (step S706). Subsequently, the encoding parameter determination unit 280 analyzes the preliminary moving image file recorded on the recording medium 209, determines the value of the quantization step, and stores it in the internal memory 235 (step S708). This process will be described with reference to FIG.

操作入力部32に対して本撮影を開始するユーザ指示がなされると、コントローラ34は、撮像装置10に本撮影の開始を指示する(ステップS710)。本撮影をしている間、コントローラ34は、撮像装置10、運台装置20および照明装置40の各機器を制御する制御信号を、ステップS702で読み出した制御データに基づいて各機器に送信する。したがって、トライアル撮影と略同一の条件で本撮影が行われる。圧縮部270は、本撮影中において、内部メモリ235に記憶された量子化ステップの値を量子化に適用してリアルタイムに圧縮符号化を行う。本処理については、図9に関連して説明する。   When a user instruction to start main shooting is given to the operation input unit 32, the controller 34 instructs the imaging device 10 to start main shooting (step S710). During the actual photographing, the controller 34 transmits a control signal for controlling each device of the imaging device 10, the carriage device 20, and the lighting device 40 to each device based on the control data read in step S702. Therefore, the main shooting is performed under substantially the same conditions as the trial shooting. The compression unit 270 performs compression encoding in real time by applying the value of the quantization step stored in the internal memory 235 to the quantization during the main photographing. This process will be described with reference to FIG.

続いて、本撮影が完了すると、システム制御部250は、圧縮部270で圧縮された本動画データを動画ファイルとして記録媒体209に記録する(ステップS712)。記録媒体209への記録が完了すると、本フローを終了する。   Subsequently, when the main photographing is completed, the system control unit 250 records the main moving image data compressed by the compression unit 270 on the recording medium 209 as a moving image file (step S712). When the recording on the recording medium 209 is completed, this flow ends.

図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 parameter determination unit 280 calculates the entire code amount of the preliminary shooting data. Subsequently, the encoding parameter determination unit 280 calculates an average value of the code amount from a predetermined target code amount (step S804).

続いて、符号化パラメータ決定部280は、量子化ステップの値を算出する(ステップS806)。具体的には、予測される発生符号量の一シーケンスにわたる符号量の平均値が、ステップS804で算出した符号量の平均値に近づくよう、各時刻の量子化ステップの値を算出する。   Subsequently, the encoding parameter determination unit 280 calculates a quantization step value (step S806). Specifically, the value of the quantization step at each time is calculated so that the average value of the code amount over one sequence of the generated generated code amount approaches the average value of the code amount calculated in step S804.

ここで、ステップ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 parameter determination unit 280 determines the compression strength for each time of the moving image data based on the entire code amount and the target code amount of the preliminary shooting data.

続いて、算出した量子化ステップの値を内部メモリ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 preprocessing unit 260 is sequentially stored in the internal memory 235. The compression unit 270 sequentially selects the frame data stored in the internal memory 235 according to the control from the memory control unit 233 and performs compression encoding (step S904).

選択したフレームデータを圧縮符号化する場合に、符号化制御部300は、内部メモリ235に記憶された量子化ステップを量子化に適用した場合の発生符号量と予測符号量との間の差が、予め定められた基準値より小さいか否かを判断する(ステップS906)。予想符号量とは、予備撮影データと、符号化パラメータ決定部280が決定した量子化ステップの値から予測される発生符号量であってよい。   When the selected frame data is compression-encoded, the encoding control unit 300 determines the difference between the generated code amount and the predicted code amount when the quantization step stored in the internal memory 235 is applied to the quantization. It is determined whether or not the value is smaller than a predetermined reference value (step S906). The expected code amount may be a generated code amount predicted from the preliminary shooting data and the value of the quantization step determined by the encoding parameter determination unit 280.

発生符号量と予測符号量との間の差が基準値より小さい場合、圧縮部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 compression unit 270 performs compression encoding by applying the quantization step stored in the internal memory 235 (step S908). When the difference between the generated code amount and the predicted code amount is equal to or larger than the reference value, the encoding control unit 300 should apply the quantization unit 330 based on the average value of the current generated code amount and the target code amount. A quantization step is determined (step S910). That is, the encoding control unit 300 calculates the quantization step mainly by feedback control based on the generated code amount per unit time.

なお、ステップ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 encoding control unit 300 specifies the corresponding timing between the main shooting and the trial shooting based on the generated code amount after starting the main shooting, and the quantization stored in the internal memory 235 from the specified timing. You may start applying steps.

このように、符号化制御部300は、本撮影データを符号化パラメータに従って符号化することにより発生する発生符号量が予め定められた予測符号量に適合する場合に、内部メモリ235に記憶された量子化ステップに従って本撮影データを符号化させる。また、符号化制御部300は、発生符号量が予め定められた予測符号量に適合しない場合には、本動画データの符号化する符号化パラメータを発生符号量に応じて制御する。   As described above, the encoding control unit 300 stores the generated code amount generated by encoding the main shooting data according to the encoding parameter in the internal memory 235 when the generated code amount matches the predetermined prediction code amount. The main photographing data is encoded according to the quantization step. In addition, when the generated code amount does not match the predetermined predicted code amount, the encoding control unit 300 controls the encoding parameter for encoding the moving image data according to the generated code amount.

ステップ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 imaging apparatus 10 according to the present embodiment is realized by each unit of the imaging apparatus 10, for example, a processor functioning as the system control unit 250, the image processing unit 237, and the like operating according to a program. Can do. That is, the process can be realized by a so-called computer device. The computer device may load a program for controlling the execution of the above-described process, operate according to the read program, and execute the process. The computer device can load the program by reading a computer-readable recording medium storing the program.

本実施形態において、スタジオ撮影用の撮像装置10を取り上げて、撮影システム50の一例を説明した。しかし、撮像装置しては、レンズ交換式の一眼レフカメラ、コンパクトデジタルカメラ、ミラーレス一眼カメラ、ビデオカメラ、撮像機能付きの携帯電話機、撮像機能付きの携帯情報端末等、撮像機能を有する種々の機器を適用の対象とすることができる。   In this embodiment, an example of the imaging system 50 has been described by taking up the imaging apparatus 10 for studio photography. However, as an imaging device, various lenses having an imaging function such as an interchangeable lens single-lens reflex camera, a compact digital camera, a mirrorless single-lens camera, a video camera, a mobile phone with an imaging function, a portable information terminal with an imaging function, etc. Equipment can be targeted.

また、本実施形態において動画データを取り上げて説明した。しかし、動画データに限らず、音声データ等の種々のデータを適用の対象とすることができる。すなわち、撮像装置に限らず、録音装置等の電子音声機器を、適用の対象とすることができる。すなわち、第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 SYMBOLS 10 Imaging device, 20 Carriage device, 30 Control device, 32 Operation input part, 34 Controller, 36 Control data storage part, 38 Recording medium, 40 Illumination device, 50 Shooting system, 60 Studio, 201 Display part, 202 Operation member, 208 power supply unit, 209 recording medium, 219 optical axis, 221 lens system, 231 imaging device, 232 A / D converter, 233 memory control unit, 234 timing generation unit, 235 internal memory, 236 system memory, 237 image processing unit, 238 Display control unit, 239 D / A converter, 240 recording medium IF, 241 external IF, 243 lens drive control unit, 270 compression unit, 300 encoding control unit, 310 subtraction unit, 320 conversion unit, 330 quantization unit, 340 variable length coding unit, 332 inverse quantization unit, 322 inverse transform unit, 3 2 adding unit, 360 deblocking unit, the prediction unit between 370 frames, 350 intra-frame prediction unit, 380 prediction control unit, 600 a quantization table

Claims (11)

第1データの符号量の変化を示す情報を取得する情報取得部と、
前記符号量の変化に基づいて、前記第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動画データの符号量の変化を示す情報を取得し、
前記パラメータ決定部は、前記第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動画データを符号化する符号化部
をさらに備える請求項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動画データを不可逆圧縮する圧縮強度を制御するパラメータを決定する
請求項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動画データを取得し、
前記パラメータ決定部は、第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.
前記パラメータ決定部は、前記第1動画データの全体の符号量および目標符号量に基づいて、前記第2動画データの時間毎の圧縮強度を決定する
請求項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動画データを量子化する量子化ステップの値を決定する
請求項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動画データを前記符号化パラメータに従って符号化することにより発生した発生符号量が予め定められた予測符号量に適合する場合に、前記符号化パラメータに従って前記第2動画データを符号化させる符号化制御部
をさらに備える請求項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.
前記符号化制御部は、前記発生符号量が前記予め定められた予測符号量に適合しない場合に、前記第2動画データの符号量を制御する符号化パラメータを、前記発生符号量に応じて制御する
請求項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.
動画撮像を行って前記第1動画データおよび前記第2動画データを生成する撮像部と、
請求項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データの符号量の変化を示す情報を取得するステップと、
前記符号量の変化に基づいて、前記第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.
JP2011147752A 2011-07-01 2011-07-01 Parameter determination device, imaging device, and program Withdrawn JP2013017003A (en)

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)

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