Movatterモバイル変換


[0]ホーム

URL:


JP4637032B2 - Image recording apparatus and control method thereof - Google Patents

Image recording apparatus and control method thereof
Download PDF

Info

Publication number
JP4637032B2
JP4637032B2JP2006037252AJP2006037252AJP4637032B2JP 4637032 B2JP4637032 B2JP 4637032B2JP 2006037252 AJP2006037252 AJP 2006037252AJP 2006037252 AJP2006037252 AJP 2006037252AJP 4637032 B2JP4637032 B2JP 4637032B2
Authority
JP
Japan
Prior art keywords
video
audio
moving image
audio data
data
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
Application number
JP2006037252A
Other languages
Japanese (ja)
Other versions
JP2007221271A (en
Inventor
浩 近藤
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon IncfiledCriticalCanon Inc
Priority to JP2006037252ApriorityCriticalpatent/JP4637032B2/en
Publication of JP2007221271ApublicationCriticalpatent/JP2007221271A/en
Application grantedgrantedCritical
Publication of JP4637032B2publicationCriticalpatent/JP4637032B2/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Landscapes

Description

Translated fromJapanese

本発明は、音声付きの動画像データを記録する画像記録装置及びその制御方法に関する。  The present invention relates to an image recording apparatus for recording moving image data with sound and a control method therefor.

音声付きの動画像(以下、「動画」と呼ぶ)を記録する画像記録装置として、デジタルカメラが普及している。近年のデジタルカメラは、圧縮技術の向上、高画素化、撮像モードの多様化、記憶媒体のアクセス速度の高速化等により、ファイルサイズを小さく抑えつつ、高画質の動画を、高いフレームレートで長時間記録することが可能になっている。  Digital cameras are widely used as image recording apparatuses that record moving images with sound (hereinafter referred to as “moving images”). Recent digital cameras have improved the compression technology, increased the number of pixels, diversified imaging modes, increased the access speed of storage media, etc. Time recording is possible.

動画を長時間記録する場合に問題となるのが、動画再生時に映像(「映像」は音声を含まない)と音声にずれが生じることである。例えば、映像信号と音声信号をサンプリングするクロックの元となる発振器が異なる場合は、各々の発振器のずれにより、撮影時間が経過すればするほど、映像と音声との間のずれが広がってしまう。この問題を解決するために、双方のクロックのずれを補正するデジタルカメラが提案されている(特許文献1参照)。
特開2005−253056号公報
A problem when recording a moving image for a long time is that there is a difference between the sound (“video” does not include sound) and the sound when the moving image is played back. For example, in the case where the oscillators that are the sources of the clocks for sampling the video signal and the audio signal are different, the deviation between the video and the audio becomes wider as the photographing time elapses due to the deviation of each oscillator. In order to solve this problem, a digital camera that corrects the shift between both clocks has been proposed (see Patent Document 1).
JP 2005-253056 A

しかしながら、上述のデジタルカメラで動画を撮像しても、撮像した動画の記録方式に起因して、動画の再生時に、映像と音声がずれる場合があるという問題がある。この問題は、動画を記録する際のフレームレートが整数でないために生じるものであり、特許文献1に示すように映像信号用と音声信号用のクロックのずれを補正しても発生しうるものである。  However, even if a moving image is captured by the above-described digital camera, there is a problem in that the video and the sound may be shifted when the moving image is reproduced due to the recording method of the captured moving image. This problem occurs because the frame rate at the time of recording a moving image is not an integer, and can occur even if the clock signal and audio signal clocks are corrected as shown in Patent Document 1. is there.

例えば、ファイル形式がAVI、フレームレートが毎秒約60フレーム(60FPS)、サイズがQVGA(320x240)の動画を記録可能なデジタルカメラを考える。この種のデジタルカメラは、フレームレートが60FPSであるとユーザインタフェースに表示するが、実際には59.94FPSで動画を記録することが一般的である。これは、現在普及している動画の表示装置が対応するNTSC規格の表示レート(59.94FPS)に、記録時のフレームレートを一致させるためである。  For example, consider a digital camera capable of recording a moving image with a file format of AVI, a frame rate of about 60 frames per second (60 FPS), and a size of QVGA (320 × 240). This type of digital camera displays on the user interface that the frame rate is 60 FPS, but in practice it is common to record moving images at 59.94 FPS. This is because the frame rate at the time of recording is made to coincide with the display rate (59.94 FPS) of the NTSC standard supported by the currently popular moving image display devices.

AVI形式のファイルは、ある基本データブロックサイズ毎に映像と音声を交互に記録する形をとっており、例えば1秒分の映像データ・音声データが交互に繰り返し記録される。  The AVI format file has a form in which video and audio are alternately recorded for each basic data block size. For example, video data and audio data for one second are alternately and repeatedly recorded.

この場合、音声データは1つのデータブロックに1秒分記録されるが、映像データは、1つのデータブロックに59.94フレーム記録するということは物理的に不可能であるため、直近の整数である60フレームに切り上げて記録される。すなわち、映像データは、1つのデータブロックに1秒よりもやや長く記録されることになる。  In this case, audio data is recorded for one second in one data block, but it is physically impossible to record 59.94 frames in one data block. Recorded by rounding up to a certain 60 frames. That is, video data is recorded in one data block for a little longer than 1 second.

したがって、1つのデータブロックに記録されている映像データと音声データの長さが異なるため、動画の再生時に映像と音声にずれが生じることになる。  Accordingly, since the length of the video data and the audio data recorded in one data block is different, there is a difference between the video and the audio when the moving image is reproduced.

本発明はこのような状況に鑑みてなされたものであり、動画を記録する際のフレームレートが整数でない場合でも、記録した動画の再生時に映像と音声のずれを抑制する技術を提供することを目的とする。  The present invention has been made in view of such a situation, and provides a technique for suppressing a shift between video and audio during reproduction of a recorded moving image even when the frame rate at the time of recording the moving image is not an integer. Objective.

上記課題を解決するために、本発明は、以下の特徴を備える画像処理装置を提供する。すなわち、
映像及び音声を含む動画を動画ファイルとして記録する画像記録装置であって、前記動画ファイルは、映像データを格納する映像データ部と音声データを格納する音声データ部が交互に配置されている形式であり、前記画像記録装置は、
前記動画を記録するフレームレートを取得する取得手段と、
前記フレームレートに基づいて、1つあたりの前記映像データ部に格納される映像データのフレーム数を決定する第1の決定手段と、
前記第1の決定手段により決定されたフレーム数の映像データを再生するのに要する映像再生時間を計算する計算手段と、
前記動画ファイルを再生したときに生じうる音ずれを抑制するよう、1つあたりの前記音声データ部に格納される、サンプリングされた音声データのデータ数を前記映像再生時間に応じて決定する第2の決定手段と、
を備え
前記第2の決定手段は、前記1つあたりの音声データ部に格納される音声データを再生するのに要する音声再生時間と前記映像再生時間との差の絶対値が、音ずれを低減するためにあらかじめ定められた値よりも小さくなるように、前記データ数を決定することを特徴とする画像記録装置。
In order to solve the above problems, the present invention provides an image processing apparatus having the following features. That is,
An image recording apparatus for recording a moving image including video and audio as a moving image file, wherein the moving image file has a format in which a video data portion storing video data and an audio data portion storing audio data are alternately arranged. And the image recording apparatus comprises:
Obtaining means for obtaining a frame rate for recording the moving image;
First determining means for determining the number of frames of video data stored in the video data portion per one based on the frame rate;
Calculating means for calculating a video playback time required to play back video data of the number of frames determined by the first determining means;
Secondly, the number of sampled audio data stored in one audio data portion is determined according to the video reproduction time so as to suppress a sound shift that may occur when the moving image file is reproduced. And means for determining
Equipped witha,
The second deciding means is configured such that the absolute value of the difference between the audio reproduction time required for reproducing the audio data stored in the one audio data portion and the video reproduction time reduces the sound deviation. The image recording apparatus is characterizedin that thenumber of data is determined so as to be smaller than a predetermined value .

また、本発明は、以下の特徴を備える制御方法を提供する。すなわち、
映像及び音声を含む動画を動画ファイルとして記録する画像記録装置の制御方法であって、前記動画ファイルは、映像データを格納する映像データ部と音声データを格納する音声データ部が交互に配置されている形式であり、前記制御方法は、
前記動画を記録するフレームレートを取得する取得工程と、
前記フレームレートに基づいて、1つあたりの前記映像データ部に格納される映像データのフレーム数を決定する第1の決定工程と、
前記第1の決定工程により決定されたフレーム数の映像データを再生するのに要する映像再生時間を計算する計算工程と、
前記動画ファイルを再生したときに生じうる音ずれを抑制するよう、1つあたりの前記音声データ部に格納される、サンプリングされた音声データのデータ数を前記映像再生時間に応じて決定する第2の決定工程と、
を備え
前記第2の決定工程では、前記1つあたりの音声データ部に格納される音声データを再生するのに要する音声再生時間と前記映像再生時間との差の絶対値が、音ずれを低減するためにあらかじめ定められた値よりも小さくなるように、前記データ数を決定することを特徴とする制御方法。
The present invention also provides a control method having the following features. That is,
A control method of an image recording apparatus for recording a moving image including video and audio as a moving image file, wherein the moving image file includes a video data portion storing video data and an audio data portion storing audio data alternately arranged. The control method is
An acquisition step of acquiring a frame rate for recording the moving image;
A first determination step of determining the number of frames of video data stored in the video data portion per one based on the frame rate;
A calculation step of calculating a video playback time required to play back the video data of the number of frames determined in the first determination step;
Secondly, the number of sampled audio data stored in one audio data portion is determined according to the video reproduction time so as to suppress a sound shift that may occur when the moving image file is reproduced. And the determination process of
Equipped witha,
In the second determination step, the absolute value of the difference between the audio reproduction time required for reproducing the audio data stored in the audio data unit per unit and the video reproduction time is used to reduce sound deviation. And determining the number of data so as to be smaller than a predetermined value .

なお、その他の本発明の特徴は、添付図面及び以下の発明を実施するための最良の形態における記載によってさらに明らかになるものである。  Other features of the present invention will become more apparent from the accompanying drawings and the following description of the best mode for carrying out the invention.

以上の構成により、本発明によれば、動画を記録する際のフレームレートが整数でない場合でも、記録した動画の再生時に映像と音声のずれを抑制する技術を提供することが可能となる。  With the above configuration, according to the present invention, it is possible to provide a technique for suppressing a shift between video and audio during playback of a recorded moving image even when the frame rate at the time of recording the moving image is not an integer.

以下、添付図面を参照して、本発明の実施形態を説明する。以下で説明される個別の実施形態は、本発明の上位概念、中位概念および下位概念など種々の概念を理解するために役立つであろう。  Embodiments of the present invention will be described below with reference to the accompanying drawings. The individual embodiments described below will help to understand various concepts, such as the superordinate concept, intermediate concept and subordinate concept of the present invention.

なお、本発明の技術的範囲は、特許請求の範囲によって確定されるのであって、以下の個別の実施形態によって限定されるわけではない。また、実施形態の中で説明されている特徴の組み合わせすべてが発明の解決手段に必須のものとは限らない。  The technical scope of the present invention is determined by the claims, and is not limited by the following individual embodiments. In addition, not all combinations of features described in the embodiments are essential for the solution of the invention.

[第1の実施形態]
<デジタルカメラ100の構成>
図1は、第1の実施形態における画像記録装置であるデジタルカメラ100の構成を示す機能ブロック図である。
[First Embodiment]
<Configuration ofDigital Camera 100>
FIG. 1 is a functional block diagram illustrating a configuration of adigital camera 100 that is an image recording apparatus according to the first embodiment.

10は光学レンズ、11はユーザが被写体像を確認するための光学ファインダーであり、ズーム制御部44による制御に従って、画角の変更が可能である。  10 is an optical lens, and 11 is an optical viewfinder for the user to check the subject image. The angle of view can be changed according to control by thezoom control unit 44.

12は絞り機能を備える絞り兼用シャッター、14は光学像を電気信号に変換する撮像素子(例えばCCD)であり、撮像素子14上には原色モザイクフィルタが配置されている。  Reference numeral 12 denotes a diaphragm combined shutter having a diaphragm function, and reference numeral 14 denotes an image sensor (for example, CCD) that converts an optical image into an electrical signal. A primary color mosaic filter is disposed on the image sensor 14.

15は撮像素子14の出力ノイズ除去のためのCDS(相関2重サンプリング)回路やAGC(自動利得制御)回路を含む前置処理回路である。16は前置処理回路15から出力されるアナログ信号をデジタル信号に変換するA/D変換器である。  Reference numeral 15 denotes a preprocessing circuit including a CDS (correlated double sampling) circuit and an AGC (automatic gain control) circuit for removing output noise of the image sensor 14.Reference numeral 16 denotes an A / D converter that converts an analog signal output from the preprocessing circuit 15 into a digital signal.

18は撮像素子14及びA/D変換器16にクロック信号や制御信号を供給するタイミング発生回路(TG)であり、クロック信号や制御信号を供給するタイミングは信号処理IC22により制御される。  Reference numeral 18 denotes a timing generation circuit (TG) for supplying a clock signal and a control signal to the image sensor 14 and the A /D converter 16, and the timing for supplying the clock signal and the control signal is controlled by asignal processing IC 22.

信号処理IC22は、CPU50からの指示により、A/D変換器16又はDRAM30から入力されるデータに対して、画素補間処理や色変換処理、拡大・縮小、画像データ形式変換など、所定の画像処理を行う。信号処理IC22はまた、DMAコントローラ、画像表示部28に供給するアナログ信号を生成するためのD/A変換器、映像データを圧縮及び伸長する圧縮・伸長回路を備える。信号処理IC22はさらに、撮像した映像データを用いて所定の演算処理を行い、得られた演算結果をDRAM30に保存する。CPU50はこの演算結果に基づいてTTL方式のAWB(オートホワイトバランス)処理、AF(オートフォーカス)処理、AE(自動露出)処理、EF(ストロボプリ発光)処理を行う。  Thesignal processing IC 22 performs predetermined image processing such as pixel interpolation processing, color conversion processing, enlargement / reduction, and image data format conversion on the data input from the A /D converter 16 or theDRAM 30 according to an instruction from the CPU 50. I do. Thesignal processing IC 22 also includes a DMA controller, a D / A converter for generating an analog signal to be supplied to theimage display unit 28, and a compression / decompression circuit that compresses and decompresses video data. Thesignal processing IC 22 further performs a predetermined calculation process using the captured video data, and stores the obtained calculation result in theDRAM 30. The CPU 50 performs TTL AWB (auto white balance) processing, AF (auto focus) processing, AE (automatic exposure) processing, and EF (strobe preflash) processing based on the calculation result.

28はTFT LCDなどから構成される画像表示部であり、DRAM30に書き込まれた表示用の映像データを信号処理IC22内部のD/A変換器(不図示)を介して受け取り、映像を表示する。画像表示部28は映像の他、撮影モード設定情報などの各種情報の表示にも使用される。  Reference numeral 28 denotes an image display unit composed of a TFT LCD or the like, which receives display image data written in theDRAM 30 via a D / A converter (not shown) in thesignal processing IC 22 and displays an image. Theimage display unit 28 is also used to display various information such as shooting mode setting information in addition to video.

画像表示部28に、撮像した映像を逐次表示すれば、画像表示部28を電子ビューファインダーとして機能させることもできる。また、画像表示部28は、CPU50の指示により任意に表示をON/OFFすることが可能であり、表示をOFFにした場合にはデジタルカメラ100の電力消費を大幅に低減することが出来る。  If the captured images are sequentially displayed on theimage display unit 28, theimage display unit 28 can also function as an electronic viewfinder. Theimage display unit 28 can arbitrarily turn on / off the display according to an instruction from the CPU 50. When the display is turned off, the power consumption of thedigital camera 100 can be greatly reduced.

さらに、画像表示部28は、回転可能なヒンジ部によってデジタルカメラ100本体に結合されていてもよい。この場合、ユーザは画像表示部28を自由な向き、角度を設定して、電子ビューファインダー機能や再生表示機能、各種表示機能を使用することが可能である。また、画像表示部28の表示部分をデジタルカメラ100本体側に向けることで表示部分を保護しつつ格納することが可能である。検知SW98は、画像表示部28が格納されたことを検知して、画像表示部28の表示動作を停止することが出来る。  Furthermore, theimage display unit 28 may be coupled to the main body of thedigital camera 100 by a rotatable hinge unit. In this case, the user can use the electronic viewfinder function, the playback display function, and various display functions by setting theimage display unit 28 in any direction and angle. Further, the display portion of theimage display unit 28 can be stored while being protected by directing the display portion toward the main body of thedigital camera 100. Thedetection SW 98 can detect that theimage display unit 28 has been stored and stop the display operation of theimage display unit 28.

DRAM30は撮影した映像の非圧縮データを一時的に格納したり、AF/AE/AWB/EF演算結果を保持したり、画像表示部28に表示する映像データを保持したり、圧縮された映像データを保持したりするために使用されるメモリである。DRAM30は、所定枚数の静止画や所定時間の動画を格納するのに十分な記憶量を備えている。DRAM30はまた、CPU50を実行させるプログラムのワーク領域としても機能する。  TheDRAM 30 temporarily stores uncompressed data of the captured video, holds AF / AE / AWB / EF calculation results, holds video data to be displayed on theimage display unit 28, and compressed video data This is memory used to hold data. TheDRAM 30 has a sufficient storage capacity for storing a predetermined number of still images and a moving image for a predetermined time. TheDRAM 30 also functions as a work area for programs that execute the CPU 50.

44は光学レンズ10及び光学ファインダー11のズーミングを制御するズーム制御部である。  Azoom control unit 44 controls zooming of theoptical lens 10 and the optical viewfinder 11.

46はコネクタであり、アクセサリーシューとも呼ばれ、外部ストロボ装置400と、デジタルカメラ100本体との電気接点や機械的な固定部を併せて備える。  Aconnector 46 is also called an accessory shoe, and includes an electrical contact between theexternal strobe device 400 and the main body of thedigital camera 100 and a mechanical fixing portion.

48は内蔵ストロボであり、TTL調光機能を有している。  A built-inflash 48 has a TTL light control function.

50はデジタルカメラ100全体を制御するCPUである。CPU50は、信号処理IC22によってDRAM30に格納されたAF/AE/AWB/EFの演算結果に基づき、AF/AE/AWB/EF制御を行う。CPU50はまた、信号処理IC22に対するデータフロー制御、各種キースキャン動作、ズーム制御、周辺モジュールとの通信等も行う。  A CPU 50 controls the entiredigital camera 100. The CPU 50 performs AF / AE / AWB / EF control based on the calculation result of AF / AE / AWB / EF stored in theDRAM 30 by thesignal processing IC 22. The CPU 50 also performs data flow control for thesignal processing IC 22, various key scan operations, zoom control, communication with peripheral modules, and the like.

52は電気的に消去・記録可能なフラッシュメモリであり、CPU50を動作させるために必要なプログラムやカメラ固有の調整データ等があらかじめ書き込まれている。  Reference numeral 52 denotes an electrically erasable / recordable flash memory in which a program necessary for operating the CPU 50, camera-specific adjustment data, and the like are written in advance.

54はCPU50でのプログラムの実行に応じて、文字、画像、音声等を用いてデジタルカメラ100の動作状態やメッセージ等を表示する表示部である。表示部54は、スピーカー等の音声出力部を備え、音声によってデジタルカメラ100の動作状態やメッセージ等をユーザに通知してもよい。表示部54は、デジタルカメラ100の操作部70近辺の視認し易い位置に単数或いは複数個所設置され、例えばLCDやLED、発音素子等の組み合わせにより構成されている。  Reference numeral 54 denotes a display unit that displays an operation state, a message, and the like of thedigital camera 100 using characters, images, sounds, and the like in accordance with execution of a program by the CPU 50. Thedisplay unit 54 may include an audio output unit such as a speaker, and may notify the user of the operating state of thedigital camera 100, a message, and the like by voice. Thedisplay unit 54 is installed at a single or a plurality of positions near the operation unit 70 of thedigital camera 100 so as to be easily visible, and is configured by a combination of, for example, an LCD, an LED, and a sounding element.

表示部54による表示には、例えば、シングルショット/連写撮影表示、セルフタイマー表示、圧縮率表示、記録画素数表示、記録枚数表示、残撮影可能枚数表示、シャッタースピード表示、絞り値表示、露出補正表示、ストロボ表示などがある。この他にも、赤目緩和表示、マクロ撮影表示、ブザー設定表示、時計用電池残量表示、電池残量表示、エラー表示、複数桁の数字による情報表示、記憶媒体150の着脱状態表示、通信I/F動作表示、日付・時刻表示などがある。  Examples of the display by thedisplay unit 54 include a single shot / continuous shooting display, a self-timer display, a compression ratio display, a recording pixel number display, a recording number display, a remaining image number display, a shutter speed display, an aperture value display, and an exposure. There are correction display and strobe display. In addition to this, red-eye reduction display, macro shooting display, buzzer setting display, clock battery level display, battery level display, error display, information display with multiple digits,storage medium 150 attachment / detachment status display, communication I / F operation display, date / time display, etc.

60は電源SWを兼ねたモードレバーであり、デジタルカメラ100を、電源オフ(OFF)、撮影モード、再生モードの3状態のいずれかに設定することができる。62は撮影時、目的・シーンに合わせてユーザが設定する各種撮影モードが割り当てられたモードダイアルである。モードダイアル62により、ユーザはデジタルカメラ100を、例えば全自動撮影モード(AUTO)、プログラム撮影モード、シャッター速度優先撮影モード、絞り優先撮影モード、マニュアル撮影モードなどに設定することができる。この他にも、ポートレートモード、風景モード、夜景モード、色効果モード、スティッチアシストモードなどの各モードに切り替え設定することが出来る。  Reference numeral 60 denotes a mode lever that also serves as a power switch, and thedigital camera 100 can be set to one of three states: power-off (OFF), shooting mode, and playback mode.Reference numeral 62 denotes a mode dial to which various shooting modes set by the user according to the purpose / scene are assigned at the time of shooting. Themode dial 62 allows the user to set thedigital camera 100 to, for example, a fully automatic shooting mode (AUTO), a program shooting mode, a shutter speed priority shooting mode, an aperture priority shooting mode, a manual shooting mode, or the like. In addition, it is possible to switch to various modes such as a portrait mode, a landscape mode, a night view mode, a color effect mode, and a stitch assist mode.

64はシャッタースイッチであり、2段階のスイッチSW1及びSW2で構成されている。シャッターボタンの半押しでSW1がONとなり、AF(オートフォーカス)処理、AE(自動露出)処理、AWB(オートホワイトバランス)処理等の動作開始をCPU50に指示する。さらにシャッターボタンの全押しによりSW2がONとなり、撮像素子12から読み出した信号を、A/D変換器16、信号処理IC30を介してDRAM30に映像データとして書き込むことをCPU50に指示する。次いで、信号処理IC30はCPU50からの指示に従って、DRAM30から映像データを読み出し、色補正、画素補間、色変換等の画像処理を行った後、圧縮処理を行い、記憶媒体150に映像データを書き込む。  Reference numeral 64 denotes a shutter switch, which is composed of two-stage switches SW1 and SW2. When the shutter button is pressed halfway, SW1 is turned on, and the CPU 50 is instructed to start operations such as AF (auto focus) processing, AE (auto exposure) processing, AWB (auto white balance) processing, and the like. When the shutter button is fully pressed, SW2 is turned ON, and the CPU 50 is instructed to write the signal read from theimage sensor 12 as video data to theDRAM 30 via the A /D converter 16 and thesignal processing IC 30. Next, thesignal processing IC 30 reads the video data from theDRAM 30 according to an instruction from the CPU 50, performs image processing such as color correction, pixel interpolation, and color conversion, and then performs compression processing and writes the video data to thestorage medium 150.

68はムービーSWであり、動画記録の開始・終了を指示するためのスイッチである。69は動画記録時のフレームレートを選択する、フレームレート選択部である。
72、74、76はそれぞれ、メニューキー、セットキー、十字キーであり、ユーザはこれらのキーを走査することにより、撮影時又は再生時の各種設定の変更や、各種機能の実行を、画像表示部28を見ながら行うことができる。このうち、十字キー76は上下左右の4つの方向キーから構成される複合キーである。
Reference numeral 68 denotes a movie SW, which is a switch for instructing start / end of moving image recording.Reference numeral 69 denotes a frame rate selection unit that selects a frame rate at the time of moving image recording.
Reference numerals 72, 74, and 76 denote a menu key, a set key, and a cross key, respectively, and the user scans these keys to change various settings during shooting or playback and to execute various functions. This can be done while looking at thepart 28. Among these, the cross key 76 is a composite key composed of four direction keys, up, down, left, and right.

メニューキー72が1回押されると、画像表示部28にメニュー画面が表示される。このメニュー画面は、モードレバー60及びモードダイアル62が指す現在のモードによって異なる。その後、表示されているメニュー項目をユーザが十字キー76を使って選択し、セットキー74を押すことにより、メニュー項目が決定される。  When themenu key 72 is pressed once, a menu screen is displayed on theimage display unit 28. This menu screen varies depending on the current mode indicated by themode lever 60 and themode dial 62. Thereafter, the user selects a displayed menu item using the cross key 76 and presses theset key 74, whereby the menu item is determined.

例えば、撮影モードがプログラム撮影モードとなっている際のメニュー項目としては、記録画素サイズ、圧縮率、記録形式、感度、AFモード、撮影の確認の有無、画質チューニングパラメータ等がある。  For example, menu items when the shooting mode is the program shooting mode include a recording pixel size, a compression rate, a recording format, sensitivity, an AF mode, whether to check shooting, image quality tuning parameters, and the like.

また、モードレバーが再生モードに設定されている時のメニュー項目としては、例えば、画像の消去(一枚もしくは全部)、画像の保護(プロテクト)、画像の回転設定等が挙げられる。  The menu items when the mode lever is set to the playback mode include, for example, image deletion (one or all), image protection (protect), image rotation setting, and the like.

また、十字キー76はメニュー設定時以外にも使用される。例えば、モードダイアル62でシャッター速度優先モードに設定されている場合には、ユーザは十字キー76の左右方向キーを使って、シャッター速度の変更を行うことができる。また、再生モードにおいては、画像送りを行うために十字キー76が使用される。  The cross key 76 is also used for other than menu setting. For example, when the shutter speed priority mode is set by themode dial 62, the user can change the shutter speed by using the left / right direction key of thecross key 76. In the playback mode, the cross key 76 is used to advance the image.

70は、メニューキー72、セットキー74、及び十字キー76以外の操作部をまとめたものである。操作部70は、ズームレバー、測光モード切替ボタン、マクロボタン、AEロックボタン、画像表示部28のON/OFFを設定する画像表示ON/OFFスイッチ等を備える。前述のメニューに含まれている項目のうち、比較的使用頻度の高いものが、操作部70に割り当てられている。  Reference numeral 70 denotes a group of operation units other than themenu key 72, theset key 74, and thecross key 76. The operation unit 70 includes a zoom lever, a photometry mode switching button, a macro button, an AE lock button, an image display ON / OFF switch for setting ON / OFF of theimage display unit 28, and the like. Among the items included in the menu described above, items that are used relatively frequently are assigned to the operation unit 70.

80は電源制御手段であり、電池検出回路、DC−DCコンバータ、通電するブロックを切り替えるスイッチ回路等により構成される。電源制御手段80は、電池の装着の有無、電池の種類、電池残量の検出を行う。そして、検出結果及びCPU50の指示に基づいてDC−DCコンバータを制御し、必要な電圧を必要な期間、記録媒体を含む各部へ供給し、必要に応じて表示部54、画像表示部28に電池残量表示を行う。  Reference numeral 80 denotes power supply control means, which includes a battery detection circuit, a DC-DC converter, a switch circuit for switching a block to be energized, and the like. The power control means 80 detects the presence / absence of a battery, the type of battery, and the remaining battery level. Then, the DC-DC converter is controlled based on the detection result and the instruction of the CPU 50, and a necessary voltage is supplied to each part including the recording medium for a necessary period. A battery is supplied to thedisplay unit 54 and theimage display unit 28 as necessary. Displays the remaining amount.

82及び84はコネクタ、86はアルカリ電池やリチウム電池等の一次電池やNiCd電池やNiMH電池、Li電池等の二次電池、ACアダプター等からなる電源である。  Reference numerals 82 and 84 denote connectors, 86 denotes a primary battery such as an alkaline battery or a lithium battery, a secondary battery such as a NiCd battery, NiMH battery, or Li battery, an AC adapter, or the like.

150はメモリカードやハードディスク等の記憶媒体である。記憶媒体150は、半導体メモリや磁気ディスク等から構成される記録部152、デジタルカメラ100とのインタフェース154、デジタルカメラ100と接続を行うコネクタ156を備えている。  Reference numeral 150 denotes a storage medium such as a memory card or a hard disk. Thestorage medium 150 includes arecording unit 152 composed of a semiconductor memory, a magnetic disk, and the like, aninterface 154 with thedigital camera 100, and aconnector 156 for connecting with thedigital camera 100.

92はメモリカードやハードディスク等の記憶媒体150とデジタルカメラ100を接続するためのコネクタである。  Reference numeral 92 denotes a connector for connecting thedigital camera 100 with astorage medium 150 such as a memory card or a hard disk.

なお、本実施形態では、デジタルカメラ100は、記憶媒体を取り付けるインタフェース及びコネクタを1系統持つものとして説明している。しかし、もちろん、記憶媒体を取り付けるインタフェース及びコネクタは、単数或いは複数、いずれの系統数を備える構成としても構わない。また、異なる規格のインタフェース及びコネクタを組み合わせて備える構成としても構わない。  In the present embodiment, thedigital camera 100 is described as having one system of interface and connector for attaching a storage medium. However, as a matter of course, the interface and the connector for attaching the storage medium may have a single or plural number of systems. Moreover, it is good also as a structure provided with combining the interface and connector of a different standard.

インタフェース及びコネクタとしては、PCMCIAカードやCF(コンパクトフラッシュ(登録商標))カード等の規格に準拠したものを用いて構成して構わない。  The interface and the connector may be configured using a PCMCIA card, a CF (Compact Flash (registered trademark)) card, or the like based on a standard.

94はデジタルカメラ100に音声を入力するためのマイクである。マイク94は主に、動画撮影時に音声データを取得するために使用される。  Reference numeral 94 denotes a microphone for inputting sound to thedigital camera 100. Themicrophone 94 is mainly used for acquiring audio data during moving image shooting.

98は検知SWであり、画像表示部28の表示部分をデジタルカメラ100に向けて格納した格納状態にあるかどうかを検知したり、電池蓋が開けられたことを検知したり、外部ストロボ404の装着状態を検知したりすることができる。  Reference numeral 98 denotes a detection SW, which detects whether the display portion of theimage display unit 28 is stored in thedigital camera 100, detects that the battery cover has been opened, It is possible to detect the wearing state.

400は外部ストロボ装置である。本実施形態では、デジタルカメラ100は、内蔵ストロボ48の他に外部ストロボを後から装着できる構成となっており、内蔵ストロボ同様、TTL調光撮影が可能となっている。402はデジタルカメラ100のアクセサリーシュー(コネクタ46)と接続するためのコネクタである。404は外部ストロボであり、AF補助光の投光機能、ストロボ調光機能も有する。  Reference numeral 400 denotes an external strobe device. In the present embodiment, thedigital camera 100 has a configuration in which an external strobe can be attached later in addition to the built-instrobe 48, and TTL light control photography is possible like the built-in strobe.Reference numeral 402 denotes a connector for connecting to the accessory shoe (connector 46) of thedigital camera 100. Anexternal strobe 404 has an AF auxiliary light projecting function and a strobe light control function.

<動画撮影動作の概要>
デジタルカメラ100を用いた動画撮影動作の概要について説明する。ムービーSW68が押下されると、デジタルカメラ100は、以下に説明する動画撮影のスタンバイ状態になる。
<Overview of video shooting operation>
An outline of a moving image shooting operation using thedigital camera 100 will be described. When themovie SW 68 is pressed, thedigital camera 100 enters a moving image shooting standby state described below.

被写体像から入射した光は、光学レンズ10を通過し、絞り兼用シャッター12において露出制御されて、撮像素子14に結像する。動画撮影時には、絞り兼用シャッター12におけるメカ機構のシャッターは開いたままであり、絞りによって露出が制御される。  Light incident from the subject image passes through theoptical lens 10, is subjected to exposure control by thediaphragm shutter 12, and forms an image on the image sensor 14. At the time of moving image shooting, the shutter of the mechanical mechanism in the aperture /shutter 12 remains open, and the exposure is controlled by the aperture.

撮像素子14で被写体像はアナログ映像データに光電変換され、A/D変換器16に送られる。A/D変換器16は、アナログ映像データをデジタル映像データに変換して、信号処理IC22に転送する。  The subject image is photoelectrically converted into analog video data by the image sensor 14 and sent to the A /D converter 16. The A /D converter 16 converts the analog video data into digital video data and transfers it to thesignal processing IC 22.

動画撮影時には、撮像素子14から全画素が読み出されてA/D変換器16に送られるわけではなく、水平方向や垂直方向に間引かれた(あるいは加算されて重畳した)画素が、記録する映像のフレームレートに合わせて読み出される。  At the time of moving image shooting, not all pixels are read out from the image sensor 14 and sent to the A /D converter 16, but pixels thinned out (or added and superimposed) in the horizontal and vertical directions are recorded. Is read out in accordance with the frame rate of the video to be played.

なお、記録する映像のフレームレートは、前述のようにフレームレート選択部69によって選択される。本実施形態では、30FPS又は59.94FPSがフレームレートとして選択可能であるものとする。ただし、フレームレートが59.94FPSに設定されても、画像表示部28や表示部54では、60FPSとしてユーザに示されるものとする。  The frame rate of the video to be recorded is selected by the framerate selection unit 69 as described above. In the present embodiment, it is assumed that 30 FPS or 59.94 FPS can be selected as the frame rate. However, even if the frame rate is set to 59.94 FPS, theimage display unit 28 and thedisplay unit 54 indicate to the user as 60 FPS.

信号処理IC22は、入力されたデジタル映像データに対して、水平垂直のフィルタ処理やアパチャー補正処理やガンマ処理などの各種処理を行う。信号処理IC22は、次に、デジタル映像データを所定の画素サイズ、例えばVGA(水平640画素、垂直480ライン)サイズにリサイズして、DRAM30に転送する。DRAM30上の映像データは、画像表示部28に転送され、表示される。画像表示部28は、設定されたフレームレートでDRAM30に転送されてくる映像データを連続的に表示する。  Thesignal processing IC 22 performs various processes such as horizontal / vertical filter processing, aperture correction processing, and gamma processing on the input digital video data. Next, thesignal processing IC 22 resizes the digital video data to a predetermined pixel size, for example, a VGA (horizontal 640 pixels, vertical 480 lines) size, and transfers it to theDRAM 30. The video data on theDRAM 30 is transferred to theimage display unit 28 and displayed. Theimage display unit 28 continuously displays the video data transferred to theDRAM 30 at the set frame rate.

次に、操作部70などに含まれる記録開始ボタンが押下されると、以下に説明するように、動画の記録が開始される。  Next, when a recording start button included in the operation unit 70 or the like is pressed, recording of a moving image is started as described below.

信号処理IC22は、DRAM30に格納されている映像データを例えばJPEG形式のデータに変換(符号化)する。併せて、CPU50は、マイク94から入力された音声を例えばWAVE形式の音声データに変換する。  Thesignal processing IC 22 converts (encodes) the video data stored in theDRAM 30 into, for example, JPEG format data. In addition, the CPU 50 converts the voice input from themicrophone 94 into, for example, WAVE format voice data.

CPU50は、符号化された映像データ及び音声データにヘッダー情報などの付加情報を付加して、例えばAVI形式の動画ファイルを生成する。CPU50は、コネクタ92を介して、記憶媒体150にAVI形式の動画ファイルを記録する。AVI形式の動画ファイルは、動画ファイルの先頭にあるヘッダー情報で映像データと音声データの配置を管理するデータ構造を持つ。  The CPU 50 adds additional information such as header information to the encoded video data and audio data to generate, for example, an AVI format moving image file. The CPU 50 records an AVI format moving image file on thestorage medium 150 via theconnector 92. An AVI video file has a data structure for managing the arrangement of video data and audio data using header information at the head of the video file.

<動画記録形式の詳細>
以下、本実施形態において、フレームレートを30FPS及び60FPS(厳密には59.94FPS)に設定した場合に、デジタルカメラ100が動画データをAVI形式のファイルに格納する方法について説明する。ここでは、映像のサイズがQVGA(320x240)であり、音声のサンプリングレートが44.1KHz、16bitステレオであるものとする。
<Details of video recording format>
Hereinafter, in the present embodiment, a method in which thedigital camera 100 stores moving image data in an AVI format file when the frame rate is set to 30 FPS and 60 FPS (strictly 59.94 FPS) will be described. Here, it is assumed that the video size is QVGA (320 × 240), the audio sampling rate is 44.1 KHz, and 16-bit stereo.

(1)30FPSの場合
図2は、フレームレートが30FPSで記録されたAVI形式の動画ファイル200を示す図である。動画ファイル200は、ヘッダー部201及び複数の基本データブロック202を備える。基本データブロック202は、映像データ部203及び音声データ部204を備える。ヘッダー部201は、総フレーム数、フレーム間隔、映像サイズ、コーデックの種類、音声のサンプリング周波数等の情報を含む。
(1) In the case of 30 FPS FIG. 2 is a diagram showing an AVI format movingimage file 200 recorded at a frame rate of 30 FPS. The movingimage file 200 includes aheader part 201 and a plurality of basic data blocks 202. The basic data block 202 includes avideo data unit 203 and anaudio data unit 204. Theheader section 201 includes information such as the total number of frames, frame interval, video size, codec type, and audio sampling frequency.

各映像データ部203には、フレームレートが30FPSの場合、例えば再生時間1秒分に相当する30フレームの映像データが格納される。  In eachvideo data unit 203, when the frame rate is 30 FPS, for example, 30 frames of video data corresponding to a playback time of 1 second is stored.

各音声データ部204には、映像データ部203の再生時間と同じ、1秒分に相当する音声データが格納される。格納されるデータの数はサンプリングレートに一致する、44100個(44.1×1000)である。また、音声は16bit(2Byte)ステレオであるため、音声データの容量は、44100×2×2=176400(Byte)となる。以下、音声データのデータ数とは、サンプリングされた音声データのデータ数(サンプリング数)を意味するものとする。  Eachaudio data unit 204 stores audio data corresponding to one second, which is the same as the reproduction time of thevideo data unit 203. The number of data to be stored is 44100 (44.1 × 1000), which matches the sampling rate. Further, since the sound is 16 bit (2 bytes) stereo, the capacity of the sound data is 44100 × 2 × 2 = 176400 (bytes). Hereinafter, the number of audio data means the number of sampled audio data (sampling number).

このように、動画ファイル200は、動画1秒分を1単位とし、これを基本データブロック202とする。そして、映像データ部203と音声データ部204を1秒単位で交互に配置する。  In this way, the movingimage file 200 has a unit of one second of moving image as abasic data block 202. Thevideo data unit 203 and theaudio data unit 204 are alternately arranged in units of 1 second.

CPU50は、動画ファイル200を作成するために、符号化した映像データをバッファーするための映像バッファー領域と音声データをバッファーするための音声バッファー領域をDRAM30で確保する。そして、その領域にそれぞれ映像データと音声データを格納する。そして1秒単位で、映像データと音声データをAVI形式のデータにまとめて、DRAM30上に確保したAVIバッファー領域に格納する。  In order to create the movingimage file 200, the CPU 50 reserves a video buffer area for buffering encoded video data and an audio buffer area for buffering audio data in theDRAM 30. Then, video data and audio data are stored in the areas. Then, video data and audio data are collected into AVI format data and stored in an AVI buffer area secured on theDRAM 30 in units of one second.

ここで、本実施形態の場合、音声データはWAVE形式なので1秒間のデータサイズは固定であるが、映像データはJPEG形式なのでデータサイズが不定である。そこで、先の映像バッファーはAVIバッファーの映像データ領域と兼用にして、AVIバッファー上の音声データ領域を空けながらJPEGデータを書きこんでいく事が可能である。これにより、DRAM30の容量を削減することができる。CPU50は、AVIバッファーに格納したデータを、順次記憶媒体150へファイルとして書き込んでいく。  In this embodiment, since the audio data is in the WAVE format, the data size per second is fixed, but the video data is in the JPEG format, and the data size is indefinite. Therefore, the previous video buffer can also be used as the video data area of the AVI buffer, and JPEG data can be written while freeing the audio data area on the AVI buffer. Thereby, the capacity of theDRAM 30 can be reduced. The CPU 50 sequentially writes the data stored in the AVI buffer to thestorage medium 150 as a file.

この例では、動画記録時のフレームレートが整数であり、映像・音声とも基本データブロックに1秒分のデータが記録されているため、動画再生時に映像と音声にずれが生じることはない。  In this example, since the frame rate at the time of moving image recording is an integer and data for one second is recorded in the basic data block for both video and audio, there is no deviation between the video and audio during moving image reproduction.

(2)60FPS(厳密には59.94FPS)の場合
フレームレートがちょうど60FPSであれば、上述した30FPSの場合と同様、映像・音声とも動画ファイルの基本データブロックに1秒分のデータを記録できるため、動画再生時に映像と音声にずれが生じることはない。
(2) In the case of 60 FPS (strictly 59.94 FPS) If the frame rate is exactly 60 FPS, one second of data can be recorded in the basic data block of the moving image file for both video and audio as in the case of 30 FPS described above. Therefore, there is no difference between video and audio during moving image playback.

しかし、前述のように、デジタルカメラ100は、記録時のフレームレートをNTSCの表示レートに一致させるために、実際には59.94FPSで動画を記録する。この場合、前述のように、1つのデータブロックに映像データを59.94フレーム記録するということは物理的に不可能であるため、直近の整数である60フレームに切り上げて記録される。すなわち、映像データは、1つのデータブロックに1秒よりもやや長く記録されることになり、動画再生時に映像と音声がずれる原因となる。  However, as described above, thedigital camera 100 actually records a moving image at 59.94 FPS in order to match the recording frame rate with the NTSC display rate. In this case, as described above, since it is physically impossible to record video data in 59.94 frames in one data block, it is recorded by rounding up to the nearest 60 frames. That is, the video data is recorded in one data block for a little longer than 1 second, which causes a shift between video and audio during moving image playback.

そこで、本実施形態では、動画再生時に映像と音声にずれを生じさせないようにするため、基本データブロックの音声データ部のデータサイズを変更する。映像データ60フレームを59.94FPSで再生すると、60/59.94≒1.001(秒)かかる。そのため、基本データブロックの音声データ部のデータサイズを1秒から1.001秒に変更する。以下、図3を参照して具体的に説明する。  Therefore, in the present embodiment, the data size of the audio data portion of the basic data block is changed so as not to cause a shift between video and audio during moving image reproduction. If 60 frames of video data are reproduced at 59.94 FPS, it takes 60 / 59.94≈1.001 (seconds). Therefore, the data size of the audio data portion of the basic data block is changed from 1 second to 1.001 seconds. Hereinafter, a specific description will be given with reference to FIG.

図3は、フレームレートが59.94FPSで記録されたAVI形式の動画ファイル300を示す図である。動画ファイル300は、ヘッダー部301及び複数の基本データブロック302を備える。基本データブロック302は、映像データ部303及び音声データ部304を備える。ヘッダー部301は、総フレーム数、フレーム間隔、映像サイズ、コーデックの種類、音声のサンプリング周波数等の情報を含む。映像データ部303は、前述のように、59.94ではなく、60フレーム分の映像データを含む。  FIG. 3 is a diagram showing anAVI video file 300 recorded at a frame rate of 59.94 FPS. The movingimage file 300 includes aheader portion 301 and a plurality of basic data blocks 302. The basic data block 302 includes avideo data unit 303 and anaudio data unit 304. Theheader section 301 includes information such as the total number of frames, frame interval, video size, codec type, and audio sampling frequency. As described above, thevideo data unit 303 includes video data for 60 frames instead of 59.94.

フレームレートが整数の場合は、図2に示すように、音声データ部203に格納されるデータ数はサンプリングレートに一致し、音声1秒分に相当する、44100個であった。しかし、フレームレートが59.94FPSの場合は、音声データ部303には、音声1.001秒分に相当する、44100×1.001=44144個のデータが格納される。この場合、音声データの容量は、44144×2×2=176576(Byte)となる。  When the frame rate is an integer, as shown in FIG. 2, the number of data stored in theaudio data unit 203 is 44100, which corresponds to the sampling rate and corresponds to 1 second of audio. However, when the frame rate is 59.94 FPS, theaudio data unit 303 stores 44100 × 1.001 = 44144 pieces of data corresponding to 1.001 seconds of audio. In this case, the capacity of the audio data is 44144 × 2 × 2 = 176576 (Bytes).

すなわち、フレームレートが59.94FPSの場合、CPU50は、1秒ではなく1.001秒を基本データブロック302の1単位とする。そして、映像データと音声データを交互に1.001秒間毎に動画ファイル300に記録する。これにより、動画再生時に映像と音声がずれることを抑制できる。なお、60/59.94は厳密には1.001ではないため、丸め誤差に起因する映像と音声のずれは発生しうるが、従来の記録方式で発生するずれに比べれば、無視できるほど小さい。  That is, when the frame rate is 59.94 FPS, the CPU 50 sets 1.001 seconds as one unit of the basic data block 302 instead of 1 second. Then, video data and audio data are alternately recorded in the movingimage file 300 every 1.001 seconds. Thereby, it can suppress that a video and a sound shift at the time of animation reproduction. Strictly speaking, 60 / 59.94 is not 1.001, and thus a deviation between video and audio due to a rounding error may occur, but it is negligibly small as compared with a deviation caused by a conventional recording method.

動画ファイルの記録に際しては、30FPSの場合と同様、AVIバッファーに格納したデータを、順次記憶媒体150へファイルとして書き込んでいけばよい。  When recording a moving image file, the data stored in the AVI buffer may be sequentially written to thestorage medium 150 as a file, as in the case of 30 FPS.

<動画記録処理の詳細>
図4は、デジタルカメラ100を使用した動画記録処理の詳細を示すフローチャートである。前述のように、CPU50がムービーSW64の押下を検知すると、デジタルカメラ100は動画撮影のスタンバイ状態になり、CPU50が操作部70などに含まれる記録開始ボタンの押下を検知すると、本フローチャートの処理が開始する。
<Details of video recording process>
FIG. 4 is a flowchart showing details of the moving image recording process using thedigital camera 100. As described above, when the CPU 50 detects that themovie SW 64 is pressed, thedigital camera 100 enters a video shooting standby state. When the CPU 50 detects that the recording start button included in the operation unit 70 or the like is pressed, the processing of this flowchart is performed. Start.

ステップS401で、CPU50は、フレームレート選択部69によってあらかじめ設定されているフレームレートを判定する。フレームレートが30FPSに設定されている場合はステップS402に進み、60FPS(実際には59.94FPS)に設定されている場合はステップS404に進む。  In step S <b> 401, the CPU 50 determines the frame rate set in advance by the framerate selection unit 69. If the frame rate is set to 30 FPS, the process proceeds to step S402. If the frame rate is set to 60 FPS (actually 59.94 FPS), the process proceeds to step S404.

ステップS402では、CPU50は、映像データがQVGA・30FPSになるように撮像素子14を駆動するように、タイミング発生器18を制御する動作を開始する。次に、ステップS403で、CPU50は、動画ファイルに含まれる基本データブロックの音声データ部のデータ数を、音声1秒分に相当する、44100個に設定し、CPU50中のレジスタ(不図示)などに記憶する。  In step S <b> 402, the CPU 50 starts an operation of controlling thetiming generator 18 so as to drive the image sensor 14 so that the video data becomes QVGA · 30 FPS. Next, in step S403, the CPU 50 sets the number of data in the audio data portion of the basic data block included in the moving image file to 44100 corresponding to one second of audio, and registers (not shown) in the CPU 50, etc. To remember.

一方、ステップS404では、CPU50は、映像データがQVGA・59.94FPSになるように撮像素子14を駆動するように、タイミング発生器18を制御する動作を開始する。次に、ステップS405で、CPU50は、動画ファイルに含まれる基本データブロックの音声データ部のデータ数を、音声1.001秒分に相当する、44144個に設定し、CPU50中のレジスタ(不図示)などに記憶する。  On the other hand, in step S404, the CPU 50 starts an operation of controlling thetiming generator 18 so as to drive the image sensor 14 so that the video data becomes QVGA · 59.94FPS. Next, in step S405, the CPU 50 sets the number of data in the audio data portion of the basic data block included in the moving image file to 44144 corresponding to the audio of 1.001 seconds, and registers (not shown) in the CPU 50. ) And so on.

