JP5164610B2 - Imaging apparatus and control method thereof - Google Patents
Imaging apparatus and control method thereof Download PDFInfo
- Publication number
- JP5164610B2 JP5164610B2 JP2008053415A JP2008053415A JP5164610B2 JP 5164610 B2 JP5164610 B2 JP 5164610B2 JP 2008053415 A JP2008053415 A JP 2008053415A JP 2008053415 A JP2008053415 A JP 2008053415A JP 5164610 B2 JP5164610 B2 JP 5164610B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- frame
- moving image
- still image
- period
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Television Signal Processing For Recording (AREA)
- Studio Devices (AREA)
Description
本発明は、撮像手段で撮像した画像データを記録媒体に記録する撮像装置及びその制御方法に関するものである。 The present invention relates to an imaging apparatus that records image data captured by an imaging unit on a recording medium, and a control method thereof.
従来から、CCD等の撮像素子で撮像した画像信号をデジタル信号に変換し、そのデジタル信号を輝度色差のデジタル映像信号に処理した後、JPEGなどの圧縮処理を施し、記録メディアへ記録するデジタルカメラが開発されている。 Conventionally, a digital camera that converts an image signal captured by an image pickup device such as a CCD into a digital signal, processes the digital signal into a digital video signal of luminance color difference, and then performs compression processing such as JPEG and records it on a recording medium Has been developed.
デジタルカメラにおける撮像素子は高解像度化が進み、1000万画素を越えるものも出現している。その一方で、撮像素子の水平、垂直ラインなどを読み飛ばすことにより、画像信号を高速に読み出して動画像として記録する機能を有するものも増えている。すなわち、昨今のデジタルカメラでは、先に述べた静止画撮影を行う静止画撮影モードと、動画撮影を行う動画撮影モードと設けて、ユーザーの操作によって両方の撮影モードを切り換える仕様となってきている。 Image sensors in digital cameras have become higher in resolution, and some have exceeded 10 million pixels. On the other hand, there are an increasing number of devices having a function of reading out image signals at high speed and recording them as moving images by skipping horizontal and vertical lines of the image sensor. In other words, in recent digital cameras, the above-described still image shooting mode for performing still image shooting and the moving image shooting mode for moving image shooting are provided, and both shooting modes are switched by a user operation. .
近年では、動画記録中に静止画の撮影を行うことも可能になってきている(特許文献1)。この文献には、動画記録中に静止画撮影を行った場合に、静止画撮影により中断した動画撮影における動画圧縮データファイルが、静止画を挟んで2つに分割される不具合を解消する技術が記載されている。これは、具体的には、静止画撮影期間の直前の1フレームを代替フレームとし、その静止画撮影する期間だけその代替フレームを連続させて動画ファイルに格納することで、動画が分断しないようにするものである。更に、この文献は静止画撮影が完了し、撮像手段による動画撮影処理を再開するための開始タイミングを、動画撮影処理が停止される前の動画撮影処理における動画フレーム撮影周期に同期させる技術も開示している。また、欠落した動画フレームに代わる代替フレームに特殊画像データを用いたり、無画像画面を用いたりしている技術も知られている(特許文献2)。
しかしながら、前述したような従来技術では、黒画像(ブラックアウト画像)や、動画の直前・直後あるいは静止画像からの代替フレーム(ストップモーション画像)をコピーしてファイルに挿入するため、ファイルサイズが大きくなるといった問題があった。 However, in the conventional technology as described above, a black image (blackout image), a frame immediately before / after a moving image, or a substitute frame (stop motion image) from a still image is copied and inserted into a file, so the file size is large. There was a problem of becoming.
また、同じストップモーション画像を画像コーデックに入力しても、参照画像が入力画像より劣化しているため、期待するほど圧縮率が上げられないといった問題があった。 Further, even if the same stop motion image is input to the image codec, there is a problem that the compression rate cannot be increased as expected because the reference image is degraded from the input image.
本発明は、上述した問題点を解決するためのものであり、動画撮影中に静止画撮影するために、動画記録を中断する間の動画像データのデータサイズを小さくし、記録媒体への書き込み負荷を軽減することを目的とする。 The present invention is for solving the above-described problems, and in order to take a still image during moving image shooting, the data size of the moving image data is reduced while the moving image recording is interrupted, and writing to the recording medium is performed. The purpose is to reduce the load.
上記の課題を解決するために、本発明の撮像装置は、撮像手段で撮像した画像データを記録媒体に記録する撮像装置であって、前記撮像手段により連続して撮像することで得られる動画像を動画像ファイルとして前記記録媒体に記録する動画撮影動作を制御する動画撮影制御手段と、前記撮像手段で撮像することで得られる静止画を静止画ファイルとして前記記録媒体に記録する静止画撮影動作を制御する静止画撮影制御手段と、前記動画撮影動作が実行されている期間に、静止画撮影動作の指示が入力された場合、前記静止画撮影制御手段は前記静止画撮影動作を制御して前記静止画ファイルを前記記録媒体に記録し、前記動画撮影制御手段は前記動画撮影動作を中断し、前記中断した期間に対応する動画像を代替する画像の先頭としてブラックアウト画像を挿入し、前記ブラックアウト画像の後に差分情報がゼロであるフレーム間圧縮された画像を挿入することを繰り返し、前記挿入した画像の数が所定数以上でありかつ前記挿入した画像がGOPの最後のフレームである場合には次のGOPの先頭であるIフレームを前記静止画撮影動作に対応する静止画から得られたストップモーション画像とし、前記Iフレームの後に差分情報がゼロであるフレーム間圧縮されたストップモーション画像を挿入することをGOPに対応するフレーム数まで繰り返すことで動画像ファイルを生成し前記記録媒体に記録することを特徴とする。 In order to solve the above problems, an imaging apparatus of the present invention is an imaging apparatus that records image data captured by an imaging unit on a recording medium, and is a moving image obtained by continuously capturing images by the imaging unit. A moving image shooting control means for controlling a moving image shooting operation for recording the image as a moving image file on the recording medium, and a still image shooting operation for recording a still image obtained by taking an image with the imaging means as a still image file on the recording medium When a still image shooting operation instruction is input during a period in which the moving image shooting operation is being performed, the still image shooting control unit controls the still image shooting operation. recording the still image file on the recording medium, the video recording control means interrupts the moving image capturing operation, blanking the first image to replace the moving image corresponding to the period that the suspended Kkuauto insert the image, the black differential information after the out-image repeat that inserts an image compressed between frames is zero, the number of the inserted image is not less than the predetermined number and the inserted images are GOP Is the last frame of the next GOP, a stop motion image obtained from a still image corresponding to the still image shooting operation is used, and the difference information is zero after the I frame. A moving image file is generated and recorded on the recording medium by repeating the insertion of a stop motion image that has been compressed between the frames up to the number of frames corresponding to the GOP .
本発明によれば、動画撮影中に静止画撮影するために、動画記録を中断する間の動画像データのデータサイズを小さくし、記録媒体への書き込み負荷を軽減することができる。 According to the present invention, since still image shooting is performed during moving image shooting, the data size of moving image data can be reduced while moving image recording is interrupted, and the writing load on the recording medium can be reduced.
以下、添付図面に従って本発明に係る実施形態を詳細に説明する。 Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings.
<第1の実施形態>
図1は、本実施形態における撮像装置としてのデジタルカメラ100のブロック構成図である。
<First Embodiment>
FIG. 1 is a block configuration diagram of a digital camera 100 as an imaging apparatus in the present embodiment.
図示において、6は撮影レンズであり、1枚又は複数枚のレンズで構成される。8は絞りやシャッター等で構成され、被写体の輝度により、露出を調整する露出制御部である。10は数百万画素程度の画素数のCCDセンサーやCMOSセンサーなどの撮像手段としての撮像素子であり、撮像して得た各色成分のアナログ画像信号を出力する。12は撮像素子10からのアナログ画像信号をデジタル信号に変換するためのA/D変換器である。14はDRAMであり、A/D変換器12からのデジタル画像信号を一時的に蓄えたり、後述する信号処理後の画像データや画像圧縮後のデータなどを、一時的に蓄えるバッファー機能を有する。通常は、DRAMとの間にメモリーコントローラを介しデータの書き込みや読み出しを行うが、ここでは示していない。
In the figure,
16はA/D変換器12で得られたデジタル画像信号から、輝度信号と色差信号へ処理するための信号処理部で、YUVデータを生成する。18は信号処理部16からのYUVデータをJPEGまたはMPEG形式の画像データに圧縮したり、JPEGまたはMPEG形式の画像データをYUVデータに伸張するための画像コーデック部である。
20は画像圧縮処理されたデータをCF(Compact Flash)カードやSD(Secure Digital)カードなどの記録メディアへ書き込んだり、読み出したりするためも記録媒体インターフェースである。21は、上述したCFカードやSDカードなどの脱着可能な記録メディアである。なお、使用する記録メディアは、ランダムアクセス可能な記録メディアであれば、その種類は問わない。例えば、光ディスク(DVD)やハードディスクでも構わない。22はカラー液晶表示器等で構成される表示部であり、ビューワー表示したり、撮影した画像に基づきレビュー表示したり、伸張した画像を再生表示するために用いる。なお、表示部22は、TV等の外部表示装置に映像信号を出力する端子も備えている。
24は、信号処理部16から出力されたYUVデータを任意のサイズにリサイズするリサイズ部である。26は、先に述べた各処理部や後述のデータフローなどを制御するためのCPUである。27は、CPU26の処理手順に係るプログラム(ファームウェア)や各種情報を記憶しているROMである。詳細は後述するが、このROM27には、既にMPEG符号化されたブラックアウト画像データ、スキップトマクロブロック画像データ及び、擬似的なシャッター音のwave形式のデータが予め格納されている。各処理部はCPU26のバス33に繋がっている。又、図示しないが、各処理部とDRAM14間には、CPUとのRead/Writeを介さないDMA転送を行うためのDMAコントローラを備えている。更に、A/D変換器12から信号処理部16と、信号処理部16から画像コーデック部18やリサイズ部24などへは、図示していないがCPUやDMAとは別に、ダイレクトにデータを送受するパスを設けている。
28は音声の録音や再生の処理を行うための音声処理部であり、30は録音する時に音声入力するためのマイク、32は音声を再生するためのスピーカーである。音声処理部28は、音声のA/D変換とD/A変換も行って、音声情報の録音と再生を行う。また、23は静止画の撮影指示を行う際に利用するレリーズスイッチ23a、動画記録のON/OFFを指示するための動画記録スイッチ23bをはじめ、各種ボタンやダイヤルスイッチを含む操作部である。
次に、本実施形態における動画撮影動作について説明する。本実施形態では、CPU26が動画撮影制御の機能を有しており、CPU26が図1の各処理部を制御することにより動画撮影動作が実行される。
Next, the moving image shooting operation in the present embodiment will be described. In this embodiment, the
撮影レンズ6を通過した光は、絞りやシャッターの露出制御部8を通過し露出制御されて、撮像素子10に結像する。動画撮影時には、メカ機構のシャッターは開き、絞りによって露出を制御する。撮像素子10によって被写体像は光電変換され、アナログ信号としてA/D変換器12に送られる。A/D変換器12では、アナログ画像信号をデジタル画像信号に変換して、デジタル画像信号はバス33を介して信号処理部16に転送される。動画撮影時には撮像素子10からは全画素を読み出すのではなく、水平方向や垂直方向に間引かれた画素を、記録するフレームレートに合わせて読み出す。これは、リサイズ部24の負荷を減らすためである。信号処理部16では、動画撮影モードに応じて、水平垂直のフィルタ処理やアパチャー補正処理やガンマ処理などが行われ、処理された画像信号はリサイズ部24に転送される。
The light that has passed through the
リサイズ部24は、画像信号をVGA(水平640画素、垂直480ライン)のサイズにリサイズして、DRAM14に転送する。DRAM14上のVGA画像データは、表示部22に転送され、TVやカメラに搭載された液晶上にスルー画像として表示される。本実施形態では、この表示処理までの状態を、動画撮影時のスタンバイ状態と言う。
The resizing
この状態で、操作部23に設けられた動画記録スイッチ23bが押下された場合には、CPU26は各処理部に動画記録動作を開始させる。
In this state, when the moving
すなわち、画像コーデック部がDRAM14上のVGA画像データをMPEGデータに変換するのと平行して、音声処理部28がマイク30で取り込んだ音声をwave形式の音声データに変換する。そして、CPU26がこれらのMPEGデータと音声WAVEデータを用いて、ヘッダーなどを付加してAVI形式で動画ファイルを生成する。生成された動画ファイルは、記録媒体インターフェース20を介して、記録メディア21に記録される。この動画記録処理は、動画記録スイッチ23bが再び押下されるまで実行される。
That is, in parallel with the image codec unit converting the VGA image data on the
以下、動画撮影時のスタンバイ状態と動画記録処理を実行している状態の両方を満たす状態を動画撮影動作の状態とする。ここでの動画ファイルの形式AVI形式で説明しているがMOV形式、MPEG形式でもよい。また、音声データ形式においては圧縮された音声データ形式でもよい。 Hereinafter, a state satisfying both the standby state during moving image shooting and the state in which the moving image recording process is executed is referred to as a moving image shooting operation state. Although the video file format AVI format is described here, it may be a MOV format or an MPEG format. The audio data format may be a compressed audio data format.
次に本実施形態における静止画撮影動作について説明する。本実施形態では、CPU26が静止画撮影制御の機能を有しており、CPU26が図1の各処理部を制御することにより静止画撮影動作が実行される。
Next, the still image shooting operation in this embodiment will be described. In the present embodiment, the
静止画撮影の待機状態では、上述した動画のスタンバイ状態とほぼ同じ処理が施され、撮像素子10で撮像した画像のスルー画像が表示部22に表示されている。
In the stand-by state of still image shooting, almost the same processing as that of the above-described moving image standby state is performed, and a through image of an image captured by the
操作部23に設けられたレリーズスイッチ23aは、2段階形式のスイッチで構成され、半押し状態をスイッチSW1がON、全押しした状態ではスイッチSW2がONとなるようになっている。そのスイッチSW1がONで撮影準備状態になり、スイッチSW2がONで静止画撮影動作状態になる。
The
更に詳しく説明すると、スイッチSW1がONの撮影準備状態では、静止画撮影に必要な自動測距(AF)や自動測光(AE)が行われる。スイッチSW2がONされ準備状態から静止画撮影動作に切り替わると、先幕電子シャッターを閉じてから撮像素子10の読み出しを止めて、露光のモードに変更する。そして撮影準備段階で被写体の輝度から予め算出した露出設定に従って絞りを設定し、センサーの余分電荷の吐き捨て後に算出したシャッタースピードでシャッターを開閉する。
More specifically, in the shooting preparation state in which the switch SW1 is ON, automatic ranging (AF) and automatic photometry (AE) necessary for still image shooting are performed. When the switch SW2 is turned on to switch from the ready state to the still image shooting operation, the front-curtain electronic shutter is closed, the reading of the
シャッターが完全に閉じきってから撮像素子10を露光モードから読み出しモードに切り換えて、複数フィールドに分けて全画素のデータを読み出す。
After the shutter is completely closed, the
その読み出した信号をA/D変換器12でデジタル信号に変換し、バスを介してDRAM14へA/D変換器12からのRAWデータを転送する。撮像素子10からの読み出しが終了したら現像処理が開始される。
The read signal is converted into a digital signal by the A /
この現像処理では、まず、DRAM14に記憶されたRAWデータが読み出され信号処理部16に転送される。信号処理部16は、水平垂直のフィルタ処理やアパチャー補正処理やガンマ処理などを静止画撮影用のモードで処理し、処理後のYUVデータを画像コーデック部18へ転送する。画像コーデック部18は、YUVデータをJPEGデータに変換してDRAM14へ書き戻す。
In this development processing, first, RAW data stored in the
以上のDRAM14からのRAWデータの読み出しからJPEGデータのDRAM14へ書き戻しまでが現像処理になる。
The development process is from the reading of the RAW data from the
この後、生成された静止画画像データ(JPEGデータ)は、記録メディア21に静止画ファイルとして書き込まれる。また、現像処理の途中の信号処理部16からのYUVデータはリサイズ部24へも転送される。リサイズ部24は、転送されたYUVデータをレビュー画像表示のためにVGAサイズ程度にリサイズして、DRAM14へ書き戻す。そして、前述の現像処理が終了したら、撮影確認のレビュー画像表示のために、VGAサイズのYUVデータを表示部22に転送して、TVやカメラ上の液晶画面に表示することで、レビュー画像を表示している。
Thereafter, the generated still image data (JPEG data) is written in the
以上、本実施形態における動画撮影動作及び静止画撮影動作について説明したが、実施形態では動画記録中においても、静止画の撮影を行うことを許容する。すなわち、動画記録処理を継続させながら、静止画撮影動作による静止画撮影処理と静止画記録処理とを実行させることを可能とする。以下、この動画記録中における静止画撮影する場合のCPU26の処理を、図2のフローチャートに従って説明する。
As described above, the moving image shooting operation and the still image shooting operation in the present embodiment have been described, but in the embodiment, still image shooting is permitted even during moving image recording. That is, it is possible to execute the still image shooting process and the still image recording process by the still image shooting operation while continuing the moving image recording process. Hereinafter, the processing of the
図2のステップS200は、先述した動画撮影動作に従って動画が撮影及び記録されている状態を示す。すなわち、操作部23における動画記録ボタン23bを押下して、記録メディア21に動画であるAVIファイルを構築中のものである。
Step S200 in FIG. 2 shows a state in which a moving image is shot and recorded according to the moving image shooting operation described above. That is, an AVI file that is a moving image is being constructed on the
ステップS202では、この動画記録中に、前述のレリーズスイッチ23aの半押し検出用スイッチSW1がONであるか否か監視及び判断を行っている。スイッチSW1がOFFである場合には、通常の動画記録動作継続する。
In step S202, whether or not the half-pressing detection switch SW1 of the
レリーズスイッチが半押しされ、スイッチSW1がONになると、処理はステップS204へ移行し、動画記録に平行して静止画用の撮影準備のAF(測距)とAE(測光)が行われる。 When the release switch is pressed halfway and the switch SW1 is turned ON, the process proceeds to step S204, and AF (distance measurement) and AE (photometry) for still image shooting preparation are performed in parallel with moving image recording.
次いで、ステップS206にて、スイッチSW1を監視し、スイッチSW1がONの状態が保持されると、AFとAEの動作が続けられる。一方、スイッチSW1がOFFになった場合には、静止画の撮影準備を終了する。ただし、CPU26は、その場合でもステップS202に戻り、動画記録処理を継続する。
Next, in step S206, the switch SW1 is monitored, and when the switch SW1 is kept on, the AF and AE operations are continued. On the other hand, when the switch SW1 is turned OFF, the still image shooting preparation is completed. However, even in that case, the
次にスイッチSW1がONの状態であり撮影準備が完了すると、処理はステップS208に移行して、レリーズスイッチの全押しか否か、すなわち、スイッチSW2がONであるか否かの監視及び判断をする。 Next, when the switch SW1 is in an ON state and the preparation for photographing is completed, the process proceeds to step S208, and monitoring and determination are performed as to whether or not the release switch is fully pressed, that is, whether or not the switch SW2 is ON. To do.
スイッチSW2がOFFであり、スイッチSW1がON保持のままだと、AFとAEがロックされ続ける。また、スイッチSW2がONになったと判断した場合には、ステップS210へ移行し、静止画撮影動作を実行する。 If the switch SW2 is OFF and the switch SW1 remains ON, the AF and AE are kept locked. If it is determined that the switch SW2 is turned on, the process proceeds to step S210, and a still image shooting operation is executed.
ステップS210の静止画の撮影動作は前述の静止画撮影動作とほぼ同じである。異なる点は、動画記録中に静止画撮影を行うため、動画の記録を一時的に中断する事である。このときは撮像素子10の駆動モードが切り替わり、動画像による動画フレームを生成できない。本実施形態では、その欠落した動画フレームの代わりに代替フレームとスキップトマクロブロック画像を挿入する。その処理ついては、図3の静止画撮影動作を行った場合の動画ファイル生成フローを用いて詳しく説明する。上記、静止画撮影動作が完了すると、ステップS212にて、中断していた動画撮影動作の準備を行ない、ステップS214で動画撮影動作状態に戻る。
The still image shooting operation in step S210 is substantially the same as the above-described still image shooting operation. The difference is that since still image shooting is performed during moving image recording, recording of the moving image is temporarily interrupted. At this time, the driving mode of the
図3を用いて動画ファイル生成フローを説明する。この手順は、静止画撮影動作とほぼ並列に実行されるものである。ステップS301は、図2のステップS208でYesと判断されたことに応じて開始されることを示している。先ず、ステップS301で動画撮影を中断し、CPU26は本処理を開始する。
The moving image file generation flow will be described with reference to FIG. This procedure is executed almost in parallel with the still image shooting operation. Step S301 indicates that the process is started in response to a determination of Yes in step S208 of FIG. First, in step S301, moving image shooting is interrupted, and the
次いで、CPU26は、ステップS302に進み、静止画撮影するために動画像撮影動作を中断する期間に対応するものとして予め設定したブラックアウト画像の枚数N1のカウントを開始する(初期値i=1)。
Next, the
ステップS303で、CPU26は、動画フレームの第1の代替フレームとしてブラックアウト画像とスキップトマクロブロック画像を挿入するためにGOPの先頭フレームかどうかを判断する。
In step S303, the
代替フレームがGOPの先頭フレーム(ステップS303でYES)ならば、ステップS304で画像コーデック部18において符号化されたブラックアウト画像Iフレームを出力する。
If the substitute frame is the first frame of the GOP (YES in step S303), the blackout image I frame encoded by the
代替フレームがGOPの先頭フレームでなく(ステップS303でNO)、i=1ならば(ステップS305でYES)、画像コーデック部18で符号化されたブラックアウト画像Pフレームを出力する(ステップS306)。
If the substitute frame is not the first frame of the GOP (NO in step S303) and i = 1 (YES in step S305), the blackout image P frame encoded by the
代替フレームがGOPの先頭フレームでなく(ステップS303でNO)、i=1でないならば(ステップS305でNO)、スキップトマクロブロック画像(SMB画像)を出力する(ステップS307)。 If the substitute frame is not the first frame of the GOP (NO in step S303) and i is not 1 (NO in step S305), a skipped macroblock image (SMB image) is output (step S307).
なお、ここで、Iフレームとは、Intra−coded Frameとよび、キーフレームのことである。Pフレームとは、Predicted Frameのことであり、差分フレーム(Bフレームも含む)である。ブラックアウト画像とは、無画像の真黒なMPEGデータであり、黒画像がMPEG圧縮されているので非常に小さいデータサイズの画像データである。 Here, the I frame is called an intra-coded frame and is a key frame. The P frame is a Predicted Frame and is a difference frame (including a B frame). A blackout image is a non-image pure black MPEG data, and is an image data having a very small data size because the black image is MPEG-compressed.
また、スキップトマクロブロック画像とは、フレーム間圧縮された画像の一種であり、フレーム間の差分情報、一例として、動きベクトルがゼロの画像である。スキップトマクロブロック画像は、VGAサイズでも数十バイト程度の非常に小さいデータサイズの画像データである。このスキップトマクロブロック画像は、図1のROM27に格納されているスキップトマクロブロック画像27bであり、VGAサイズでMPEG符号化されているものである。
A skipped macroblock image is a type of image compressed between frames. For example, the difference information between frames, for example, an image having a motion vector of zero. The skipped macroblock image is image data having a very small data size of about several tens of bytes even in the VGA size. This skipped macroblock image is the skipped
このスキップトマクロブロック画像27bはROM27から読み出されて、第1の代替フレームとして動画ファイル(AVIデータ)上に挿入される。
The skipped
また、後に記載するストップモーション画像がPフレームの場合には、参照フレームとしてブラックアウト画像が必要であるため、画像コーデック部18でブラックアウト画像を生成する。図5は、動画像記録中に静止画撮影した場合の動画ファイルの構成を示す図である。
Further, when a stop motion image described later is a P frame, a blackout image is required as a reference frame, and therefore the
図5において、フレームNo.8のストップモーション画像Pフレームを生成するためにはフレームNo.7の情報が必要である。フレームNo.7はフレームNo.6の情報が必要である。フレームNo.6はフレームNo.5の情報が必要である。フレームNo.5はフレームNo.4の情報が必要である。 In FIG. In order to generate the stop motion image P frame of No. 8, frame No. 7 information is required. Frame No. 7 is a frame number. Six pieces of information are required. Frame No. 6 is a frame number. Five pieces of information are required. Frame No. 5 is a frame number. Four pieces of information are required.
したがって、フレームNo.8はフレームNo.4の情報が必要であるため、フレームNo.4を画像コーデック部18でブラックアウト画像Pフレームを生成しておく。または画像コーデック部18がストップモーション画像Pフレームを生成するためのフレームNo.4の情報を一時的に記憶しておく。
Therefore, frame No. 8 is a frame number. 4 information is necessary, so 4, the
このようにフレームNo.5〜フレームNo.7はスキップトマクロブロック画像のため、フレームNo.7の代わりにフレームNo.4の情報を使用してフレームNo.8を生成する。 Thus, frame No. 5-Frame No. 7 is a skipped macroblock image. Frame No. 7 4 using the information of frame No. 8 is generated.
ストップモーション画像がIフレームの場合には、参照フレームとしてブラックアウト画像が必要ないため、画像コーデック部18でブラックアウト画像を生成しない。この場合、MPEG圧縮されたブラックアウト画像27aがROM27から読み出され、第1の代替フレームとして動画ファイル(AVIデータ)上に挿入される。ここでROM27からMPEG圧縮されたブラックアウト画像27aを読み出すとしたが、CPUでブラックアウト画像27aを生成してもよい。
When the stop motion image is an I frame, a blackout image is not necessary as a reference frame, and therefore the
その第1の代替フレームの長さ(期間)は、カメラグリーンモード(AUTOモード)の最長露光時間と等しく、約1/8秒(125mSec)程度である。動画像が30フレーム/秒の撮像される場合、1/8秒間でのフレーム数は“4”である。したがって、ROM27のブラックアウト画像(または画像コーデック部18で生成されるブラックアウト画像)を1回、スキップトマクロブロック画像を3回、AVIファイルに挿入することになる。なお、ブラックアウト画像の代わりに、「静止画撮影」等のメッセージを有する画像としても構わない。 The length (period) of the first alternative frame is equal to the longest exposure time in the camera green mode (AUTO mode), and is about 1/8 second (125 mSec). When a moving image is captured at 30 frames / second, the number of frames in 1/8 second is “4”. Therefore, the blackout image in the ROM 27 (or the blackout image generated by the image codec unit 18) is inserted into the AVI file once and the skipped macroblock image is inserted three times. Instead of the blackout image, an image having a message such as “still image shooting” may be used.
ステップS308でブラックアウト画像N1枚に達していない場合(ステップS308でNO)、ステップS309でiをインクリメントし、ステップS303に戻る。ステップS308でブラックアウト画像の枚数がN1枚に達したら(SステップS308でYES)、ステップS310に進む。 If N1 blackout images have not been reached in step S308 (NO in step S308), i is incremented in step S309, and the process returns to step S303. If the number of blackout images reaches N1 in step S308 (YES in step S308), the process proceeds to step S310.
次にステップS310では、ROM27上に置かれた擬似シャッター音データ27cを読み出して、動画ファイル(AVIデータ)の音声データに挿入する。これと共に、その擬似シャッター音データ27cを音声処理部28に出力し、スピーカー32より再生させる。その擬似シャッター音データの時間長は、先のブラックアウト画像データの時間長とほぼ同じ時間にする。
Next, in step S310, the pseudo shutter
このとき、マイク30から録音される音声データから擬似データを急に置き換えると、データの急な切り替わりで高周波成分が発生し、エイリアシングによりノイズ音データが発生する。そこで擬似データに置き換える期間(擬似シャッター音をスピーカー32で再生する期間でもある)は、音声処理部28にてその期間をまず無音検出状態、すなわちミュート(無音)する。そのミュートされた音声データの上に擬似シャッター音を挿入するようにした。これにより、エイリアシングによる高周波ノイズを発生させずに高品位の擬似シャッター音を音声データに挿入することができる。
At this time, if the pseudo data is suddenly replaced with the sound data recorded from the
次にステップS311にて、先述した静止画撮影動作における静止画の現像処理の完了を待つ。現像が完了したらステップS312に進む。 In step S311, the process waits for the completion of the still image developing process in the above-described still image shooting operation. When the development is completed, the process proceeds to step S312.
この後CPU26は、図2のステップS210内の処理として、現像済みの静止画を画像コーデック部18でJPEG符号化し、符号化されたデータから1つの静止画ファイルを生成する。生成した静止画ファイルは動画像ファイルとは別に記録メディア21に格納される。
After that, the
この処理と平行し、またはこの後、CPU26は、このステップS312において、上記現像済みの静止画から、VGAサイズのレビュー画像をリサイズ部24で生成し、ストップモーション画像の枚数N2のカウントを開始する(カウント初期値j=1)。
In parallel with this processing, or thereafter, in this step S312, the
次にGOPの先頭フレームか判断し、先頭ならば(ステップS313でYES)、レビュー画像データを画像コーデック部18でストップモーション画像Iフレームとして符号化し、出力する(ステップS314)。
Next, it is determined whether it is the first frame of the GOP. If it is the first frame (YES in step S313), the review image data is encoded as a stop motion image I frame by the
GOPの先頭フレームでなく(ステップS313でNO)、かつj=1ならば(ステップS315でYES)、レビュー画像データを画像コーデック部18でストップモーション画像Pフレームとして符号化し、出力する(ステップS316)。 If it is not the first frame of the GOP (NO in step S313) and j = 1 (YES in step S315), the review image data is encoded and output as a stop motion image P frame by the image codec unit 18 (step S316). .
GOPの先頭フレームでなく(ステップS313でNO)、かつj=1でないならば(ステップS315でNO)、スキップトマクロブロック画像(SMB画像)を出力する(ステップS317)。 If it is not the first frame of the GOP (NO in step S313) and j is not 1 (NO in step S315), a skipped macroblock image (SMB image) is output (step S317).
次にjがN2に達していないならば(ステップS318でNO)、ステップS319でjをインクリメントし、ステップS313に戻る。jがN2に達したら(SステップS318でYES)、ステップS212へ進む(ステップS320)。 If j has not reached N2 (NO in step S318), j is incremented in step S319, and the process returns to step S313. When j reaches N2 (YES in S step S318), the process proceeds to step S212 (step S320).
この符号化されたVGAサイズの画像(ストップモーション画像)が第2の代替フレームデータである。そして、先の第1の代替フレームであるブラックアウト画像に続けて、第2の代替フレームを、現像処理期間の動画記録が中断された動画フレーム数分をスキップトマクロブロック画像またはストップモーション画像で補う。つまり、第2の代替フレームを、適当な回数だけ繰り返しAVIファイルに挿入する。 The encoded VGA size image (stop motion image) is the second alternative frame data. Then, following the blackout image that is the first alternative frame, the second alternative frame is the skipped macroblock image or stop motion image for the number of video frames for which video recording was interrupted during the development processing period. compensate. That is, the second substitute frame is repeatedly inserted into the AVI file an appropriate number of times.
第2の代替フレーム期間中の音声データは、マイク30からの音を音声処理部28でWAVEデータにしてAVIファイルに挿入する。つまり、このAVIファイルを再生すると、静止画撮影で中断される期間の内、第1の代替フレームのブラックアウト期間は擬似シャッター音と録音した音声が合成された音声が記録される。そして、第2の代替フレームのストップモーション画像期間は、実際に静止画撮影された画像に相当するフレームが再生されると共に、その間に音声録音された音が再生されることになる。
The audio data during the second alternative frame period is inserted into the AVI file by converting the sound from the
次に、ステップS320にて図2のステップS212に戻り、動画撮影動作の再開の準備を行う。これは撮像素子10の読み出しを動画用に切り換え、同時に信号処理部16やリサイズ部24や画像コーデック処理部18などの設定を動画用に切り換え、データのパスも切り換える動作になる。ステップS214で、最初の動画撮影動作状態に戻り、動画記録のための撮影が連続して行われる。
Next, in step S320, the process returns to step S212 in FIG. This is an operation of switching the reading of the
図4は、動画記録中の静止画撮影のシーケンスを示している。同図において(a)は、撮影時のカメラの動作状態が移り変わる様子(シーケンス)を示す。同図の(b)は、撮影時のスルー画像を表示部22へ表示する画像の移り変わる様子(シーケンス)を示している。また、同図の(c)は、生成された動画ファイル(AVI形式)の記録状態を、実際の撮影及び記録時のシーケンスに対応づけて示している。言い換えるとすなわち動画ファイル(AVI形式)を再生した時の液晶やTVモニターの画像表示の移り変わる様子(シーケンス)を示していることになる。更に同図(d)は、作成したAVIファイルをメディアへ書きこむタイミングを仮定して示している。 FIG. 4 shows a still image shooting sequence during moving image recording. FIG. 4A shows a state (sequence) in which the operating state of the camera changes during shooting. (B) of the figure shows a state (sequence) in which an image for displaying a through image at the time of photographing is changed on the display unit 22. Further, (c) in the figure shows the recording state of the generated moving image file (AVI format) in association with the actual shooting and recording sequence. In other words, it shows a state (sequence) in which the image display on the liquid crystal or TV monitor changes when a moving image file (AVI format) is reproduced. Further, FIG. 6D shows the timing when the created AVI file is written to the medium.
後述するが、動画撮影動作及び静止画撮影動作のうち、メディアへの記録処理に関しては、同図(a)のタイミングと一致していない。図4において、図の左端からレリーズスイッチが有するスイッチSW1がONになるまでの期間は、動画撮影動作状態を示している。 As will be described later, the recording process to the medium in the moving image shooting operation and the still image shooting operation does not coincide with the timing of FIG. In FIG. 4, the period from the left end of the figure until the switch SW1 of the release switch is turned on indicates the moving image shooting operation state.
同図(a)の期間S400では、動画撮影動作の状態を示している。この期間では、同図(b)の期間S418で動画像のスルー画像を表示部22へ表示し、同図(c)での期間S428で動画像と音声データを動画ファイルとして記録する。 In a period S400 in FIG. 6A, the state of the moving image shooting operation is shown. In this period, the through image of the moving image is displayed on the display unit 22 in the period S418 in FIG. 4B, and the moving image and the audio data are recorded as a moving image file in the period S428 in FIG.
次のスイッチSW1がONになり、スイッチSW2がONになるまでの同図(a)の期間S402では、動画撮影及び記録も行ないながら静止画用の撮影準備のAEとAFを行う状態を示している。 In the period S402 in FIG. 9A until the next switch SW1 is turned on and the switch SW2 is turned on, a state in which AE and AF for still image shooting preparation are performed while moving image shooting and recording are shown. Yes.
同図(b)での期間S420では、その静止画用の撮影準備のAEとAFを行う様子を表示部22へ表示し、同図(c)での期間S430でその静止画用の撮影準備のAEとAFを行う様子を動画ファイルに記録している。 In a period S420 in FIG. 6B, the state of performing AE and AF for shooting preparation for the still image is displayed on the display unit 22, and in the period S430 in FIG. 4C, the shooting preparation for the still image is performed. AE and AF are recorded in a moving image file.
スイッチSW2がONになるまで期間は、同図の(a)と(b)と(c)のタイミングが揃っているが、スイッチSW2がONになった以降は揃っていない。以下に、そのシーケンスについて説明する。 In the period until the switch SW2 is turned on, the timings (a), (b), and (c) in the figure are aligned, but not after the switch SW2 is turned on. The sequence will be described below.
同図(a)の期間S404は、スイッチSW2がONになった直後の撮像素子10のモード切り替え状態を示し、動画用の読み出しモードから静止画の露光のモードに切り替えをしている。次の期間S406は、静止画状態の露光期間を示しており、例えば本実施形態1における露光時間は1/2000秒から1/8秒までを可変に被写体像の露出を制御する。
A period S404 in FIG. 6A shows the mode switching state of the
次の期間S408は、撮像素子10から静止画像用の全画素を複数フィールドで読み出す読み出し期間を示しており、例えば300mSec程度の時間を要する。
The next period S408 indicates a readout period in which all pixels for still images are read out from the
次の期間S410は静止画像の現像処理の期間を示し、現像処理の内容は先述のDRAM14におけるRAWデータの読み出しから処理後のJPEGデータをDRAM14へ書き戻す処理になる。
The next period S410 indicates the period of the still image development process, and the contents of the development process are the process of writing back the processed JPEG data to the
次の期間S412はレビュー画像を生成する期間を示し、先述した内容の信号処理部16からのYUVデータをリサイズ部24でVGAサイズにリサイズし、レビュー画像としてDRAM14に書き戻す処理になる。
The next period S412 indicates a period for generating a review image. The YUV data from the
この期間S404からS412までの期間では、同図(b)に示すように、ブラックアウト画像(無画像)を表示部22に表示する。 In the period from S404 to S412, as shown in FIG. 5B, a blackout image (no image) is displayed on the display unit 22.
これは静止画の撮影処理中は、カメラが静止画像の取り込みと現状処理を行っていることを明確にユーザーに伝えるためであり、EVFのスルー画像表示と異なる無表示画像を表示しており、通常の静止画撮影動作と同様の表示になる。 This is to clearly notify the user that the camera is capturing still images and processing the current state during still image shooting processing, and displaying a non-displayed image different from the EVF through image display, The display is the same as the normal still image shooting operation.
期間S414は、期間S412で生成したレビュー画像から、動画ファイルにはめ込む第2の代替フレームデータの作成をする期間を示している。この期間では、VGAサイズのYUVデータを画像コーデック部18でMPEGデータに圧縮処理する。更に欠落して不足する動画フレーム枚数分をスキップトマクロブロック画像とし、そのときの音声データと合わせて動画ファイルを生成している。
A period S414 indicates a period in which the second alternative frame data to be inserted into the moving image file is created from the review image generated in the period S412. During this period, the VGA size YUV data is compressed into MPEG data by the
同図(b)の期間S424は、上記の期間S414の期間に前記レビュー画像を表示部22へ表示する期間を示している。 A period S424 in FIG. 4B indicates a period during which the review image is displayed on the display unit 22 during the period S414.
同図(c)の期間S432は、動画ファイル上で静止画撮影する際の期間S404の撮像素子10のモード切り替え期間と期間S406の露光期間を合わせた期間を、無表示画像のブラックアウト画像とスキップトマクロブロック画像で補った期間を示している。
A period S432 in FIG. 6C is a period obtained by combining the mode switching period of the
露光時間は被写体の輝度レベルにより可変であるが、このブラックアウトしている期間S432の期間は、実施形態1では露光時間の最長時間(50+80=130mSec)にした。更に、この期間S432に合わせて擬似シャッター音もはめ込んでいる。 Although the exposure time is variable depending on the luminance level of the subject, the blackout period S432 is set to the longest exposure time (50 + 80 = 130 mSec) in the first embodiment. Furthermore, a pseudo shutter sound is also fitted in accordance with this period S432.
次に同図(c)の期間S434は、先述の期間S414で生成した静止画のレビュー画像から代替フレームデータとスキップトマクロブロック画像を用いて欠落した動画フレームにはめ込む期間を示しており、動画ファイル上のストップモーションと称している。この期間は、ブラックアウトの代替フレーム期間の直後から動画に戻るまでの期間になる。 Next, a period S434 in FIG. 6C shows a period during which the review frame image inserted in the above-described period S414 is inserted into the missing video frame using the substitute frame data and the skipped macroblock image. This is called stop motion on the file. This period is a period from immediately after the blackout alternative frame period to when the video is returned to.
また、静止画撮影終了後では、次の通りである。先ず、同図(a)の期間S416では再度動画撮影動作に戻る状態を示している。同図(b)の期間S426は再度動画像のスルー画を表示部22への表示を示し、同図(c)の期間S436は動画ファイル上も動画像が記録されている状態であることを示している。 In addition, after the still image shooting is completed, it is as follows. First, in a period S416 in FIG. 6A, the state is shown in which the operation returns to the moving image shooting operation again. A period S426 in FIG. 5B shows the display of the moving image through image on the display unit 22 again, and a period S436 in FIG. 4C indicates that the moving image is recorded on the moving image file. Show.
通常、静止画像を撮影する時の実際のシャッター動作は「閉じ→開き」の動作になる。その静止画撮影動作を動画ファイル上でイメージさせるには、「動画→シャッター閉じ→静止画像のストップモーション画像表示→シャッター閉じ→シャッター開き→動画」の動作になる。 Normally, the actual shutter operation when shooting a still image is a “closed to open” operation. In order to image the still image shooting operation on a moving image file, the operation is “moving image → shutter closing → stop motion image display of still image → shutter closing → shutter opening → moving image”.
しかし、動画撮影動作中では、ユーザーがストップモーションによる静止画像を認識したら、すぐに動画に戻す方が動画記録に適している。したがって、先のストップモーション画像表示後のシャッターの動作を省き、「動画→シャッター閉じ→静止画像のストップモーション画像表示→動画」のシーケンスが最適である。 However, during the moving image shooting operation, when the user recognizes a still image by stop motion, it is more suitable for moving image recording to immediately return to the moving image. Therefore, the sequence of “moving image → shutter closing → still image stop motion image displaying → moving image” is optimal without the shutter operation after the previous stop motion image displaying.
このシャッター閉じは、先述したようにブラックアウト画像を代替フレームとスキップトマクロブロック画像としてはめ込んでいるが、ストップモーション画像についての表示期間は所定の固定期間での表示が望ましい。 As described above, the shutter closes the blackout image as a substitute frame and a skipped macroblock image as described above, but the display period of the stop motion image is preferably displayed in a predetermined fixed period.
更にストップモーションの表示期間は、撮影した画像の確認を行う事になるが、長すぎると動画撮影動作を阻害することになる。したがって、この表示期間は第2の所定時間以内がよく、その第2の所定時間は静止画処理の期間で動画を再開するまでの期間を当てはめるのが、カメラ動作的にも望ましい。 Furthermore, while the stop motion display period is to check the captured image, if it is too long, the moving image capturing operation will be hindered. Therefore, this display period is preferably within the second predetermined time, and it is desirable from the viewpoint of camera operation that the second predetermined time is a period until the moving image is restarted during the still image processing period.
すなわち、動画撮影動作に戻るまでの中断する期間の内で、ブラックアウト画像の代替フレーム以外を静止画のストップモーション画像で代替することになる。 That is, within the period of interruption until returning to the moving image shooting operation, a frame other than the blackout image substitute frame is substituted with the still motion stop motion image.
本実施形態では、上記の結果、動画記録中に静止画撮影した場合における、その静止画を約600mSec程度の期間、ストップモーション画像として表示した。 In the present embodiment, as a result of the above, when a still image was shot during moving image recording, the still image was displayed as a stop motion image for a period of about 600 mSec.
次に、図4(d)を用いてのメディアへの記録について説明する。本実施形態では動画のAVIファイルは、音声データと映像データを1秒毎に配置した形式のデータ構造になっている。CPU26は、前述のAVIバッファー領域のAVIデータをファイルにしてメディアへ書き出すことでAVIファイルをメディア上に生成する。
Next, recording on a medium using FIG. 4D will be described. In the present embodiment, the moving image AVI file has a data structure in which audio data and video data are arranged every second. The
図4(d)の期間S440はその動画撮影により生成したAVIデータをメディアに書き出す期間を示す。同図(d)の期間S442はスイッチSW1がONになったタイミング後の動画記録期間を示し、S440と同様にこの期間でも動画のAVIファイルの記録はそのまま続ける。この期間は、スイッチSW2がONになったタイミング、すなわち、センサーからの動画読み出しが中断され動画のAVIデータ生成も中断されるタイミングでは終了しない。 A period S440 in FIG. 4D indicates a period in which the AVI data generated by the moving image shooting is written on the medium. A period S442 in FIG. 6D shows a moving image recording period after the timing when the switch SW1 is turned on, and the recording of the moving image AVI file continues as it is in this period as in S440. This period does not end at the timing when the switch SW2 is turned on, that is, the timing at which the reading of the moving image from the sensor is interrupted and the generation of the AVI data of the moving image is also interrupted.
このタイミング時にはDRAM14上のAVIバッファー領域にはまだAVIデータは残っているため、そのAVIバッファーに残ったデータ分は、メディアへ書き出し続けるためである。
This is because the AVI data still remains in the AVI buffer area on the
AVIバッファー領域のデータがすべてメディアへ書き出された時が、同図(d)の期間S442から期間S444へ移り変わるタイミングである。同図(d)の期間S444では、前述した期間S432のブラックアウト期間に相当するブラックアウト画像データとスキップトマクロブロック画像データをメディアへ書き出すタイミングを示している。 The time when all the data in the AVI buffer area is written to the medium is the timing at which the transition from the period S442 to the period S444 in FIG. A period S444 in FIG. 4D shows the timing for writing blackout image data and skipped macroblock image data corresponding to the blackout period of the above-described period S432 to the medium.
ブラックアウト表示用のAVIデータは、スイッチSW2がONになったタイミングから即時に生成されるため、AVIバッファー領域に残ったAVIデータを書き出した直後に書き出すことができる。 Since the AVI data for blackout display is generated immediately from the timing when the switch SW2 is turned ON, it can be written immediately after the AVI data remaining in the AVI buffer area is written.
更に、メディアの書きこみスピードが十二分に速く、AVIファイル生成をするとほぼ同時にメディアへの書き出しを行える場合には、AVIバッファーにデータが溜まらない。したがって、先に記載した期間S444におけるブラックアウト画像データとスキップトマクロブロック画像データが挿入されたAVIデータの書き込みをスイッチSW2がONになった直後から行うことができる。 Further, when the writing speed of the medium is sufficiently fast and the writing to the medium can be performed almost simultaneously with the generation of the AVI file, no data is accumulated in the AVI buffer. Accordingly, the AVI data in which the blackout image data and the skipped macroblock image data are inserted in the period S444 described above can be written immediately after the switch SW2 is turned on.
このブラックアウト画像データとスキップトマクロブロック画像データが挿入されたAVIのデータ容量も小さいので比較的短時間で書きこむことになる。メディアへの書き込みスピードは使用するメディアによって個々に異なる。書き込みスピードが速い場合には、期間S444でブラックアウト画像データとスキップトマクロブロック画像データのAVIデータの書き込み後から、次の期間S446への間にメディアへ書き込むデータがない。この期間は、書き込みが発生しない時間となる。 Since the data capacity of the AVI in which the blackout image data and the skipped macroblock image data are inserted is small, writing can be performed in a relatively short time. The writing speed to the media varies depending on the media used. When the writing speed is fast, there is no data to be written to the medium during the next period S446 after the writing of the AVI data of the blackout image data and the skipped macroblock image data in the period S444. This period is a time during which writing does not occur.
次の期間S446は、静止画撮影したJPEGデータファイル(記録モードに応じた現像処理の結果得られた全画素で構成される静止画ファイル)をメディアへ書き出すタイミングを示す。静止画JPEGデータは、先述の期間S410のタイミングで生成しているので、メディアへの書き出しはそのタイミング以降になる。その期間S446における静止画JPEGデータの書き出し直後に期間S448で、静止画撮影後のレビュー画像から作成したAVIデータをメディアへ書き出すタイミングを示す。 The next period S446 indicates the timing for writing a JPEG data file (still image file composed of all the pixels obtained as a result of the development processing corresponding to the recording mode) obtained by shooting a still image to the medium. Since the still image JPEG data is generated at the timing of the above-described period S410, the writing to the medium is performed after that timing. Immediately after the writing of the still image JPEG data in the period S446, the timing at which the AVI data created from the review image after shooting the still image is written to the medium in the period S448 is shown.
この期間S448のレビュー画像AVIは、先に記載した期間S434の第2の代替フレーム期間分を記録している。そして期間S448のレビュー画像のAVIデータを書き込み終えとき、先の期間S416で生成している動画のAVIデータがAVIバッファー上に溜めて込まれている。したがって、その動画のAVIデータを期間S450のタイミングでメディアへ書き出す。 The review image AVI in this period S448 records the second alternative frame period in the period S434 described above. When the AVI data of the review image in the period S448 is written, the AVI data of the moving image generated in the previous period S416 is accumulated in the AVI buffer. Therefore, the AVI data of the moving image is written to the medium at the timing of period S450.
以上が動画記録中に静止画撮影を行った場合のメディアへのデータ書き込みのシーケンスになる。このように記録したAVIデータは、前述したように再生すると、動画記録中に静止画撮影した状況をユーザーに分りやすく表示する事ができる。 The above is the sequence of data writing to the media when still image shooting is performed during moving image recording. When the recorded AVI data is reproduced as described above, it is possible to easily display a situation where a still image is captured during moving image recording to the user.
なお、レリーズスイッチが半押し、すなわち、スイッチSW1がONで、スイッチSW2がOFFの状態のとき、撮像中の動画中の隅にレリーズスイッチのボタンのマークを合成しても良い。この場合、動画再生中に、静止画撮影によりブラックアウト画像が表示する直前で、静止画撮影しようとしていることを、ユーザーに知らせることが可能になる。 When the release switch is half-pressed, that is, when the switch SW1 is ON and the switch SW2 is OFF, the mark of the button of the release switch may be combined with the corner in the moving image being imaged. In this case, it becomes possible to notify the user that the user is about to shoot a still image immediately before the blackout image is displayed by still image shooting during moving image playback.
次に、図5を用いて動画像記録中に静止画撮影した場合の動画ファイルの構成について説明する。先に説明したように、1秒分の音声データがあり、そのあとに動画フレームが続く。 Next, the structure of a moving image file when a still image is shot during moving image recording will be described with reference to FIG. As described above, there is audio data for one second, followed by a moving image frame.
本実施形態では15フレーム単位にGOPの先頭Iフレームを生成する。動画撮影中に操作部23aのSW2がONになったとき、動画撮影が中断される。そして、画像コーデック部18からブラックアウト画像Pフレームが出力され、AVIに1枚挿入され、続いて3枚スキップトマクロブロック画像(SMB画像)がAVIに3枚挿入される(ブラックアウト期間)。
In this embodiment, the first I frame of the GOP is generated in units of 15 frames. When the SW2 of the
次に、画像コーデック部18で静止画撮影の現像処理が終了したら、レビュー画像からストップモーション画像Pフレームを画像コーデック部18が生成し、AVIに挿入する。
Next, when the
それ続いてストップモーション期間中はSMB画像を挿入する。ストップモーション期間中のGOPの先頭フレームはレビュー画像からストップモーション画像Iフレームを画像コーデック部18生成し、AVIに挿入する。 Subsequently, an SMB image is inserted during the stop motion period. For the first frame of the GOP during the stop motion period, a stop motion image I frame is generated from the review image and is inserted into the AVI.
ストップモーション期間が終了し動画撮影再開されたら、通常の動画撮影動作に戻り、順次、動画フレームと音声データをAVIファイルに記録していく。 When the stop motion period ends and the moving image shooting is resumed, the normal moving image shooting operation is resumed, and the moving image frame and the audio data are sequentially recorded in the AVI file.
以上説明したように、本実施形態によれば、動画撮影中に静止画撮影することによって生じる動画ファイルの助長なフレームをスキップトマクロブロック画像とする。このファイル構成によって動画ファイルのファイルサイズを小さくすることができる。また、記憶媒体への書き込み負荷も小さくすることができる。 As described above, according to the present embodiment, an assisting frame of a moving image file generated by capturing a still image during moving image shooting is set as a skipped macroblock image. With this file structure, the file size of the moving image file can be reduced. In addition, the writing load on the storage medium can be reduced.
<第2の実施形態>
本実施形態のデジタルカメラは、第1の実施形態と同様に図1に示すものであり、動画像記録中に静止画撮影した場合の処理手順も、図2のフローチャートと同様なものである。
<Second Embodiment>
The digital camera of this embodiment is the same as that of the first embodiment shown in FIG. 1, and the processing procedure when a still image is shot during moving image recording is also the same as the flowchart of FIG.
図6は図2におけるステップS210の静止画撮影動作を行った場合の動画ファイル生成処理手順を示すフローチャートである。 FIG. 6 is a flowchart showing a moving image file generation processing procedure when the still image shooting operation of step S210 in FIG. 2 is performed.
ステップS601で動画撮影の中断を行ない、ステップS602でストップモーション画像の枚数N2のカウントを開始する(カウント初期値j=1)。 In step S601, the moving image shooting is interrupted, and in step S602, counting of the number N2 of stop motion images is started (count initial value j = 1).
次にGOPの先頭フレームか判断し、先頭ならば(ステップS603でYES)、静止画撮影動画開始する直前のフレーム画像データを画像コーデック部18でVGAサイズのストップモーション画像Iフレームとして符号化し、出力する(ステップS604)。
Next, it is determined whether the frame is the first frame of the GOP. If it is the first frame (YES in step S603), the frame image data immediately before starting the still image shooting moving image is encoded by the
GOPの先頭フレームでない場合(ステップS603でNO)、ROM27からVGAサイズのスキップトマクロブロック画像27b(SMB画像)を出力する(ステップS605)。
If it is not the first frame of the GOP (NO in step S603), the VGA size skipped
次にjがN2に達していないならば(ステップS606でNO)、ステップS607でjをインクリメントし、ステップS603に戻る。jがN2に達したら(ステップS606でYES)、ステップS212へ進む(ステップS608)。 If j has not reached N2 (NO in step S606), j is incremented in step S607, and the process returns to step S603. If j reaches N2 (YES in step S606), the process proceeds to step S212 (step S608).
この符号化されたVGAサイズの画像(ストップモーション画像Iフレーム)が代替フレームデータである。この代替フレームはレビュー画像や動画撮影を中断する直前の画像から生成してもよいし、任意の画像としてもよい。 The encoded VGA size image (stop motion image I frame) is the substitute frame data. This alternative frame may be generated from a review image or an image immediately before the moving image shooting is interrupted, or may be an arbitrary image.
図7は、本実施形態における動画像記録中の静止画撮影した場合の動画ファイルの構成図である。まず音声データ1秒分のデータがあり、動画フレームが続いている。 FIG. 7 is a configuration diagram of a moving image file when a still image is captured during moving image recording in the present embodiment. First, there is data for one second of audio data, and a moving image frame continues.
フレームNo.4でSW2がONによる動画撮影の中断があり、直前のフレーム(フレームNo.3)をスキップするスキップトマクロブロック画像がストップモーション期間続く。 Frame No. 4, the video shooting is interrupted due to the SW2 being turned on, and a skipped macroblock image skipping the immediately preceding frame (frame No. 3) continues for the stop motion period.
ストップモーション期間中に存在するGOPの先頭フレーム(ここではGOPを15フレーム単位とする)はフレームNo.16である。このフレームのために、動画撮影を中断する直前のフレーム(フレームNo.3)を画像コーデック部18からIフレームを生成する。
The first frame of the GOP existing during the stop motion period (here, the GOP is assumed to be 15 frames) is the frame number. 16. For this frame, an I frame is generated from the
ストップモーション期間が終了したら、フレームNo.20から通常の動画撮影を再開し、動画フレームを画像コーデック部18で生成する。ストップモーション期間中は音声データを記録しておいてもよいし、擬似シャッター音を挿入してもよい。
When the stop motion period ends, the frame No. The normal moving image shooting is resumed from 20, and the moving image frame is generated by the
以上説明したように、本実施形態によれば、動画撮影中に静止画撮影することによって生じる動画ファイルの助長なフレームをスキップトマクロブロック画像とした。これによって動画ファイルのファイルサイズを小さくすることができる。また、記憶媒体への書き込み負荷も小さくすることができる。また、ストップモーション期間中にGOPごとにIフレームを挿入するので、編集単位を固定化して、簡易編集が可能となる。また、実施形態ではIフレーム、Pフレームと記載したが、インターレース画像に対してもこの実施形態は適用できる。また、本実施形態では、動画像データの形式としてMPEG方式を用いたが、フレーム間圧縮を行うものであれば、H264等の他の形式でも同様に適用可能である。 As described above, according to the present embodiment, an encouraging frame of a moving image file generated by capturing a still image during moving image shooting is a skipped macroblock image. This can reduce the file size of the moving image file. In addition, the writing load on the storage medium can be reduced. In addition, since an I frame is inserted for each GOP during the stop motion period, the editing unit is fixed and simple editing is possible. Moreover, although described as I frame and P frame in the embodiment, this embodiment can be applied to an interlaced image. In this embodiment, the MPEG system is used as the format of the moving image data. However, other formats such as H264 can be similarly applied as long as they perform inter-frame compression.
<第3の実施形態>
本実施形態のデジタルカメラは、第1の実施形態と同様に図1に示すものであり、動画像記録中に静止画撮影した場合の処理手順は、図2のフローチャートと同様なものである。
<Third Embodiment>
The digital camera of this embodiment is the same as that of the first embodiment shown in FIG. 1, and the processing procedure when a still image is shot during moving image recording is the same as the flowchart of FIG.
図8は図2におけるステップS210の静止画撮影動作を行った場合の動画ファイル生成処理手順を示すフローチャートである。 FIG. 8 is a flowchart showing a moving image file generation processing procedure when the still image shooting operation of step S210 in FIG. 2 is performed.
図8を用いて動画ファイル生成フローを説明する。この手順は、静止画撮影動作とほぼ並列に実行されるものである。ステップS801は、図2のステップS208でYesと判断されたことに応じて開始されることを示している。先ず、ステップS801で動画撮影を中断し、CPU26は本処理を開始する。
The moving image file generation flow will be described with reference to FIG. This procedure is executed almost in parallel with the still image shooting operation. Step S801 indicates that the process is started in response to a determination of Yes in step S208 of FIG. First, in step S801, moving image shooting is interrupted, and the
次いで、CPU26は、ステップS802に進み、静止画撮影するために動画像撮影動作を中断する期間に対応するものとして予め設定したブラックアウト画像の枚数N1のカウントを開始する(初期値i=1)。
Next, the
ステップS803で、CPU26は、動画フレームの第1の代替フレームとしてブラックアウト画像とスキップトマクロブロック画像を挿入するためにGOPの先頭フレームかどうかを判断する。
In step S803, the
代替フレームがGOPの先頭フレーム(ステップS803でYES)ならば、ステップS804で画像コーデック部18において符号化されたブラックアウト画像Iフレームを出力する。
If the substitute frame is the first frame of the GOP (YES in step S803), the blackout image I frame encoded by the
代替フレームがGOPの先頭フレームでなく(ステップS803でNO)、i=1ならば(ステップS805でYES)、画像コーデック部18で符号化されたブラックアウト画像Pフレームを出力する(ステップS806)。
If the substitute frame is not the first frame of the GOP (NO in step S803) and i = 1 (YES in step S805), the blackout image P frame encoded by the
代替フレームがGOPの先頭フレームでなく(ステップS803でNO)、i=1でないならば(ステップS805でNO)、スキップトマクロブロック画像(SMB画像)を出力する(ステップS307)。 If the substitute frame is not the first frame of the GOP (NO in step S803) and i is not 1 (NO in step S805), a skipped macroblock image (SMB image) is output (step S307).
ブラックアウト画像Iフレームまたはブラックアウト画像PフレームはあらかじめCPU26で作成してもよい。
The blackout image I frame or the blackout image P frame may be created by the
このスキップトマクロブロック画像27bはROM27から読み出されて、第1の代替フレームとして動画ファイル(AVIデータ)上に挿入される。
The skipped
また、後に記載するストップモーション画像がIフレームの場合には、参照フレームとしてブラックアウト画像が必要でないため、画像コーデック部18でブラックアウト画像を生成する必要はない。図9は、動画像記録中に静止画撮影した場合の動画ファイルの構成を示す図である。
When the stop motion image described later is an I frame, it is not necessary to generate a blackout image by the
図9において、動画再開時に必要なフレームNo.26の動画像Pフレームを生成するためにはフレームNo.16の情報が必要である。 In FIG. 9, the frame No. required when the moving image is resumed. In order to generate the 26 moving image P frames, the frame No. Sixteen pieces of information are required.
フレームNo.17〜フレームNo.25はスキップトマクロブロック画像で補う。 Frame No. 17 to frame No. 25 is supplemented with a skipped macroblock image.
ストップモーション画像がIフレームの場合(フレームNo.16の場合)には、参照フレームとしてブラックアウト画像が必要ないため、画像コーデック部18でブラックアウト画像を生成しない。
When the stop motion image is an I frame (in the case of frame No. 16), a blackout image is not required as the reference frame, and therefore the
この場合、MPEG圧縮されたブラックアウト画像27aがROM27から読み出され、第1の代替フレームとして動画ファイル(AVIデータ)上に挿入される。ここでROM27からMPEG圧縮されたブラックアウト画像27aを読み出すとしたが、CPUでブラックアウト画像27aを生成してもよい。
In this case, the MPEG-compressed
ステップS808でブラックアウト画像N1枚に達していない場合でかつGOPの最後のフレームでない場合、(ステップS808でNO)、ステップS809でiをインクリメントし、ステップS803に戻る。 If N1 blackout images have not been reached in step S808 and if it is not the last frame of the GOP (NO in step S808), i is incremented in step S809, and the process returns to step S803.
ステップS808でブラックアウト画像の枚数がN1枚以上でなおかつGOPの最後のフレームの場合(SステップS808でYES)、ステップS810に進む。 If the number of blackout images is N1 or more in step S808 and the last frame of the GOP (YES in step S808), the process proceeds to step S810.
次にステップS810では、ROM27上に置かれた擬似シャッター音データ27cを読み出して、動画ファイル(AVIデータ)の音声データに挿入する。これと共に、その擬似シャッター音データ27cを音声処理部28に出力し、スピーカー32より再生させる。その擬似シャッター音データの時間長は、先のブラックアウト画像データの時間長とほぼ同じ時間にする。
Next, in step S810, the pseudo shutter
このとき、マイク30から録音される音声データから擬似データを急に置き換えると、データの急な切り替わりで高周波成分が発生し、エイリアシングによりノイズ音データが発生する。そこで擬似データに置き換える期間(擬似シャッター音をスピーカー32で再生する期間でもある)は、音声処理部28にてその期間をまず無音検出状態、すなわちミュート(無音)する。そのミュートされた音声データの上に擬似シャッター音を挿入するようにした。これにより、エイリアシングによる高周波ノイズを発生させずに高品位の擬似シャッター音を音声データに挿入することができる。
At this time, if the pseudo data is suddenly replaced with the sound data recorded from the
次にステップS811にて、先述した静止画撮影動作における静止画の現像処理の完了を待つ。現像が完了したらステップS812に進む。 In step S811, the process waits for the completion of still image development processing in the above-described still image shooting operation. When the development is completed, the process proceeds to step S812.
この後CPU26は、図2のステップS210内の処理として、現像済みの静止画を画像コーデック部18でJPEG符号化し、符号化されたデータから1つの静止画ファイルを生成する。生成した静止画ファイルは動画像ファイルとは別に記録メディア21に格納される。
After that, the
この処理と平行し、またはこの後、CPU26は、このステップS312において、上記現像済みの静止画から、VGAサイズのレビュー画像をリサイズ部24で生成し、ストップモーション画像の枚数N2のカウントを開始する(カウント初期値j=1)。
In parallel with this processing, or thereafter, in this step S312, the
次にGOPの先頭フレームか判断し、先頭ならば(ステップS313でYES)、レビュー画像データを画像コーデック部18でストップモーション画像Iフレームとして符号化し、出力する(ステップS814)。 Next, it is determined whether the frame is the first frame of the GOP. If it is the first frame (YES in step S313), the review image data is encoded and output as a stop motion image I frame by the image codec unit 18 (step S814).
GOPの先頭フレームでないならば(ステップS813でNO)、スキップトマクロブロック画像(SMB画像)を出力する(ステップS815)。 If it is not the first frame of the GOP (NO in step S813), a skipped macroblock image (SMB image) is output (step S815).
次にjがN2に達していないならば(ステップS316でNO)、ステップS317でjをインクリメントし、ステップS813に戻る。jがN2に達したら(SステップS816でYES)、ステップS212へ進む(ステップS818)。 If j has not reached N2 (NO in step S316), j is incremented in step S317, and the process returns to step S813. If j reaches N2 (YES in step S816), the process proceeds to step S212 (step S818).
以上説明したように、本実施形態によれば、動画撮影中に静止画撮影することによって生じる動画ファイルの助長なフレームをスキップトマクロブロック画像とした。これによって動画ファイルのファイルサイズを小さくすることができる。また、記憶媒体への書き込み負荷も小さくすることができる。また、ストップモーション期間中にGOPの単位でIフレームを挿入するので、編集単位を固定化して、簡易編集が可能となる。また、実施形態ではブラックアウト画像をGOP単位で生成するため、ストップモーション画像についてはブラックアウト画像を参照フレームとしないIフレームのみが必要となるため、Pフレームを生成する必要がない。そのため画像コーデック部18に対する負荷が軽減できる。なお、GOPの数は1つに限らず、それ以上の数でもよい。
As described above, according to the present embodiment, an encouraging frame of a moving image file generated by capturing a still image during moving image shooting is a skipped macroblock image. This can reduce the file size of the moving image file. In addition, the writing load on the storage medium can be reduced. In addition, since the I frame is inserted in GOP units during the stop motion period, the editing unit is fixed and simple editing is possible. In the embodiment, since the blackout image is generated in units of GOPs, only the I frame that does not use the blackout image as the reference frame is required for the stop motion image, so that it is not necessary to generate the P frame. Therefore, the load on the
本実施形態では、Iフレーム、Pフレームと記載したが、インターレース画像に対してもこの実施形態は適用できる。また、本実施形態では、動画像データの形式としてMPEG方式を用いたが、フレーム間圧縮を行うものであれば、H264等の他の形式でも同様に本発明を適用可能である。 In this embodiment, the I frame and the P frame are described, but this embodiment can also be applied to an interlaced image. In this embodiment, the MPEG system is used as the format of the moving image data. However, the present invention can be similarly applied to other formats such as H264 as long as inter-frame compression is performed.
また、第2の期間であるストップモーション画像を第1の期間と同じようにGOP単位で生成してもよい。 Further, the stop motion image that is the second period may be generated in units of GOP as in the first period.
これにより、ストップモーション画像と次の動画再開時の動画像との相関が小さい場合でも、Iフレームから動画記録を再開するためレート制御が容易になる。 Accordingly, even when the correlation between the stop motion image and the moving image at the time of the next moving image restart is small, the rate control is facilitated because the moving image recording is restarted from the I frame.
<第4の実施形態>
本実施形態のデジタルカメラは、第1の実施形態と同様に図1に示すものであり、動画像記録中に静止画撮影した場合の処理手順は、図2のフローチャートと同様なものである。
<Fourth Embodiment>
The digital camera of this embodiment is the same as that of the first embodiment shown in FIG. 1, and the processing procedure when a still image is shot during moving image recording is the same as the flowchart of FIG.
図10は図2におけるステップS210の静止画撮影動作を行った場合の動画ファイル生成処理手順を示すフローチャートである。 FIG. 10 is a flowchart showing a moving image file generation processing procedure when the still image shooting operation of step S210 in FIG. 2 is performed.
図10を用いて動画ファイル生成フローを説明する。この手順は、静止画撮影動作とほぼ並列に実行されるものである。ステップS1001は、図2のステップS208でYesと判断されたことに応じて開始されることを示している。先ず、ステップS1001で動画撮影を中断し、CPU26は本処理を開始する。
The moving image file generation flow will be described with reference to FIG. This procedure is executed almost in parallel with the still image shooting operation. Step S1001 indicates that the process starts in response to the determination of Yes in step S208 of FIG. First, in step S1001, moving image shooting is interrupted, and the
次いで、CPU26は、ステップS1002に進み、静止画撮影するために動画像撮影動作を中断する期間に対応するものとして予め設定したブラックアウト画像の枚数N1のカウントを開始する(初期値i=1)。
Next, the
ステップS1003で、CPU26は、動画フレームの第1の代替フレームとしてブラックアウト画像を挿入するためにGOPの先頭フレームかどうかを判断する。
In step S1003, the
代替フレームがGOPの先頭フレーム(ステップS1003でYES)ならば、ステップS1004で画像コーデック部18において符号化されたブラックアウト画像Iフレームを出力する。
If the substitute frame is the first frame of the GOP (YES in step S1003), the blackout image I frame encoded by the
代替フレームがGOPの先頭フレームでないならば(ステップS1003でNO)、画像コーデック部18で符号化されたブラックアウト画像Pフレームはインターマクロブロック(インターMB)を出力する(ステップS1005)。
If the substitute frame is not the first frame of the GOP (NO in step S1003), the blackout image P frame encoded by the
本処理でのインターMBとはフレーム間圧縮されたPフレームにおいて、すべてのマクロブロックを、他のフレームに基づく予測符号化を行わないイントラマクロブロックとする画像である。 The inter MB in this process is an image in which all macroblocks are intra macroblocks that are not subjected to predictive coding based on other frames in a P frame compressed between frames.
通常、Pフレームは、フレーム間での差分情報が格納されている。また、現フレームと前フレームの差分をマクロブロック単位で算出し、その差分情報をインターマクロブロック(インターMB)としている。ここで差分情報が0だと、前に述べた実施形態のように、インターマクロブロックをスキップトマクロブロックに置き換えることが可能である。しかし、本実施形態の処理では、予め符号化されたPフレームの各マクロブロックを前方参照しないマクロブロック、つまり、フレーム内で算出されたイントラマクロブロックとする。このインターMBは前方参照しないので、ブラックアウト画像Pフレームは、予め準備しておくことが可能である。 Normally, difference information between frames is stored in the P frame. Also, the difference between the current frame and the previous frame is calculated in units of macroblocks, and the difference information is used as an inter macroblock (inter MB). If the difference information is 0, it is possible to replace the inter macro block with the skipped macro block as in the embodiment described above. However, in the processing of the present embodiment, each macroblock of a P frame encoded in advance is assumed to be a macroblock that is not forward-referenced, that is, an intra macroblock calculated within the frame. Since this inter MB is not forward-referenced, the blackout image P frame can be prepared in advance.
ブラックアウト画像Iフレームまたはブラックアウト画像PフレームはあらかじめCPU26で作成してもよい。
The blackout image I frame or the blackout image P frame may be created by the
このブラックアウト画像27bはROM27から読み出されて、第1の代替フレームとして動画ファイル(AVIデータ)上に挿入される。
The
図11は、動画像記録中に静止画撮影した場合の動画ファイルの構成を示す図である。 FIG. 11 is a diagram showing the structure of a moving image file when a still image is shot during moving image recording.
図11において、フレームNo.1からNo.3までは動画中断前の画像である。
動画中断後のフレームNo.4からNo.6はブラックアウト画像ですべてPフレームのインターマクロブロック(インターMB)で構成されている。
In FIG. 1 to No. Up to 3 are images before the video is interrupted.
Frame No. after
フレームNo.4を画像コーデック部18でブラックアウト画像PフレームインターMBを生成しておく。
Frame No. 4 is generated by the
第1の代替フレームの長さ(期間)は、カメラグリーンモード(AUTOモード)の最長露光時間と等しく、約1/8秒(125mSec)程度である。動画像が30フレーム/秒の撮像される場合、1/8秒間でのフレーム数は“4”である。したがって、ROM27のブラックアウト画像(または画像コーデック部18で生成されるブラックアウト画像)を4回、AVIファイルに挿入することになる。 The length (period) of the first alternative frame is equal to the longest exposure time in the camera green mode (AUTO mode), and is about 1/8 second (125 mSec). When a moving image is captured at 30 frames / second, the number of frames in 1/8 second is “4”. Therefore, the blackout image in the ROM 27 (or the blackout image generated by the image codec unit 18) is inserted into the AVI file four times.
なお、ブラックアウト画像の代わりに、「静止画撮影」等のメッセージを有する画像としても構わない。 Instead of the blackout image, an image having a message such as “still image shooting” may be used.
ステップS1006でブラックアウト画像N1枚に達していない場合(ステップS1006でNO)、ステップS1007でiをインクリメントし、ステップS1003に戻る。ステップS1006でブラックアウト画像の枚数がN1枚に達したら(SステップS1006でYES)、ステップS1008に進む。 If N1 blackout images have not been reached in step S1006 (NO in step S1006), i is incremented in step S1007, and the process returns to step S1003. If the number of blackout images reaches N1 in step S1006 (YES in step S1006), the process proceeds to step S1008.
次にステップS1008では、ROM27上に置かれた擬似シャッター音データ27cを読み出して、動画ファイル(AVIデータ)の音声データに挿入する。これと共に、その擬似シャッター音データ27cを音声処理部28に出力し、スピーカー32より再生させる。その擬似シャッター音データの時間長は、先のブラックアウト画像データの時間長とほぼ同じ時間にする。
In step S1008, the pseudo shutter
このとき、マイク30から録音される音声データから擬似データを急に置き換えると、データの急な切り替わりで高周波成分が発生し、エイリアシングによりノイズ音データが発生する。そこで擬似データに置き換える期間(擬似シャッター音をスピーカー32で再生する期間でもある)は、音声処理部28にてその期間をまず無音検出状態、すなわちミュート(無音)する。そのミュートされた音声データの上に擬似シャッター音を挿入するようにした。これにより、エイリアシングによる高周波ノイズを発生させずに高品位の擬似シャッター音を音声データに挿入することができる。
At this time, if the pseudo data is suddenly replaced with the sound data recorded from the
次にステップS1009にて、先述した静止画撮影動作における静止画の現像処理の完了を待つ。現像が完了したらステップS1010に進む。 In step S1009, the process waits for the completion of the still image development process in the above-described still image shooting operation. When development is completed, the process proceeds to step S1010.
この後CPU26は、図2のステップS210内の処理として、現像済みの静止画を画像コーデック部18でJPEG符号化し、符号化されたデータから1つの静止画ファイルを生成する。生成した静止画ファイルは動画像ファイルとは別に記録メディア21に格納される。
After that, the
この処理と平行し、またはこの後、CPU26は、このステップS1010において、上記現像済みの静止画から、VGAサイズのレビュー画像をリサイズ部24で生成し、ストップモーション画像の枚数N2のカウントを開始する(カウント初期値j=1)。
In parallel with this processing or thereafter, in this step S1010, the
次にGOPの先頭フレームか判断し、先頭ならば(ステップS1011でYES)、レビュー画像データを画像コーデック部18でストップモーション画像Iフレームとして符号化し、出力する(ステップS1012)。
Next, it is determined whether it is the first frame of the GOP. If it is the first frame (YES in step S1011), the review image data is encoded as a stop motion image I frame by the
GOPの先頭フレームでないならば(ステップS1011でNO)、レビュー画像データを画像コーデック部18でストップモーション画像PフレームインターMBとして符号化し、出力する(ステップS1013)。 If it is not the first frame of the GOP (NO in step S1011), the review image data is encoded and output as a stop motion image P frame inter MB by the image codec unit 18 (step S1013).
次にjがN2に達していないならば(ステップS1014でNO)、ステップS1015でjをインクリメントし、ステップS1011に戻る。jがN2に達したら(ステップS1014でYES)、ステップS212へ進む(ステップS1016)。 If j has not reached N2 (NO in step S1014), j is incremented in step S1015, and the process returns to step S1011. If j reaches N2 (YES in step S1014), the process proceeds to step S212 (step S1016).
以上説明したように、本実施形態によれば、動画撮影中に静止画撮影することによって生じる動画ファイルの助長なPフレームをインターMB画像とした。これによって参照画像を必要としないため画像コーデック部18に対する負荷が軽減できる。
As described above, according to the present embodiment, an encouraging P frame of a moving image file generated by taking a still image during moving image shooting is an inter MB image. This eliminates the need for a reference image, thereby reducing the load on the
Iフレーム、Pフレームと記載したが、インターレース画像に対してもこの実施形態は適用できる。また、本実施形態では、動画像データの形式としてMPEG方式を用いたが、フレーム間圧縮を行うものであれば、H264等の他の形式でも同様に適用可能である。 Although described as I frame and P frame, this embodiment can also be applied to interlaced images. In this embodiment, the MPEG system is used as the format of the moving image data. However, other formats such as H264 can be similarly applied as long as they perform inter-frame compression.
8 画像コーデック部
10 撮像素子
16 信号処理部
21 記録メディア
23 操作部
26 CPU
27 ROM
8
27 ROM
Claims (9)
前記撮像手段により連続して撮像することで得られる動画像を動画像ファイルとして前記記録媒体に記録する動画撮影動作を制御する動画撮影制御手段と、
前記撮像手段で撮像することで得られる静止画を静止画ファイルとして前記記録媒体に記録する静止画撮影動作を制御する静止画撮影制御手段と、
前記動画撮影動作が実行されている期間に、静止画撮影動作の指示が入力された場合、前記静止画撮影制御手段は前記静止画撮影動作を制御して前記静止画ファイルを前記記録媒体に記録し、前記動画撮影制御手段は前記動画撮影動作を中断し、前記中断した期間に対応する動画像を代替する画像の先頭としてブラックアウト画像を挿入し、前記ブラックアウト画像の後に差分情報がゼロであるフレーム間圧縮された画像を挿入することを繰り返し、前記挿入した画像の数が所定数以上でありかつ前記挿入した画像がGOPの最後のフレームである場合には次のGOPの先頭であるIフレームを前記静止画撮影動作に対応する静止画から得られたストップモーション画像とし、前記Iフレームの後に差分情報がゼロであるフレーム間圧縮された画像を挿入することをGOPに対応するフレーム数まで繰り返すことで動画像ファイルを生成し前記記録媒体に記録することを特徴とする撮像装置。 An imaging device that records image data captured by an imaging unit on a recording medium,
A moving image shooting control unit for controlling a moving image shooting operation for recording a moving image obtained by continuously capturing images with the imaging unit as a moving image file on the recording medium;
Still image shooting control means for controlling a still image shooting operation for recording a still image obtained by taking an image with the imaging means as a still image file on the recording medium;
When an instruction for a still image shooting operation is input during a period in which the moving image shooting operation is being performed, the still image shooting control unit controls the still image shooting operation and records the still image file on the recording medium. The moving image shooting control unit interrupts the moving image shooting operation , inserts a blackout image as the head of an image that replaces the moving image corresponding to the interrupted period, and the difference information is zero after the blackout image. Inserting a compressed image between frames is repeated, and when the number of inserted images is equal to or greater than a predetermined number and the inserted image is the last frame of a GOP, the I that is the head of the next GOP The frame is a stop motion image obtained from a still image corresponding to the still image shooting operation, and is compressed between frames whose difference information is zero after the I frame. Imaging apparatus characterized by recording on the recording medium to generate a moving image file by repeating the insertion of the image to the number of frames corresponding to the GOP.
前記動画撮影動作が実行されている期間に、静止画撮影動作の指示が入力された場合、前記動画撮影動作を中断し、前記静止画撮影動作を制御して前記静止画ファイルを前記記録媒体に記録し、前記中断した期間に対応する動画像を代替する画像の先頭としてブラックアウト画像を挿入し、前記ブラックアウト画像の後に差分情報がゼロであるフレーム間圧縮された画像を挿入することを繰り返し、前記挿入した画像の数が所定数以上でありかつ前記挿入した画像がGOPの最後のフレームである場合には次のGOPの先頭であるIフレームを前記静止画撮影動作に対応する静止画から得られたストップモーション画像とし、前記Iフレームの後に差分情報がゼロであるフレーム間圧縮された画像を挿入することをGOPに対応するフレーム数まで繰り返すことで動画像ファイルを生成し前記記録媒体に記録することを特徴とする撮像装置の制御方法。 A moving image shooting operation for recording a moving image obtained by continuous imaging by an imaging unit on a recording medium as a moving image file, and a still image obtained by imaging by the imaging unit as a still image file on the recording medium A method of controlling an imaging apparatus having a function of executing a still image shooting operation to be recorded,
If an instruction for a still image shooting operation is input during a period in which the moving image shooting operation is being performed, the moving image shooting operation is interrupted, and the still image file is controlled to store the still image file on the recording medium. Recording, inserting a blackout image as the head of an image that replaces the moving image corresponding to the interrupted period, and repeatedly inserting an inter-frame compressed image whose difference information is zero after the blackout image If the number of inserted images is equal to or greater than a predetermined number and the inserted image is the last frame of a GOP, the I frame that is the head of the next GOP is extracted from the still image corresponding to the still image shooting operation. A frame corresponding to the GOP that the obtained stop motion image is inserted and an inter-frame compressed image whose difference information is zero is inserted after the I frame. Control method for an imaging apparatus characterized by generating a moving image file recorded on the recording medium by repeating up.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008053415A JP5164610B2 (en) | 2007-05-02 | 2008-03-04 | Imaging apparatus and control method thereof |
CN2008100892889A CN101299801B (en) | 2007-05-02 | 2008-04-30 | Imaging apparatus and control method therefor |
US12/113,673 US8743227B2 (en) | 2007-05-02 | 2008-05-01 | Imaging apparatus and control method for reducing a load of writing image data on a recording medium |
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007121743 | 2007-05-02 | ||
JP2007121743 | 2007-05-02 | ||
JP2008053415A JP5164610B2 (en) | 2007-05-02 | 2008-03-04 | Imaging apparatus and control method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008301475A JP2008301475A (en) | 2008-12-11 |
JP5164610B2 true JP5164610B2 (en) | 2013-03-21 |
Family
ID=40079472
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008053415A Expired - Fee Related JP5164610B2 (en) | 2007-05-02 | 2008-03-04 | Imaging apparatus and control method thereof |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP5164610B2 (en) |
CN (1) | CN101299801B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5294767B2 (en) | 2008-09-16 | 2013-09-18 | キヤノン株式会社 | Movie playback device, movie playback method, program, and recording medium |
JP2011223079A (en) | 2010-04-05 | 2011-11-04 | Canon Inc | Image processing apparatus |
JP6422011B2 (en) | 2012-05-11 | 2018-11-14 | サン パテント トラスト | Moving picture encoding method, moving picture decoding method, moving picture encoding apparatus, and moving picture decoding apparatus |
DE102016109179B4 (en) * | 2015-05-29 | 2023-08-03 | Canon Kabushiki Kaisha | Image pickup device and imaging device |
CN111726529B (en) * | 2020-06-24 | 2022-10-21 | 深圳市道通智能航空技术股份有限公司 | Image processing method, camera equipment and storage medium |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH10136380A (en) * | 1996-10-31 | 1998-05-22 | Matsushita Electric Ind Co Ltd | Device and method for encoding moving image |
JP2002010263A (en) * | 2000-06-20 | 2002-01-11 | Mitsubishi Electric Corp | Motion picture encoding apparatus and its method |
JP4337248B2 (en) * | 2000-08-31 | 2009-09-30 | ソニー株式会社 | Image information transmission apparatus, transmission system, and transmission method |
JP2004064210A (en) * | 2002-07-25 | 2004-02-26 | Canon Inc | Recording apparatus |
JP4158463B2 (en) * | 2002-09-05 | 2008-10-01 | 株式会社日立製作所 | Imaging device |
KR101189980B1 (en) * | 2004-09-08 | 2012-10-12 | 소니 주식회사 | Recording device and method, reproduction device and method, and recording medium |
JP2006310907A (en) * | 2005-04-26 | 2006-11-09 | Canon Inc | Imaging apparatus and its control method |
JP4724577B2 (en) * | 2005-05-11 | 2011-07-13 | キヤノン株式会社 | Imaging apparatus and control method thereof |
-
2008
- 2008-03-04 JP JP2008053415A patent/JP5164610B2/en not_active Expired - Fee Related
- 2008-04-30 CN CN2008100892889A patent/CN101299801B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN101299801A (en) | 2008-11-05 |
CN101299801B (en) | 2010-09-22 |
JP2008301475A (en) | 2008-12-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4724577B2 (en) | Imaging apparatus and control method thereof | |
US8743227B2 (en) | Imaging apparatus and control method for reducing a load of writing image data on a recording medium | |
JP4441882B2 (en) | Imaging device, display control method, program | |
JP2005080059A (en) | Image recorder and image compression apparatus | |
JP2003008948A (en) | Electronic camera and its image display method, and image recording method | |
US8577161B2 (en) | Reproduction apparatus | |
JP5164610B2 (en) | Imaging apparatus and control method thereof | |
KR20090064273A (en) | Recording apparatus, reproducing apparatus, recoding method, reproducing method and storing medium having program to perform the method | |
JP2007266659A (en) | Imaging reproducing apparatus | |
JP2006310907A (en) | Imaging apparatus and its control method | |
JP2009225361A (en) | Recording device and recording method, and editing device and editing method | |
JP2006261953A (en) | Recording and reproducing device, its controlling method, and imaging apparatus | |
CN101656828B (en) | Camera | |
JP4799504B2 (en) | Image decoding apparatus and control method thereof | |
JP2007281966A (en) | Reproducing apparatus, method for selecting reproduced image, program, and storage medium | |
JP2010183370A (en) | Image reproducing apparatus | |
JP5300627B2 (en) | Imaging apparatus, control method thereof, and program | |
JP2000041170A (en) | Image pickup device and method | |
JP2007208850A (en) | Camera, recording control method for camera, program, and recording medium | |
JP2020188415A (en) | Imaging apparatus, control method thereof, and program | |
JP7374698B2 (en) | Imaging device, control method and program | |
JP2001230958A (en) | Electronic camera apparatus | |
JP2021129200A (en) | Moving image playback device | |
JP5930807B2 (en) | Imaging device | |
JP2004274488A (en) | Method for recording and reproducing animation data, recording apparatus and its reproducing apparatus thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20100201 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20100630 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110225 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120308 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120410 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120611 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20121120 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20121218 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20151228 Year of fee payment: 3 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5164610 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20151228 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |