JP2009130561A - Imaging apparatus, control method of imaging apparatus and control program of imaging apparatus - Google Patents
Imaging apparatus, control method of imaging apparatus and control program of imaging apparatus Download PDFInfo
- Publication number
- JP2009130561A JP2009130561A JP2007302550A JP2007302550A JP2009130561A JP 2009130561 A JP2009130561 A JP 2009130561A JP 2007302550 A JP2007302550 A JP 2007302550A JP 2007302550 A JP2007302550 A JP 2007302550A JP 2009130561 A JP2009130561 A JP 2009130561A
- Authority
- JP
- Japan
- Prior art keywords
- still image
- image
- data
- imaging
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
この発明は、動画像と静止画像とを記録可能な撮像装置、撮像装置の制御方法および撮像装置の制御プログラムに関し、特に、動画像を記録しながら静止画像を記録する構成に関する。 The present invention relates to an imaging apparatus capable of recording a moving image and a still image, a control method for the imaging apparatus, and a control program for the imaging apparatus, and more particularly to a configuration for recording a still image while recording a moving image.
近年では、動画記録を行う撮像装置において、動画の記録中に動画記録を停止することなく静止画の記録を行うようにした製品が開発されている。このような動画記録中に静止画記録を行う記録方式においては、撮像素子から出力される撮像信号をそのまま用いたRAWデータをリアルタイムで圧縮符号化して一旦メモリに格納し、後に、メモリから圧縮符号化されたRAWデータを読み出して復号して伸長し、静止画像に対する所定の画像処理を施して記録媒体に記録する。 In recent years, products that record still images without stopping moving image recording during moving image recording have been developed in imaging devices that perform moving image recording. In such a recording method for recording a still image during moving image recording, RAW data using the image signal output from the image sensor as it is is compression-coded in real time, temporarily stored in the memory, and later compressed from the memory. The converted RAW data is read out, decoded and decompressed, subjected to predetermined image processing on the still image, and recorded on the recording medium.
動画データに対する処理は、この静止画データに対する処理と並列的に行われることになる。すなわち、動画データは、タイミングジェネレータから出力されるタイミング信号に基づきフレームタイミング毎に出力され、所定に圧縮符号化されてメモリに一旦格納される。メモリに格納された圧縮動画データは、例えば記録媒体の記録単位毎に読み出され、記録媒体に記録される。 Processing for moving image data is performed in parallel with processing for still image data. That is, the moving image data is output for each frame timing based on the timing signal output from the timing generator, is compressed and encoded in a predetermined manner, and is temporarily stored in the memory. The compressed moving image data stored in the memory is read, for example, for each recording unit of the recording medium and recorded on the recording medium.
ところで、静止画記録において、RAWデータに対して圧縮符号化処理を施す際に、圧縮効率を高めるために可変長符号化を用いる場合がある。動画記録中に静止画記録を行うので、RAWデータの圧縮符号化をリアルタイムで行う必要があり、可変長符号化は、1パス処理で行われる。この場合、RAWデータの圧縮符号化処理は、リトライが不可能となり、対象となる静止画像の絵柄によって圧縮率に大きな変動が発生する。一方、メモリは、上述のように動画データの処理と共用される。そのため、静止画像の圧縮率の変動に応じてメモリ帯域の確保が困難になり、処理が破綻する可能性がある。 By the way, in still image recording, when compression encoding processing is performed on RAW data, variable length encoding may be used to increase compression efficiency. Since still image recording is performed during moving image recording, it is necessary to perform compression encoding of RAW data in real time, and variable length encoding is performed by one-pass processing. In this case, the compression encoding process of the RAW data cannot be retried, and the compression rate greatly varies depending on the design of the target still image. On the other hand, the memory is shared with the processing of moving image data as described above. For this reason, it becomes difficult to secure a memory band according to the change in the compression rate of the still image, and the processing may fail.
ここで、動画の記録を主に処理している撮像装置であれば、静止画記録によりメモリ帯域の確保が困難になり処理が破綻しそうな場合には、動画記録の処理を優先させ、静止画記録の処理を犠牲にしても、動画記録の処理を絶対に中断しないようにする。例えば、メモリ帯域の確保が困難になり処理が破綻しそうになったら、静止画記録を停止し、次のフレームタイミングで再度、静止画の記録を試みる方法が考えられる。この場合には、撮影者が意図した撮影タイミングと記録される静止画像のタイミングとの間にずれが生じ、シャッタチャンスを逃すことになってしまう。 Here, in the case of an imaging device that mainly processes video recording, if it is difficult to secure memory bandwidth due to still image recording and the processing is likely to fail, priority is given to video recording processing, Even if the recording process is sacrificed, the moving image recording process is never interrupted. For example, if it is difficult to secure the memory bandwidth and the processing is likely to fail, a method of stopping still image recording and attempting to record a still image again at the next frame timing can be considered. In this case, a deviation occurs between the photographing timing intended by the photographer and the timing of the recorded still image, and a photo opportunity is missed.
そのため、処理が破綻しそうな場合には、静止画像の圧縮符号化処理を一旦停止し、メモリ帯域に余裕が生じて破綻が回復するのを待つようにすることが考えられる。静止画の圧縮処理を停止した後に圧縮処理を再開すれば、静止画データの記録は、可能となる。しかしながら、このデータは、一時的に可変長符号化による圧縮符号化が停止されているため、復号した場合に正しいデータが得られない可能性がある。例えば、可変長符号を用いて圧縮符号化されたデータにおいて、可変長符号が途中で途切れた場合、その可変長符号の先頭から、次に先頭が検出される可変長符号までの間のデータが欠落することになる。 For this reason, when the process is likely to fail, it is conceivable to temporarily stop the compression encoding process of the still image and wait for the memory band to have a margin and the failure to recover. If the compression process is resumed after the still image compression process is stopped, the still image data can be recorded. However, since this data is temporarily stopped from compression encoding by variable length encoding, there is a possibility that correct data cannot be obtained when it is decoded. For example, in the data compressed and encoded using a variable length code, when the variable length code is interrupted, the data from the beginning of the variable length code to the next variable length code where the head is detected Will be missing.
このように、符号化された画像データの復号時にエラーデータを救済する方法としては、特許文献1に記載されるように、動画データに対してエラー時に直前の画像を出力する方法や、特許文献2に記載されるように、復号時に欠落した画像データを周囲の正常な画像データで補間する方法などが考えられる。
ところが、静止画記録の場合、記録される画像データが1枚であることが想定されるので、特許文献1に記載される、直前の画像を出力する方法は、適用できないという問題点があった。
However, in the case of still image recording, since it is assumed that the number of image data to be recorded is one, there is a problem that the method of outputting the immediately preceding image described in
また、特許文献2に記載の方法は、例えばデータの欠落部が連続的となっているなど補間すべき領域が広い場合には、補間に用いるための正常な画素が補間対象の画素の近傍に存在しないということが考えられる。この場合には、補間後の画像は、著しく画質が低下したものになってしまう可能性があるという問題点があった。
Further, in the method described in
したがって、この発明の目的は、動画記録中に静止画を記録する場合において、静止画像データに発生したデータの欠落を修復することができるようにした撮像装置、撮像装置の制御方法および撮像装置の制御プログラムを提供することにある。 Accordingly, an object of the present invention is to provide an image pickup apparatus, an image pickup apparatus control method, and an image pickup apparatus that are capable of repairing missing data generated in still image data when a still image is recorded during moving image recording. It is to provide a control program.
この発明は、上述した課題を解決するために、動画データの記録と並列的に静止画データの記録を行うことができるようにした撮像装置において、被写体からの光を電気信号に変換して撮像信号としてフレームタイミングで出力する撮像部と、撮像部から出力された撮像信号を動画としてフレームタイミング毎に連続的に処理する動画処理部と、撮像部から出力された撮像信号を、任意のタイミングで供給される撮像指示に応じてフレームタイミングで静止画として処理する静止画処理部と、静止画の欠損箇所を静止画にフレームタイミングが対応する動画のフレームを用いて復元する画像復元部とを有することを特徴とする撮像装置である。 In order to solve the above-described problems, the present invention converts an image of light from a subject into an electrical signal in an imaging apparatus capable of recording still image data in parallel with recording of moving image data. An imaging unit that outputs a signal at a frame timing, a moving image processing unit that continuously processes an imaging signal output from the imaging unit for each frame timing as a moving image, and an imaging signal output from the imaging unit at an arbitrary timing A still image processing unit that processes as a still image at a frame timing according to a supplied imaging instruction, and an image restoration unit that restores a missing portion of the still image using a moving image frame corresponding to the frame timing of the still image This is an imaging apparatus.
また、この発明は、動画データの記録と並列的に静止画データの記録を行うことができるようにした撮像装置の制御方法において、被写体からの光を電気信号に変換してフレームタイミングで撮像部から出力される撮像信号を動画としてフレームタイミング毎に連続的に処理する動画処理のステップと、撮像部から出力される撮像信号を、任意のタイミングで供給される撮像指示に応じてフレームタイミングで静止画として処理する静止画処理のステップと、静止画の欠損箇所を静止画にフレームタイミングが対応する動画のフレームを用いて復元する画像復元のステップとを有することを特徴とする撮像装置の制御方法である。 According to another aspect of the present invention, there is provided a method of controlling an imaging apparatus capable of recording still image data in parallel with recording of moving image data. A video processing step for continuously processing the imaging signal output from the camera as a video at each frame timing, and the imaging signal output from the imaging unit at a frame timing according to an imaging instruction supplied at an arbitrary timing A method for controlling an image pickup apparatus, comprising: a step of still image processing to be processed as an image; and a step of image restoration to restore a missing portion of the still image using a moving image frame whose frame timing corresponds to the still image It is.
また、この発明は、動画データの記録と並列的に静止画データの記録を行うことができるようにした撮像装置の制御方法をコンピュータに実行させる撮像制御プログラムにおいて、被写体からの光を電気信号に変換してフレームタイミングで撮像部から出力される撮像信号を動画としてフレームタイミング毎に連続的に処理する動画処理のステップと、撮像部から出力される撮像信号を、任意のタイミングで供給される撮像指示に応じてフレームタイミングで静止画として処理する静止画処理のステップと、静止画の欠損箇所を静止画にフレームタイミングが対応する動画のフレームを用いて復元する画像復元のステップとを有する撮像装置の制御方法をコンピュータに実行させることを特徴とする撮像制御プログラムである。 According to another aspect of the present invention, there is provided an imaging control program for causing a computer to execute a control method for an imaging apparatus capable of recording still image data in parallel with recording of moving image data. Steps of moving image processing in which image signals converted and output from the imaging unit at the frame timing are continuously processed as moving images for each frame timing, and imaging signals output from the imaging unit are supplied at an arbitrary timing An imaging apparatus having a still image processing step for processing as a still image at a frame timing according to an instruction, and an image restoration step for restoring a missing portion of the still image using a moving image frame corresponding to the frame timing for the still image An imaging control program that causes a computer to execute the control method.
上述したように、この発明は、被写体からの光を電気信号に変換してフレームタイミングで撮像部から出力される撮像信号を動画としてフレームタイミング毎に連続的に処理すると共に、撮像部から出力される撮像信号を、任意のタイミングで供給される撮像指示に応じてフレームタイミングで静止画として処理するようにされ、静止画の欠損箇所を静止画にフレームタイミングが対応する動画のフレームを用いて復元するようにしているので、動画を記録中に静止画を記録する場合に、静止画に欠損部分が発生しても欠損部分の復元が可能となる。 As described above, according to the present invention, light from a subject is converted into an electrical signal, and an imaging signal output from the imaging unit at a frame timing is continuously processed as a moving image at each frame timing and output from the imaging unit. The captured image signal is processed as a still image at a frame timing in accordance with an imaging instruction supplied at an arbitrary timing, and a missing portion of the still image is restored using a moving image frame corresponding to the frame timing of the still image Thus, when recording a still image while recording a moving image, even if a missing portion occurs in the still image, the missing portion can be restored.
この発明は、上述したように、被写体からの光を電気信号に変換してフレームタイミングで撮像部から出力される撮像信号を動画としてフレームタイミング毎に連続的に処理すると共に、撮像部から出力される撮像信号を、任意のタイミングで供給される撮像指示に応じてフレームタイミングで静止画として処理するようにされ、静止画の欠損箇所を静止画にフレームタイミングが対応する動画のフレームを用いて復元するようにしているので、動画を記録中に静止画を記録する場合に、静止画に欠損部分が発生しても欠損部分の復元が可能となる効果がある。 As described above, the present invention converts the light from the subject into an electrical signal and continuously processes the imaging signal output from the imaging unit at the frame timing as a moving image for each frame timing, and outputs it from the imaging unit. The captured image signal is processed as a still image at a frame timing in accordance with an imaging instruction supplied at an arbitrary timing, and a missing portion of the still image is restored using a moving image frame corresponding to the frame timing of the still image Therefore, when a still image is recorded while a moving image is being recorded, there is an effect that the lost portion can be restored even if a missing portion occurs in the still image.
以下、この発明の実施の一形態を、図面を参照しながら説明する。図1を用いて、この発明の概念について説明する。例えば、動画像を記録中に静止画の記録が指示され、動画像のフレームNのタイミングで静止画が取り込まれる場合について考える。静止画の記録指示に応じて撮像信号をメモリに格納する際に、メモリ帯域が確保できずにデータ転送に破綻が生じ、図1Aに例示されるように、静止画100において画像データが欠損した破綻箇所101が発生している。この発明では、静止画100の破綻箇所101を、対応する動画像を参照して復元する。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings. The concept of the present invention will be described with reference to FIG. For example, consider a case where recording of a still image is instructed during recording of a moving image, and the still image is captured at the timing of frame N of the moving image. When storing an imaging signal in a memory in response to a still image recording instruction, the memory bandwidth cannot be secured and data transfer fails, and image data is lost in the
一例として、図1Bに例示されるように、静止画100と撮像タイミングが対応する動画のフレームNを参照し、このフレームNの、静止画100における破綻箇所101に対応する領域のデータを用いて、静止画100の修復を行う。例えば、静止画の記録時に、破綻に対応する位置を示す情報を記憶しておく。そして、当該静止画100の再生時に、記録時において静止画100と取り込みタイミングが対応する動画のフレームNの画像を参照し、記憶された破綻位置情報に基づきこのフレームNの画像の対応する位置のデータ102を取得する。この取得されたデータを、静止画100の破綻箇所101に所定に適用させて(データ102’)、静止画100の復元を行う。
As an example, as illustrated in FIG. 1B, a frame N of a moving image corresponding to a
図2は、この発明の実施の一形態に適用可能な撮像装置1の一例の構成を示す。この撮像装置1は、光学系10を介して入射された光を撮像素子11で受光して電気信号に変換して撮像信号とし、この撮像信号を信号処理部20で、信号処理部20に接続される外部メモリであるRAM35を用いて所定に処理して記録媒体37に記録する。撮像装置1は、撮像信号を、動画データとして記録媒体37に記録すると共に、撮影指示に応じたタイミングで取り込まれた静止画データとしても、記録媒体37に記録することができるようにされている。
FIG. 2 shows a configuration of an example of an
なお、以下では、簡単のために、撮像素子11の有効画素数を水平2560画素、垂直1920画素とする。動画は、水平および垂直方向をそれぞれ1/4に縮小した水平640画素、垂直480画素を画枠とし、静止画は、撮像素子11の有効画素をそのまま用いて、画枠を水平2560画素、垂直1920画素とする。
In the following, for the sake of simplicity, the effective pixel count of the
光学系10は、レンズ系、絞り機構、フォーカス機構ズーム機構などを有し、後述するCPU(Central Processing Unit)30の命令に基づく駆動部13の制御やマニュアル操作などにより、絞りやフォーカス、ズームなどが制御されるようになっている。被写体からの光が光学系10を介して撮像素子11に入射される。撮像素子11は、例えばCCD(Charge Coupled Device)からなり、入射された光を光電変換により電気信号に変換し、撮像信号としてライン順次で出力する。なお、撮像素子11は、CCDに限らず、例えばCMOS(Complementary Metal-Oxide Semiconductor)イメージャを用いてもよい。
The
フロントエンド(F/E)部12は、例えばノイズ抑圧部、自動利得制御部およびA/D変換部を有し、撮像素子11からアナログ信号として出力された撮像信号に対し、ノイズ抑圧部で例えば相関二重サンプリング処理を施してノイズを抑圧し、自動利得制御部でゲインを制御する。そして、A/D変換部でディジタル撮像信号に変換して出力する。このディジタル撮像信号は、撮像素子11の各画素それぞれに直接的に対応するデータからなるRAWデータである。
The front end (F / E)
なお、後述するタイミングジェネレータ14により出力されるタイミング信号(クロックパルス)に基づき、撮像素子11が、例えばフレームタイミング毎に光電変換が行われ撮像信号が出力されるように制御されると共に、フロントエンド部12が、フレームタイミングに同期して処理が行われるように制御される。
Note that, based on a timing signal (clock pulse) output from a timing generator 14 (to be described later), the
信号処理部20は、カメラ信号処理部22、拡張画像処理部23、解像度変換部24、静止画コーデック(CODEC)部25、動画コーデック部26、表示制御部27、CPU30、外部インターフェイス(I/F)部33、メモリコントローラ34および記録再生制御部36の各処理ブロックを含み、これら各処理ブロックがそれぞれバス21を介して接続される。
The
カメラ信号処理部22は、フロントエンド部12から出力されたRAWデータが入力される。カメラ信号処理部22は、入力されたRAWデータを所定に補正し、バッファメモリを利用して、クロックをセンサ駆動系のクロックから信号処理部20の内部クロックに乗せ換える。クロックが乗せ換えられたRAWデータは、後段の動画処理に適した形式のデータに変換される。
The camera
また、RAWデータは、静止画の記録を行う場合には、所定に圧縮符号化されバス21にも送り出される。カメラ信号処理部22は、バス21を介して供給される圧縮符号化されたRAWデータの圧縮符号を復号して伸長し、さらに後段の静止画処理に適した形式のデータに変換する。
The RAW data is compressed and encoded in a predetermined manner and sent to the
カメラ信号処理部22は、さらに、ベースバンドの動画データや静止画データを拡大および/または縮小し、動画データの記録や出力画像データとして必要な解像度(サイズ)に変換する。この例では、動画データの記録のためには、撮像素子11の有効画素に従い解像度が2560画素×1920画素のデータを、解像度が640画素×480画素のデータに縮小する。静止画記録については、この例では、この段階での解像度の変換は行わない。このように解像度変換がなされたベースバンドの動画データや静止画データがカメラ信号処理部22から出力される。
The camera
ここで、ベースバンドのデータとは、例えばアナログ信号がディジタル信号に変換されたデータであり、圧縮符号化や変調などの各種処理が施されていない状態のデータを指す。この例では、撮像素子11から出力されたアナログ信号がフロントエンド部12によってディジタル信号に変換されたディジタル撮像信号のことをベースバンドのデータと適宜称する。
Here, the baseband data is, for example, data obtained by converting an analog signal into a digital signal, and indicates data that has not been subjected to various types of processing such as compression coding and modulation. In this example, a digital image pickup signal obtained by converting an analog signal output from the
拡張画像処理部23は、例えば被写体認識処理や超高速連写など、拡張的な画像処理を行う。被写体認識処理は、例えば予め学習されたパターン辞書などを用いて、画像から顔らしき部分を抽出する。超高速連写は、通常の動画データのフレームレートの60fps(frame per second)に対し、例えば240fpsといった非常に高いフレームレートで撮像素子11における電荷読み出しおよび撮像信号の出力を行うものである。超高速連写機能では、通常の動画データに比べて高速のデータ転送能力が要求されるため、処理部を別途、設けることが好ましい。
The extended
解像度変換部24は、ベースバンドの動画データや静止画データの解像度を、後述する表示装置28に表示するのに適した解像度に変換したり、記録モードに応じた解像度に変換する処理を行う。
The
静止画コーデック部25は、ベースバンドの静止画データに対する圧縮符号化処理と、圧縮符号化された静止画データに対する復号処理とを行う。圧縮符号化方式の種類は、特に問わないが、例えばJPEG(Joint Photographic Experts Group)方式が適用される。すなわち、静止画コーデック部25は、供給された静止画データのフレームを例えば8×8画素といった所定サイズの符号化ブロックに分割し、この符号化ブロック毎にDCTを行う。そして、DCTにより得られたDCT係数を所定の量子化スケールで量子化する。量子化されたデータは、ハフマン符号化などの可変長符号化によりさらに圧縮されて出力される。静止画コーデック部25による圧縮静止画データの復号処理は、圧縮符号化処理の逆の処理を以て行われる。 The still image codec unit 25 performs compression encoding processing on baseband still image data and decoding processing on compression-encoded still image data. The type of compression encoding method is not particularly limited, but for example, a JPEG (Joint Photographic Experts Group) method is applied. That is, the still image codec unit 25 divides the supplied still image data frame into encoded blocks of a predetermined size such as 8 × 8 pixels, and performs DCT for each encoded block. Then, the DCT coefficient obtained by DCT is quantized with a predetermined quantization scale. The quantized data is further compressed and output by variable length coding such as Huffman coding. The decoding process of the compressed still image data by the still image codec unit 25 is performed by the reverse process of the compression encoding process.
動画コーデック部26は、ベースバンドの動画データに対する圧縮符号化処理と、圧縮符号化された動画データに対する復号処理とを行う。圧縮符号化方式の種類は特に問わないが、例えばMPEG2(Moving Pictures Experts Group 2)方式や、ITU−T(International Telecommunication Union-Telecommunication Standarization Sector)勧告H.264あるいはISO(International Organization for Standarization)/IEC(International Electrotechnical Commission)国際標準14496−10(MPEG−4パート10)Advanced Video Coding(以下、H.264|AVCと略称する)方式などを適用することができる。以下では、動画コーデック部26は、圧縮符号化方式としてMPEG2方式を適用するものとする。 The moving image codec unit 26 performs compression encoding processing on baseband moving image data and decoding processing on compression encoded moving image data. The type of compression coding system is not particularly limited. For example, MPEG2 (Moving Pictures Experts Group 2) system or ITU-T (International Telecommunication Union-Telecommunication Standardization Sector) recommendation H.264 or ISO (International Organization for Standarization) / IEC (International Electrotechnical Commission) International Standard 14496-10 (MPEG-4 Part 10) Advanced Video Coding (hereinafter abbreviated as H.264 | AVC) or the like can be applied. it can. In the following, it is assumed that the moving picture codec unit 26 applies the MPEG2 system as a compression encoding system.
動画コーデック部26は、例えば、供給された動画データのフレームを例えば8×8画素といった所定サイズの符号化ブロックに分割し、この符号化ブロック毎にDCTを行う。そして、DCTにより得られたDCT係数を所定の量子化スケールで量子化する。また、動画コーデック部26は、供給された動画データについて、動き補償を用いた予測符号化によるフレーム間符号化も行う。フレーム内符号化およびフレーム間符号化を施されたデータは、ハフマン符号化などの可変長符号化によりさらに圧縮されて出力される。動画コーデック部26による圧縮動画データの復号処理は、圧縮符号化処理の逆の処理を以て行われる。 For example, the moving image codec unit 26 divides a frame of the supplied moving image data into encoded blocks of a predetermined size such as 8 × 8 pixels, and performs DCT for each encoded block. Then, the DCT coefficient obtained by DCT is quantized with a predetermined quantization scale. In addition, the moving image codec unit 26 also performs interframe coding on the supplied moving image data by predictive coding using motion compensation. Data subjected to intraframe coding and interframe coding is further compressed and output by variable length coding such as Huffman coding. The decoding process of the compressed moving image data by the moving image codec unit 26 is performed by the reverse process of the compression encoding process.
表示制御部27は、供給された画像データを表示装置28に表示可能な形式の信号に変換する。表示装置28は、例えばLCD(Liquid Crystal Display)からなり、撮像装置1におけるビューファインダとして用いられると共に、記録媒体37から再生された画像のモニタとして用いられる。また、表示制御部27は、後述するCPU30から供給される命令に基づき、表示装置28に文字や図形を表示させるための表示信号を生成する。表示信号に応じた表示も、表示装置28に表示される。例えば、撮像装置1に対する各種設定を行うための設定画面や、撮像装置1の各種状態を示す表示、カーソル表示などが表示装置28に所定に表示される。
The
CPU30に、ROM(Read Only Memory)31と入力デバイス32とが接続される。CPU30は、図示されないRAM(Random Access Memory)をワークメモリとして用い、ROM(Read Only Memory)31に予め記憶されたプログラムに従いこの撮像装置1の全体の動作を制御する。
A ROM (Read Only Memory) 31 and an
例えば、CPU30は、バス21を介して信号処理部20の各部とコマンドやデータのやりとりを行い、信号処理部20の各部を制御する。また、CPU30は、上述した入力デバイス32に対する操作に応じた制御信号や撮像信号などに基づき、光学系10のフォーカス、絞り、ズームなどを制御するための制御信号を生成し、駆動部13に供給する。駆動部13は、供給された制御信号に応じて光学系10の各部の制御を行う。また、CPU30は、タイミングジェネレータ14に対して、所定のクロックパルスを出力するようにコマンドを出す。
For example, the
タイミングジェネレータ14は、CPU30から供給されたこのコマンドに応じて、例えばフレーム同期信号や水平同期信号、垂直同期信号をといった、撮像素子11から出力された撮像信号に対する処理に必要なタイミング信号を生成する。
In response to this command supplied from the
入力デバイス32は、この撮像装置1を操作するために用いられる各種の操作子が設けられ、各操作子に対する操作に応じた制御信号を出力する。例えば、電源部39による電源供給のON/OFFを切り替える電源キー、撮影モードや記録モードといった撮像装置1における動作モードを切り換えるモード切り換えキー、カーソル移動のためのキーなどが設けられる。さらに、入力デバイス32には、この撮像装置1で静止画を撮影する際に用いられるシャッタボタンや、動画や静止画を撮影する際に光学系10のフォーカス、絞り、ズームなどを操作するための操作子なども設けられる。
The
外部I/F33は、この撮像装置1と外部の機器との間でのデータのやりとりを制御する。
The external I /
メモリコントローラ34に対して、RAM35が接続される。RAM35は、例えばメモリバスクロックに同期して動作するSDRAM(Synchronous Dynamic Random-Access Memory)であって、データの入出力を所定のデータ長(バースト長)単位でバースト転送により行うことができる。RAM35は、バス21に接続される各部と共用して用いられる。メモリコントローラ34は、このRAM35に対するアクセス制御を行う。バス21に接続される各処理ブロックにおいて、RAM35に対する転送要求が発生した場合には、バス21からメモリコントローラ34に対して転送要求が渡され、メモリコントローラ34は、この転送要求に従いRAM35へのアクセスを発生させる。
A
記録再生制御部36は、記録媒体37に対するデータの記録制御や、記録媒体37に記録されたデータの再生制御を行う。記録媒体37としては、例えば着脱可能な不揮発性メモリを用いることができる。また、記録媒体37として記録可能なタイプの光ディスクを用いることもできる。さらに、着脱可能または撮像装置1に内蔵されるハードディスクを記録媒体37として用いることもできる。勿論、記録媒体37は、従来から動画データの記録に用いられる磁気テープを適用することも可能である。
The recording / reproducing
図3は、カメラ信号処理部22の一例の構成を示す。カメラ信号処理部22は、RAW補正部50、スイッチ部51、信号処理部52および解像度変換部53を有すると共に、RAW圧縮部54およびRAW伸長部56、ならびに、バスI/F55、57および58を有する。
FIG. 3 shows an exemplary configuration of the camera
バスI/F55、57および58は、RAM35のデータを一時的に溜め込むことができるバッファメモリを有する。バスI/F55、57および58は、このバッファメモリにバースト長分のデータが溜め込まれたら、バッファメモリからバースト長単位でデータを読み出しバス21に送り出すことができるようにされている。また。バスI/F55、57および58は、RAM35からバースト長単位で読み出されたデータを一時的にバッファに溜め込み、所定のタイミングで出力することができるようにされている。
The bus I /
RAW補正部50は、補正処理部50Aおよび同期乗り換え部50Bを有する。補正処理部50Aは、供給されたRAWデータに対して欠陥補正やレンズ補正などの各種補正処理を施すと共に、RAWデータの配列に対してデモザイク処理を施し、後段での補正処理や色変換処理に適したデータ配列に並び替える。
The
同期乗り換え部50Bは、センサ駆動系のクロックをシステム系のクロックへの乗り換え処理を行う。すなわち、カメラ信号処理部22に供給されるデータは、撮像素子11の出力であって、撮像素子11から電荷を読み出す際の駆動クロックに同期している。一方、カメラ信号処理部22から出力されるデータは、信号処理部20内部のクロックに同期している必要がある。同期乗り換え部50Bは、バッファメモリを有し、センサ駆動系のクロックに従いバッファメモリに入力データを書き込んでいき、システム系のクロックに従いバッファメモリからデータを読み出す。バッファメモリからのデータ読み出しは、同期乗り換え部50Bに供給される転送要求に応じて行われる。
The synchronous transfer unit 50B performs a process of changing the sensor drive system clock to the system clock. That is, the data supplied to the camera
信号処理部52からの転送要求Aに応じて、同期乗り換え部50BのバッファメモリからRAWデータが読み出され、スイッチ部51の一方の端子51Aを介して信号処理部52に供給される。信号処理部52は、RAWデータを後段の処理に適した形式の画像信号に変換する。例えば、信号処理部52は、RAWデータを輝度信号Yと色差信号Cb/CrとからなるY/C信号に変換する。
In response to the transfer request A from the
信号処理部52は、さらに、RAWデータが変換された画像信号に対してホワイトバランス処理、ガンマ補正処理、エッジ強調処理など所定の画質補正処理を施す。なお、一般的に、動画像と静止画像とでは、求められる画質が異なると考えられている。そこで、信号処理部52は、例えばCPU30の制御により、動画データに対する処理を行う場合と、静止画データに対する処理を行う場合とで、これらの画質補正処理を行う際のパラメータを切り替えることができるようにされている。
The
信号処理部52で信号処理された画像信号は、解像度変換部53で例えば動作モードに応じた解像度に解像度変換され、バスI/F58からの転送要求Cに応じて、バスI/F58を介してバス21に送り出される。
The image signal subjected to signal processing by the
信号処理部52からの転送要求Aは、バスI/F57にも供給される。バスI/F57は、この転送要求Aに応じて所定のタイミングで、例えばバス21を介してメモリコントローラ34に対してRAM35に格納される圧縮RAWデータの読み出しを要求し、この要求に応じてRAM35から読み出され転送された圧縮RAWデータを、RAW伸長部56に供給する。RAW伸長部56は、バスI/F57を介して供給されたこの圧縮RAWデータに対し、後述するRAW圧縮部54と逆の処理により復号処理を施し、伸長する。スイッチ部51で端子51Bが選択され、RAW伸長部56の出力は、スイッチ部51の端子51Bを介して信号処理部52に供給される。
The transfer request A from the
なお、信号処理部52および解像度変換部53の処理は、バスI/F58から供給される転送要求Cと、信号処理部52が出力する転送要求Aに対する応答信号に基づき行われる。すなわち、信号処理部52および解像度変換部53では、出力相手側からのデータ転送要求と、入力相手側からのデータ出力応答とが共に有効となったときに、データの転送および信号処理が行われる。
The processing of the
バスI/F55からの転送要求Bに応じて、同期乗り換え部50BのバッファメモリからRAWデータが読み出され、RAW圧縮部54に供給される。RAW圧縮部54は、供給されたRAWデータを圧縮符号化して出力する。RAW圧縮部54では、より画質劣化の少ない圧縮符号化方式を適用すると、好ましい。
In response to the transfer request B from the bus I /
例えば、特開2005−311743号公報に記載されるような、ガンマ曲線に似た変換カーブに基づき変換前データをよりビット長の短い変換後のデータに対応付ける変換テーブルを作成し、この変換テーブルを参照することでデータ長を短縮して圧縮符号化を行う方法を用いることができる。また、特開2006−352509号公報に記載されるような、ガンマ曲線に似た変換カーブに基づく変換テーブルを用いた圧縮符号化方式に対し、さらにDPCM(Defferential Pulse Code Modulation)方式による圧縮符号化方式を加えた方法を用いてもよい。これらの方法で圧縮符号化されたデータに対して、例えばハフマン符号などを用いてさらに圧縮符号化を行うようにしてもよい。 For example, a conversion table that associates pre-conversion data with post-conversion data having a shorter bit length based on a conversion curve similar to a gamma curve, as described in JP-A-2005-311743, It is possible to use a method of compressing and encoding by shortening the data length by referring. In addition to the compression coding method using a conversion table based on a conversion curve similar to a gamma curve as described in Japanese Patent Application Laid-Open No. 2006-352509, compression coding by a DPCM (Defective Pulse Code Modulation) method is further performed. You may use the method which added the system. For example, Huffman code may be used for further compression coding on the data compression-coded by these methods.
なお、RAW圧縮部54における圧縮符号化処理は、RAWデータの転送に対してリアルタイム性を重視してなされ、例えば、撮像素子11の読み出し特性に基づきライン順次で行われる。これに限らず、RAW圧縮部54に複数ラインを格納可能なラインメモリを設け、水平8画素×垂直8画素からなるブロック単位で、静止画データを水平方向に順次走査して行うようにもできる。
Note that the compression encoding process in the
RAW圧縮部54で圧縮符号化された圧縮RAWデータは、バスI/F55を介してバス21に送り出される。
The compressed RAW data compression-encoded by the
このような構成による撮像装置1における一例の動作について、概略的に説明する。動画データの記録を主に行う動画データ記録モード時には、被写体からの光が光学系10を介して撮像素子11に入射され、光電変換により電気信号に変換され撮像信号としてフレームタイミング毎に出力される。撮像信号は、フロントエンド部12によりノイズ抑圧処理やゲイン制御などの所定の処理を施され、さらにA/D変換されてRAWデータとしてフレームタイミング毎に出力される。フロントエンド部12から出力されたRAWデータは、信号処理部20に入力され、カメラ信号処理部22に供給される。
An example of the operation of the
RAWデータは、カメラ信号処理部22において、補正処理部50Aで補正処理され、同期乗り換え部50Bでセンサ駆動系クロックでバッファメモリに書き込まれる。信号処理部52から出力された転送要求Aに応じて、バッファメモリからRAWデータが読み出される。このとき、バッファメモリからのデータの読み出しがシステム系クロックに従い行われ、クロックの乗せ換えが行われる。同期乗り換え部50Bから出力されたRAWデータは、スイッチ部51を介して信号処理部52に供給され、ベースバンドの動画データに変換され、解像度変換部53で所定に解像度変換される。転送要求Cに応じて解像度変換部53から動画データが出力され、バスI/F58によりバス21に転送され、RAM35に書き込まれる。
The RAW data is corrected in the camera
RAM35に書き込まれた動画データは、所定にRAM35から読み出されバス21を介して解像度変換部24および動画コーデック部26に供給される。解像度変換部24は、供給された動画データの解像度を例えば表示装置28に表示するのに適した解像度に変換する。解像度変換部24で解像度が変換された動画データは、バス21を介して表示制御部37に供給され、記録モニタ画像として表示装置28に表示される。
The moving image data written in the
RAM35に書き込まれた動画データは、バス21を介して動画コーデック部26にも供給される。動画コーデック部26は、例えばMPEG2方式により圧縮符号化を行う。圧縮動画データは、バス21を介してメモリコントローラ34に供給され、RAM35に格納される。る。解像度変換された動画データは、バス21を介してメモリコントローラ34に供給され、RAM35に格納される。
The moving image data written in the
なお、RAM35に書き込まれた動画データをバス21を介して拡張画像処理部23に供給して所定に画像処理を施し、その後、解像度変換部24に供給するようにしてもよい。これに限らず、解像度変換部24で解像度変換された動画データをバス21を介して拡張画像処理部23に供給し、画像処理を施すようにしてもよい。
Note that the moving image data written in the
記録再生制御部36は、RAM35に所定量以上の圧縮動画データが溜め込まれると、RAM35から、例えば記録媒体37の記録単位毎に圧縮動画データを読み出し、記録媒体37に記録する。
When a predetermined amount or more of the compressed moving image data is accumulated in the
動画データの記録中に静止画記録を行う場合には、先ず、例えば動画の記録中に、静止画の記録を指示するために、入力デバイス32として設けられたシャッタボタンが押下される。シャッタボタンの押下に応じた制御信号が入力デバイス32からCPU30に供給される。CPU30は、この制御信号に基づき、撮像装置1の各部を、静止画記録を行うように制御する。
When recording a still image while recording moving image data, first, for example, during recording of a moving image, a shutter button provided as the
例えば、シャッタボタンが押下された直後のフレームタイミングのRAWデータに基づく静止画データが取り込まれ記録される。すなわち、カメラ信号処理部22において、シャッタボタンが押下されタイミングに対応するRAWデータに対し、補正処理部50Aで所定に補正処理を施し同期乗り換え部50Bでセンサ駆動系クロックでバッファメモリに書き込まれる。バッファメモリに書き込まれたRAWデータは、転送要求Bに応じてシステム系クロックで読み出されてクロックが乗せ換えられ、RAW圧縮部54に供給される。RAW圧縮部54で圧縮符号化された圧縮RAWデータは、バスI/F55を介してバス21に送り出され、バス21およびメモリコントローラ34を介してRAM35に格納される。
For example, still image data based on RAW data at the frame timing immediately after the shutter button is pressed is captured and recorded. That is, in the camera
RAM35に格納された圧縮RAWデータは、所定のタイミングでRAM35から読み出され、カメラ信号処理部22に供給される。カメラ信号処理部22に供給された圧縮RAWデータは、転送要求Aに応じてバスI/F57を介してRAW伸長部56に供給され、圧縮符号を伸長される。伸長されたRAWデータは、信号処理部52でベースバンドの静止画データに変換され、解像度変換部53で解像度変換を施され、バスI/F58を介してバス21に転送され、メモリコントローラ34を介してRAM35に書き込まれる。
The compressed RAW data stored in the
RAM35に書き込まれたRAWデータは、所定に読み出されてバス21を介して静止画コーデック部25に供給され、例えばJPEG方式に従って圧縮符号化される。圧縮静止画データは、バス21を介して記録再生制御部36に供給され、動画データの記録が行われていないタイミングで記録媒体37に記録される。圧縮静止画データを一旦RAM35に格納し、記録媒体37に対して動画データの記録が行われていないタイミングでRAM35から圧縮静止画データを読み出して記録媒体37に記録するようにしてもよい。
The RAW data written in the
なお、動画データの記録中に静止画データの記録を行う場合、動画データの記録を停止させないために、カメラ信号処理部22におけるRAWデータの圧縮符号化処理や、圧縮RAWデータのRAM35に対する書き込みは、撮像素子11の出力に同期してリアルタイムに行う必要がある。
Note that when still image data is recorded during recording of moving image data, the RAW data is compressed and encoded in the camera
一方、RAM35に格納された圧縮RAWデータの読み出しや、読み出されたRAWデータのカメラ信号処理部22における伸長処理および信号処理、静止画コーデック部25における圧縮符号化処理、圧縮静止画データの記録再生制御部36への供給などは、例えば撮像素子11における駆動信号のブランキング期間といった、バス21が混雑していないタイミングで行う。なお、静止画データに対する信号処理は、リアルタイム性が要求されないため、CPU30におけるソフトウェア処理や、汎用DSP(Digital Signal Processor)を用いて低速で信号処理することが可能である。
On the other hand, reading of the compressed RAW data stored in the
次に、カメラ信号処理部22における処理について、より詳細に説明する。上述したように、同期乗り換え部50Bでは、センサ駆動系のクロックに同期して入力されたRAWデータをバッファメモリに一旦格納し、このバッファメモリからの読み出しをシステム系クロックに同期させて行うことで、クロックの乗せ替えを行っている。バッファメモリは、クロック乗せ換えと、バス21における瞬間的なアクセス遅延を吸収可能な容量を、少なくとも有しているものとする。バッファメモリからの読み出しが行われない状態で、バッファメモリに対する書き込みが発生すると、バッファメモリがオーバーフローを起こし、バッファ機能が破綻することになる。
Next, the processing in the camera
このように、バッファメモリに対するRAWデータの読み書きの速度差によりバッファ破綻が発生する例としては、RAW圧縮部54で圧縮符号化された圧縮RAWデータが送り出されるバス21において、データ転送量が増大してバス21が混雑している場合が考えられる。例えばバスI/F55は、バス21が圧縮RAWデータよりも優先度が高いデータの転送で混雑している場合、例えば当該データの転送が終了するまで圧縮RAWデータをバス21に送り出す処理を待機する。若しくは、RAW圧縮部54を制御してRAWデータの圧縮処理を停止し、当該データの転送が終了しバッファメモリが空になるのを待機する。
In this way, as an example of buffer failure due to the difference in the reading / writing speed of RAW data to / from the buffer memory, the data transfer amount increases on the
また、RAW圧縮部54がRAWデータの空間周波数成分に応じて圧縮率が変動する可変長符号化を用いてRAWデータの圧縮符号化を行う場合、圧縮符号化するRAWデータの高周波成分が多ければ、圧縮符号化後のデータ量が大きくなってしまう場合が有り得る。このような場合にも、バッファ破綻が発生する可能性がある。
In addition, when the
バッファ破綻が発生する可能性がある場合、静止画データの記録を継続するためには、RAWデータの圧縮符号化処理およびその前段の処理を停止し、バッファメモリが空になるのを待つ必要がある。前段の処理は、例えば撮像素子11からの撮像信号の出力、フロントエンド部12からのRAWデータの出力、補正処理部50Aにおける補正処理が含まれる。しかしながら、動画データの記録中に静止画データの記録が行われる場合、動画データの記録を連続的に行う必要があるため、これら前段の処理を中止することができない。
If there is a possibility of buffer failure, in order to continue recording still image data, it is necessary to stop the RAW data compression encoding process and the preceding process and wait for the buffer memory to become empty. is there. The preceding process includes, for example, output of an imaging signal from the
そこで、同期乗り換え部50Bがバッファメモリの状態を監視し、バッファの破綻が検知されたら、破綻処理を行う。図4は、このような処理を行うようにされた同期乗り換え部50Bの一例の構成を示す。同期乗り換え部50Bは、バッファメモリ60と、読み出し制御部61とからなる。バッファメモリ60は、先入れ先出し(FIFO:First In, First Out)制御のメモリであって、前処理側から供給される書き込みイネーブル信号を受けて、データの書き込みを行う。読み出し制御部61は、上述した転送要求Aおよび転送要求Bと、バッファメモリ60の容量とに基づきバッファメモリ60に対してデータの読み出し要求を出す。バッファメモリ60の容量は、例えばバッファメモリが満杯(フル)状態および空(エンプティ)状態の何れかを示しているのみでもよい。
Therefore, the synchronous transfer unit 50B monitors the state of the buffer memory, and performs a failure process when a buffer failure is detected. FIG. 4 shows an example of the configuration of the synchronous transfer unit 50B configured to perform such processing. The synchronous transfer unit 50B includes a
読み出し制御部61は、バッファメモリ60の容量が空ではなく、且つ、転送要求Aおよび転送要求Bの双方が成立する場合に、バッファメモリ60への読み出し要求をアクティブとしてバッファメモリ60からデータを読み出し、信号処理部52およびRAW圧縮部54に対して出力する。
When the capacity of the
ここで、読み出し制御部61は、バッファメモリ60の容量と、転送要求Aおよび転送要求Bとに基づき、バッファが破綻する可能性の有無を判断する。すなわち、バッファメモリ60の容量がフル状態であって、少なくとも転送要求Aまたは転送要求Bの何れか一方が成立しない場合に、バッファが破綻する可能性があると判断する。なお、転送要求が成立するか否かは、例えばその転送要求により行われるべき処理のタイミングに当該転送要求が読み出し制御部61に到来しているか否かで判断することが考えられる。
Here, the
転送要求Aまたは転送要求Bのうち何れか一方のみが成立しないと判断された場合を、部分破綻と呼び、発生要因を例えば読み出し制御部61の内部レジスタに保持する。また、転送要求Aと転送要求Bとが共に成立しないと判断された場合を、完全破綻と呼び、発生要因を内部レジスタに保持する。CPU30は、読み出し制御部61の内部レジスタを読み出すことで、フレーム処理の単位で、部分破綻または完全破綻の何れが発生したか否かを知ることができる。
A case where it is determined that only one of the transfer request A and the transfer request B is not established is called partial failure, and the cause of occurrence is held in, for example, an internal register of the read
なお、読み出し制御部61の内部レジスタに保持される発生要因は、例えば成立しないとされた転送要求の情報を用いることができる。一例として、転送要求Aが成立しないとされ、部分破綻可能性が発生したとされた場合には、転送要求Aを示す情報を、読み出し制御部61の内部レジスタに保持することが考えられる。他の例として、転送要求Aおよび転送要求Bが共に成立しないとされ、完全破綻可能性が発生したとされた場合には、転送要求Aおよび転送要求Bをそれぞれ示す情報を読み出し制御部61の内部レジスタに保持することが考えられる。
For example, information on a transfer request that is not established can be used as the generation factor held in the internal register of the read
図5は、転送要求に基づく一例のバッファ破綻判定をまとめて示す。例えば、動画データの記録のみを行っている場合は、転送要求Aのみが読み出し制御部61に供給されるはずである。記録モードが動画データ記録モードであって、バッファメモリ60の容量がフル状態のときに、転送要求Aが読み出し制御部61に供給されない場合は、バッファが破綻する可能性があると判断できる。一例として、バス21が混雑しており、バスI/F58から転送要求Cが出力されない場合、解像度変換部53で解像度変換を行ったデータをバス21に送り出すことができないことになる。この場合、信号処理部52は、次のデータを同期乗り換え部50Bに要求できないため、転送要求Aを出力しない。
FIG. 5 collectively shows an example of the buffer failure determination based on the transfer request. For example, when only moving image data is recorded, only the transfer request A should be supplied to the
また例えば、静止画データの記録のみを行っている場合は、転送要求Bのみが読み出し制御部61に供給されるはずである。記録モードが静止画データ記録モードであって、バッファメモリ60がフル状態のときに、転送要求Bが読み出し制御部61に供給されない場合は、バッファが破綻する可能性があると判断できる。一例として、バス21が混雑している場合にバスI/F55が転送要求Bを出力しないようにすると共に、RAW圧縮部54におけるRAWデータの圧縮符号化処理を停止させるようにできる。バス21の混雑が緩和されたら転送要求Bを出力すると共にRAW圧縮部54によるRAWデータの圧縮符号化処理を再開することが考えられる。
Further, for example, when only still image data is recorded, only the transfer request B should be supplied to the
さらに例えば、動画データの記録を行い動画データの記録中に静止画データの記録を行う場合には、転送要求Aおよび転送要求Bがそれぞれ読み出し制御部61に供給されるはずである。記録モードが動画および静止画データ記録モードであって、バッファメモリ60がフル状態のときに、転送要求Aまたは転送要求Bのうち何れか一方が読み出し制御部61に供給されない場合には、バッファが部分破綻を起こす可能性があり、転送要求Aおよび転送要求Bが共に供給されない場合には、バッファが完全破綻を起こす可能性がある。
Furthermore, for example, when recording moving image data and recording still image data while recording moving image data, the transfer request A and the transfer request B should be supplied to the
この発明の実施の一形態では、動画記録中の静止画記録においてバッファが破綻する可能性があると判断された場合には、RAW圧縮部54によるRAWデータの圧縮符号化処理を一旦停止し、バッファメモリ60が空になるのを待機する。例えば、動画記録のための転送要求Aに応じてバッファメモリ60からデータが読み出されるのが待機される。このとき、RAWデータ上の圧縮符号化が停止された位置をレジスタやメモリなどに所定に保持する。そして、バッファメモリ60が空になりバッファの破綻が解消されたら、バスI/F55から転送要求Bを出力し、バッファメモリ60に順次格納されていくRAWデータを読み出し、RAW圧縮部54で圧縮符号化する。
In one embodiment of the present invention, when it is determined that there is a possibility that the buffer may fail in still image recording during moving image recording, the RAW data compression and encoding process by the
図6を用いて、より具体的に説明する。動画データのフレームNのデータ(以下、「動画データのフレームNのデータ」を、適宜、単に「フレームN」として記述する)に対応して記録が指示された静止画データにおいて、ラインmの位置でバッファ破綻の可能性が生じたものとする。例えば、読み出し制御部61により、転送要求Bが供給されないことが検知されると、バッファの部分破綻が生じる可能性があると判断される。RAW圧縮部54は、バッファ破綻の可能性が生じたら、RAWデータの圧縮符号化処理を停止する。圧縮符号処理は、バッファ破綻の可能性が生じた位置からRAWデータの一定量分、停止される。図6の例では、バッファ破綻の可能性が生じた位置から一定量分が経過したラインm+αから、RAW圧縮部54によるRAWデータの圧縮符号化処理が再開される。
This will be described more specifically with reference to FIG. The position of the line m in the still image data instructed to be recorded in correspondence with the data of the frame N of the moving image data (hereinafter “frame N data of the moving image data” is simply described as “frame N” as appropriate) It is assumed that the possibility of buffer failure has occurred. For example, if the
以下、この、バッファ破綻の可能性が生じた位置から、バッファ破綻が解消された位置までを、破綻区間と呼ぶ。また、バッファ破綻の可能性が生じた位置を破綻位置と呼び、バッファ破綻が解消された位置を破綻回復位置と呼ぶ。破綻区間においては、RAWデータの圧縮符号化処理が停止されているため、静止画像データが欠損することになる。 Hereinafter, the position from the position where the possibility of buffer failure occurs to the position where the buffer failure is resolved is referred to as a failure section. A position where the possibility of buffer failure has occurred is called a failure position, and a position where the buffer failure has been eliminated is called a failure recovery position. In the failed section, since the RAW data compression encoding process is stopped, still image data is lost.
圧縮符号を伸長した画像においては、このラインmからラインm+αまでの破綻区間は、有効なRAWデータが欠損しており、正常な表示が行われない。圧縮RAWデータの伸長時に破綻区間のデータを有効な画像データと置き換えるためには、この破綻区間を示す情報を保持しておく必要がある。 In an image in which the compression code is expanded, valid RAW data is missing in the failed section from line m to line m + α, and normal display is not performed. In order to replace the data in the failed section with valid image data when decompressing the compressed RAW data, it is necessary to retain information indicating the failed section.
例えば、図7に例示されるように、RAWデータの圧縮符号化に用いられない所定の符号を用いて破綻区間を示す情報として用い、圧縮符号化されたRAWデータに埋め込むことが考えられる。一例として、図7Aに示されるように、ラインm上の破綻位置からラインm+α上の破綻回復位置すなわち圧縮符号化処理の再開位置までが破綻区間とした場合について考える。 For example, as illustrated in FIG. 7, it is conceivable that a predetermined code that is not used for RAW data compression encoding is used as information indicating a failed section and is embedded in compression encoded RAW data. As an example, as shown in FIG. 7A, let us consider a case where the failure section from the failure position on the line m to the failure recovery position on the line m + α, that is, the restart position of the compression encoding process, is a failure section.
この場合、図7Bに例示されるように、破綻位置の直前まではRAWデータが圧縮符号化された符号で埋められ、破綻位置から破綻回復位置までは、圧縮符号で用いられない所定の符号で埋められる。例えばRAWデータの圧縮符号化をテーブルを用いて符号変換することで行う場合には、このテーブルに定義されない符号を、破綻区間を示す符号として用いることができる。破綻区間を示す符号は、例えばバッファメモリ60が空になりバッファ破綻から回復されたら、RAW圧縮部54で所定に生成され、出力される。その後、破綻回復位置より後ろのRAWデータについて圧縮符号化が行われる。
In this case, as illustrated in FIG. 7B, the RAW data is filled with a compression encoded code until just before the failure position, and from the failure position to the failure recovery position is a predetermined code that is not used in the compression code. Buried. For example, when compression encoding of RAW data is performed by code conversion using a table, a code that is not defined in this table can be used as a code indicating a failed section. For example, when the
また、破綻区間を示す情報の保持は、破綻区間を所定の符号で置き換える方法に限られない。例えば、図8に例示されるように、破綻区間を示す位置情報を、圧縮RAWデータとは別に保持することも考えられる。位置情報としては、画素の座標情報を用いることができる。図8Aの例のように、座標(x1,y1)でバッファ破綻が生じ、座標(x2,y2)で破綻から回復した場合、図8Bに例示されるように、破綻位置情報は、破綻位置を示す座標ST(x1,y1)と、破綻回復位置を示す座標ED(x2,y2)とで示すことができる。破綻区間を位置情報を用いて示す場合には、図8Cに例示されるように、破綻区間の符号は任意とすることができる。 In addition, holding information indicating a failed section is not limited to a method of replacing the failed section with a predetermined code. For example, as illustrated in FIG. 8, it may be possible to hold position information indicating a failed section separately from the compressed RAW data. As the position information, pixel coordinate information can be used. When the buffer failure occurs at the coordinates (x 1 , y 1 ) and recovers from the failure at the coordinates (x 2 , y 2 ) as in the example of FIG. 8A, the failure position information is as shown in FIG. 8B. The coordinates ST (x 1 , y 1 ) indicating the failure position and the coordinates ED (x 2 , y 2 ) indicating the failure recovery position can be indicated. When the failed section is indicated using position information, the code of the failed section may be arbitrary as illustrated in FIG. 8C.
破綻区間を示す位置情報は、画素の座標情報に限られない。例えば、RAWデータの圧縮符号化処理がライン順次に行う場合には、ライン番号を用いることができる。図8Aの例のように、破綻区間がラインmからラインm+αまでの場合には、破綻位置情報をライン(m,m+α)のように表すことができる。また、RAWデータの圧縮符号化処理をブロック単位で行う場合には、ブロックを識別するためのブロック番号などを、破綻位置情報として用いることができる。 The position information indicating the failed section is not limited to pixel coordinate information. For example, when the RAW data compression encoding process is performed line-sequentially, a line number can be used. As in the example of FIG. 8A, when the failure section is from line m to line m + α, the failure position information can be expressed as line (m, m + α). Further, when the RAW data compression encoding process is performed in units of blocks, a block number or the like for identifying a block can be used as the failure position information.
この発明の実施の一形態では、圧縮RAWデータを伸長する際に、破綻区間の画像を対応する動画データに基づく画像データを参照して復元する。この破綻区間の復元に際して参照される画像データを、動画データおよび静止画データとは別に保持する。 In one embodiment of the present invention, when decompressing the compressed RAW data, the image in the failed section is restored with reference to the image data based on the corresponding moving image data. The image data referred to when restoring the failed section is stored separately from the moving image data and the still image data.
図9を用いて、復元に際して参照される画像データの保持について説明する。動画データのフレームNのタイミングでRAWデータが静止画データとして取り込まれ、RAW圧縮部54で圧縮符号化される。このとき、ラインmからラインm+αまでの区間が破綻区間であるものとする。この場合、動画データにおけるフレームNの破綻区間に対応した区間が復元用のデータとして、別途、保持される。
With reference to FIG. 9, description will be given of holding image data referred to during restoration. RAW data is captured as still image data at the timing of frame N of the moving image data, and is compressed and encoded by the
例えば、動画記録中の静止画記録においてバッファ破綻の可能性が生じたときに、動画コーデック部26で圧縮符号化される以前の、記録する静止画データに対応するフレームNをRAM35に保持しておき、この保持されたフレームNから破綻区間に対応する領域のデータを抽出して復元用データとして用いることが考えられる。圧縮RAWデータの伸長時には、この保持された復元用データが、動画データの画枠サイズと静止画データの画枠サイズの比率に応じて所定に拡大処理されて用いられる。
For example, when there is a possibility of buffer failure in still image recording during moving image recording, a frame N corresponding to still image data to be recorded before being compressed and encoded by the moving image codec unit 26 is held in the
例えば、静止画データの画枠サイズが2560画素×1920画素、動画データの画枠サイズがその1/4の640画素×480画素である場合、フレームNのラインm/4からライン(m+α)/4までの区間が復元用のデータとして保持される。なお、実際には、圧縮RAWデータを伸長する際の復元用データの拡大処理のために、動画データおよび静止画データの画枠サイズの比率に応じた領域に対して所定の領域が付加されたデータが復元用データとして用いられる。図9の例では、フレームNの、破綻区間に対応する区間に対して上下にA本のラインが付加された区間が復元用データとして用いられる。 For example, when the image frame size of still image data is 2560 pixels × 1920 pixels and the image frame size of moving image data is ¼ of 640 pixels × 480 pixels, the line m / 4 to the line (m + α) / Sections up to 4 are held as restoration data. Actually, a predetermined area is added to the area corresponding to the ratio of the image frame size of the moving image data and the still image data for the expansion process of the restoration data when decompressing the compressed RAW data. Data is used as restoration data. In the example of FIG. 9, a section of frame N in which A lines are added up and down with respect to the section corresponding to the bankrupt section is used as restoration data.
なお、破綻区間の復元の際に、図10に例示されるように、対応する動画データを直接的に参照することも考えられる。この場合には、動画コーデック部26で圧縮符号化するためにRAM35に格納される、記録する静止画データに対応するフレームNを直接的に参照することが考えられる。この場合には、動画コーデック部26における当該フレームNの圧縮符号化のタイミングを考慮して、破綻区間の復元処理を行う必要がある。
In addition, when restoring the failed section, it is conceivable to directly refer to the corresponding moving image data as illustrated in FIG. In this case, it is conceivable to directly refer to the frame N corresponding to the still image data to be recorded, which is stored in the
図11は、この発明の実施の一形態によるRAWデータ圧縮符号化処理の一例の制御を示すフローチャートである。このフローチャートにより処理は、例えば、読み出し制御部61による判断に基づき、CPU30により制御される。
FIG. 11 is a flowchart showing control of an example of the RAW data compression encoding process according to the embodiment of the present invention. The processing according to this flowchart is controlled by the
なお、撮像装置1は、記録モードが動画記録中に静止画の記録が可能なモードとされているものとする。したがって、同期乗り換え部50Bの読み出し制御部61に対して、転送要求Aおよび転送要求Bが供給されることになる。なお、これに限らず、動画が記録される場合に、通常は動画記録モードとされ読み出し制御部61に対して転送要求Aのみが供給され、例えばシャッタボタンの押下に応じて動画記録中に静止画記録が可能な記録モードに変更されるようにしてもよい。場合には、記録モードの変更に伴い、転送要求Aおよび転送要求Bが読み出し制御部61に供給されることになる。
Note that the
ステップS10で、バッファ破綻の可能性が生じたか否かが判断される。例えば、読み出し制御部61に対して、記録モード対応して転送要求Aおよび転送要求Bが供給されるべきところに、転送要求Aまたは転送要求Bの何れか一方しか供給されていなければ、バッファが部分破綻を起こす可能性があると判断することができる。若し、読み出し制御部61に対して転送要求Aおよび転送要求Bが共に供給されていると判断されれば、ステップS11で、読み出し制御部61によりバッファメモリ60からRAWデータが所定に読み出され、RAW圧縮部54にて圧縮符号化される。圧縮符号化されたRAWデータは、バス21を介してRAM35に転送される。
In step S10, it is determined whether or not there is a possibility of buffer failure. For example, if only one of the transfer request A and the transfer request B is supplied to the
一方、ステップS10で、バッファが部分破綻を起こす可能性があると判断された場合には、処理はステップS12に移行される。ステップS12では、破綻位置を示す情報が所定に保持される。次のステップS13で、RAW圧縮データを伸長する際に破綻区間を復元するための動画データが確保される。 On the other hand, if it is determined in step S10 that there is a possibility that the buffer may partially fail, the process proceeds to step S12. In step S12, information indicating the failure position is held in a predetermined manner. In the next step S13, moving image data for restoring the failed section is secured when the RAW compressed data is expanded.
なお、ここでは、破綻位置は、図7を用いて説明した、破綻区間をRAWデータの圧縮符号化において用いられない所定の符号で置き換えて示すものとする。また、破綻区間を復元するためのデータは、図9を用いて説明した、取り込む静止画に対応する動画データのフレームNから破綻区間に対応する領域を抽出して、別途、RAM35に格納することで確保するものとする。 Here, the failure position is shown by replacing the failure section described with reference to FIG. 7 with a predetermined code that is not used in the RAW data compression encoding. In addition, as data for restoring the failed section, an area corresponding to the failed section is extracted from the frame N of the moving image data corresponding to the captured still image described with reference to FIG. It shall be secured by
次のステップS14で、RAW圧縮部54における圧縮符号化処理が停止される。そして、ステップS15で、バッファ破綻の可能性から回復したか否かが判断される。例えばステップS15では、破綻位置から一定量分のRAWデータに対する圧縮符号化が停止されたか否かが判断される。バッファ破綻の可能性から回復していないと判断されれば、処理はステップS14に戻され、RAWデータの圧縮符号化処理の停止状態が維持される。一方、バッファ破綻の可能性から回復したと判断されれば、処理はステップS10に戻され、次のステップS11でRAWデータの転送および圧縮符号化が行われる。
In the next step S14, the compression encoding process in the
次に、図12および図13を用いて破綻区間に対する一例の復元処理について説明する。図12は、圧縮RAWデータの復号処理における破綻区間の一例の復元処理を示すフローチャートである。なお、破綻区間の位置は、破綻区間のデータを圧縮符号化で用いられない所定の符号で破綻区間のデータを置き換えて示し、破綻区間を復元するためのデータは、RAM35に格納される、動画コーデック部26による圧縮符号化前のデータから破綻区間に対応する部分を抽出し別途、保持したデータを用いるものとする。
Next, an example of restoration processing for a failed section will be described with reference to FIGS. 12 and 13. FIG. 12 is a flowchart illustrating an example of a restoration process of a failed section in the decoding process of compressed RAW data. Note that the position of the failed section is indicated by replacing the data of the failed section with a predetermined code that is not used in compression encoding, and data for restoring the failed section is stored in the
RAW伸長部56において、RAM35から読み出された圧縮RAWデータに対し、例えば画面の左上隅に対応する位置から復号処理が行われる。このとき、破綻位置を示す所定の符号の検出を行い(ステップS20)、当該圧縮RAWデータにおいて現在復号を行おうとしている符号が当該処理の符号でなければ、ステップS21で復号処理を行い圧縮RAWデータを伸長する。伸長された伸長RAWデータは、所定に信号処理され画像データが生成される。なお、ステップS20で破綻位置を示す符号が検出されると、検出結果に基づき破綻位置を示す情報が求められ、保持される。
In the
例えば、信号処理部52において動画データに対する信号処理が行われていない間に、伸長RAWデータに対する信号処理が信号処理部52において行われ、画像データが生成される。これに限らず、例えばCPU30においてソフトウェア的に処理を行ってもよいし、別途、信号処理用にDSP(Digital Signal Processor)を設け、このDSPにおいて行ってもよい。この圧縮RAWデータの伸長処理は、動画データに対する信号処理のようなリアルタイム性が要求されないため、より低速な処理により行うことも可能である。
For example, while the
一方、ステップS20で当該所定の符号が検出されたら、例えばステップS21の復号処理をスキップして処理がステップS22に移行される。ステップS22では、画面の終端すなわち画面の右下隅まで処理が終了したか否かが判断される。若し、終了していないと判断されれば、処理はステップS20に戻される。 On the other hand, if the predetermined code is detected in step S20, for example, the decoding process in step S21 is skipped, and the process proceeds to step S22. In step S22, it is determined whether or not the processing is completed up to the end of the screen, that is, the lower right corner of the screen. If it is determined that the process has not ended, the process returns to step S20.
一方、ステップS22で画面の終端までの処理が終了していると判断されれば、処理はステップS23に移行される。ステップS23以下の処理では、上述したステップS20での破綻位置の検出結果に基づき、破綻区間に対して復元用データを適用してRAWデータの復元を行う。例えば、図13Aに例示されるように、画枠サイズが2560画素×1920画素の静止画データにおいて、斜線で示される部分が破綻区間として検出されたものとする。 On the other hand, if it is determined in step S22 that the process up to the end of the screen has been completed, the process proceeds to step S23. In the processing from step S23 onward, based on the failure position detection result in step S20 described above, the restoration data is applied to the failure section to restore the RAW data. For example, as illustrated in FIG. 13A, it is assumed that a portion indicated by diagonal lines is detected as a broken section in still image data having an image frame size of 2560 pixels × 1920 pixels.
ステップS23で、RAM35から復元用のデータを読み出し、次のステップS24で、動画データの画枠サイズと静止画データの画枠サイズとの比率に応じて、RAM35から読み出された復元用のデータに対する拡大処理を行う。例えば、図13Bに例示されるように、動画データの画枠サイズが640画素×480画素であって、水平および垂直方向のそれぞれについて静止画データの1/4であるとすれば、復元用データを水平および垂直方向にそれぞれ4倍のサイズに拡大する。拡大処理は、例えば、画素間距離を拡大した画素の画素値に基づき線形補間などを用いて新たな画素値を生成することで行うことができる。
In step S23, the restoration data is read from the
次に、ステップS25で、拡大された復元用データの画質調整が行われる。すなわち、一般的に、動画と静止画とでは求められる特性が異なるため、例えば画像の明るさや色合いといった、画質が異なる。これにより、伸長RAWデータに対し、破綻区間に対応する部分の動画データを単純に置き換えただけでは、不自然な画像となってしまうことが考えられる。そのため、復元用データの画質を、破綻区間以外の部分の伸長RAWデータの画質に合わせるように、復元用データの画質調整を行う。 Next, in step S25, image quality adjustment of the enlarged restoration data is performed. That is, generally, since the required characteristics are different between the moving image and the still image, the image quality such as the brightness and the hue of the image is different. As a result, it is conceivable that an unnatural image is obtained simply by replacing the moving image data corresponding to the failed section with the expanded RAW data. Therefore, the image quality of the restoration data is adjusted so that the image quality of the restoration data matches the image quality of the decompressed RAW data in the part other than the failed section.
画質調整は、例えば信号処理部52で動画データに対して画質補正処理を行う際のパラメータと、静止画データに対して画質補正処理を行う際のパラメータとをそれぞれ参照し、復元用データを拡大した画像データの特性を、伸長RAWデータの破綻区間以外の部分の特性に合わせるように、復元用データを変換することで行うことができる。
The image quality adjustment is performed by, for example, referring to a parameter used when the
次のステップS26で、図13Cに例示されるように、伸長RAWデータの破綻区間のデータを、拡大され画質調整がなされた復元用データで置き換える処理を行う。ここで、復元用データは、静止画データに対して解像度が1/4の動画データを線形補間などを用いて4倍に拡大した画像なので、復元用データによって置き換えがなされる周囲の伸長RAWデータに対して粗い画質となっている。そのため、復元用データを伸長RAWデータにおける破綻区間のデータと単純に置き換えたのでは、置き換えを行った境界部分で繋ぎ目が滑らかにならず、置き換えが目立ってしまうことになる。 In the next step S26, as illustrated in FIG. 13C, a process of replacing the data in the failed section of the decompressed RAW data with the restored data that has been enlarged and adjusted for image quality is performed. Here, the restoration data is an image obtained by enlarging the moving image data having a resolution of 1/4 with respect to the still image data by four times using linear interpolation or the like. Therefore, the surrounding decompressed RAW data that is replaced by the restoration data. The image quality is coarse. For this reason, if the restoration data is simply replaced with the data of the failed section in the decompressed RAW data, the joints are not smooth at the replaced boundary portion, and the replacement becomes conspicuous.
そこで、図13Dに例示されるように、ステップS27において、復元用データによる置き換えを行った境界および境界付近のデータに対して空間的にローパスフィルタ処理を施すことにより、置き換えを行った境界部分での繋ぎ目を滑らかにする。 Therefore, as illustrated in FIG. 13D, in step S27, the boundary having been replaced by the restoration data and the data in the vicinity of the boundary are spatially subjected to low-pass filter processing, so that the boundary portion where the replacement has been performed. Smooth the joints.
ステップS28で、1枚の伸長RAWデータにおける全ての破綻位置に対する処理が終了したか否かが判断され、終了していないと判断されれば、処理はステップS23に戻され、次の破綻位置に対してステップS23〜ステップS27までの処理がなされる。 In step S28, it is determined whether or not the processing for all the failed positions in one extended RAW data has been completed. If it is determined that the processing has not been completed, the process returns to step S23, and the next failed position is reached. On the other hand, processing from step S23 to step S27 is performed.
ステップS28で、1枚の伸長RAWデータにおける全ての破綻位置に対する処理が終了したと判断されれば、一連の復元処理が終了される。破綻区間が復元された伸長RAWデータは、例えば解像度変換部53で所定に解像度変換され、バスI/F58からの転送要求Cに応じてバス21に送り出され、メモリコントローラ34を介してRAM35に書き込まれる。そして、所定のタイミングで記録再生制御部36に読み出され、記録媒体37に記録される。
If it is determined in step S28 that the processing for all the broken positions in one piece of decompressed RAW data has been completed, a series of restoration processing is completed. The decompressed RAW data with the failed section restored is, for example, subjected to predetermined resolution conversion by the
このように、この発明の実施の一形態では、動画記録中に静止画を記録する際に、静止画のRAWデータのバッファ処理が破綻する可能性がある場合でも、静止画のRAWデータの圧縮符号化処理を一旦停止することで、動画記録を停止することなく行うことができる。また、静止画の圧縮符号化処理を停止した区間を示す情報を保持すると共に、静止画に対応する動画データを保持することで、静止画において圧縮符号化処理が停止された区間を復元させるためのデータを、保持された動画データから生成することができる。これにより、静止画のRAWデータのバッファ処理が破綻する可能性がある場合でも、元の画像から極力劣化を抑えた静止画を復元することができる。 As described above, according to the embodiment of the present invention, when a still image is recorded during moving image recording, even if the buffer processing of the still image RAW data may fail, the compression of the still image RAW data is performed. By temporarily stopping the encoding process, the moving image recording can be performed without stopping. In addition, the information indicating the section in which the compression encoding process of the still image is stopped is retained, and the moving image data corresponding to the still image is retained to restore the section in which the compression encoding process is stopped in the still image. Can be generated from the stored moving image data. As a result, even when there is a possibility that the RAW data buffer processing of the still image may fail, it is possible to restore the still image with the least possible degradation from the original image.
なお、上述では、1枚の静止画データに対して対応する動画データの1フレームのデータを用いて破綻区間の復元を行っていたが、これはこの例に限定されない。例えば、1枚の静止画データに対して、動画データの複数フレームを用いて破綻区間の復元を行うようにもできる。すなわち、複数フレームの画像の動き情報に基づき、破綻区間における画像の動きが所定より小さいと見做せる場合には、静止画に対応するフレームと、当該フレームに対して時間的に前後の複数フレームとを用いて復元用データを生成する。 In the above description, the failure section is restored using one frame of moving image data corresponding to one piece of still image data, but this is not limited to this example. For example, it is possible to restore a failed section using a plurality of frames of moving image data for one piece of still image data. That is, based on the motion information of images of a plurality of frames, when it can be considered that the motion of the image in the failed section is smaller than a predetermined value, a frame corresponding to the still image and a plurality of frames temporally before and after the frame The restoration data is generated using and.
一例として、図14に示されるように、フレームNのタイミングで取り込んだ静止画に対してバッファ破綻が生じた場合に、動画データのフレームNと、フレームNに対して時間的に前後のフレーム(N−1)およびフレーム(N+1)とを用いて、復元用データを生成することが考えられる。例えば、動画コーデック部26における動き検出結果に基づき、フレームNに対するフレーム(N−1)の動きベクトルMVN-1とフレーム(N+1)の動きベクトルMVN+1を求める。動きベクトルMVN-1および/または動きベクトルMVN+1が所定値より小さい場合に、これら動きベクトルMVN-1と動きベクトルMVN+1とを用いて、復元用データを生成する。このように、複数のフレームから復元用データを生成することで、復元用データの解像度を静止画のRAWデータの解像度に近付けることができる。 As an example, as shown in FIG. 14, when a buffer failure occurs with respect to a still image captured at the timing of the frame N, the frame N of the moving image data and the frame ( It is conceivable to generate restoration data using N-1) and frame (N + 1). For example, the motion vector MV N−1 of the frame (N−1) and the motion vector MV N + 1 of the frame (N + 1) with respect to the frame N are obtained based on the motion detection result in the video codec unit 26. When the motion vector MV N-1 and / or the motion vector MV N + 1 is smaller than a predetermined value, restoration data is generated using the motion vector MV N-1 and the motion vector MV N + 1 . In this way, by generating the restoration data from a plurality of frames, the resolution of the restoration data can be brought close to the resolution of the RAW data of the still image.
なお、実際には、動きベクトルMVは、例えば16画素×16画素といった所定サイズのブロック単位で求められる。ここでは説明のため、フレームNに対する動きベクトルを、フレーム(N−1)については動きベクトルMVN-1、フレーム(N+1)については動きベクトルMVN+1でそれぞれ代表させて記述している。 In practice, the motion vector MV is obtained in units of blocks of a predetermined size, for example, 16 pixels × 16 pixels. Here, for the sake of explanation, the motion vector for the frame N is represented by the motion vector MV N-1 for the frame (N−1) and the motion vector MV N + 1 for the frame (N + 1).
また、1枚の静止画記録に際し、多数回のバッファ破綻の可能性が生じ、RAWデータの圧縮符号化処理が停止される回数が多い場合や、圧縮符号化処理が連続的に停止した場合などは、復元用データで置き換える部分が多くなり、画質の劣化が顕著になるおそれがある。 In addition, when one still image is recorded, there is a possibility of buffer failure many times, and the number of times the RAW data compression encoding process is stopped is large, or the compression encoding process is continuously stopped. In this case, the number of parts to be replaced with restoration data increases, and there is a risk that the image quality will be significantly deteriorated.
そこで、動画記録中の静止画記録において生じたバッファ破綻可能性による破綻区間の量を計測しておくと共に、後続する複数フレームでも、RAWデータの圧縮符号化処理および圧縮RAWデータのRAM35への格納を行い、後に、破綻区間の量が最も少ない圧縮RAWデータを選択し、伸長して記録することが考えられる。例えば破綻区間の面積を以て、破綻区間の量とすることが考えられる。
Therefore, the amount of the failure section due to the possibility of the buffer failure occurring in the still image recording during the moving image recording is measured, and the RAW data is compressed and encoded and the compressed RAW data is stored in the
図15を用いて、より具体的に説明する。図15の例では、フレームNに対応するRAWデータの転送時にバッファ破綻の可能性が生じ、圧縮符号化が停止された区間が生じている。フレームNのタイミングでバッファ破綻可能性により圧縮符号化が停止されたため、続くフレーム(N+1)、フレーム(N+2)についても、対応するRAWデータの転送および圧縮符号化がなされている。この図15の例では、これらフレーム(N+1)およびフレーム(N+2)でも、バッファ破綻可能性により圧縮符号化が停止された区間が生じている。 This will be described more specifically with reference to FIG. In the example of FIG. 15, there is a possibility of buffer failure at the time of transfer of RAW data corresponding to the frame N, and there is a section in which compression encoding is stopped. Since compression encoding is stopped due to the possibility of buffer failure at the timing of frame N, transfer of corresponding RAW data and compression encoding are performed for the subsequent frame (N + 1) and frame (N + 2). In the example of FIG. 15, even in these frames (N + 1) and (N + 2), there is a section in which compression encoding is stopped due to the possibility of buffer failure.
これらフレームN、(N+1)および(N+2)にそれぞれ対応する圧縮RAWデータのうち、破綻区間の量が最も少ないフレーム(N+1)に対応する圧縮RAWデータが選択され、伸長処理および所定の信号処理がなされ、記録される。伸長時に、上述したようにして、対応する動画データのフレームを用いて復元用データを生成し、破綻区間のデータと置き換える処理をさらに行うと、より好ましい。この処理により、静止画記録指示に対して僅かにタイミングがずれる可能性があるが、画像劣化が極力少ない静止画像を得ることができる。 Among the compressed RAW data corresponding to the frames N, (N + 1) and (N + 2), the compressed RAW data corresponding to the frame (N + 1) with the smallest amount of the failed section is selected, and the decompression process and the predetermined signal processing are performed. Made and recorded. At the time of decompression, it is more preferable to perform a process of generating restoration data using the corresponding moving image data frame and replacing it with the data of the failed section as described above. With this processing, there is a possibility that the timing is slightly shifted with respect to the still image recording instruction, but it is possible to obtain a still image with as little image degradation as possible.
1 撮像装置
11 撮像素子
20 信号処理部
22 カメラ信号処理部
24 解像度変換部
25 静止画コーデック部
26 動画コーデック部
30 CPU
34 メモリコントローラ
35 RAM
36 記録再生制御部
37 記録媒体
50 RAW補正部
50A 補正処理部
50B 同期乗り換え部
51 スイッチ部
52 信号処理部
53 解像度変換部
54 RAW圧縮部
55,57,58 バスI/F
56 RAW伸長部
DESCRIPTION OF
34
36 Recording /
56 RAW expansion unit
Claims (17)
被写体からの光を電気信号に変換して撮像信号としてフレームタイミングで出力する撮像部と、
上記撮像部から出力された上記撮像信号を動画として上記フレームタイミング毎に連続的に処理する動画処理部と、
上記撮像部から出力された上記撮像信号を、任意のタイミングで供給される撮像指示に応じて上記フレームタイミングで静止画として処理する静止画処理部と、
上記静止画の欠損箇所を該静止画に上記フレームタイミングが対応する上記動画のフレームを用いて復元する画像復元部と
を有する
ことを特徴とする撮像装置。 In an imaging device capable of recording still image data in parallel with recording of moving image data,
An imaging unit that converts light from a subject into an electrical signal and outputs the signal as an imaging signal at a frame timing;
A moving image processing unit that continuously processes the imaging signal output from the imaging unit as a moving image for each frame timing;
A still image processing unit that processes the imaging signal output from the imaging unit as a still image at the frame timing according to an imaging instruction supplied at an arbitrary timing;
An imaging apparatus comprising: an image restoration unit that restores a missing portion of the still image using the moving image frame corresponding to the frame timing of the still image.
上記画像復元部は、復元する上記静止画に上記フレームタイミングが対応する上記動画のフレームの、上記欠損箇所に対応する領域のデータを用いて上記欠損箇所の復元を行う
ことを特徴とする撮像装置。 The imaging apparatus according to claim 1,
The image restoration unit restores the missing portion using data of a region corresponding to the missing portion of the moving image frame corresponding to the frame timing to the still image to be restored. .
上記動画処理部は、上記処理を行う前の上記フレームを保持するようにし、上記画像復元部は、該保持された該処理を行う前のフレームを用いて上記欠損箇所の復元を行う
ことを特徴とする撮像装置。 The imaging device according to claim 2,
The moving image processing unit holds the frame before performing the processing, and the image restoration unit restores the missing portion using the held frame before performing the processing. An imaging device.
上記画像復元部は、上記動画処理部で上記フレームタイミング毎に処理される上記フレームを直接的に用いて上記欠損箇所の復元を行う
ことを特徴とする撮像装置。 The imaging device according to claim 2,
The imaging apparatus, wherein the image restoration unit restores the missing portion directly using the frame processed at each frame timing by the moving image processing unit.
上記画像復元部は、復元する上記静止画に上記フレームタイミングが一致するフレームと、該フレームタイミングが一致するフレームに対して時間的に前および/または後ろの所定枚数のフレームとによる複数フレームを用いて上記欠損箇所の復元を行う
ことを特徴とする撮像装置。 The imaging device according to claim 2,
The image restoration unit uses a plurality of frames including a frame whose frame timing matches the still image to be restored, and a predetermined number of frames temporally before and / or behind the frame whose frame timing matches. An image pickup apparatus that restores the missing portion.
上記画像復元部は、上記複数フレームの動き情報に基づき上記欠損箇所の復元を行う
ことを特徴とする撮像装置。 The imaging apparatus according to claim 5,
The imaging apparatus, wherein the image restoration unit restores the missing portion based on the motion information of the plurality of frames.
上記静止画処理部は、上記撮像指示に応じて複数の静止画を上記フレームタイミング毎に処理するようにされ、
上記画像復元部は、上記複数の静止画のうち上記欠損箇所の量が最も少ない静止画を選択し、該静止画に対して上記フレームタイミングが対応する上記動画のフレームを用いて上記欠損箇所の復元を行う
ことを特徴とする撮像装置。 The imaging device according to claim 2,
The still image processing unit is configured to process a plurality of still images at each frame timing according to the imaging instruction,
The image restoration unit selects a still image with the smallest amount of the missing portion from the plurality of still images, and uses the moving image frame corresponding to the frame timing with respect to the still image to detect the missing portion. An imaging apparatus that performs restoration.
上記静止画処理部は、上記静止画に上記欠損箇所が発生する可能性がある場合に、該静止画の次の上記フレームタイミングの上記静止画に対する処理を行う
ことを特徴とする撮像装置。 The imaging apparatus according to claim 7,
The imaging apparatus, wherein the still image processing unit performs processing on the still image at the frame timing next to the still image when the missing portion may occur in the still image.
上記画像復元部は、上記静止画の上記欠損箇所のデータと、上記動画のフレームの上記欠損箇所に対応する領域のデータとの置き換えを行うことで該欠損箇所を復元する
ことを特徴とする撮像装置。 The imaging device according to claim 2,
The image restoration unit restores the missing portion by replacing the data of the missing portion of the still image with data of an area corresponding to the missing portion of the frame of the moving image. apparatus.
上記画像復元部は、上記置き換えを行う際に、該置き換えに用いる上記動画の解像度を上記静止画の解像度に一致させる
ことを特徴とする撮像装置。 The imaging device according to claim 9,
The image restoration unit, when performing the replacement, makes the resolution of the moving image used for the replacement match the resolution of the still image.
上記画像復元部は、上記置き換えを行う際に、該置き換えに用いる上記動画の画質を上記静止画の画質に一致させる処理を行う
ことを特徴とする撮像装置。 The imaging device according to claim 9,
The image restoration unit, when performing the replacement, performs processing for matching the image quality of the moving image used for the replacement with the image quality of the still image.
上記画像復元部は、上記置き換えを行った境界に低域通過フィルタ処理を施す
ことを特徴とする撮像装置。 The imaging device according to claim 9,
The imaging apparatus according to claim 1, wherein the image restoration unit performs low-pass filter processing on the replaced boundary.
上記静止画処理部は、上記欠損箇所のデータを所定の符号に置き換えて上記静止画を出力し、
上記画像復元部は、上記静止画から検出された上記所定の符号に基づき上記復元を行う
ことを特徴とする撮像装置。 The imaging apparatus according to claim 1,
The still image processing unit outputs the still image by replacing the data of the missing portion with a predetermined code,
The imaging apparatus, wherein the image restoration unit performs the restoration based on the predetermined code detected from the still image.
上記静止画処理部は、上記欠損箇所の位置を示す情報を保持し、
上記画像復元部は、上記欠損箇所の位置を示す情報に基づき上記復元を行う
ことを特徴とする撮像装置。 The imaging apparatus according to claim 1,
The still image processing unit holds information indicating the position of the missing part,
The imaging apparatus, wherein the image restoration unit performs the restoration based on information indicating a position of the missing portion.
上記静止画処理部は、上記静止画に欠損が発生する可能性がある場合に、一定量の上記撮像信号に対して上記処理を停止する
ことを特徴とする撮像装置。 The imaging apparatus according to claim 1,
The imaging apparatus, wherein the still image processing unit stops the processing for a certain amount of the imaging signal when there is a possibility that a defect occurs in the still image.
被写体からの光を電気信号に変換してフレームタイミングで撮像部から出力される撮像信号を動画として該フレームタイミング毎に連続的に処理する動画処理のステップと、
上記撮像部から出力される上記撮像信号を、任意のタイミングで供給される撮像指示に応じて上記フレームタイミングで静止画として処理する静止画処理のステップと、
上記静止画の欠損箇所を該静止画に上記フレームタイミングが対応する上記動画のフレームを用いて復元する画像復元のステップと
を有する
ことを特徴とする撮像装置の制御方法。 In the control method of the image pickup apparatus capable of recording still image data in parallel with recording of moving image data,
A step of moving image processing in which light from a subject is converted into an electric signal and an imaging signal output from an imaging unit at a frame timing is continuously processed as a moving image at each frame timing;
A still image processing step of processing the imaging signal output from the imaging unit as a still image at the frame timing in accordance with an imaging instruction supplied at an arbitrary timing;
And a step of image restoration for restoring a missing portion of the still image using the moving image frame corresponding to the frame timing of the still image.
被写体からの光を電気信号に変換してフレームタイミングで撮像部から出力される撮像信号を動画として該フレームタイミング毎に連続的に処理する動画処理のステップと、
上記撮像部から出力される上記撮像信号を、任意のタイミングで供給される撮像指示に応じて上記フレームタイミングで静止画として処理する静止画処理のステップと、
上記静止画の欠損箇所を該静止画に上記フレームタイミングが対応する上記動画のフレームを用いて復元する画像復元のステップと
を有する撮像装置の制御方法をコンピュータに実行させる
ことを特徴とする撮像装置の制御プログラム。 In an imaging apparatus control program for causing a computer to execute a control method for an imaging apparatus that can record still image data in parallel with recording of moving image data,
A step of moving image processing in which light from a subject is converted into an electric signal and an imaging signal output from an imaging unit at a frame timing is continuously processed as a moving image at each frame timing;
A still image processing step of processing the imaging signal output from the imaging unit as a still image at the frame timing in accordance with an imaging instruction supplied at an arbitrary timing;
An image pickup apparatus that causes a computer to execute a control method for an image pickup apparatus including an image restoration step of restoring a missing portion of the still image using the moving image frame corresponding to the frame timing of the still image. Control program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007302550A JP2009130561A (en) | 2007-11-22 | 2007-11-22 | Imaging apparatus, control method of imaging apparatus and control program of imaging apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007302550A JP2009130561A (en) | 2007-11-22 | 2007-11-22 | Imaging apparatus, control method of imaging apparatus and control program of imaging apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009130561A true JP2009130561A (en) | 2009-06-11 |
Family
ID=40821059
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007302550A Pending JP2009130561A (en) | 2007-11-22 | 2007-11-22 | Imaging apparatus, control method of imaging apparatus and control program of imaging apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009130561A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014036361A (en) * | 2012-08-09 | 2014-02-24 | Canon Inc | Image processing device, control method therefor, and control program |
JP7001265B2 (en) | 2018-03-05 | 2022-01-19 | 国立大学法人 鹿児島大学 | Video restoration system, video restoration method and program |
-
2007
- 2007-11-22 JP JP2007302550A patent/JP2009130561A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014036361A (en) * | 2012-08-09 | 2014-02-24 | Canon Inc | Image processing device, control method therefor, and control program |
JP7001265B2 (en) | 2018-03-05 | 2022-01-19 | 国立大学法人 鹿児島大学 | Video restoration system, video restoration method and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5056370B2 (en) | IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, IMAGING DEVICE CONTROL PROGRAM, DATA PROCESSING DEVICE, DATA PROCESSING METHOD, AND DATA PROCESSING PROGRAM | |
JP4525561B2 (en) | Imaging apparatus, image processing method, and program | |
US8743227B2 (en) | Imaging apparatus and control method for reducing a load of writing image data on a recording medium | |
KR101264389B1 (en) | Imaging device and method | |
US9918062B2 (en) | Image capturing apparatus, control method of image capturing apparatus, and image processing method | |
US7408139B2 (en) | Video image capture device | |
US9894270B2 (en) | Image processing apparatus and image processing method for handling a raw image, of a moving image or a still image | |
US9723169B2 (en) | Imaging apparatus and imaging apparatus control method | |
JP5141324B2 (en) | Imaging apparatus, imaging apparatus control method, signal processing apparatus, and signal processing method | |
US20170264858A1 (en) | Image processing apparatus and image processing method | |
US9396756B2 (en) | Image processing apparatus and control method thereof | |
JP6278712B2 (en) | Imaging apparatus and control method thereof | |
US10360660B2 (en) | Image processing apparatus and image processing method for handling raw images | |
KR20100061311A (en) | Photographing apparatus and controlling method thereof | |
JP4280363B2 (en) | Image processing device | |
JP2009130561A (en) | Imaging apparatus, control method of imaging apparatus and control program of imaging apparatus | |
JP2012175303A (en) | Imaging device, imaging method, and program | |
KR20090064278A (en) | Recording apparatus, replaying apparatus, recording method, replaying method and program recording medium | |
JP2009130563A (en) | Unit, method, and program for processing data, imaging apparatus, and method and program for controlling the same | |
JP2007228119A (en) | Imaging apparatus, image processing method, and program | |
JP2009232004A (en) | Signal processor and signal processing method, and imaging apparatus and control method of the imaging apparatus | |
JP2010147531A (en) | Imaging apparatus and imaging method | |
JP6327939B2 (en) | IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD | |
JP2005217493A (en) | Imaging apparatus | |
JP4312070B2 (en) | Digital camera |