ステップS406で、CPU50は、ステップS402及びS403、又は、ステップS404及びS405で設定した内容に従って、映像データ及び音声データを取得し、動画ファイルとして記憶媒体150に記録する。ただし、フレームレートが59.94FPSの場合は、基本データブロックの映像データ部に格納される映像のフレーム数は、60個である。この処理は、ステップS407においてCPU50が記録終了の指示を受けるまで継続される。  In step S406, the CPU 50 acquires video data and audio data according to the contents set in steps S402 and S403 or steps S404 and S405, and records them as a moving image file in thestorage medium 150. However, when the frame rate is 59.94 FPS, the number of video frames stored in the video data portion of the basic data block is 60. This process is continued until the CPU 50 receives a recording end instruction in step S407.

図5は、図4をより一般化したフローチャートである。図5において、図4と同一の処理を行うステップには同一の符号を付し、説明を省略する。  FIG. 5 is a more generalized flowchart of FIG. In FIG. 5, steps that perform the same processing as in FIG. 4 are given the same reference numerals, and descriptions thereof are omitted.

ステップS501で、CPU50は、動画ファイルにおける基本データブロックの音声データ部のデータ数を、操作部70等を介して設定された値であるA個(例えば、44.1KHz1秒分の44100個)にする。  In step S501, the CPU 50 sets the number of data in the audio data portion of the basic data block in the moving image file to A (for example, 44100 for 44.1 KHz per second) which is a value set via the operation unit 70 or the like. To do.

