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 PDF

Info

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
Application number
JP2007302550A
Other languages
Japanese (ja)
Inventor
Takeshi Yoshida
剛 吉田
Yuji Kawamura
裕二 川村
Fumiaki Kato
文昭 加藤
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2007302550A priority Critical patent/JP2009130561A/en
Publication of JP2009130561A publication Critical patent/JP2009130561A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To repair a data omission that occurs in still image data in recording a still image during moving image recording. <P>SOLUTION: For example, during storing an imaging signal in a memory in accordance with recording instructions of a still image in recording the still image during moving image recording, if a memory band can not be secured to cause a failure in data transfer, it is considered that a failure place 101 where image data are lost occurs in a still image 100. The failure place 101 of the still image 100 is restored by referring to a corresponding moving image. With reference to a frame N of a moving image whose imaging timing corresponds to that of the still image 100, data 102 of an area corresponding to the failure place 101 in the still image 100, of the frame N, is applied in a prescribed manner to the failure place 101 of the still image 100 (data 102') to restore the still image 100. <P>COPYRIGHT: (C)2009,JPO&INPIT

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に記載されるように、復号時に欠落した画像データを周囲の正常な画像データで補間する方法などが考えられる。
特開2005−229395号公報 特開平8−321944号公報
As described above, as a method of relieving error data at the time of decoding encoded image data, as described in Patent Document 1, a method of outputting the immediately preceding image at the time of error to moving image data, or Patent Document As described in FIG. 2, a method of interpolating image data that has been lost at the time of decoding with surrounding normal image data can be considered.
JP 2005-229395 A JP-A-8-321944

ところが、静止画記録の場合、記録される画像データが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 Patent Document 1 cannot be applied. .

また、特許文献2に記載の方法は、例えばデータの欠落部が連続的となっているなど補間すべき領域が広い場合には、補間に用いるための正常な画素が補間対象の画素の近傍に存在しないということが考えられる。この場合には、補間後の画像は、著しく画質が低下したものになってしまう可能性があるという問題点があった。   Further, in the method described in Patent Document 2, when a region to be interpolated is wide, for example, a lack of data is continuous, a normal pixel to be used for interpolation is located near the pixel to be interpolated. It can be considered that it does not exist. In this case, there is a problem that the image after the interpolation may be remarkably deteriorated.

したがって、この発明の目的は、動画記録中に静止画を記録する場合において、静止画像データに発生したデータの欠落を修復することができるようにした撮像装置、撮像装置の制御方法および撮像装置の制御プログラムを提供することにある。   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 still image 100 as illustrated in FIG. 1A. A failure location 101 has occurred. In the present invention, the failed portion 101 of the still image 100 is restored with reference to the corresponding moving image.

一例として、図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 still image 100 and an imaging timing is referred to, and data of an area corresponding to the broken portion 101 in the still image 100 of this frame N is used. Then, the still image 100 is restored. For example, information indicating a position corresponding to the failure is stored at the time of recording a still image. Then, when the still image 100 is played back, the image of the frame N of the moving image corresponding to the still image 100 and the capture timing at the time of recording is referred to, and the corresponding position of the image of the frame N is determined based on the stored failure position information. Data 102 is acquired. The acquired data is applied to the failure location 101 of the still image 100 in a predetermined manner (data 102 '), and the still image 100 is restored.

図2は、この発明の実施の一形態に適用可能な撮像装置1の一例の構成を示す。この撮像装置1は、光学系10を介して入射された光を撮像素子11で受光して電気信号に変換して撮像信号とし、この撮像信号を信号処理部20で、信号処理部20に接続される外部メモリであるRAM35を用いて所定に処理して記録媒体37に記録する。撮像装置1は、撮像信号を、動画データとして記録媒体37に記録すると共に、撮影指示に応じたタイミングで取り込まれた静止画データとしても、記録媒体37に記録することができるようにされている。   FIG. 2 shows a configuration of an example of an imaging apparatus 1 applicable to the embodiment of the present invention. In this imaging device 1, light incident through the optical system 10 is received by the imaging element 11 and converted into an electrical signal to be an imaging signal, and this imaging signal is connected to the signal processing unit 20 by the signal processing unit 20. The data is recorded on the recording medium 37 by performing predetermined processing using the RAM 35 which is an external memory. The imaging device 1 is configured to record the imaging signal as moving image data on the recording medium 37 and also to the recording medium 37 as still image data captured at a timing according to the imaging instruction. .

なお、以下では、簡単のために、撮像素子11の有効画素数を水平2560画素、垂直1920画素とする。動画は、水平および垂直方向をそれぞれ1/4に縮小した水平640画素、垂直480画素を画枠とし、静止画は、撮像素子11の有効画素をそのまま用いて、画枠を水平2560画素、垂直1920画素とする。   In the following, for the sake of simplicity, the effective pixel count of the image sensor 11 is assumed to be 2560 horizontal pixels and 1920 vertical pixels. The moving image has horizontal 640 pixels and vertical 480 pixels reduced to ¼ in the horizontal and vertical directions, respectively, and the still image uses the effective pixels of the image sensor 11 as they are, and the image frame is horizontal 2560 pixels and vertical. It is assumed that there are 1920 pixels.

光学系10は、レンズ系、絞り機構、フォーカス機構ズーム機構などを有し、後述するCPU(Central Processing Unit)30の命令に基づく駆動部13の制御やマニュアル操作などにより、絞りやフォーカス、ズームなどが制御されるようになっている。被写体からの光が光学系10を介して撮像素子11に入射される。撮像素子11は、例えばCCD(Charge Coupled Device)からなり、入射された光を光電変換により電気信号に変換し、撮像信号としてライン順次で出力する。なお、撮像素子11は、CCDに限らず、例えばCMOS(Complementary Metal-Oxide Semiconductor)イメージャを用いてもよい。   The optical system 10 includes a lens system, a diaphragm mechanism, a focus mechanism zoom mechanism, and the like, and controls a drive unit 13 based on a command of a CPU (Central Processing Unit) 30 to be described later, a manual operation, and the like to perform diaphragm, focus, zoom, and the like. Is to be controlled. Light from the subject enters the image sensor 11 through the optical system 10. The image pickup device 11 is composed of, for example, a CCD (Charge Coupled Device), converts incident light into an electric signal by photoelectric conversion, and outputs the signal as an image pickup signal in line order. The image sensor 11 is not limited to a CCD, and for example, a CMOS (Complementary Metal-Oxide Semiconductor) imager may be used.

フロントエンド(F/E)部12は、例えばノイズ抑圧部、自動利得制御部およびA/D変換部を有し、撮像素子11からアナログ信号として出力された撮像信号に対し、ノイズ抑圧部で例えば相関二重サンプリング処理を施してノイズを抑圧し、自動利得制御部でゲインを制御する。そして、A/D変換部でディジタル撮像信号に変換して出力する。このディジタル撮像信号は、撮像素子11の各画素それぞれに直接的に対応するデータからなるRAWデータである。   The front end (F / E) unit 12 includes, for example, a noise suppression unit, an automatic gain control unit, and an A / D conversion unit, and is a noise suppression unit for an imaging signal output as an analog signal from the imaging device 11. A correlated double sampling process is performed to suppress noise, and the automatic gain control unit controls the gain. Then, it is converted into a digital imaging signal by an A / D conversion unit and output. This digital image signal is RAW data composed of data directly corresponding to each pixel of the image sensor 11.

なお、後述するタイミングジェネレータ14により出力されるタイミング信号(クロックパルス)に基づき、撮像素子11が、例えばフレームタイミング毎に光電変換が行われ撮像信号が出力されるように制御されると共に、フロントエンド部12が、フレームタイミングに同期して処理が行われるように制御される。   Note that, based on a timing signal (clock pulse) output from a timing generator 14 (to be described later), the image pickup device 11 is controlled so that, for example, photoelectric conversion is performed at each frame timing and an image pickup signal is output, and the front end. The unit 12 is controlled to perform processing in synchronization with the frame timing.

信号処理部20は、カメラ信号処理部22、拡張画像処理部23、解像度変換部24、静止画コーデック(CODEC)部25、動画コーデック部26、表示制御部27、CPU30、外部インターフェイス(I/F)部33、メモリコントローラ34および記録再生制御部36の各処理ブロックを含み、これら各処理ブロックがそれぞれバス21を介して接続される。   The signal processing unit 20 includes a camera signal processing unit 22, an extended image processing unit 23, a resolution conversion unit 24, a still image codec (CODEC) unit 25, a moving image codec unit 26, a display control unit 27, a CPU 30, an external interface (I / F). ) Unit 33, memory controller 34, and recording / playback control unit 36, and these processing blocks are connected via the bus 21.

カメラ信号処理部22は、フロントエンド部12から出力されたRAWデータが入力される。カメラ信号処理部22は、入力されたRAWデータを所定に補正し、バッファメモリを利用して、クロックをセンサ駆動系のクロックから信号処理部20の内部クロックに乗せ換える。クロックが乗せ換えられたRAWデータは、後段の動画処理に適した形式のデータに変換される。   The camera signal processing unit 22 receives RAW data output from the front end unit 12. The camera signal processing unit 22 corrects the input RAW data to a predetermined value, and transfers the clock from the sensor driving system clock to the internal clock of the signal processing unit 20 using the buffer memory. The RAW data with the clock changed is converted into data in a format suitable for the subsequent moving image processing.

また、RAWデータは、静止画の記録を行う場合には、所定に圧縮符号化されバス21にも送り出される。カメラ信号処理部22は、バス21を介して供給される圧縮符号化されたRAWデータの圧縮符号を復号して伸長し、さらに後段の静止画処理に適した形式のデータに変換する。   The RAW data is compressed and encoded in a predetermined manner and sent to the bus 21 when recording a still image. The camera signal processing unit 22 decodes and decompresses the compression code of the compression-coded RAW data supplied via the bus 21, and further converts the data into a format suitable for still image processing in the subsequent stage.

カメラ信号処理部22は、さらに、ベースバンドの動画データや静止画データを拡大および/または縮小し、動画データの記録や出力画像データとして必要な解像度(サイズ)に変換する。この例では、動画データの記録のためには、撮像素子11の有効画素に従い解像度が2560画素×1920画素のデータを、解像度が640画素×480画素のデータに縮小する。静止画記録については、この例では、この段階での解像度の変換は行わない。このように解像度変換がなされたベースバンドの動画データや静止画データがカメラ信号処理部22から出力される。   The camera signal processing unit 22 further enlarges and / or reduces the baseband moving image data and still image data, and converts them into a resolution (size) necessary for recording moving image data and output image data. In this example, for recording moving image data, data with a resolution of 2560 pixels × 1920 pixels is reduced to data with a resolution of 640 pixels × 480 pixels in accordance with the effective pixels of the image sensor 11. For still image recording, in this example, resolution conversion is not performed at this stage. The baseband moving image data and still image data subjected to resolution conversion in this way are output from the camera signal processing unit 22.

ここで、ベースバンドのデータとは、例えばアナログ信号がディジタル信号に変換されたデータであり、圧縮符号化や変調などの各種処理が施されていない状態のデータを指す。この例では、撮像素子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 image pickup element 11 into a digital signal by the front end unit 12 is appropriately referred to as baseband data.

拡張画像処理部23は、例えば被写体認識処理や超高速連写など、拡張的な画像処理を行う。被写体認識処理は、例えば予め学習されたパターン辞書などを用いて、画像から顔らしき部分を抽出する。超高速連写は、通常の動画データのフレームレートの60fps(frame per second)に対し、例えば240fpsといった非常に高いフレームレートで撮像素子11における電荷読み出しおよび撮像信号の出力を行うものである。超高速連写機能では、通常の動画データに比べて高速のデータ転送能力が要求されるため、処理部を別途、設けることが好ましい。   The extended image processing unit 23 performs extended image processing such as subject recognition processing and ultra-high speed continuous shooting. In the subject recognition process, for example, a part that looks like a face is extracted from an image using a previously learned pattern dictionary or the like. The ultra high-speed continuous shooting is to read out charges from the image sensor 11 and output an image pickup signal at a very high frame rate, for example, 240 fps with respect to the frame rate of 60 fps (frame per second) of normal moving image data. Since the ultra-high speed continuous shooting function requires a higher data transfer capability than normal moving image data, it is preferable to provide a separate processing unit.

解像度変換部24は、ベースバンドの動画データや静止画データの解像度を、後述する表示装置28に表示するのに適した解像度に変換したり、記録モードに応じた解像度に変換する処理を行う。   The resolution conversion unit 24 performs processing for converting the resolution of baseband moving image data or still image data to a resolution suitable for display on the display device 28 described later, or converting the resolution to a resolution corresponding to a recording mode.

静止画コーデック部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 display control unit 27 converts the supplied image data into a signal in a format that can be displayed on the display device 28. The display device 28 includes, for example, an LCD (Liquid Crystal Display), is used as a viewfinder in the imaging device 1 and is used as a monitor for an image reproduced from the recording medium 37. In addition, the display control unit 27 generates a display signal for causing the display device 28 to display characters and graphics based on a command supplied from a CPU 30 described later. A display corresponding to the display signal is also displayed on the display device 28. For example, a setting screen for performing various settings for the imaging device 1, a display indicating various states of the imaging device 1, a cursor display, and the like are displayed on the display device 28 in a predetermined manner.

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 input device 32 are connected to the CPU 30. The CPU 30 uses a RAM (Random Access Memory) (not shown) as a work memory, and controls the overall operation of the imaging apparatus 1 according to a program stored in advance in a ROM (Read Only Memory) 31.

例えば、CPU30は、バス21を介して信号処理部20の各部とコマンドやデータのやりとりを行い、信号処理部20の各部を制御する。また、CPU30は、上述した入力デバイス32に対する操作に応じた制御信号や撮像信号などに基づき、光学系10のフォーカス、絞り、ズームなどを制御するための制御信号を生成し、駆動部13に供給する。駆動部13は、供給された制御信号に応じて光学系10の各部の制御を行う。また、CPU30は、タイミングジェネレータ14に対して、所定のクロックパルスを出力するようにコマンドを出す。   For example, the CPU 30 exchanges commands and data with each unit of the signal processing unit 20 via the bus 21 and controls each unit of the signal processing unit 20. Further, the CPU 30 generates a control signal for controlling the focus, aperture, zoom, and the like of the optical system 10 based on a control signal or an imaging signal according to the operation on the input device 32 described above, and supplies the control signal to the drive unit 13. To do. The drive unit 13 controls each unit of the optical system 10 according to the supplied control signal. Further, the CPU 30 issues a command to the timing generator 14 so as to output a predetermined clock pulse.

タイミングジェネレータ14は、CPU30から供給されたこのコマンドに応じて、例えばフレーム同期信号や水平同期信号、垂直同期信号をといった、撮像素子11から出力された撮像信号に対する処理に必要なタイミング信号を生成する。   In response to this command supplied from the CPU 30, the timing generator 14 generates a timing signal necessary for processing the image signal output from the image sensor 11, such as a frame synchronization signal, a horizontal synchronization signal, and a vertical synchronization signal. .

入力デバイス32は、この撮像装置1を操作するために用いられる各種の操作子が設けられ、各操作子に対する操作に応じた制御信号を出力する。例えば、電源部39による電源供給のON/OFFを切り替える電源キー、撮影モードや記録モードといった撮像装置1における動作モードを切り換えるモード切り換えキー、カーソル移動のためのキーなどが設けられる。さらに、入力デバイス32には、この撮像装置1で静止画を撮影する際に用いられるシャッタボタンや、動画や静止画を撮影する際に光学系10のフォーカス、絞り、ズームなどを操作するための操作子なども設けられる。   The input device 32 is provided with various operators that are used to operate the imaging apparatus 1 and outputs a control signal corresponding to an operation on each operator. For example, a power key for switching ON / OFF of power supply by the power supply unit 39, a mode switching key for switching an operation mode in the imaging apparatus 1 such as a shooting mode and a recording mode, a key for moving a cursor, and the like are provided. Further, the input device 32 is used for operating a shutter button used when taking a still image with the imaging apparatus 1 and operating the focus, aperture, zoom, and the like of the optical system 10 when shooting a moving image or a still image. An operator or the like is also provided.

外部I/F33は、この撮像装置1と外部の機器との間でのデータのやりとりを制御する。   The external I / F 33 controls data exchange between the imaging apparatus 1 and an external device.

メモリコントローラ34に対して、RAM35が接続される。RAM35は、例えばメモリバスクロックに同期して動作するSDRAM(Synchronous Dynamic Random-Access Memory)であって、データの入出力を所定のデータ長(バースト長)単位でバースト転送により行うことができる。RAM35は、バス21に接続される各部と共用して用いられる。メモリコントローラ34は、このRAM35に対するアクセス制御を行う。バス21に接続される各処理ブロックにおいて、RAM35に対する転送要求が発生した場合には、バス21からメモリコントローラ34に対して転送要求が渡され、メモリコントローラ34は、この転送要求に従いRAM35へのアクセスを発生させる。   A RAM 35 is connected to the memory controller 34. The RAM 35 is, for example, an SDRAM (Synchronous Dynamic Random Access Memory) that operates in synchronization with a memory bus clock, and can input and output data by burst transfer in units of a predetermined data length (burst length). The RAM 35 is used in common with each unit connected to the bus 21. The memory controller 34 controls access to the RAM 35. In each processing block connected to the bus 21, when a transfer request to the RAM 35 occurs, the transfer request is passed from the bus 21 to the memory controller 34, and the memory controller 34 accesses the RAM 35 according to this transfer request. Is generated.

記録再生制御部36は、記録媒体37に対するデータの記録制御や、記録媒体37に記録されたデータの再生制御を行う。記録媒体37としては、例えば着脱可能な不揮発性メモリを用いることができる。また、記録媒体37として記録可能なタイプの光ディスクを用いることもできる。さらに、着脱可能または撮像装置1に内蔵されるハードディスクを記録媒体37として用いることもできる。勿論、記録媒体37は、従来から動画データの記録に用いられる磁気テープを適用することも可能である。   The recording / reproducing control unit 36 performs recording control of data on the recording medium 37 and reproduction control of data recorded on the recording medium 37. As the recording medium 37, for example, a removable nonvolatile memory can be used. Also, a recordable optical disc can be used as the recording medium 37. Furthermore, a removable hard disk or a built-in hard disk in the imaging apparatus 1 can be used as the recording medium 37. Of course, as the recording medium 37, a magnetic tape conventionally used for recording moving image data can be applied.

図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 signal processing unit 22. The camera signal processing unit 22 includes a RAW correction unit 50, a switch unit 51, a signal processing unit 52, and a resolution conversion unit 53, and includes a RAW compression unit 54 and a RAW expansion unit 56, and bus I / Fs 55, 57, and 58. Have.

バスI/F55、57および58は、RAM35のデータを一時的に溜め込むことができるバッファメモリを有する。バスI/F55、57および58は、このバッファメモリにバースト長分のデータが溜め込まれたら、バッファメモリからバースト長単位でデータを読み出しバス21に送り出すことができるようにされている。また。バスI/F55、57および58は、RAM35からバースト長単位で読み出されたデータを一時的にバッファに溜め込み、所定のタイミングで出力することができるようにされている。   The bus I / Fs 55, 57, and 58 have buffer memories that can temporarily store data in the RAM 35. The bus I / Fs 55, 57, and 58 are configured to be able to read data from the buffer memory in units of burst length and send it to the bus 21 when data for the burst length is accumulated in the buffer memory. Also. The bus I / Fs 55, 57 and 58 are configured so that data read from the RAM 35 in units of burst length can be temporarily stored in a buffer and output at a predetermined timing.

RAW補正部50は、補正処理部50Aおよび同期乗り換え部50Bを有する。補正処理部50Aは、供給されたRAWデータに対して欠陥補正やレンズ補正などの各種補正処理を施すと共に、RAWデータの配列に対してデモザイク処理を施し、後段での補正処理や色変換処理に適したデータ配列に並び替える。   The RAW correction unit 50 includes a correction processing unit 50A and a synchronous transfer unit 50B. The correction processing unit 50A performs various correction processes such as defect correction and lens correction on the supplied RAW data, and also performs demosaic processing on the array of RAW data, and performs correction processing and color conversion processing at a later stage. Rearrange to a suitable data array.

同期乗り換え部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 signal processing unit 22 is an output of the image sensor 11 and is synchronized with a drive clock when reading out charges from the image sensor 11. On the other hand, the data output from the camera signal processing unit 22 needs to be synchronized with the clock inside the signal processing unit 20. The synchronous transfer section 50B has a buffer memory, writes input data to the buffer memory in accordance with the sensor drive system clock, and reads data from the buffer memory in accordance with the system clock. Data reading from the buffer memory is performed in response to a transfer request supplied to the synchronous transfer unit 50B.

信号処理部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 signal processing unit 52, RAW data is read from the buffer memory of the synchronous transfer unit 50B and supplied to the signal processing unit 52 via one terminal 51A of the switch unit 51. The signal processing unit 52 converts the RAW data into an image signal in a format suitable for subsequent processing. For example, the signal processing unit 52 converts the RAW data into a Y / C signal composed of a luminance signal Y and a color difference signal Cb / Cr.

信号処理部52は、さらに、RAWデータが変換された画像信号に対してホワイトバランス処理、ガンマ補正処理、エッジ強調処理など所定の画質補正処理を施す。なお、一般的に、動画像と静止画像とでは、求められる画質が異なると考えられている。そこで、信号処理部52は、例えばCPU30の制御により、動画データに対する処理を行う場合と、静止画データに対する処理を行う場合とで、これらの画質補正処理を行う際のパラメータを切り替えることができるようにされている。   The signal processing unit 52 further performs predetermined image quality correction processing such as white balance processing, gamma correction processing, and edge enhancement processing on the image signal obtained by converting the RAW data. In general, it is considered that the required image quality differs between a moving image and a still image. Therefore, for example, the signal processing unit 52 can switch parameters for performing the image quality correction processing depending on the control of the CPU 30 depending on whether the processing is performed on moving image data or the processing on still image data. Has been.

信号処理部52で信号処理された画像信号は、解像度変換部53で例えば動作モードに応じた解像度に解像度変換され、バスI/F58からの転送要求Cに応じて、バスI/F58を介してバス21に送り出される。   The image signal subjected to signal processing by the signal processing unit 52 is resolution-converted to a resolution corresponding to, for example, the operation mode by the resolution conversion unit 53, and is transmitted via the bus I / F 58 in response to a transfer request C from the bus I / F 58. It is sent to the bus 21.

信号処理部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 signal processing unit 52 is also supplied to the bus I / F 57. The bus I / F 57 requests the memory controller 34 to read out the compressed RAW data stored in the RAM 35 via the bus 21 at a predetermined timing in response to the transfer request A, and the RAM 35 responds to this request. The compressed RAW data read from and transferred to the RAW decompression unit 56 is supplied. The RAW expansion unit 56 performs a decoding process on the compressed RAW data supplied via the bus I / F 57 by a process reverse to that of the RAW compression unit 54 described later, and expands the data. The switch 51 selects the terminal 51 </ b> B, and the output of the RAW decompression unit 56 is supplied to the signal processing unit 52 via the terminal 51 </ b> B of the switch unit 51.

なお、信号処理部52および解像度変換部53の処理は、バスI/F58から供給される転送要求Cと、信号処理部52が出力する転送要求Aに対する応答信号に基づき行われる。すなわち、信号処理部52および解像度変換部53では、出力相手側からのデータ転送要求と、入力相手側からのデータ出力応答とが共に有効となったときに、データの転送および信号処理が行われる。   The processing of the signal processing unit 52 and the resolution conversion unit 53 is performed based on a transfer request C supplied from the bus I / F 58 and a response signal to the transfer request A output from the signal processing unit 52. That is, in the signal processing unit 52 and the resolution conversion unit 53, data transfer and signal processing are performed when both the data transfer request from the output counterpart and the data output response from the input counterpart are valid. .

バスI/F55からの転送要求Bに応じて、同期乗り換え部50BのバッファメモリからRAWデータが読み出され、RAW圧縮部54に供給される。RAW圧縮部54は、供給されたRAWデータを圧縮符号化して出力する。RAW圧縮部54では、より画質劣化の少ない圧縮符号化方式を適用すると、好ましい。   In response to the transfer request B from the bus I / F 55, RAW data is read from the buffer memory of the synchronous transfer unit 50B and supplied to the RAW compression unit 54. The RAW compression unit 54 compresses and encodes the supplied RAW data and outputs it. In the RAW compression unit 54, it is preferable to apply a compression coding method with less image quality degradation.

例えば、特開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 compression unit 54 is performed with emphasis on real-time characteristics with respect to RAW data transfer, and is performed, for example, line-sequentially based on the readout characteristics of the image sensor 11. Not limited to this, a line memory capable of storing a plurality of lines is provided in the RAW compression unit 54, and still image data can be sequentially scanned in the horizontal direction in units of blocks of 8 horizontal pixels × 8 vertical pixels. .

RAW圧縮部54で圧縮符号化された圧縮RAWデータは、バスI/F55を介してバス21に送り出される。   The compressed RAW data compression-encoded by the RAW compression unit 54 is sent to the bus 21 via the bus I / F 55.

このような構成による撮像装置1における一例の動作について、概略的に説明する。動画データの記録を主に行う動画データ記録モード時には、被写体からの光が光学系10を介して撮像素子11に入射され、光電変換により電気信号に変換され撮像信号としてフレームタイミング毎に出力される。撮像信号は、フロントエンド部12によりノイズ抑圧処理やゲイン制御などの所定の処理を施され、さらにA/D変換されてRAWデータとしてフレームタイミング毎に出力される。フロントエンド部12から出力されたRAWデータは、信号処理部20に入力され、カメラ信号処理部22に供給される。   An example of the operation of the imaging apparatus 1 having such a configuration will be schematically described. In a moving image data recording mode in which moving image data is mainly recorded, light from a subject enters the image sensor 11 via the optical system 10, is converted into an electric signal by photoelectric conversion, and is output as an image signal at each frame timing. . The imaging signal is subjected to predetermined processing such as noise suppression processing and gain control by the front end unit 12, and is further A / D converted and output as RAW data at each frame timing. The RAW data output from the front end unit 12 is input to the signal processing unit 20 and supplied to the camera signal processing unit 22.

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 signal processing unit 22 by the correction processing unit 50A, and is written in the buffer memory by the synchronous transfer unit 50B with the sensor drive system clock. In response to the transfer request A output from the signal processing unit 52, RAW data is read from the buffer memory. At this time, reading of data from the buffer memory is performed according to the system clock, and clock switching is performed. The RAW data output from the synchronous transfer unit 50B is supplied to the signal processing unit 52 via the switch unit 51, converted into baseband moving image data, and the resolution conversion unit 53 performs predetermined resolution conversion. In response to the transfer request C, the moving image data is output from the resolution conversion unit 53, transferred to the bus 21 via the bus I / F 58, and written to the RAM 35.

RAM35に書き込まれた動画データは、所定にRAM35から読み出されバス21を介して解像度変換部24および動画コーデック部26に供給される。解像度変換部24は、供給された動画データの解像度を例えば表示装置28に表示するのに適した解像度に変換する。解像度変換部24で解像度が変換された動画データは、バス21を介して表示制御部37に供給され、記録モニタ画像として表示装置28に表示される。   The moving image data written in the RAM 35 is read from the RAM 35 and supplied to the resolution conversion unit 24 and the moving image codec unit 26 via the bus 21. The resolution conversion unit 24 converts the resolution of the supplied moving image data into a resolution suitable for display on the display device 28, for example. The moving image data whose resolution is converted by the resolution conversion unit 24 is supplied to the display control unit 37 via the bus 21 and is displayed on the display device 28 as a recording monitor image.

RAM35に書き込まれた動画データは、バス21を介して動画コーデック部26にも供給される。動画コーデック部26は、例えばMPEG2方式により圧縮符号化を行う。圧縮動画データは、バス21を介してメモリコントローラ34に供給され、RAM35に格納される。る。解像度変換された動画データは、バス21を介してメモリコントローラ34に供給され、RAM35に格納される。   The moving image data written in the RAM 35 is also supplied to the moving image codec unit 26 via the bus 21. The moving image codec unit 26 performs compression encoding by, for example, the MPEG2 system. The compressed moving image data is supplied to the memory controller 34 via the bus 21 and stored in the RAM 35. The The resolution-converted moving image data is supplied to the memory controller 34 via the bus 21 and stored in the RAM 35.

なお、RAM35に書き込まれた動画データをバス21を介して拡張画像処理部23に供給して所定に画像処理を施し、その後、解像度変換部24に供給するようにしてもよい。これに限らず、解像度変換部24で解像度変換された動画データをバス21を介して拡張画像処理部23に供給し、画像処理を施すようにしてもよい。   Note that the moving image data written in the RAM 35 may be supplied to the extended image processing unit 23 via the bus 21 to perform predetermined image processing, and then supplied to the resolution conversion unit 24. However, the present invention is not limited to this, and the moving image data subjected to resolution conversion by the resolution conversion unit 24 may be supplied to the extended image processing unit 23 via the bus 21 to perform image processing.

記録再生制御部36は、RAM35に所定量以上の圧縮動画データが溜め込まれると、RAM35から、例えば記録媒体37の記録単位毎に圧縮動画データを読み出し、記録媒体37に記録する。   When a predetermined amount or more of the compressed moving image data is accumulated in the RAM 35, the recording / playback control unit 36 reads the compressed moving image data from the RAM 35 for each recording unit of the recording medium 37 and records it on the recording medium 37.

動画データの記録中に静止画記録を行う場合には、先ず、例えば動画の記録中に、静止画の記録を指示するために、入力デバイス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 input device 32 is pressed in order to instruct recording of a still image. A control signal corresponding to the pressing of the shutter button is supplied from the input device 32 to the CPU 30. Based on this control signal, the CPU 30 controls each unit of the imaging device 1 so as to perform still image recording.

例えば、シャッタボタンが押下された直後のフレームタイミングの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 signal processing unit 22, the RAW data corresponding to the timing when the shutter button is pressed is subjected to a predetermined correction process by the correction processing unit 50A, and written to the buffer memory by the synchronous transfer unit 50B with the sensor drive system clock. The RAW data written in the buffer memory is read by the system clock in response to the transfer request B, the clock is changed, and is supplied to the RAW compression unit 54. The compressed RAW data compression-encoded by the RAW compression unit 54 is sent to the bus 21 via the bus I / F 55 and stored in the RAM 35 via the bus 21 and the memory controller 34.

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 RAM 35 is read from the RAM 35 at a predetermined timing and supplied to the camera signal processing unit 22. The compressed RAW data supplied to the camera signal processing unit 22 is supplied to the RAW expansion unit 56 via the bus I / F 57 in response to the transfer request A, and the compression code is expanded. The expanded RAW data is converted into baseband still image data by the signal processing unit 52, resolution-converted by the resolution conversion unit 53, transferred to the bus 21 via the bus I / F 58, and sent to the memory controller 34. To the RAM 35.

RAM35に書き込まれたRAWデータは、所定に読み出されてバス21を介して静止画コーデック部25に供給され、例えばJPEG方式に従って圧縮符号化される。圧縮静止画データは、バス21を介して記録再生制御部36に供給され、動画データの記録が行われていないタイミングで記録媒体37に記録される。圧縮静止画データを一旦RAM35に格納し、記録媒体37に対して動画データの記録が行われていないタイミングでRAM35から圧縮静止画データを読み出して記録媒体37に記録するようにしてもよい。   The RAW data written in the RAM 35 is read out in a predetermined manner, supplied to the still image codec unit 25 via the bus 21, and is compressed and encoded in accordance with, for example, the JPEG method. The compressed still image data is supplied to the recording / playback control unit 36 via the bus 21 and is recorded on the recording medium 37 at a timing when the moving image data is not recorded. The compressed still image data may be temporarily stored in the RAM 35, and the compressed still image data may be read from the RAM 35 and recorded on the recording medium 37 at a timing when moving image data is not recorded on the recording medium 37.

なお、動画データの記録中に静止画データの記録を行う場合、動画データの記録を停止させないために、カメラ信号処理部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 signal processing unit 22 and the compressed RAW data is written to the RAM 35 in order not to stop recording of the moving image data. It is necessary to perform in real time in synchronization with the output of the image sensor 11.

一方、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 RAM 35, decompression processing and signal processing of the read RAW data in the camera signal processing unit 22, compression encoding processing in the still image codec unit 25, recording of compressed still image data The supply to the reproduction controller 36 is performed at a timing when the bus 21 is not congested, such as a drive signal blanking period in the image sensor 11. Since signal processing for still image data does not require real-time processing, it is possible to perform signal processing at low speed using software processing in the CPU 30 or a general-purpose DSP (Digital Signal Processor).

次に、カメラ信号処理部22における処理について、より詳細に説明する。上述したように、同期乗り換え部50Bでは、センサ駆動系のクロックに同期して入力されたRAWデータをバッファメモリに一旦格納し、このバッファメモリからの読み出しをシステム系クロックに同期させて行うことで、クロックの乗せ替えを行っている。バッファメモリは、クロック乗せ換えと、バス21における瞬間的なアクセス遅延を吸収可能な容量を、少なくとも有しているものとする。バッファメモリからの読み出しが行われない状態で、バッファメモリに対する書き込みが発生すると、バッファメモリがオーバーフローを起こし、バッファ機能が破綻することになる。   Next, the processing in the camera signal processing unit 22 will be described in more detail. As described above, the synchronous transfer unit 50B temporarily stores the RAW data input in synchronization with the clock of the sensor drive system in the buffer memory, and performs reading from the buffer memory in synchronization with the system clock. , Changing clocks. It is assumed that the buffer memory has at least a capacity capable of absorbing clock transfer and instantaneous access delay in the bus 21. If writing to the buffer memory occurs without reading from the buffer memory, the buffer memory overflows, and the buffer function fails.

このように、バッファメモリに対する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 bus 21 to which the compressed RAW data compressed and encoded by the RAW compression unit 54 is sent out. The bus 21 may be congested. For example, when the bus 21 is congested due to transfer of data having a higher priority than the compressed RAW data, the bus I / F 55 waits for processing for sending the compressed RAW data to the bus 21 until the transfer of the data is completed, for example. . Alternatively, the RAW compression unit 54 is controlled to stop the RAW data compression process, and wait for the transfer of the data to end and the buffer memory to become empty.

また、RAW圧縮部54がRAWデータの空間周波数成分に応じて圧縮率が変動する可変長符号化を用いてRAWデータの圧縮符号化を行う場合、圧縮符号化するRAWデータの高周波成分が多ければ、圧縮符号化後のデータ量が大きくなってしまう場合が有り得る。このような場合にも、バッファ破綻が発生する可能性がある。   In addition, when the RAW compression unit 54 performs compression encoding of RAW data using variable length encoding in which the compression rate varies according to the spatial frequency component of the RAW data, if there are many high-frequency components of the RAW data to be compression encoded, In some cases, the amount of data after compression encoding becomes large. Even in such a case, a buffer failure may occur.

バッファ破綻が発生する可能性がある場合、静止画データの記録を継続するためには、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 image sensor 11, output of RAW data from the front end unit 12, and correction processing in the correction processing unit 50A. However, when still image data is recorded during the recording of moving image data, it is necessary to continuously record moving image data, and therefore these preceding processes cannot be stopped.

そこで、同期乗り換え部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 buffer memory 60 and a read control unit 61. The buffer memory 60 is a first-in first-out (FIFO) control memory, and writes data in response to a write enable signal supplied from the preprocessing side. The read control unit 61 issues a data read request to the buffer memory 60 based on the transfer request A and transfer request B described above and the capacity of the buffer memory 60. The capacity of the buffer memory 60 may only indicate, for example, whether the buffer memory is full (full) or empty (empty).

読み出し制御部61は、バッファメモリ60の容量が空ではなく、且つ、転送要求Aおよび転送要求Bの双方が成立する場合に、バッファメモリ60への読み出し要求をアクティブとしてバッファメモリ60からデータを読み出し、信号処理部52およびRAW圧縮部54に対して出力する。   When the capacity of the buffer memory 60 is not empty and both the transfer request A and the transfer request B are satisfied, the read control unit 61 reads the data from the buffer memory 60 by making the read request to the buffer memory 60 active. And output to the signal processing unit 52 and the RAW compression unit 54.

ここで、読み出し制御部61は、バッファメモリ60の容量と、転送要求Aおよび転送要求Bとに基づき、バッファが破綻する可能性の有無を判断する。すなわち、バッファメモリ60の容量がフル状態であって、少なくとも転送要求Aまたは転送要求Bの何れか一方が成立しない場合に、バッファが破綻する可能性があると判断する。なお、転送要求が成立するか否かは、例えばその転送要求により行われるべき処理のタイミングに当該転送要求が読み出し制御部61に到来しているか否かで判断することが考えられる。   Here, the read control unit 61 determines whether or not there is a possibility that the buffer will fail based on the capacity of the buffer memory 60 and the transfer request A and the transfer request B. That is, when the capacity of the buffer memory 60 is full and at least one of the transfer request A and the transfer request B is not established, it is determined that the buffer may fail. Whether or not the transfer request is established can be determined by determining whether or not the transfer request has arrived at the read control unit 61 at the timing of processing to be performed according to the transfer request, for example.

転送要求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 control unit 61. When it is determined that neither transfer request A nor transfer request B is established, it is called complete failure, and the cause of occurrence is held in the internal register. The CPU 30 can know whether partial failure or complete failure has occurred in the unit of frame processing by reading the internal register of the read control unit 61.

なお、読み出し制御部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 control unit 61. As an example, when it is determined that the transfer request A is not established and a possibility of partial failure has occurred, it is conceivable that information indicating the transfer request A is held in an internal register of the read control unit 61. As another example, when it is determined that neither transfer request A nor transfer request B is established and there is a possibility of complete failure, information indicating transfer request A and transfer request B is read out from control unit 61. It can be held in an internal register.

図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 read control unit 61. When the recording mode is the moving image data recording mode and the capacity of the buffer memory 60 is full, if the transfer request A is not supplied to the read control unit 61, it can be determined that the buffer may fail. As an example, when the bus 21 is congested and the transfer request C is not output from the bus I / F 58, the data whose resolution has been converted by the resolution converter 53 cannot be sent to the bus 21. In this case, the signal processing unit 52 does not output the transfer request A because it cannot request the next data from the synchronous transfer unit 50B.

また例えば、静止画データの記録のみを行っている場合は、転送要求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 read control unit 61. When the recording mode is the still image data recording mode and the buffer memory 60 is full, if the transfer request B is not supplied to the read control unit 61, it can be determined that the buffer may fail. As an example, the bus I / F 55 can be prevented from outputting the transfer request B when the bus 21 is congested, and the RAW data compression encoding process in the RAW compression unit 54 can be stopped. If the congestion of the bus 21 is alleviated, it is conceivable that the transfer request B is output and the RAW data compression encoding process by the RAW compression unit 54 is restarted.

さらに例えば、動画データの記録を行い動画データの記録中に静止画データの記録を行う場合には、転送要求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 read control unit 61, respectively. When the recording mode is the moving image and still image data recording mode and the buffer memory 60 is full, if either one of the transfer request A or the transfer request B is not supplied to the read control unit 61, the buffer is stored. If the transfer request A and the transfer request B are not supplied together, there is a possibility that the buffer will completely fail.

この発明の実施の一形態では、動画記録中の静止画記録においてバッファが破綻する可能性があると判断された場合には、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 RAW compression unit 54 is temporarily stopped. It waits for the buffer memory 60 to become empty. For example, it waits for data to be read from the buffer memory 60 in response to a transfer request A for moving image recording. At this time, the position where compression encoding on the RAW data is stopped is held in a predetermined register or memory. When the buffer memory 60 becomes empty and the buffer failure is resolved, the transfer request B is output from the bus I / F 55, the raw data sequentially stored in the buffer memory 60 is read, and the raw code is compressed by the raw compression unit 54. Turn into.

図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 read control unit 61 detects that the transfer request B is not supplied, it is determined that there is a possibility of partial buffer failure. When there is a possibility of buffer failure, the RAW compression unit 54 stops the RAW data compression encoding process. The compression code processing is stopped for a certain amount of RAW data from the position where the possibility of buffer failure has occurred. In the example of FIG. 6, the RAW data compression encoding process by the RAW compression unit 54 is resumed from the line m + α after a certain amount has elapsed from the position where the possibility of buffer failure has occurred.

以下、この、バッファ破綻の可能性が生じた位置から、バッファ破綻が解消された位置までを、破綻区間と呼ぶ。また、バッファ破綻の可能性が生じた位置を破綻位置と呼び、バッファ破綻が解消された位置を破綻回復位置と呼ぶ。破綻区間においては、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 buffer memory 60 becomes empty and is recovered from the buffer failure, the code indicating the failure interval is generated and output by the RAW compression unit 54 in a predetermined manner. Thereafter, compression coding is performed on the RAW data after the failure recovery position.

また、破綻区間を示す情報の保持は、破綻区間を所定の符号で置き換える方法に限られない。例えば、図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 RAW compression unit 54. At this time, it is assumed that the section from the line m to the line m + α is a failed section. In this case, a section corresponding to the broken section of the frame N in the moving image data is separately held as restoration data.

例えば、動画記録中の静止画記録においてバッファ破綻の可能性が生じたときに、動画コーデック部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 RAM 35. In addition, it is conceivable that data of an area corresponding to the failed section is extracted from the held frame N and used as restoration data. When decompressing the compressed RAW data, the stored restoration data is used after being enlarged to a predetermined size according to the ratio between the image frame size of the moving image data and the image frame size of the still image data.

例えば、静止画データの画枠サイズが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 RAM 35 for compression encoding by the moving image codec unit 26. In this case, it is necessary to perform restoration processing of the failed section in consideration of the compression encoding timing of the frame N in the moving picture codec unit 26.

図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 CPU 30 based on the determination by the read control unit 61, for example.

なお、撮像装置1は、記録モードが動画記録中に静止画の記録が可能なモードとされているものとする。したがって、同期乗り換え部50Bの読み出し制御部61に対して、転送要求Aおよび転送要求Bが供給されることになる。なお、これに限らず、動画が記録される場合に、通常は動画記録モードとされ読み出し制御部61に対して転送要求Aのみが供給され、例えばシャッタボタンの押下に応じて動画記録中に静止画記録が可能な記録モードに変更されるようにしてもよい。場合には、記録モードの変更に伴い、転送要求Aおよび転送要求Bが読み出し制御部61に供給されることになる。   Note that the imaging apparatus 1 is assumed to be a mode in which a recording mode can record a still image during moving image recording. Accordingly, the transfer request A and the transfer request B are supplied to the read control unit 61 of the synchronous transfer unit 50B. However, the present invention is not limited to this. When a moving image is recorded, the moving image recording mode is normally set, and only the transfer request A is supplied to the read control unit 61. You may make it change into the recording mode in which image recording is possible. In this case, the transfer request A and the transfer request B are supplied to the read control unit 61 as the recording mode is changed.

ステップ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 read control unit 61 where the transfer request A and the transfer request B are to be supplied corresponding to the recording mode, a buffer is stored. It can be determined that there is a possibility of partial failure. If it is determined that both the transfer request A and the transfer request B are supplied to the read control unit 61, the read control unit 61 reads RAW data from the buffer memory 60 in a predetermined manner in step S11. The RAW compression unit 54 performs compression encoding. The compression-coded RAW data is transferred to the RAM 35 via the bus 21.

一方、ステップ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 RAW compression unit 54 is stopped. In step S15, it is determined whether or not the possibility of buffer failure has been recovered. For example, in step S15, it is determined whether or not compression encoding for a certain amount of RAW data from the failure position has been stopped. If it is determined that there is no recovery from the possibility of buffer failure, the process returns to step S14, and the RAW data compression encoding process is stopped. On the other hand, if it is determined that recovery from the possibility of buffer failure is made, the process returns to step S10, and RAW data transfer and compression encoding are performed in the next step S11.

次に、図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 RAM 35. It is assumed that the data corresponding to the failed section is extracted from the data before compression coding by the codec unit 26 and separately held data is used.

RAW伸長部56において、RAM35から読み出された圧縮RAWデータに対し、例えば画面の左上隅に対応する位置から復号処理が行われる。このとき、破綻位置を示す所定の符号の検出を行い(ステップS20)、当該圧縮RAWデータにおいて現在復号を行おうとしている符号が当該処理の符号でなければ、ステップS21で復号処理を行い圧縮RAWデータを伸長する。伸長された伸長RAWデータは、所定に信号処理され画像データが生成される。なお、ステップS20で破綻位置を示す符号が検出されると、検出結果に基づき破綻位置を示す情報が求められ、保持される。   In the RAW decompression unit 56, the compressed RAW data read from the RAM 35 is decoded from a position corresponding to the upper left corner of the screen, for example. At this time, a predetermined code indicating the failure position is detected (step S20), and if the code currently being decoded in the compressed RAW data is not the code of the process, the decoding process is performed in step S21 and the compressed RAW is compressed. Decompress the data. The expanded RAW data is subjected to predetermined signal processing to generate image data. When a code indicating the failure position is detected in step S20, information indicating the failure position is obtained and held based on the detection result.

例えば、信号処理部52において動画データに対する信号処理が行われていない間に、伸長RAWデータに対する信号処理が信号処理部52において行われ、画像データが生成される。これに限らず、例えばCPU30においてソフトウェア的に処理を行ってもよいし、別途、信号処理用にDSP(Digital Signal Processor)を設け、このDSPにおいて行ってもよい。この圧縮RAWデータの伸長処理は、動画データに対する信号処理のようなリアルタイム性が要求されないため、より低速な処理により行うことも可能である。   For example, while the signal processing unit 52 does not perform signal processing on moving image data, the signal processing unit 52 performs signal processing on the decompressed RAW data to generate image data. For example, the CPU 30 may perform software processing, or a DSP (Digital Signal Processor) may be separately provided for signal processing. The decompression process of the compressed RAW data does not require real-time performance like the signal process for moving image data, and can be performed by a slower process.

一方、ステップ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 RAM 35. In the next step S24, the restoration data read from the RAM 35 in accordance with the ratio between the image frame size of the moving image data and the image frame size of the still image data. The enlargement process is performed for. For example, as illustrated in FIG. 13B, if the image data frame size is 640 pixels × 480 pixels, and the horizontal and vertical directions are 1/4 of the still image data, the restoration data Is expanded to 4 times the size in the horizontal and vertical directions. The enlargement process can be performed, for example, by generating a new pixel value using linear interpolation or the like based on the pixel value of the pixel whose pixel distance is enlarged.

次に、ステップ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 signal processing unit 52 performs image quality correction processing on moving image data and a parameter used when image quality correction processing is performed on still image data, respectively, and enlarges the restoration data. This can be done by converting the restoration data so that the characteristics of the image data matched with the characteristics of the portion other than the failed section of the decompressed RAW data.

次のステップ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 resolution conversion unit 53, sent to the bus 21 in response to the transfer request C from the bus I / F 58, and written to the RAM 35 via the memory controller 34. It is. Then, the data is read out to the recording / playback control unit 36 at a predetermined timing and recorded on the recording medium 37.

このように、この発明の実施の一形態では、動画記録中に静止画を記録する際に、静止画の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 RAM 35 even in a plurality of subsequent frames. It is conceivable that compressed RAW data with the smallest amount of failed sections is selected and decompressed and recorded later. For example, it is conceivable to use the area of the failed section as the amount of the failed section.

図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.

発明の概念について説明するための略線図である。It is a basic diagram for demonstrating the concept of invention. 発明の実施の一形態に適用可能な撮像装置の一例の構成を示すブロック図である。It is a block diagram which shows the structure of an example of the imaging device applicable to one Embodiment of invention. カメラ信号処理部の一例の構成を示すブロック図である。It is a block diagram which shows the structure of an example of a camera signal processing part. 同期乗り換え部の一例の構成を示すブロック図である。It is a block diagram which shows the structure of an example of a synchronous transfer part. 転送要求に基づく一例のバッファ破綻判定を示す略線図である。It is a basic diagram which shows an example of the buffer failure determination based on a transfer request. 発明の実施の一形態によるRAWデータに対する圧縮符号化処理の一例の制御を説明するための略線図である。It is a basic diagram for demonstrating control of an example of the compression encoding process with respect to RAW data by one Embodiment of invention. RAWデータの圧縮符号化に用いられない所定の符号を用いて破綻区間を示す情報として用いることを説明するための略線図である。It is a basic diagram for demonstrating using as information which shows a failure area using the predetermined code | symbol which is not used for the compression encoding of RAW data. 破綻区間を示す位置情報を圧縮RAWデータとは別に保持することを説明するための略線図である。It is a basic diagram for demonstrating holding | maintaining the positional information which shows a failure area separately from compression RAW data. 復元に際して参照される画像データの保持について説明するための略線図である。It is a basic diagram for demonstrating holding | maintenance of the image data referred in the case of decompression | restoration. 破綻区間の復元の際に対応する動画データを直接的に参照することを説明するための略線図である。It is a basic diagram for demonstrating referring directly the moving image data corresponding in the case of restoration of a failure area. 発明の実施の一形態によるRAWデータ圧縮符号化処理の一例の制御を示すフローチャートである。It is a flowchart which shows control of an example of the RAW data compression encoding process by one Embodiment of invention. 圧縮RAWデータの復号処理における破綻区間の一例の復元処理を示すフローチャートである。It is a flowchart which shows the decompression | restoration process of an example of the failure area in the decoding process of compression RAW data. 圧縮RAWデータの復号処理における破綻区間の一例の復元処理を説明するための略線図である。It is a basic diagram for demonstrating the decompression | restoration process of an example of the failure area in the decoding process of compression RAW data. 1枚の静止画データに対し、動画データの複数フレームを用いて破綻区間の復元を行うことを説明するための略線図である。It is an approximate line figure for explaining performing restoration of a failure section using a plurality of frames of video data to one piece of still picture data. 連続的な複数の圧縮RAWデータのうち最も破綻区間の量が少ないデータを選択して伸長することを説明するための略線図である。It is an approximate line figure for explaining selecting and decompressing data with the smallest amount of a failure section among a plurality of continuous compression RAW data.

符号の説明Explanation of symbols

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 SYMBOLS 1 Imaging device 11 Image pick-up element 20 Signal processing part 22 Camera signal processing part 24 Resolution conversion part 25 Still image codec part 26 Movie codec part 30 CPU
34 Memory controller 35 RAM
36 Recording / Reproduction Control Unit 37 Recording Medium 50 RAW Correction Unit 50A Correction Processing Unit 50B Synchronization Transfer Unit 51 Switch Unit 52 Signal Processing Unit 53 Resolution Conversion Unit 54 RAW Compression Units 55, 57, 58 Bus I / F
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.
請求項1に記載の撮像装置において、
上記画像復元部は、復元する上記静止画に上記フレームタイミングが対応する上記動画のフレームの、上記欠損箇所に対応する領域のデータを用いて上記欠損箇所の復元を行う
ことを特徴とする撮像装置。
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. .
請求項2に記載の撮像装置において、
上記動画処理部は、上記処理を行う前の上記フレームを保持するようにし、上記画像復元部は、該保持された該処理を行う前のフレームを用いて上記欠損箇所の復元を行う
ことを特徴とする撮像装置。
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.
請求項2に記載の撮像装置において、
上記画像復元部は、上記動画処理部で上記フレームタイミング毎に処理される上記フレームを直接的に用いて上記欠損箇所の復元を行う
ことを特徴とする撮像装置。
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.
請求項2に記載の撮像装置において、
上記画像復元部は、復元する上記静止画に上記フレームタイミングが一致するフレームと、該フレームタイミングが一致するフレームに対して時間的に前および/または後ろの所定枚数のフレームとによる複数フレームを用いて上記欠損箇所の復元を行う
ことを特徴とする撮像装置。
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.
請求項5に記載の撮像装置において、
上記画像復元部は、上記複数フレームの動き情報に基づき上記欠損箇所の復元を行う
ことを特徴とする撮像装置。
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.
請求項2に記載の撮像装置において、
上記静止画処理部は、上記撮像指示に応じて複数の静止画を上記フレームタイミング毎に処理するようにされ、
上記画像復元部は、上記複数の静止画のうち上記欠損箇所の量が最も少ない静止画を選択し、該静止画に対して上記フレームタイミングが対応する上記動画のフレームを用いて上記欠損箇所の復元を行う
ことを特徴とする撮像装置。
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.
請求項7に記載の撮像装置において、
上記静止画処理部は、上記静止画に上記欠損箇所が発生する可能性がある場合に、該静止画の次の上記フレームタイミングの上記静止画に対する処理を行う
ことを特徴とする撮像装置。
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.
請求項2に記載の撮像装置において、
上記画像復元部は、上記静止画の上記欠損箇所のデータと、上記動画のフレームの上記欠損箇所に対応する領域のデータとの置き換えを行うことで該欠損箇所を復元する
ことを特徴とする撮像装置。
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.
請求項9に記載の撮像装置において、
上記画像復元部は、上記置き換えを行う際に、該置き換えに用いる上記動画の解像度を上記静止画の解像度に一致させる
ことを特徴とする撮像装置。
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.
請求項9に記載の撮像装置において、
上記画像復元部は、上記置き換えを行う際に、該置き換えに用いる上記動画の画質を上記静止画の画質に一致させる処理を行う
ことを特徴とする撮像装置。
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.
請求項9に記載の撮像装置において、
上記画像復元部は、上記置き換えを行った境界に低域通過フィルタ処理を施す
ことを特徴とする撮像装置。
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.
請求項1に記載の撮像装置において、
上記静止画処理部は、上記欠損箇所のデータを所定の符号に置き換えて上記静止画を出力し、
上記画像復元部は、上記静止画から検出された上記所定の符号に基づき上記復元を行う
ことを特徴とする撮像装置。
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.
請求項1に記載の撮像装置において、
上記静止画処理部は、上記欠損箇所の位置を示す情報を保持し、
上記画像復元部は、上記欠損箇所の位置を示す情報に基づき上記復元を行う
ことを特徴とする撮像装置。
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.
請求項1に記載の撮像装置において、
上記静止画処理部は、上記静止画に欠損が発生する可能性がある場合に、一定量の上記撮像信号に対して上記処理を停止する
ことを特徴とする撮像装置。
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.
JP2007302550A 2007-11-22 2007-11-22 Imaging apparatus, control method of imaging apparatus and control program of imaging apparatus Pending JP2009130561A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (2)

* Cited by examiner, † Cited by third party
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