ステップS502で、CPU50は、フレームレート選択部によって設定されているフレームレートFが整数であるか否かを判定する。整数である場合はステップS503に進み、整数でない場合はステップS504に進む。  In step S502, the CPU 50 determines whether or not the frame rate F set by the frame rate selection unit is an integer. If it is an integer, the process proceeds to step S503, and if it is not an integer, the process proceeds to step S504.

ステップS503で、CPU50は、操作部70等を介して設定された条件(例えば映像サイズはQVGAである、など)に従って撮像素子を駆動するように、タイミング発生器18を制御する動作を開始する。  In step S503, the CPU 50 starts an operation of controlling thetiming generator 18 so as to drive the image pickup device in accordance with conditions set via the operation unit 70 or the like (for example, the video size is QVGA).

ステップS504で、CPU50は、フレームレートFに最も近い整数Nを求める。例えば、F=59.94の場合や、F=60.49の場合は、N=60となる。なお、ステップS504において重要なことは、フレームレートFと相関の高い整数を求めることであり、整数Nは、必ずしもFに最も近い整数でなくても構わない。すなわち、例えば、NはFの少数以下を切り上げたり切り捨てたりして求まる整数でもよい。  In step S504, the CPU 50 obtains an integer N closest to the frame rate F. For example, when F = 59.94 or F = 60.49, N = 60. What is important in step S504 is to obtain an integer having a high correlation with the frame rate F. The integer N is not necessarily an integer closest to F. That is, for example, N may be an integer obtained by rounding up or down a decimal number of F.

ステップS505で、CPU50は、A=A×(N/F)とする。ただし、計算の結果、Aが整数にならない場合は、少数以下を例えば四捨五入することにより、Aを整数にする。  In step S505, the CPU 50 sets A = A × (N / F). However, if A does not become an integer as a result of the calculation, A is made an integer by rounding off the decimal number, for example.

ステップS506で、CPU50は、ステップS503と同様にタイミング発生器18を制御する動作を開始する。  In step S506, the CPU 50 starts an operation for controlling thetiming generator 18 in the same manner as in step S503.

ステップS507で、CPU50は、ステップS406と同様に、映像データ及び音声データを取得し、動画ファイルとして記憶媒体150に記録する。ただし、フレームレートFが整数でない場合は、基本データブロックの映像データ部に格納される映像のフレーム数はN個である。  In step S507, the CPU 50 acquires video data and audio data and records them as a moving image file in thestorage medium 150, as in step S406. However, when the frame rate F is not an integer, the number of video frames stored in the video data portion of the basic data block is N.

以上、図5を参照して説明したように、本実施形態では、フレームレートは30又は59.94FPSに限られるものではないし、映像サイズはQVGAに限られるものではない。また、動画ファイルの形式は、映像データと音声データが所定の単位で交互に記録されるものであれば、AVI形式に限られるものではない。すなわち、本発明は、種々のフレームレート、基本データブロックサイズ、ファイル形式、映像サイズ、音声サンプリング周波数での動画記録に適用可能であり、動画の表示装置もNTSC規格以外の規格に準拠していてもよい。  As described above with reference to FIG. 5, in this embodiment, the frame rate is not limited to 30 or 59.94 FPS, and the video size is not limited to QVGA. The format of the moving image file is not limited to the AVI format as long as video data and audio data are alternately recorded in a predetermined unit. That is, the present invention can be applied to moving image recording at various frame rates, basic data block sizes, file formats, video sizes, and audio sampling frequencies, and the moving image display device also complies with standards other than the NTSC standard. Also good.

<ずれ抑制の程度>
図4のステップS405及び図5のステップS505では、次のことを目的とした処理が行われている。すなわち、基本データブロックの映像データ部に記録されている映像データを再生するのに要する時間を映像再生時間とする。音声データ部に記録されている音声データを再生するのに要する時間を音声再生時間とする。そして、映像再生時間と音声再生時間との差の絶対値(以下、「再生時間の差」と呼ぶ)が最小となるように、音声データ部に記録されるデータ数が決定される。もちろん、再生時間の差が0になるのが最も好ましいが、音声データ部に記録されるデータ数は整数でなければならないため、再生時間の差は必ずしも0にならない。
<Degree of deviation suppression>
In step S405 of FIG. 4 and step S505 of FIG. 5, processing for the following purpose is performed. That is, the time required to reproduce the video data recorded in the video data portion of the basic data block is defined as the video reproduction time. The time required to reproduce the audio data recorded in the audio data portion is defined as the audio reproduction time. Then, the number of data recorded in the audio data portion is determined so that the absolute value of the difference between the video reproduction time and the audio reproduction time (hereinafter referred to as “reproduction time difference”) is minimized. Of course, it is most preferable that the difference in the reproduction time is zero, but the difference in the reproduction time is not necessarily zero because the number of data recorded in the audio data portion must be an integer.

一方、再生時間の差は、必ずしも最小になる必要は無い。再生時間の差が小さくなればなるほど、動画再生時に、映像と音声のずれが目立たなくなるため、人間が映像と音声のずれを認識できない程度に再生時間の差を小さくすれば、「映像と音声のずれを抑制する」という目的に対して一定の効果が得られる。  On the other hand, the difference in reproduction time is not necessarily minimized. The smaller the difference in playback time, the less noticeable the difference between video and audio during video playback. Therefore, if the difference in playback time is reduced so that humans cannot recognize the difference between video and audio, the video and audio A certain effect can be obtained for the purpose of “suppressing deviation”.

そこで、ステップS405及びS505において、再生時間の差があらかじめ定められた値よりも小さくなるように、音声データ部に記録されるデータ数が決定されるように、デジタルカメラ100を構成してもよい。  Therefore, in steps S405 and S505, thedigital camera 100 may be configured such that the number of data recorded in the audio data portion is determined so that the difference in reproduction time is smaller than a predetermined value. .

<第1の実施形態のまとめ>
以上説明したように、本実施形態によれば、デジタルカメラ100は、動画の記録時に、基本データブロックの音声データ部に格納されるデータ数を、フレームレートに応じて変化させる。具体的には、基本データブロックの映像データ部及び音声データ部の再生時間の差を、あらかじめ定められた値よりも小さくする。
<Summary of First Embodiment>
As described above, according to the present embodiment, thedigital camera 100 changes the number of data stored in the audio data portion of the basic data block according to the frame rate when recording a moving image. Specifically, the difference between the reproduction times of the video data portion and the audio data portion of the basic data block is made smaller than a predetermined value.

これにより、表示装置で動画を再生する際に、映像と音声がずれることを抑制できる。  Thereby, when a moving image is reproduced on the display device, it is possible to suppress a shift between video and audio.

[その他の実施形態]
上述した実施の形態の処理は、各機能を具現化したソフトウェアのプログラムコードを記録した記憶媒体をシステム或は装置に提供してもよい。そして、そのシステム或は装置のコンピュータ(又はCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによって、前述した実施形態の機能を実現することができる。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。このようなプログラムコードを供給するための記憶媒体としては、例えば、フロッピィ(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスクなどを用いることができる。或いは、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROMなどを用いることもできる。
[Other Embodiments]
In the processing of the above-described embodiment, a storage medium in which a program code of software that embodies each function is recorded may be provided to the system or apparatus. The functions of the above-described embodiments can be realized by the computer (or CPU or MPU) of the system or apparatus reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. As a storage medium for supplying such a program code, for example, a floppy (registered trademark) disk, a hard disk, an optical disk, a magneto-optical disk, or the like can be used. Alternatively, a CD-ROM, CD-R, magnetic tape, nonvolatile memory card, ROM, or the like can be used.

また、コンピュータが読み出したプログラムコードを実行することにより、前述した各実施の形態の機能が実現されるだけではない。そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)などが実際の処理の一部又は全部を行い、その処理によって前述した各実施の形態の機能が実現される場合も含まれている。  The functions of the above-described embodiments are not only realized by executing the program code read by the computer. In some cases, an OS (operating system) running on the computer performs part or all of the actual processing based on the instruction of the program code, and the functions of the above-described embodiments are realized by the processing. include.

さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書きこまれてもよい。その後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部又は全部を行い、その処理によって前述した各実施の形態の機能が実現される場合も含むものである。  Further, the program code read from the storage medium may be written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. After that, the CPU of the function expansion board or function expansion unit performs part or all of the actual processing based on the instruction of the program code, and the functions of the above-described embodiments are realized by the processing. Is also included.

第1の実施形態における画像記録装置であるデジタルカメラ100の構成を示す機能ブロック図である。1 is a functional block diagram illustrating a configuration of adigital camera 100 that is an image recording apparatus according to a first embodiment.フレームレートが30FPSで記録されたAVI形式の動画ファイル200を示す図である。It is a figure which shows the movingimage file 200 of the AVI format recorded with the frame rate of 30 FPS.フレームレートが59.94FPSで記録されたAVI形式の動画ファイル300を示す図である。It is a figure which shows the movingimage file 300 of the AVI format recorded by frame rate 59.94FPS.デジタルカメラ100を使用した動画記録処理の詳細を示すフローチャートである。5 is a flowchart showing details of a moving image recording process using thedigital camera 100.図4をより一般化したフローチャートである。FIG. 5 is a generalized flowchart of FIG. 4.

Claims (7)

Translated fromJapanese
映像及び音声を含む動画を動画ファイルとして記録する画像記録装置であって、前記動画ファイルは、映像データを格納する映像データ部と音声データを格納する音声データ部が交互に配置されている形式であり、前記画像記録装置は、
前記動画を記録するフレームレートを取得する取得手段と、
前記フレームレートに基づいて、1つあたりの前記映像データ部に格納される映像データのフレーム数を決定する第1の決定手段と、
前記第1の決定手段により決定されたフレーム数の映像データを再生するのに要する映像再生時間を計算する計算手段と、
前記動画ファイルを再生したときに生じうる音ずれを抑制するよう、1つあたりの前記音声データ部に格納される、サンプリングされた音声データのデータ数を前記映像再生時間に応じて決定する第2の決定手段と、
を備え
前記第2の決定手段は、前記1つあたりの音声データ部に格納される音声データを再生するのに要する音声再生時間と前記映像再生時間との差の絶対値が、音ずれを低減するためにあらかじめ定められた値よりも小さくなるように、前記データ数を決定することを特徴とする画像記録装置。
An image recording apparatus for recording a moving image including video and audio as a moving image file, wherein the moving image file has a format in which a video data portion storing video data and an audio data portion storing audio data are alternately arranged. And the image recording apparatus comprises:
Obtaining means for obtaining a frame rate for recording the moving image;
First determining means for determining the number of frames of video data stored in the video data portion per one based on the frame rate;
Calculating means for calculating a video playback time required to play back video data of the number of frames determined by the first determining means;
Secondly, the number of sampled audio data stored in one audio data portion is determined according to the video reproduction time so as to suppress a sound shift that may occur when the moving image file is reproduced. And means for determining
Equipped witha,
The second deciding means is configured such that the absolute value of the difference between the audio reproduction time required for reproducing the audio data stored in the one audio data portion and the video reproduction time reduces the sound deviation. The image recording apparatus is characterizedin that thenumber of data is determined so as to be smaller than a predetermined value .
前記第2の決定手段は、前記1つあたりの音声データ部に格納される音声データを再生するのに要する音声再生時間が前記映像再生時間に一致させることが可能な場合は該音声再生時間が該映像再生時間に一致するように前記1つあたりの音声データ部に格納されるサンプリングされた音声データのデータ数を決定し、
前記1つあたりの音声データ部に格納される音声データを再生するのに要する音声再生時間が前記映像再生時間に一致させることが不可能な場合は該音声再生時間と該映像再生時間との差の絶対値が最小になるように前記1つあたりの音声データ部に格納されるサンプリングされた音声データのデータ数を決定する
ことを特徴とする請求項1に記載の画像記録装置。
The second determining means determines the audio reproduction time when the audio reproduction time required to reproduce the audio data stored in the one audio data portion can be matched with the video reproduction time. Determining the number of sampled audio data stored in the audio data unit per unit so as to coincide with the video playback time;
If the audio playback time required to play back the audio data stored in one audio data portion cannot be matched with the video playback time, the difference between the audio playback time and the video playback time absolute value image recording apparatus accordingto claim1, characterized in that to determine the number of data of the audio data sampled the stored in the voice data section for unit so as to minimize the.
ユーザの指示に応答して前記フレームレートを設定する設定手段を備えることを特徴とする請求項1又は2に記載の画像記録装置。The image recording apparatus according to claim 1or 2 in response to an instruction from a user, characterized in that it comprises a setting means for setting the frame rate. 前記動画ファイルの形式は、AVI形式であることを特徴とする請求項1乃至のいずれか1項に記載の画像記録装置。The format of the moving image file, the image recording apparatus according to any one of claims 1 to3, characterized in that the AVI format. 映像及び音声を含む動画を動画ファイルとして記録する画像記録装置の制御方法であって、前記動画ファイルは、映像データを格納する映像データ部と音声データを格納する音声データ部が交互に配置されている形式であり、前記制御方法は、
前記動画を記録するフレームレートを取得する取得工程と、
前記フレームレートに基づいて、1つあたりの前記映像データ部に格納される映像データのフレーム数を決定する第1の決定工程と、
前記第1の決定工程により決定されたフレーム数の映像データを再生するのに要する映像再生時間を計算する計算工程と、
前記動画ファイルを再生したときに生じうる音ずれを抑制するよう、1つあたりの前記音声データ部に格納される、サンプリングされた音声データのデータ数を前記映像再生時間に応じて決定する第2の決定工程と、
を備え
前記第2の決定工程では、前記1つあたりの音声データ部に格納される音声データを再生するのに要する音声再生時間と前記映像再生時間との差の絶対値が、音ずれを低減するためにあらかじめ定められた値よりも小さくなるように、前記データ数を決定することを特徴とする制御方法。
A control method of an image recording apparatus for recording a moving image including video and audio as a moving image file, wherein the moving image file includes a video data portion storing video data and an audio data portion storing audio data alternately arranged. The control method is
An acquisition step of acquiring a frame rate for recording the moving image;
A first determination step of determining the number of frames of video data stored in the video data portion per one based on the frame rate;
A calculation step of calculating a video playback time required to play back the video data of the number of frames determined in the first determination step;
Secondly, the number of sampled audio data stored in one audio data portion is determined according to the video reproduction time so as to suppress a sound shift that may occur when the moving image file is reproduced. And the determination process of
Equipped witha,
In the second determination step, the absolute value of the difference between the audio reproduction time required for reproducing the audio data stored in the audio data unit per unit and the video reproduction time is used to reduce sound deviation. And determining the number of data so as to be smaller than a predetermined value .
映像及び音声を含む動画を動画ファイルとして記録する画像記録装置の制御方法をコンピュータに実行させるためのプログラムであって、前記動画ファイルは、映像データを格納する映像データ部と音声データを格納する音声データ部が交互に配置されている形式であり、前記制御方法は、
前記動画を記録するフレームレートを取得する取得工程と、
前記フレームレートに基づいて、1つあたりの前記映像データ部に格納される映像データのフレーム数を決定する第1の決定工程と、
前記第1の決定工程により決定されたフレーム数の映像データを再生するのに要する映像再生時間を計算する計算工程と、
前記動画ファイルを再生したときに生じうる音ずれを抑制するよう、1つあたりの前記音声データ部に格納される、サンプリングされた音声データのデータ数を前記映像再生時間に応じて決定する第2の決定工程と、
を備え
前記第2の決定工程では、前記1つあたりの音声データ部に格納される音声データを再生するのに要する音声再生時間と前記映像再生時間との差の絶対値が、音ずれを低減するためにあらかじめ定められた値よりも小さくなるように、前記データ数を決定することを特徴とするプログラム。
A program for causing a computer to execute a control method of an image recording apparatus for recording a moving image including video and audio as a moving image file, wherein the moving image file includes a video data portion for storing video data and an audio for storing audio data. The data parts are alternately arranged, and the control method is
An acquisition step of acquiring a frame rate for recording the moving image;
A first determination step of determining the number of frames of video data stored in the video data portion per one based on the frame rate;
A calculation step of calculating a video playback time required to play back the video data of the number of frames determined in the first determination step;
Secondly, the number of sampled audio data stored in one audio data portion is determined according to the video reproduction time so as to suppress a sound shift that may occur when the moving image file is reproduced. And the determination process of
Equipped witha,
In the second determination step, the absolute value of the difference between the audio reproduction time required for reproducing the audio data stored in the audio data unit per unit and the video reproduction time is used to reduce sound deviation. A programfor determining the number of data to be smaller than a predetermined value .
請求項に記載のプログラムを記録したコンピュータ読み取り可能な記憶媒体。A computer-readable storage medium in which the program according to claim6 is recorded.
JP2006037252A2006-02-142006-02-14 Image recording apparatus and control method thereofExpired - Fee RelatedJP4637032B2 (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
JP2006037252AJP4637032B2 (en)2006-02-142006-02-14 Image recording apparatus and control method thereof

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
JP2006037252AJP4637032B2 (en)2006-02-142006-02-14 Image recording apparatus and control method thereof

Publications (2)

Publication NumberPublication Date
JP2007221271A JP2007221271A (en)2007-08-30
JP4637032B2true JP4637032B2 (en)2011-02-23

Family

ID=38498097

Family Applications (1)

Application NumberTitlePriority DateFiling Date
JP2006037252AExpired - Fee RelatedJP4637032B2 (en)2006-02-142006-02-14 Image recording apparatus and control method thereof

Country Status (1)

CountryLink
JP (1)JP4637032B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102761724A (en)*2011-12-162012-10-31新奥特(北京)视频技术有限公司Video/audio treating method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP2624538B2 (en)*1989-03-021997-06-25日本放送協会 Audio synchronization method for television format conversion
JPH09247625A (en)*1996-03-111997-09-19Sony CorpDigital video tape recorder

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102761724A (en)*2011-12-162012-10-31新奥特(北京)视频技术有限公司Video/audio treating method

Also Published As

Publication numberPublication date
JP2007221271A (en)2007-08-30

Similar Documents

PublicationPublication DateTitle
JP4724577B2 (en) Imaging apparatus and control method thereof
JP4777180B2 (en) Imaging apparatus and control method thereof
KR20050090804A (en)Composition camera and dsc lens control method using the same
JP2007306224A (en) Digital camera
KR20040099874A (en)Combination apparatus for photograping image and method thereof
JP2008301475A (en) Imaging apparatus and control method thereof
JP2002084448A (en)Image automatic transmission digital camera
JP4574087B2 (en) Imaging apparatus, control method thereof, control program thereof, and storage medium
JP4637032B2 (en) Image recording apparatus and control method thereof
JP2002010188A (en)Automatic image transmitting digital camera
JP4810485B2 (en) Image processing apparatus, image processing method, and computer program
JP5836578B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND PROGRAM
JP4948011B2 (en) Imaging apparatus, control method therefor, computer program, and storage medium
JP2006310907A (en) Imaging apparatus and control method thereof
JP2004096227A (en) Audio processing device, method, computer program, and computer-readable storage medium
JP4161710B2 (en) Camera with music playback function
JP5300627B2 (en) Imaging apparatus, control method thereof, and program
JP2010074296A (en)Image reproducing device and method, and program
EP1575286A2 (en)Combined camcorder and stills camera
JP5207880B2 (en) Imaging apparatus, control method thereof, and program
JP2008011244A (en) Imaging apparatus, control method thereof, and program
JP3978522B2 (en) Electronic camera
JP2004032713A (en) Imaging apparatus, imaging method, program, and storage medium
KR100627070B1 (en)Video and audio signal recording device and reproducing device
JP5288962B2 (en) Imaging apparatus and control method thereof

Legal Events

DateCodeTitleDescription
A621Written request for application examination

Free format text:JAPANESE INTERMEDIATE CODE: A621

Effective date:20090213

A977Report on retrieval

Free format text:JAPANESE INTERMEDIATE CODE: A971007

Effective date:20100902

A131Notification of reasons for refusal

Free format text:JAPANESE INTERMEDIATE CODE: A131

Effective date:20100906

A521Request for written amendment filed

Free format text:JAPANESE INTERMEDIATE CODE: A523

Effective date:20101022

TRDDDecision of grant or rejection written
A01Written decision to grant a patent or to grant a registration (utility model)

Free format text:JAPANESE INTERMEDIATE CODE: A01

Effective date:20101115

A01Written decision to grant a patent or to grant a registration (utility model)

Free format text:JAPANESE INTERMEDIATE CODE: A01

A61First payment of annual fees (during grant procedure)

Free format text:JAPANESE INTERMEDIATE CODE: A61

Effective date:20101122

FPAYRenewal fee payment (event date is renewal date of database)

Free format text:PAYMENT UNTIL: 20131203

Year of fee payment:3

R150Certificate of patent or registration of utility model

Free format text:JAPANESE INTERMEDIATE CODE: R150

LAPSCancellation because of no payment of annual fees

[8]ページ先頭

©2009-2025 Movatter.jp