JP2013016081A - Image processing apparatus and control method of the same - Google Patents
Image processing apparatus and control method of the same Download PDFInfo
- Publication number
- JP2013016081A JP2013016081A JP2011149492A JP2011149492A JP2013016081A JP 2013016081 A JP2013016081 A JP 2013016081A JP 2011149492 A JP2011149492 A JP 2011149492A JP 2011149492 A JP2011149492 A JP 2011149492A JP 2013016081 A JP2013016081 A JP 2013016081A
- Authority
- JP
- Japan
- Prior art keywords
- recording medium
- image data
- recording
- unit
- written
- 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.)
- Granted
Links
Images
Abstract
Description
本発明は、画像処理装置及びその制御方法に関する。 The present invention relates to an image processing apparatus and a control method thereof.
メモリカード、磁気記録媒体、光学記録媒体などの記録媒体に画像データを記録する際には、かかるデータを特定する情報(ファイル名など)、記録開始アドレス、データのサイズなどのデータ管理用の管理データが画像データと共に記録される。このような画像データの記録及び管理を行うための方式として、FAT(File Allocation Table)ファイルシステムが一般的によく知られている。 When recording image data on a recording medium such as a memory card, magnetic recording medium, or optical recording medium, management for data management such as information (file name, etc.) for specifying the data, recording start address, data size, etc. Data is recorded along with the image data. A FAT (File Allocation Table) file system is generally well known as a method for recording and managing such image data.
FATファイルシステムでは、画像データはクラスタと呼ばれる単位で記録(管理)され、1クラスタのサイズはフォーマットの種類で異なる。1クラスタのサイズよりも大きなサイズの画像データを記録する場合には、複数のクラスタが使用される。また、FATファイルシステムは、マスターブート領域(MBR)、ブートセクタ領域(BPB)、FSINFO領域(32ビットFATのみ)、FAT領域、ルートディレクトリ領域、データ領域などで構成されている。ブートセクタ領域には、FAT数、ルートディレクトリのエントリ数などの記録媒体に対して画像データを読み書きする場合に必要な情報が記録される。FAT領域には、画像データの記録に複数のクラスタを使用する場合に、その連鎖情報が記録される。ルートディレクトリ領域には、記録された画像データのファイル名、記録を開始したクラスタの番号、記録された画像データのサイズなどの情報が記録される。 In the FAT file system, image data is recorded (managed) in units called clusters, and the size of one cluster differs depending on the format type. When recording image data having a size larger than the size of one cluster, a plurality of clusters are used. The FAT file system includes a master boot area (MBR), a boot sector area (BPB), an FSINFO area (32-bit FAT only), a FAT area, a root directory area, a data area, and the like. In the boot sector area, information necessary for reading / writing image data from / to a recording medium, such as the number of FATs and the number of root directory entries, is recorded. In the FAT area, chain information is recorded when a plurality of clusters are used for recording image data. In the root directory area, information such as the file name of the recorded image data, the number of the cluster that started recording, and the size of the recorded image data are recorded.
例えば、クラスタ2、3及び4の3つのクラスタを使用して画像データを記録する場合を考える。この場合、クラスタ2のFAT領域には次に続くクラスタの番号である「3」が記録され、同様に、クラスタ3のFAT領域には「4」、クラスタ4のFAT領域には最終クラスタを意味するコード(12ビットFATでは、「FFFh」)が記録される。また、ルートディレクトリ領域のディレクトリエントリには、ファイル名及びクラスタ開始番号として「2」が記録されることになる。 For example, consider a case where image data is recorded using three clusters 2, 3 and 4. In this case, “3”, which is the number of the next cluster, is recorded in the FAT area of the cluster 2, and similarly, “4” is recorded in the FAT area of the cluster 3 and the last cluster is stored in the FAT area of the cluster 4. Code ("FFFh" in 12-bit FAT) is recorded. In the directory entry of the root directory area, “2” is recorded as the file name and the cluster start number.
なお、画像データが記録されていないクラスタ(即ち、空きクラスタ)のFAT領域には「0」が記録されている。FATファイルシステムで画像データを管理する装置では、12ビットFATや16ビットFATの場合、一般的に、FAT領域に「0」が記録されているクラスタの数と、ブートセクタ領域に記録されている1クラスタのサイズから記録媒体の空き容量を算出する。また、32ビットFATの場合は、FAT領域の大きさも非常に大きくなることから、FSINFO領域に空きクラスタ数を記録する領域があり、記録媒体の空き容量を短時間で算出できるようになっている。 Note that “0” is recorded in the FAT area of a cluster in which image data is not recorded (that is, an empty cluster). In a device that manages image data with the FAT file system, in the case of 12-bit FAT or 16-bit FAT, generally, the number of clusters in which “0” is recorded in the FAT area and the boot sector area are recorded. The free capacity of the recording medium is calculated from the size of one cluster. In the case of 32-bit FAT, since the size of the FAT area becomes very large, there is an area for recording the number of free clusters in the FSINFO area, and the free capacity of the recording medium can be calculated in a short time. .
FATファイルシステムで画像データを管理する装置において、着脱可能な記録媒体への画像データの記録中に、記録媒体が取り外されたり、装置本体の電池が抜かれたり、電池の急激な電圧低下などが生じたりした場合は、画像データの記録が中断される。画像データの記録が中断した場合には、FAT領域に記録される連鎖情報やディレクトリエントリなどのデータに何らかの不具合が生じる可能性がある。例えば、FAT領域に記録される連鎖情報が途切れ、画像データを正しく読み出すことができなかったり、実際に記録された画像データのサイズとルートディレクトリ領域に記録されている画像データのサイズが一致しなくなったりする。また、実際には使用していないクラスタのFAT領域に何らかの連鎖情報が記録され、そのクラスタを使用できなくなることもある。 In an apparatus that manages image data with the FAT file system, the recording medium is removed, the battery of the apparatus is removed, or the battery suddenly drops in voltage while the image data is recorded on the removable recording medium. In such a case, the recording of the image data is interrupted. When the recording of the image data is interrupted, there is a possibility that some trouble occurs in the data such as chain information and directory entries recorded in the FAT area. For example, the chain information recorded in the FAT area is interrupted, and the image data cannot be read correctly, or the size of the actually recorded image data and the size of the image data recorded in the root directory area do not match. Or In addition, some chain information may be recorded in the FAT area of a cluster that is not actually used, and the cluster may not be used.
このような問題への対策として、管理データ用の記録領域(管理データ記録領域)への管理データの書き込みが完了した後に画像データ用の記録領域への画像データの書き込みを開始する技術が知られている。また、このような問題に関連する他の技術も幾つか提案されている(特許文献1及び2参照)。
As a countermeasure against such a problem, a technique is known in which writing of image data to a recording area for image data is started after the writing of management data to a management data recording area (management data recording area) is completed. ing. Several other techniques related to such a problem have been proposed (see
一方、FATファイルシステムで画像データを管理する装置では、1つの画像データを記録媒体に書き込むたびに、FAT領域やルートディレクトリ領域への管理データの書き込みを繰り返さなければならない。従って、記録媒体に点在する領域への書き込みによるオーバーヘッドが発生するという問題もある。 On the other hand, in an apparatus that manages image data using the FAT file system, it is necessary to repeatedly write management data to the FAT area or the root directory area every time one piece of image data is written to a recording medium. Therefore, there is also a problem that overhead occurs due to writing to areas scattered on the recording medium.
このような問題への対策として、時間的に連続する画像データ(連写画像データや動画像データなど)を記録媒体に記録する際に、管理データの書き込み回数を低減する技術が提案されている(特許文献3参照)。 As a countermeasure against such a problem, a technique for reducing the number of times management data is written when recording temporally continuous image data (such as continuous-shot image data or moving image data) on a recording medium has been proposed. (See Patent Document 3).
しかしながら、管理データの書き込みが完了した後に画像データの書き込みを開始する技術では、画像データの書き込みが中断されると、書き込み中のクラスタに続いて使用する予定のクラスタは未使用であるが、管理データ上では使用されていることになる。従って、このような技術では、記録媒体の容量を有効に活用することができない。 However, in the technology for starting the writing of image data after the writing of management data is completed, if the writing of image data is interrupted, the cluster scheduled to be used after the cluster being written is unused, but the management is continued. It is used on the data. Therefore, with such a technique, the capacity of the recording medium cannot be used effectively.
特許文献1には、仮のファイル名で画像データの書き込みを開始し、画像データの書き込みを完了したときに本来のファイル名に変更する技術が提案されている。特許文献1の技術は、無効な画像データが記録されている領域を無くすことはできるが、FAT領域などの管理データ記録領域への書込みに対しての保護はなされていない。更に、その記録媒体を他の装置で使用する場合、他の装置では仮のファイル名を判別することができないため、その領域を使用することができなくなる。
Japanese Patent Application Laid-Open No. 2004-133620 proposes a technique for starting writing image data with a temporary file name and changing the original file name when writing of the image data is completed. Although the technique of
特許文献2には、記録媒体を取り外し可能な状態にする操作又は状態を検知した場合に、画像データと管理データとが整合した状態で画像データの書き込みを中断する技術が提案されている。特許文献2の技術では、記録媒体における管理データ記録領域の破壊や記録データの破壊を保護することはできるが、動画像を記録している場合には、画像データの書き込みが中断されてしまうため、動画像の連続性が失われてしまう。 Patent Document 2 proposes a technique for interrupting the writing of image data in a state in which the image data and the management data match when an operation or a state for making the recording medium removable is detected. With the technique of Patent Document 2, it is possible to protect the destruction of the management data recording area and the destruction of the recording data in the recording medium. However, when a moving image is recorded, the writing of the image data is interrupted. , The continuity of the moving image is lost.
一方、特許文献3の技術は、画像データや管理データの効率的な書き込みを可能にするが、上述したように画像データの記録が突然中断された場合には対応することができない。換言すれば、このような場合、特許文献3の技術では、FAT領域に記録される連鎖情報やディレクトリエントリなどのデータに何らかの不具合が生じる可能性を低減(回避)することができない。 On the other hand, the technique of Patent Document 3 enables efficient writing of image data and management data, but cannot cope with the case where recording of image data is suddenly interrupted as described above. In other words, in such a case, the technique of Patent Document 3 cannot reduce (avoid) the possibility that some trouble occurs in data such as chain information and directory entries recorded in the FAT area.
本発明は、このような従来技術の課題に鑑みてなされたものであり、画像データや管理データの保護と効率的な書き込みとの両立の点で有利な技術を提供することを例示的目的とする。 The present invention has been made in view of the problems of the prior art as described above, and an exemplary object is to provide an advantageous technique in terms of both protection of image data and management data and efficient writing. To do.
上記目的を達成するために、本発明の一側面としての画像処理装置は、画像データと、前記画像データを管理するための管理データとを保存する記録媒体を着脱可能な画像処理装置であって、前記記録媒体に対して、データの書き込み及び読み出しを行う記録手段と、前記記録媒体に記録する1つ以上の画像データを記憶する第1の記憶手段と、前記記録手段によって前記記録媒体から読み出された前記管理データを記憶する第2の記憶手段と、前記第1の記憶手段に記憶された画像データが前記記録手段によって前記記録媒体に書き込まれるたびに、前記第2の記憶手段に記憶された前記管理データを更新する更新手段と、前記第1の記憶手段に記憶された画像データを前記記録媒体に書き込むことが不可能となりえる予め定められた状態を検知する検知手段と、を有し、前記記録手段による前記第1の記憶手段に記憶された画像データの前記記録媒体への書き込みが開始され、且つ、前記第1の記憶手段に画像データが残っているときに、前記検知手段が前記予め定められた状態を検知した場合には、前記記録手段は、前記第2の記憶手段に記憶されている、前記更新手段によって更新された最新の管理データを前記記録媒体に書き込み、前記検知手段が前記予め定められた状態を検知しない場合には、1つの画像データが前記記録媒体に書き込まれるたびに、前記記録手段は、前記第2の記憶手段に記憶されている、前記更新手段によって更新された最新の管理データのうち少なくとも前記記録媒体から画像データを読み出すのに必要となる一部のデータを前記記録媒体に書き込み、前記記録手段による前記第1の記憶手段に記憶された全ての画像データの前記記録媒体への書き込みが終わってから、前記記録手段は、前記最新の管理データの全部のデータを前記記録媒体に書き込むことを特徴とする。 In order to achieve the above object, an image processing apparatus according to an aspect of the present invention is an image processing apparatus in which a recording medium for storing image data and management data for managing the image data is detachable. Recording means for writing and reading data to and from the recording medium, first storage means for storing one or more image data to be recorded on the recording medium, and reading from the recording medium by the recording means Second storage means for storing the management data that has been output, and image data stored in the first storage means is stored in the second storage means each time the image data is written to the recording medium by the recording means. A predetermined state in which it is impossible to write the image data stored in the first storage unit and the update unit that updates the management data that has been recorded on the recording medium Detecting means for detecting, the writing of the image data stored in the first storage means by the recording means to the recording medium is started, and the image data remains in the first storage means When the detection means detects the predetermined state, the recording means stores the latest management data stored in the second storage means and updated by the update means. Is written to the recording medium, and the detection means does not detect the predetermined state, the recording means stores the second storage means each time one piece of image data is written to the recording medium. Of the latest management data updated by the updating means, at least a part of data necessary for reading image data from the recording medium is written on the recording medium. In addition, after all the image data stored in the first storage unit by the recording unit has been written to the recording medium, the recording unit stores all of the latest management data in the recording medium. It is characterized by writing in.
本発明の更なる目的又はその他の側面は、以下、添付図面を参照して説明される好ましい実施形態によって明らかにされるであろう。 Further objects and other aspects of the present invention will become apparent from the preferred embodiments described below with reference to the accompanying drawings.
本発明によれば、例えば、画像データや管理データの保護と効率的な書き込みとの両立の点で有利な技術を提供することができる。 According to the present invention, for example, it is possible to provide a technique that is advantageous in terms of both protection of image data and management data and efficient writing.
以下、添付図面を参照して、本発明の好適な実施の形態について説明する。なお、各図において、同一の部材については同一の参照番号を付し、重複する説明は省略する。 DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described with reference to the accompanying drawings. In addition, in each figure, the same reference number is attached | subjected about the same member and the overlapping description is abbreviate | omitted.
図1は、本発明の一側面としての画像処理装置として機能する撮像装置1の構成を示す概略図である。撮像装置1は、本実施形態では、被写体を撮像して画像データ(静止画像データや動画像データ)を生成するデジタルカメラである。但し、撮像装置1は、レンズ交換が可能なデジタルビデオカメラなど他の撮像装置であってもよい。撮像装置1には、記録媒体30やパーソナルコンピュータ(PC)40などの外部装置が着脱可能になっている。撮像装置1は、図1に示すように、レンズ部10と、本体部20とを有する。
FIG. 1 is a schematic diagram illustrating a configuration of an
レンズ部10は、複数のレンズからなる撮像レンズ102と、絞り104と、レンズ部10と本体部20とを機械的及び電気的に接続するレンズ側マウント106と、レンズ部10の全体を制御するレンズ制御部108とを有する。レンズ制御部108は、例えば、撮像レンズ102のフォーカシングやズーミング、絞り104の絞り値などを制御する。レンズ部10は、レンズ制御部108の制御下で、撮像レンズ102に入射した光を、絞り104(及びレンズ側マウント106)を介して、撮像素子212に結像する(即ち、撮像素子212の上に光学像を形成する)。
The
本体部20において、本体側マウント202は、レンズ部10と本体部20とを機械的及び電気的に接続する。ミラー204及び206は、撮像レンズ102に入射した光を、一眼レフ方式で光学ファインダ208に導く。シャッタ210は、絞り機能を有する。撮像素子212は、レンズ部10(撮像レンズ102)によって形成される光学像を電気信号に変換する。A/D変換部214は、撮像素子212から出力されるアナログ信号をデジタル信号に変換する。
In the
画像処理部216は、A/D変換部214からの画像データ又はメモリ制御部218からの画像データに対して所定の画像処理(画素補間処理や色変換処理)を行う。画像処理部216は、必要に応じて、A/D変換部214からの画像データを用いて所定の演算処理を行い、その演算結果に基づいて、TTL(スルー・ザ・レンズ)方式のホワイトバランス(AWB)処理を行う。また、画像処理部216は、所定の演算処理の演算結果をシステム制御部228に出力する。システム制御部228は、画像処理部216からの演算結果に基づいて、TTL(スルー・ザ・レンズ)方式のオートフォーカス(AF)処理、自動露出(AE)処理及びフラッシュプリ発光(EF)処理を行う。
The
メモリ制御部218は、A/D変換部214、画像処理部216、画像表示メモリ220及びD/A変換部222を制御する。A/D変換部214からの画像データは、画像処理部216及びメモリ制御部218を介して、或いは、メモリ制御部218のみを介して、画像表示メモリ220又はメモリ224に書き込まれる(記録される)。
The
メモリ224は、撮像素子212から順次入力される画像データを記憶するためのメモリであって、所定の数(1つ以上)の画像データを記憶するための十分な記憶容量を備えている。従って、複数の静止画像データを連続して撮影する連写撮像やパノラマ撮像を行う場合にも、高速、且つ、大量な画像データの書き込みをメモリ224に対して行うことができる。また、メモリ224は、システム制御部228の作業領域として使用することもできる。
The
表示部226は、例えば、TFT方式のLCDなどで構成される。表示部226は、デジタル信号をアナログ信号に変換するD/A変換部222を介して、画像表示メモリ220に書き込まれた表示用の画像データに対応する画像を表示する。表示部226において、撮像素子212からの画像データを逐次表示することで、電子ビューファインダ(EVF)機能を実現することができる。また、表示部226は、撮像装置1の状態(撮像モード(静止画撮像モード、動画撮像モードなど)、撮像可能枚数、撮像条件(シャッタ速度や絞り値など)、記録媒体30やPC40などの着脱状態など)も表示することが可能である。
The
システム制御部228は、CPUやメモリなどを含み、本体部20の全体(動作)を制御する。例えば、システム制御部228は、上述したように、AF処理、AE処理及びEF処理を行う。なお、AF処理を行うためのAF処理部、AE処理を行うためのAE処理部及びEF処理を行うためのEF処理部を個別に設けてもよい。
The
不揮発性メモリ230は、データを電気的に消去・記憶可能なメモリ(例えば、EEPROM)であって、後述するプログラムなどを記憶する。また、不揮発性メモリ230は、撮像装置1(本体部20)に着脱された記録媒体30に関する情報(例えば、種類など)や撮像装置1に装着された記録媒体30が交換されたことを示す情報などを含む履歴を記憶する。
The non-volatile memory 230 is a memory (for example, EEPROM) capable of electrically erasing and storing data, and stores a program and the like to be described later. The non-volatile memory 230 is information indicating that the
操作部232は、ユーザの操作を受け付ける(動作指示を入力する)ためのスイッチ、ダイヤル、タッチパネル、ボタンなどで構成される。操作部232は、例えば、静止画撮像モード(単写撮像モード又は連写撮像モード)や動画撮像モードなどの撮像モードを設定するためのモードダイヤル、表示部226に画像を表示(再生)するための再生ボタンを含む。また、操作部232は、各種メニューボタン、各種設定ボタン、移動ボタン、記録媒体30を撮像装置1から取り外す際に開けられる蓋や電池を撮像装置1から取り外す際に開けられる蓋の蓋開けスイッチも含む。なお、単写撮像モードとは、第2のスイッチSW2がON状態となった場合に、1コマの撮像を行って待機状態となるモードであり、連写撮像モードとは、第2のスイッチSW2がON状態となっている間、連続して撮像を行うモードである。
The
シャッターボタン234は、被写体の撮像を指示するためのボタンであって、第1のスイッチSW1と、第2のスイッチSW2とを含む。第1のスイッチSW1は、シャッターボタン234の操作途中(半押し)でON状態となり、AF処理、AE処理、AWB処理、EF処理などの開始を指示する。第2のスイッチSW2は、シャッターボタン234の操作完了(全押し)でON状態となり、撮像素子212からの画像信号の読み出しから記録媒体30などに画像データを書き込むまでの一連の撮像処理(露光処理、現像処理及び記録処理)の開始を指示する。
The
電源スイッチ236は、撮像装置1を電源ONの状態又は電源OFFの状態に切り替えるためのスイッチである。電源供給部238は、電池検出回路、DC−DCコンバータ、通電するブロックを切り替えるスイッチ回路などを含み、電源部240における電池の装着の有無、電池の種類、電池の電圧(残容量)を検出する。また、電源供給部238は、電源部240における各検出結果及びシステム制御部228からの指示に基づいて、DC−DCコンバータを介して、必要な電圧を必要な期間、記録媒体30を含む撮像装置1の各部に供給する。電源部240は、アルカリ電池やリチウム電池などの一次電池、NiCd電池、NiMH電池やLi電池などの二次電池、ACアダプターなどを着脱可能に保持する。なお、電源部240には、電源部240に装着された電池が電源部240の外に飛び出すことを防止し、撮像装置1(電源部240)から電池を取り外す際に開けられる蓋が設けられている。
The
第1の接続部242は、インタフェース(I/F)やコネクタを含み、撮像装置1(本体部20)と記録媒体30とを接続する。第2の接続部244は、インタフェース(I/F)やコネクタを含み、撮像装置1(本体部20)とPC40とを接続する。I/F及びコネクタは、撮像装置1と記録媒体30又はPC40との間で画像データや画像データを管理するための管理データを転送することができるように、種々の記録媒体やPCの規格に準拠して構成される。
The
検知部246は、画像データを記録媒体30やPC40に書き込むことが不可能となりえる予め定められた状態を検知する。ここで、予め定められた状態とは、記録媒体30を撮像装置1から取り外す際に開けられる蓋が開状態であること、電池を撮像装置1から取り外す際に開けられる蓋が開状態であること、電池の電圧が予め定められた電圧よりも低くなった状態であることなどを含む。なお、電池を撮像装置1から取り外す際に開けられる蓋が開状態であること、及び、電池の電圧が予め定められた電圧よりも低くなった状態であることは、電源供給部238が検知することも可能である。
The
記録媒体30は、記録媒体30と撮像装置1(本体部20)とを接続する接続部302と、画像データや管理データを保存する記憶部304とを有する。記録媒体30は、例えば、PCMCIAカードやSDメモリカードなどのメモリカード、磁気ディスク、DAT、光磁気ディスク、光ディスク、相変化型光ディスクなどを含む。
The
PC40は、PC40と撮像装置1(本体部20)とを接続する接続部402と、画像データや管理データを保存する記憶部404とを有する。記憶部404は、磁気ディスクなどで構成される。
The
図2及び図3を参照して、撮像装置1による記録媒体30(記憶部304)への画像データの保存処理の概要を説明する。ここでは、撮像装置1の撮像モードとして連写撮像モードが設定されているものとする。また、撮像装置1によるPC40の記憶部404への画像データの書き込みは、記録媒体30への画像データの保存処理と同様であるため、ここでの説明は省略する。
With reference to FIG. 2 and FIG. 3, the outline of the image data storing process in the recording medium 30 (storage unit 304) by the
図2は、記録媒体30の記憶部304におけるファイルシステムを示している。かかるファイルシステムは、FSINFO領域304a、第1のFAT領域304b、第2のFAT領域304c、ルートディレクトリ領域304d及びデータ領域304eで構成されている。FSINFO領域304aには、記録媒体30の空き容量を示す空き容量情報IFが記録される。第1のFAT領域304bは、画像データの連鎖情報などを含むFAT情報FAT1を記録するための領域である。第2のFAT領域304cは、FAT情報FAT1の内容をコピーした内容を有するFAT情報FAT2を記録するための領域である。ルートディレクトリ領域304dは、画像データのファイル名、記録を開始したクラスタの番号、記録された画像データのサイズなどを示すディレクトリ情報DIRを記録するための領域である。データ領域304eは、画像データDATAを記録するための領域である。なお、空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIRは、画像データDATAを管理するための管理データである。
FIG. 2 shows a file system in the
図3に示すように、システム制御部228は、画像データを記録媒体30に記録する際に、記録媒体30に対して、データの書き込み及び読み出しを行う。メモリ224は、内部バッファ(第1の記憶部)504と、キャッシュ部(第2の記憶部)506とを含む。内部バッファ502には、記録媒体30に記録する1つ以上の画像データが記憶(蓄積)される。キャッシュ部504には、記録媒体30から読み出された管理データ、即ち、空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIRが記憶される。
As shown in FIG. 3, the
システム制御部228の処理の一例を説明する。なお、本実施形態では、従来技術のように、記録媒体30に対して、1つの画像データごとに、画像データの書き込みと管理データの書き込み(書き戻し)とを繰り返すことはせず、画像データや管理データの効率的な書き込みを実現する。
An example of processing of the
図3を参照するに、まず、システム制御部228は、記録媒体30から空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIRを含む管理データを読み出し、かかる管理データをキャッシュ部504に記憶させる。内部バッファ502に画像データが記憶(蓄積)され、ファイル作成が指示されると、システム制御部228はファイルのオープンを行い、キャッシュ部504に記憶されたディレクトリ情報DIRを更新するが、記録媒体30への書き込みは行わない。
Referring to FIG. 3, first, the
次いで、システム制御部228は、内部バッファ502に記憶された画像データDATAを記録媒体30に書き込むと共に、キャッシュ部504に記憶された、対応する空き容量情報IF、FAT情報FAT1及びFAT2を更新する。そして、ファイルをクローズする際に、システム制御部228は、キャッシュ部504に記憶されている、更新された最新のFAT情報FAT1及びディレクトリ情報DIRを記録媒体30に書き込み(書き戻す)。なお、FAT情報FAT2及び空き容量情報IFに関しては、キャッシュ部504に記憶されているFAT情報FAT2及び空き容量情報IFのみを更新する。
Next, the
この処理は繰り返し行われ、記録媒体30への画像データの書き込みを終了する際に、キャッシュ部504に記憶されている、更新された最新の空き容量情報IF及びN個の画像データに対応するFAT情報FAT2をまとめて記録媒体30に書き込む(書き戻す)。
This process is repeated, and when the writing of the image data to the
例えば、N回の撮像が行われた場合を考える。この場合、N個の画像データを記録媒体30に書き込む際に、従来技術では、N個の画像データのそれぞれに対応する管理データの記録媒体30への書き込みを含めて5N回の書き込みが必要となるが、本実施形態では、3N+2回の書き込みを行うだけでよい。これは、記録媒体30に書き込む画像データの数が2つ以上である場合、即ち、撮像モードが連写撮像モード又は動画撮像モードである場合に、従来技術よりも書き込み回数が減少することを示している。このように、本実施形態では、画像データDATAについては連続して書き込み、空き容量情報IF及びFAT情報FAT2についてはまとめて最後に書き込むことで、画像データや管理データの効率的な書き込みを実現している。
For example, consider a case where N times of imaging have been performed. In this case, when N pieces of image data are written to the
以下、各実施形態において、撮像装置1による記録媒体30(記憶部304)への画像データの保存処理について詳細に説明する。なお、各実施形態において、検知部246は、画像データを記録媒体30に書き込むことが不可能となりえる予め定められた状態として、記録媒体30を撮像装置1から取り外す際に開けられる蓋が開状態であることを検知するものとする。但し、検知部246は、電池を撮像装置1から取り外す際に開けられる蓋が開状態であることや電池の電圧が予め定められた電圧よりも低くなった状態であることを検知してもよいし、これらを組み合わせてもよい。
Hereinafter, in each embodiment, the image data saving process in the recording medium 30 (storage unit 304) by the
<第1の実施形態>
図4は、第1の実施形態における記録媒体30への画像データの保存処理を説明するためのフローチャートである。ここでは、撮像装置1の撮像モードとして静止画撮像モード(単写撮像モード又は連写撮像モード)が設定されているものとする。
<First Embodiment>
FIG. 4 is a flowchart for explaining a process for storing image data in the
S1002において、システム制御部228は、記録媒体30から管理データ(空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIR)を読み出す。なお、システム制御部228は、記録媒体30から読み出した管理データをメモリ224のキャッシュ部504に記憶させる。
In S1002, the
S1004において、シャッターボタン234の全押しによる撮像処理が開始されると、メモリ224の内部バッファ502は、撮像素子212から順次入力される画像データを記憶(蓄積)する。
In step S <b> 1004, when imaging processing is started by fully pressing the
S1006において、システム制御部228は、ファイルのオープンを行い、S1002でキャッシュ部504に記憶されているディレクトリ情報DIRを更新する。また、システム制御部228は、S1004で内部バッファ502に記憶された画像データのうち1つの画像データを記録媒体30に書き込む。この際、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIR(即ち、管理データ)を更新する。
In S1006, the
S1008において、システム制御部228は、管理データの更新ができないほどキャッシュ部504の予め決められた領域が使用されているか、即ち、キャッシュ部504がフル状態であるか否かを判定する。キャッシュ部504がフル状態である場合には、S1010に移行し、システム制御部228は、キャッシュ部504に記憶されているFAT情報FAT1及びFAT2、ディレクトリ情報DIRを記録媒体30に書き戻す(書き込む)。一方、キャッシュ部504がフル状態でない場合には、S1012に移行する。
In step S1008, the
S1012において、システム制御部228は、検知部246が記録媒体30を撮像装置1から取り外す際に開けられる蓋が開状態であることを検知したか否かを判定する。蓋が開状態であることを検知していない場合には、S1014に移行し、システム制御部228は、キャッシュ部504に記憶されているFAT情報FAT1及びディレクトリ情報DIRを記録媒体30に書き戻す。一方、蓋が開状態であることを検知した場合には、S1016に移行し、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIRを記録媒体30に書き戻す。
In step S <b> 1012, the
S1018において、システム制御部228は、内部バッファ502に画像データが残っていないか、即ち、内部バッファ502が空になっているか否かを判定する。内部バッファ502が空になっていない場合には、S1006に移行し、内部バッファ502が空になっている場合には、S1020に移行する。
In step S1018, the
S1020において、システム制御部228は、過去に(即ち、S1012で)検知部246によって記録媒体30を撮像装置1から取り外す際に開けられる蓋が開状態であることが検知されているか否かを判定する。換言すれば、S1020では、内部バッファ502に記憶された画像データの記録媒体30への書き込みが開始され、且つ、内部バッファ502に画像データが残っているときに、蓋が開状態であることが検知されているか否かを判定する。
In step S1020, the
S1012で蓋が開状態であることが検知されている場合には、S1016においてキャッシュ部504に記憶されている管理データの全てのデータが記録媒体30に書き戻されているため、記録媒体30への画像データの保存処理を終了する。一方、S1012で蓋が開状態であることが検知されていない場合には、S1022に移行する。
If it is detected in S1012 that the lid is open, all the management data stored in the
S1022において、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IF、FAT情報FAT2を記録媒体30に書き戻し、記録媒体30への画像データの保存処理を終了する。
In step S1022, the
本実施形態では、内部バッファ502に記憶された画像データの書き込みが開始され、且つ、内部バッファ502に画像データが残っているときに、蓋が開状態であることを検知した場合と、蓋が開状態であることを検知しない場合とで異なる処理を行う。具体的には、蓋が開状態であることを検知した場合、キャッシュ部504に記憶されている、更新された最新の管理データ(空き容量情報IF、FAT1、FAT2、DIR)を記録媒体30に書き込む。従って、静止画撮像モード(静止画の記録中)において、画像データを記録媒体30に書き込むことが不可能になった場合でも、管理データが記録媒体30に書き込まれているため、記録媒体30から画像データを読み出すことができる。換言すれば、画像データを記録媒体30に書き込むことが不可能になる直前までの画像データの消失を回避することができる。また、蓋が開状態であることを検知しない場合、キャッシュ部504に記憶されている最新の管理データのうち少なくとも画像データを読み出すのに必要となる一部のデータ(FAT1、DIR)を記録媒体30に書き込む。従って、静止画撮像モード(静止画の記録中)において、画像データを記録媒体30に書き込むことが不可能になった場合でも、記録媒体30から画像データ(直前までの画像データ)を読み出すことができる。なお、蓋が開状態であることを検知しない場合には、内部バッファ502に記憶された全ての画像データの記録媒体30への書き込みが終わったときに、キャッシュ部504に記憶されている管理データの残りのデータ(IF、FAT2)を記録媒体30に書き込む。従って、上述したように、画像データや管理データの効率的な書き込みを実現している。
In this embodiment, when the writing of the image data stored in the
<第2の実施形態>
図5は、第2の実施形態における記録媒体30への画像データの保存処理を説明するためのフローチャートである。ここでは、撮像装置1の撮像モードとして動画撮像モードが設定されているものとする。
<Second Embodiment>
FIG. 5 is a flowchart for explaining a process for storing image data in the
S1102において、システム制御部228は、記録媒体30から管理データ(空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIR)を読み出す。なお、システム制御部228は、記録媒体30から読み出した管理データをメモリ224のキャッシュ部504に記憶させる。
In step S1102, the
S1104において、システム制御部228は、動画を圧縮記録する際の最小単位である1コマを効率的に管理するために必要なデータの集まりであるGOP(Group Of Pictures)を構成するフレーム数Fを取得する。また、システム制御部228は、管理データの記録媒体30への書き戻し間隔をFに設定する。
In S1104, the
S1106において、動画像撮像ボタンの操作による撮像処理が開始されると、メモリ224の内部バッファ502は、撮像素子212から順次入力される画像データをフレームごとに記憶(蓄積)する。また、システム制御部228は、フレームカウントfを初期化(f=0)する。
In step S <b> 1106, when imaging processing is started by operating the moving image imaging button, the
S1108において、システム制御部228は、ファイルのオープンを行い、S1102でキャッシュ部504に記憶されているディレクトリ情報DIRを更新する。また、システム制御部228は、S1106で内部バッファ502に記憶された画像データを1フレームごとに記録媒体30に書き込む。この際、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIR(即ち、管理情報)を更新する。更に、システム制御部228は、フレームカウントfをインクリメント(f=f+1)する。
In step S1108, the
S1110において、システム制御部228は、管理データの更新ができないほどキャッシュ部504の予め決められた領域が使用されているか、即ち、キャッシュ部504がフル状態であるか否かを判定する。キャッシュ部504がフル状態である場合には、S1112に移行し、システム制御部228は、キャッシュ部504に記憶されているFAT情報FAT1及びFAT2、ディレクトリ情報DIRを記録媒体30に書き戻す(書き込む)。一方、キャッシュ部504がフル状態でない場合には、S1114に移行する。
In step S1110, the
S1114において、システム制御部228は、検知部246が記録媒体30を撮像装置1から取り外す際に開けられる蓋が開状態であることを検知したか否かを判定する。蓋が開状態であることを検知していない場合には、S1116に移行し、システム制御部228は、キャッシュ部504に記憶されているFAT情報FAT1及びディレクトリ情報DIRを記録媒体30に書き戻す。一方、蓋が開状態であることを検知した場合には、S1118に移行する。
In step S <b> 1114, the
S1118において、システム制御部228は、フレームカウントfが管理データの書き戻し間隔Fに等しい(f=F)か否かを判定する。フレームカウントfが管理データの書き戻し間隔Fと等しくない場合には、S1108に移行し、フレームカウントfが管理データの書き戻し間隔Fと等しい倍には、S1120に移行する。
In step S1118, the
S1120において、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIRを記録媒体30に書き戻す。また、システム制御部228は、フレームカウントfを初期化(f=0)する。
In S1120, the
S1122において、システム制御部228は、内部バッファ502に画像データが残っていないか、即ち、内部バッファ502が空になっているか否かを判定する。内部バッファ502が空になっていない場合には、S1108に移行し、内部バッファ502が空になっている場合には、S1124に移行する。
In step S1122, the
S1124において、システム制御部228は、過去に(即ち、S1114で)検知部246によって記録媒体30を撮像装置1から取り外す際に開けられる蓋が開状態であることが検知されているか否かを判定する。換言すれば、S1124では、内部バッファ502に記憶された画像データの記録媒体30への書き込みが開始され、且つ、内部バッファ502に画像データが残っているときに、蓋が開状態であることが検知されているか否かを判定する。
In S1124, the
S1114で蓋が開状態であることが検知されている場合には、S1120においてキャッシュ部504に記憶されている管理データの全てのデータが記録媒体30に書き戻されているため、記録媒体30への画像データの保存処理を終了する。一方、S1114で蓋が開状態であることが検知されていない場合には、S1126に移行する。
If it is detected in S1114 that the lid is open, all the management data stored in the
S1126において、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IF、FAT情報FAT2を記録媒体30に書き戻し、記録媒体30への画像データの保存処理を終了する。
In step S1126, the
本実施形態では、内部バッファ502に記憶された画像データの書き込みが開始され、且つ、内部バッファ502に画像データが残っているときに、蓋が開状態であることを検知した場合と、蓋が開状態であることを検知しない場合とで異なる処理を行う。具体的には、蓋が開状態であることを検知した場合、キャッシュ部504に記憶されている、更新された最新の管理データ(空き容量情報IF、FAT1、FAT2、DIR)を記録媒体30に書き込む。従って、動画撮像モード(動画像の記録中)において、画像データを記録媒体30に書き込むことが不可能になった場合でも、管理データが記録媒体30に書き込まれているため、記録媒体30から画像データを読み出すことができる。換言すれば、画像データを記録媒体30に書き込むことが不可能になる直前までの画像データの消失を回避することができる。また、蓋が開状態であることを検知しない場合、キャッシュ部504に記憶されている最新の管理データのうち少なくとも画像データを読み出すのに必要となる一部のデータ(FAT1、DIR)を記録媒体30に書き込む。従って、動画撮像モード(動画の記録中)において、画像データを記録媒体30に書き込むことが不可能になった場合でも、記録媒体30から画像データ(直前までの画像データ)を読み出すことができる。なお、蓋が開状態であることを検知しない場合には、内部バッファ502に記憶された全ての画像データの記録媒体30への書き込みが終わったときに、キャッシュ部504に記憶されている管理データの残りのデータ(IF、FAT2)を記録媒体30に書き込む。従って、上述したように、画像データや管理データの効率的な書き込みを実現している。
In this embodiment, when the writing of the image data stored in the
<第3の実施形態>
図6は、第3の実施形態における記録媒体30への画像データの保存処理を説明するためのフローチャートである。ここでは、撮像装置1の撮像モードとして静止画撮像モード(単写撮像モード又は連写撮像モード)が設定されているものとする。
<Third Embodiment>
FIG. 6 is a flowchart for explaining a process for storing image data in the
S1202乃至S1214、及び、S1218乃至S1222のそれぞれは、第1の実施形態(図4)におけるS1002乃至S1014、及び、S1018乃至S1022と同様である。第1の実施形態と異なる処理、即ち、S1216及びS1224について説明する。 Each of S1202 to S1214 and S1218 to S1222 is the same as S1002 to S1014 and S1018 to S1022 in the first embodiment (FIG. 4). Processing different from the first embodiment, that is, S1216 and S1224 will be described.
S1216において、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IF、FAT情報FAT1、ディレクトリ情報DIRを記録媒体30に書き戻す。この際、システム制御部228は、1つの画像データの書き込みに対応するFAT情報FAT2については書き戻さない。
In step S1216, the
S1224において、システム制御部228は、S1216において書き戻していない、キャッシュ部504に記憶されているFAT情報FAT2をまとめて記録媒体30に書き戻す。
In S1224, the
本実施形態では、内部バッファ502に記憶された画像データの書き込みが開始され、且つ、内部バッファ502に画像データが残っているときに、蓋が開状態であることを検知した場合と、蓋が開状態であることを検知しない場合とで異なる処理を行う。具体的には、蓋が開状態であることを検知した場合、キャッシュ部504に記憶されている、更新された最新の管理データ(空き容量情報IF、FAT1、DIR)を記録媒体30に書き込む。従って、静止画撮像モード(静止画の記録中)において、画像データを記録媒体30に書き込むことが不可能になった場合でも、管理データが記録媒体30に書き込まれているため、記録媒体30から画像データを読み出すことができる。換言すれば、画像データを記録媒体30に書き込むことが不可能になる直前までの画像データの消失を回避することができる。また、蓋が開状態であることを検知しない場合、キャッシュ部504に記憶されている最新の管理データのうち少なくとも画像データを読み出すのに必要となる一部のデータ(FAT1、DIR)を記録媒体30に書き込む。従って、静止画撮像モード(静止画の記録中)において、画像データを記録媒体30に書き込むことが不可能になった場合でも、記録媒体30から画像データ(直前までの画像データ)を読み出すことができる。なお、蓋が開状態であることを検知しない場合には、内部バッファ502に記憶された全ての画像データの記録媒体30への書き込みが終わったときに、キャッシュ部504に記憶されている管理データの残りのデータ(IF、FAT2)を記録媒体30に書き込む。従って、上述したように、画像データや管理データの効率的な書き込みを実現している。
In this embodiment, when the writing of the image data stored in the
なお、本実施形態では、蓋が開状態であることを検知した場合であっても、内部バッファ502に画像データが残っているときには、FAT情報FAT2を記録媒体30に書き戻さない(S1216)。そして、全ての画像データの記録媒体30への書き込みが終わったときに、FAT情報FAT2をまとめて記録媒体30に書き戻している(S1224)。従って、本実施形態は、蓋が開状態であることを検知した場合において、第1の実施形態と比較して、より効率的に管理データを記録媒体30に書き込むことができる。
In this embodiment, even when it is detected that the lid is open, the FAT information FAT2 is not written back to the
<第4の実施形態>
図7は、第4の実施形態における記録媒体30への画像データの保存処理を説明するためのフローチャートである。ここでは、撮像装置1の撮像モードとして動画撮像モードが設定されているものとする。
<Fourth Embodiment>
FIG. 7 is a flowchart for explaining a process for storing image data in the
S1302乃至S1318、及び、S1322乃至S1326のそれぞれは、第2の実施形態(図5)におけるS1102乃至S1118、及び、S1122乃至S1126と同様である。第2の実施形態と異なる処理、即ち、S1320及びS1328について説明する。 Each of S1302 to S1318 and S1322 to S1326 is the same as S1102 to S1118 and S1122 to S1126 in the second embodiment (FIG. 5). Processing different from the second embodiment, that is, S1320 and S1328 will be described.
S1320において、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IF、FAT情報FAT1、ディレクトリ情報DIRを記録媒体30に書き戻す。この際、システム制御部228は、1つの画像データの書き込みに対応するFAT情報FAT2については書き戻さない。
In step S1320, the
S1328において、システム制御部228は、S1320において書き戻していない、キャッシュ部504に記憶されているFAT情報FAT2をまとめて記録媒体30に書き戻す。
In S1328, the
本実施形態では、内部バッファ502に記憶された画像データの書き込みが開始され、且つ、内部バッファ502に画像データが残っているときに、蓋が開状態であることを検知した場合と、蓋が開状態であることを検知しない場合とで異なる処理を行う。具体的には、蓋が開状態であることを検知した場合、キャッシュ部504に記憶されている、更新された最新の管理データ(空き容量情報IF、FAT1、DIR)を記録媒体30に書き込む。従って、動画撮像モード(動画像の記録中)において、画像データを記録媒体30に書き込むことが不可能になった場合でも、管理データが記録媒体30に書き込まれているため、記録媒体30から画像データを読み出すことができる。換言すれば、画像データを記録媒体30に書き込むことが不可能になる直前までの画像データの消失を回避することができる。また、蓋が開状態であることを検知しない場合、キャッシュ部504に記憶されている最新の管理データのうち少なくとも画像データを読み出すのに必要となる一部のデータ(FAT1、DIR)を記録媒体30に書き込む。従って、静止画撮像モード(静止画の記録中)において、画像データを記録媒体30に書き込むことが不可能になった場合でも、記録媒体30から画像データ(直前までの画像データ)を読み出すことができる。なお、蓋が開状態であることを検知しない場合には、内部バッファ502に記憶された全ての画像データの記録媒体30への書き込みが終わったときに、キャッシュ部504に記憶されている管理データの残りのデータ(IF、FAT2)を記録媒体30に書き込む。従って、上述したように、画像データや管理データの効率的な書き込みを実現している。
In this embodiment, when the writing of the image data stored in the
なお、本実施形態では、蓋が開状態であることを検知した場合であっても、内部バッファ502に画像データが残っているときには、FAT情報FAT2を記録媒体30に書き戻さない(S1320)。そして、全ての画像データの記録媒体30への書き込みが終わったときに、FAT情報FAT2をまとめて記録媒体30に書き戻している(S1328)。従って、本実施形態は、蓋が開状態であることを検知した場合において、第2の実施形態と比較して、より効率的に管理データを記録媒体30に書き込むことができる。
In the present embodiment, even when it is detected that the lid is open, if image data remains in the
<第5の実施形態>
図8は、第5の実施形態における記録媒体30への画像データの保存処理を説明するためのフローチャートである。ここでは、撮像装置1の撮像モードとして静止画撮像モード(単写撮像モード又は連写撮像モード)が設定されているものとする。
<Fifth Embodiment>
FIG. 8 is a flowchart for explaining a process of storing image data in the
S1402乃至S1412、及び、S1414乃至S1418、及び、S1422のそれぞれは、第3の実施形態(図6)におけるS1202乃至S1212、及び、S1216乃至S1220、及び、S1224と同様である。第3の実施形態と異なる処理、即ち、S1420について説明する。なお、本実施形態では、第3の実施形態におけるS1214に相当する処理が省略されている。 Each of S1402 to S1412, S1414 to S1418, and S1422 is the same as S1202 to S1212, S1216 to S1220, and S1224 in the third embodiment (FIG. 6). A process different from the third embodiment, that is, S1420 will be described. Note that in this embodiment, processing corresponding to S1214 in the third embodiment is omitted.
S1420において、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIRを記録媒体30に書き戻し、記録媒体30への画像データの保存処理を終了する。換言すれば、S1420では、キャッシュ部504に記憶されている、全ての画像データの記録媒体30への書き込みが終わったときに、管理データの全部のデータを書き戻す。
In step S1420, the
本実施形態では、内部バッファ502に記憶された画像データの書き込みが開始され、且つ、内部バッファ502に画像データが残っているときに、蓋が開状態であることを検知した場合と、蓋が開状態であることを検知しない場合とで異なる処理を行う。具体的には、蓋が開状態であることを検知した場合、キャッシュ部504に記憶されている、更新された最新の管理データ(空き容量情報IF、FAT1、DIR)を記録媒体30に書き込む。従って、静止画撮像モード(静止画の記録中)において、画像データを記録媒体30に書き込むことが不可能になった場合でも、管理データが記録媒体30に書き込まれているため、記録媒体30から画像データを読み出すことができる。換言すれば、画像データを記録媒体30に書き込むことが不可能になる直前までの画像データの消失を回避することができる。また、蓋が開状態であることを検知しない場合、全ての画像データの記録媒体30への書き込みが終わった後に管理データ(空き容量情報IF、FAT1、FAT2、DIR)をまとめて記録媒体30に書き込む。従って、記録媒体30へのデータの書き込み回数を大幅に低減させることができ、画像データや管理データをより効率的に記録媒体30に書き込むことができる。但し、ACアダプターのプラグ抜けなどによって画像データの書き込みが突然中断されると、管理データが記録媒体30に書き込まれていないため、記録媒体30から画像データを読み出すことができなくなる可能性がある。従って、本実施形態は、ACアダプターのプラグ抜けなどが極力起こらないように設計された場合に効果を発揮する。
In this embodiment, when the writing of the image data stored in the
<第6の実施形態>
図9は、第6の実施形態における記録媒体30への画像データの保存処理を説明するためのフローチャートである。ここでは、撮像装置1の撮像モードとして動画撮像モードが設定されているものとする。
<Sixth Embodiment>
FIG. 9 is a flowchart for explaining a process of storing image data in the
S1502乃至S1514、及び、S1516乃至S1522、及び、S1528のそれぞれは、第4の実施形態(図7)におけるS1302乃至S1314、及び、S1318乃至S1324、及び、S1328と同様である。第4の実施形態と異なる処理、即ち、S1524について説明する。なお、本実施形態では、第3の実施形態におけるS1316に相当する処理が省略されている。 Each of S1502 to S1514, S1516 to S1522, and S1528 is the same as S1302 to S1314, S1318 to S1324, and S1328 in the fourth embodiment (FIG. 7). A process different from the fourth embodiment, that is, S1524 will be described. In this embodiment, processing corresponding to S1316 in the third embodiment is omitted.
S1524において、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIRを記録媒体30に書き戻し、記録媒体30への画像データの保存処理を終了する。換言すれば、S1524では、キャッシュ部504に記憶されている、全ての画像データの記録媒体30への書き込みが終わったときに、管理データの全部のデータを書き戻す。
In step S1524, the
本実施形態では、内部バッファ502に記憶された画像データの書き込みが開始され、且つ、内部バッファ502に画像データが残っているときに、蓋が開状態であることを検知した場合と、蓋が開状態であることを検知しない場合とで異なる処理を行う。具体的には、蓋が開状態であることを検知した場合、キャッシュ部504に記憶されている、更新された最新の管理データ(空き容量情報IF、FAT1、DIR)を記録媒体30に書き込む。従って、動画撮像モード(動画の記録中)において、画像データを記録媒体30に書き込むことが不可能になった場合でも、管理データが記録媒体30に書き込まれているため、記録媒体30から画像データを読み出すことができる。換言すれば、画像データを記録媒体30に書き込むことが不可能になる直前までの画像データの消失を回避することができる。また、蓋が開状態であることを検知しない場合、全ての画像データの記録媒体30への書き込みが終わった後に管理データ(空き容量情報IF、FAT1、FAT2、DIR)をまとめて記録媒体30に書き込む。従って、記録媒体30へのデータの書き込み回数を大幅に低減させることができ、画像データや管理データをより効率的に記録媒体30に書き込むことができる。但し、ACアダプターのプラグ抜けなどによって画像データの書き込みが突然中断されると、管理データが記録媒体30に書き込まれていないため、記録媒体30から画像データを読み出すことができなくなる可能性がある。従って、本実施形態は、ACアダプターのプラグ抜けなどが極力起こらないように設計された場合に効果を発揮する。
In this embodiment, when the writing of the image data stored in the
<第7の実施形態>
各実施形態において、画像データを記録媒体30に書き込むことが不可能となりえる予め定められた状態を検知したとしても、ACアダプターのプラグ抜けなどによって画像データの書き込みが突然中断される場合がある。このような場合、管理データ、具体的には、空き容量情報IFやFAT情報FAT2が記録媒体30に正しく書き込まれていない可能性がある。第7の実施形態では、このような問題を解決するための撮像装置1の起動時の処理について説明する。
<Seventh Embodiment>
In each of the embodiments, even if a predetermined state in which the image data cannot be written to the
図10は、撮像装置1の起動時の処理を説明するためのフローチャートである。ここでは、撮像装置1が起動され、且つ、撮像装置1に記録媒体30が装着されているものとする。
FIG. 10 is a flowchart for explaining processing at the time of activation of the
S1602において、システム制御部228は、不揮発性メモリ230に記憶されている履歴を取得して、記録媒体30が交換されたか否かを判定する。記録媒体30が交換されていない場合には、処理を終了する。一方、記録媒体30が交換されている場合には、S1604に移行する。
In S1602, the
S1604において、システム制御部228は、記録媒体30のマスターブート領域に記録されているMBR情報を読み出し、記録媒体30のブートセクタ領域に記録すべきBPB情報のオフセットを算出する。また、システム制御部228は、記録媒体30のブートセクタ領域に記録されているBPB情報を読み出し、予約セクタ数、クラスタのサイズ、FAT当たりのセクタ数を算出する。
In step S <b> 1604, the
S1606において、システム制御部228は、BPB情報のオフセット、予約セクタ数、クラスタのサイズから第1のFAT情報FAT1のオフセットを算出し、記録媒体30から第1のFAT情報FAT1を読み出してキャッシュ部504に記憶させる。
In S1606, the
S1608において、システム制御部228は、FAT1のオフセット、クラスタのサイズ、FAT当たりのセクタ数から第2のFAT情報FAT2のオフセットを算出し、記録媒体30から第2のFAT情報FAT2を読み出してキャッシュ部504に記憶させる。
In step S1608, the
S1610において、システム制御部228は、キャッシュ部504に記憶されている第1のFAT情報FAT1に含まれる連鎖情報を探索して(連鎖情報が「0」である場合に空きとすることで)、記録媒体30の空き容量を算出する。
In S1610, the
S1612において、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IFをS1610で算出した空き容量に対応する空き容量情報に更新する。
In S1612, the
S1614において、システム制御部228は、S1606で読み出した第1のFAT情報FAT1とS1608で読み出した第2のFAT情報FAT2とが異なっているか否かを判定する。第1のFAT情報FAT1と第2のFAT情報FAT2とが異なっていない場合には、処理を終了する。一方、第1のFAT情報FAT1と第2のFAT情報FAT2とが異なっている場合には、S1616に移行する。
In S1614, the
S1616において、システム制御部228は、キャッシュ部504に記憶されている第1のFAT情報FAT1の内容を、第2のFAT情報FAT2の内容としてコピーして第2のFAT情報FAT2を更新する。そして、システム制御部228は、S1612で更新された空き容量情報及びS1616で更新された第2のFAT情報を記録媒体30に書き込む。
In step S1616, the
本実施形態では、記録媒体30に正しく書き込まれている第1のFAT情報FAT1から正しい空き容量情報及び正しい第2のFAT情報を算出し、かかる情報を記録媒体30に書き込むことができる。本実施形態は、ACアダプターのプラグ抜けなどによって画像データの書き込みが突然中断され、空き容量情報IFやFAT情報FAT2が記録媒体30に正しく書き込まれていない可能性がある場合に効果を発揮する。
In the present embodiment, it is possible to calculate correct free space information and correct second FAT information from the first FAT information FAT1 correctly written on the
なお、第2、第4及び第6の実施形態では、GOPを構成するフレーム数を管理データの記録媒体30への書き戻し間隔として設定したが、他の方法で管理データの記録媒体30への書き戻し間隔を設定してもよい。例えば、動画記録開始時に、記録媒体30(記憶部304)の未使用領域にダミーのデータを書き込み、その時間を計測することで書き込み速度を取得すると共に、動画記録のパラメータ(解像度、ビット数、フレームレート)を取得する。そして、これらの情報に基づいて、管理データの書き戻しの際のオーバーヘッドに起因するフレーム落ちが生じないように、管理データの記録媒体30への書き戻し間隔を設定してもよい。
In the second, fourth, and sixth embodiments, the number of frames constituting the GOP is set as the write-back interval of the management data to the
また、上述した実施形態では、撮像装置1(撮像素子212)で生成される画像データを記録媒体30に書き込む場合を例に説明したが、撮像素子212や画像処理部216は必須な構成要素ではない。例えば、予め用意された画像データを記録媒体30に書き込む構成(PCなどの画像処理装置)であってもよい。
In the above-described embodiment, the case where image data generated by the imaging device 1 (imaging device 212) is written to the
以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されないことはいうまでもなく、その要旨の範囲内で種々の変形及び変更が可能である。 As mentioned above, although preferable embodiment of this invention was described, it cannot be overemphasized that this invention is not limited to these embodiment, A various deformation | transformation and change are possible within the range of the summary.
Claims (8)
前記記録媒体に対して、データの書き込み及び読み出しを行う記録手段と、
前記記録媒体に記録する1つ以上の画像データを記憶する第1の記憶手段と、
前記記録手段によって前記記録媒体から読み出された前記管理データを記憶する第2の記憶手段と、
前記第1の記憶手段に記憶された画像データが前記記録手段によって前記記録媒体に書き込まれるたびに、前記第2の記憶手段に記憶された前記管理データを更新する更新手段と、
前記第1の記憶手段に記憶された画像データを前記記録媒体に書き込むことが不可能となりえる予め定められた状態を検知する検知手段と、
を有し、
前記記録手段による前記第1の記憶手段に記憶された画像データの前記記録媒体への書き込みが開始され、且つ、前記第1の記憶手段に画像データが残っているときに、
前記検知手段が前記予め定められた状態を検知した場合には、前記記録手段は、前記第2の記憶手段に記憶されている、前記更新手段によって更新された最新の管理データを前記記録媒体に書き込み、
前記検知手段が前記予め定められた状態を検知しない場合には、1つの画像データが前記記録媒体に書き込まれるたびに、前記記録手段は、前記第2の記憶手段に記憶されている、前記更新手段によって更新された最新の管理データのうち少なくとも前記記録媒体から画像データを読み出すのに必要となる一部のデータを前記記録媒体に書き込み、
前記記録手段による前記第1の記憶手段に記憶された全ての画像データの前記記録媒体への書き込みが終わってから、前記記録手段は、前記最新の管理データの全部のデータを前記記録媒体に書き込むことを特徴とする画像処理装置。 An image processing apparatus in which a recording medium for storing image data and management data for managing the image data is removable.
Recording means for writing and reading data to and from the recording medium;
First storage means for storing one or more image data to be recorded on the recording medium;
Second storage means for storing the management data read from the recording medium by the recording means;
Updating means for updating the management data stored in the second storage means each time image data stored in the first storage means is written to the recording medium by the recording means;
Detecting means for detecting a predetermined state in which the image data stored in the first storage means cannot be written to the recording medium;
Have
When writing of the image data stored in the first storage unit by the recording unit to the recording medium is started and image data remains in the first storage unit,
When the detection unit detects the predetermined state, the recording unit stores the latest management data stored in the second storage unit and updated by the update unit in the recording medium. writing,
When the detection means does not detect the predetermined state, the recording means is stored in the second storage means each time one image data is written to the recording medium. Writing at least a part of data necessary for reading out image data from the recording medium among the latest management data updated by the means to the recording medium;
After all the image data stored in the first storage unit by the recording unit has been written to the recording medium, the recording unit writes all of the latest management data to the recording medium. An image processing apparatus.
前記記録媒体に対して、データの書き込み及び読み出しを行う記録手段と、
前記記録媒体に記録する1つ以上の画像データを記憶する第1の記憶手段と、
前記記録手段によって前記記録媒体から読み出された前記管理データを記憶する第2の記憶手段と、
前記第1の記憶手段に記憶された画像データが前記記録手段によって前記記録媒体に書き込まれるたびに、前記第2の記憶手段に記憶された前記管理データを更新する更新手段と、
前記第1の記憶手段に記憶された画像データを前記記録媒体に書き込むことが不可能となりえる予め定められた状態を検知する検知手段と、
を有し、
前記記録手段による前記第1の記憶手段に記憶された画像データの前記記録媒体への書き込みが開始され、且つ、前記第1の記憶手段に画像データが残っているときに、
前記検知手段が前記予め定められた状態を検知した場合には、前記記録手段は、前記第2の記憶手段に記憶されている、前記更新手段によって更新された最新の管理データを前記記録媒体に書き込み、
前記検知手段が前記予め定められた状態を検知しない場合には、前記記録手段による前記第1の記憶手段に記憶された全ての画像データの前記記録媒体への書き込みが終わってから、前記記録手段は、前記最新の管理データを前記記録媒体に書き込むことを特徴とする画像処理装置。 An image processing apparatus in which a recording medium for storing image data and management data for managing the image data is removable.
Recording means for writing and reading data to and from the recording medium;
First storage means for storing one or more image data to be recorded on the recording medium;
Second storage means for storing the management data read from the recording medium by the recording means;
Updating means for updating the management data stored in the second storage means each time image data stored in the first storage means is written to the recording medium by the recording means;
Detecting means for detecting a predetermined state in which the image data stored in the first storage means cannot be written to the recording medium;
Have
When writing of the image data stored in the first storage unit by the recording unit to the recording medium is started and image data remains in the first storage unit,
When the detection unit detects the predetermined state, the recording unit stores the latest management data stored in the second storage unit and updated by the update unit in the recording medium. writing,
If the detection means does not detect the predetermined state, the recording means after all the image data stored in the first storage means by the recording means has been written to the recording medium. An image processing apparatus, wherein the latest management data is written to the recording medium.
記録手段が、前記記録媒体に対して、データの書き込み及び読み出しを行う記録ステップと、
更新手段が、前記第1の記憶手段に記憶された画像データが前記記録手段によって前記記録媒体に書き込まれるたびに、前記第2の記憶手段に記憶された前記管理データを更新する更新ステップと、
検知手段が、前記第1の記憶手段に記憶された画像データを前記記録媒体に書き込むことが不可能となりえる予め定められた状態を検知する検知ステップと、
を有し、
前記記録手段による前記第1の記憶手段に記憶された画像データの前記記録媒体への書き込みが開始され、且つ、前記第1の記憶手段に画像データが残っているときに、
前記検知ステップで前記予め定められた状態を検知した場合には、前記記録ステップで、前記第2の記憶手段に記憶されている、前記更新ステップで更新された最新の管理データを前記記録媒体に書き込み、
前記検知ステップで前記予め定められた状態を検知しない場合には、1つの画像データが前記記録媒体に書き込まれるたびに、前記記録ステップで、前記第2の記憶手段に記憶されている、前記更新ステップで更新された最新の管理データのうち少なくとも前記記録媒体から画像データを読み出すのに必要となる一部のデータを前記記録媒体に書き込み、
前記記録手段による前記第1の記憶手段に記憶された全ての画像データの前記記録媒体への書き込みが終わってから、前記記録ステップで、前記最新の管理データの全部のデータを前記記録媒体に書き込むことを特徴とする制御方法。 A recording medium for storing image data and management data for managing the image data is detachable, a first storage means for storing one or more image data to be recorded on the recording medium, and the recording A second storage unit that stores the management data read from the medium, and a control method for the image processing apparatus,
A recording step in which recording means writes and reads data to and from the recording medium;
An update step for updating the management data stored in the second storage unit each time the update unit writes the image data stored in the first storage unit to the recording medium by the recording unit;
A detecting step for detecting a predetermined state in which the detecting means cannot write the image data stored in the first storage means to the recording medium; and
Have
When writing of the image data stored in the first storage unit by the recording unit to the recording medium is started and image data remains in the first storage unit,
When the predetermined state is detected in the detection step, the latest management data updated in the update step stored in the second storage means in the recording step is stored in the recording medium. writing,
If the predetermined state is not detected in the detection step, the update is stored in the second storage means in the recording step each time one image data is written to the recording medium. Write at least a part of the data required to read out the image data from the recording medium among the latest management data updated in the step to the recording medium,
After all the image data stored in the first storage means by the recording means has been written to the recording medium, all the latest management data is written to the recording medium in the recording step. A control method characterized by that.
記録手段が、前記記録媒体に対して、データの書き込み及び読み出しを行う記録ステップと、
更新手段が、前記第1の記憶手段に記憶された画像データが前記記録手段によって前記記録媒体に書き込まれるたびに、前記第2の記憶手段に記憶された前記管理データを更新する更新ステップと、
検知手段が、前記第1の記憶手段に記憶された画像データを前記記録媒体に書き込むことが不可能となりえる予め定められた状態を検知する検知ステップと、
を有し、
前記記録手段による前記第1の記憶手段に記憶された画像データの前記記録媒体への書き込みが開始され、且つ、前記第1の記憶手段に画像データが残っているときに、
前記検知ステップで前記予め定められた状態を検知した場合には、前記記録ステップで、前記第2の記憶手段に記憶されている、前記更新手段によって更新された最新の管理データを前記記録媒体に書き込み、
前記検知ステップで前記予め定められた状態を検知しない場合には、前記記録手段による前記第1の記憶手段に記憶された全ての画像データの前記記録媒体への書き込みが終わってから、前記記録ステップで、前記最新の管理データを前記記録媒体に書き込むことを特徴とする制御方法。 A recording medium for storing image data and management data for managing the image data is detachable, a first storage means for storing one or more image data to be recorded on the recording medium, and the recording A second storage unit that stores the management data read from the medium, and a control method for the image processing apparatus,
A recording step in which recording means writes and reads data to and from the recording medium;
An update step for updating the management data stored in the second storage unit each time the update unit writes the image data stored in the first storage unit to the recording medium by the recording unit;
A detecting step for detecting a predetermined state in which the detecting means cannot write the image data stored in the first storage means to the recording medium; and
Have
When writing of the image data stored in the first storage unit by the recording unit to the recording medium is started and image data remains in the first storage unit,
When the predetermined state is detected in the detection step, the latest management data updated by the update unit stored in the second storage unit in the recording step is stored in the recording medium. writing,
If the predetermined state is not detected in the detection step, the recording step is performed after all the image data stored in the first storage unit by the recording unit has been written to the recording medium. And writing the latest management data into the recording medium.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011149492A JP5766050B2 (en) | 2011-07-05 | 2011-07-05 | Image processing apparatus and control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011149492A JP5766050B2 (en) | 2011-07-05 | 2011-07-05 | Image processing apparatus and control method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2013016081A true JP2013016081A (en) | 2013-01-24 |
JP5766050B2 JP5766050B2 (en) | 2015-08-19 |
Family
ID=47688702
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011149492A Expired - Fee Related JP5766050B2 (en) | 2011-07-05 | 2011-07-05 | Image processing apparatus and control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5766050B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018207489A1 (en) * | 2017-05-10 | 2018-11-15 | オリンパス株式会社 | Video generation device, video generation method and video generation program |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08110868A (en) * | 1994-08-15 | 1996-04-30 | Ricoh Co Ltd | Information recording and reproducing device |
JPH11175381A (en) * | 1997-12-12 | 1999-07-02 | Olympus Optical Co Ltd | Information recording and reproducing device |
JP2000148569A (en) * | 1998-11-17 | 2000-05-30 | Matsushita Electric Ind Co Ltd | Recording and reproducing device |
JP2002335486A (en) * | 2001-05-08 | 2002-11-22 | Fuji Photo Film Co Ltd | Digital camera, image recording method and image recording program |
JP2003030925A (en) * | 2001-07-12 | 2003-01-31 | Sony Corp | Information processing device and information processing method |
JP2005174263A (en) * | 2003-12-15 | 2005-06-30 | Canon Inc | Image input device |
JP2007122221A (en) * | 2005-10-26 | 2007-05-17 | Sony Corp | Information processor, information processing method and computer program |
JP2010117891A (en) * | 2008-11-13 | 2010-05-27 | Nikon Corp | Electronic apparatus |
-
2011
- 2011-07-05 JP JP2011149492A patent/JP5766050B2/en not_active Expired - Fee Related
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08110868A (en) * | 1994-08-15 | 1996-04-30 | Ricoh Co Ltd | Information recording and reproducing device |
JPH11175381A (en) * | 1997-12-12 | 1999-07-02 | Olympus Optical Co Ltd | Information recording and reproducing device |
JP2000148569A (en) * | 1998-11-17 | 2000-05-30 | Matsushita Electric Ind Co Ltd | Recording and reproducing device |
JP2002335486A (en) * | 2001-05-08 | 2002-11-22 | Fuji Photo Film Co Ltd | Digital camera, image recording method and image recording program |
JP2003030925A (en) * | 2001-07-12 | 2003-01-31 | Sony Corp | Information processing device and information processing method |
JP2005174263A (en) * | 2003-12-15 | 2005-06-30 | Canon Inc | Image input device |
JP2007122221A (en) * | 2005-10-26 | 2007-05-17 | Sony Corp | Information processor, information processing method and computer program |
JP2010117891A (en) * | 2008-11-13 | 2010-05-27 | Nikon Corp | Electronic apparatus |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018207489A1 (en) * | 2017-05-10 | 2018-11-15 | オリンパス株式会社 | Video generation device, video generation method and video generation program |
Also Published As
Publication number | Publication date |
---|---|
JP5766050B2 (en) | 2015-08-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5025104B2 (en) | Imaging apparatus, control method therefor, and computer program | |
CN104754274A (en) | Image Reproducing Apparatus And Method For Controlling Same | |
JP4095383B2 (en) | Imaging apparatus, control method therefor, and storage medium | |
EP1694046B1 (en) | Camera, control method thereof, program, and computer readable storage medium | |
JP5766050B2 (en) | Image processing apparatus and control method | |
CN108132705B (en) | Electronic device, control method, and storage medium | |
JP5460001B2 (en) | Image search apparatus, image search apparatus control method, program, and recording medium | |
JP2007036587A (en) | Imaging apparatus and its control method | |
JP2006227822A (en) | Information retrieval device and information retrieval method, program and recording medium | |
CN111147734B (en) | Image pickup apparatus, control method thereof, and non-transitory computer-readable storage medium | |
JP4298534B2 (en) | Image display apparatus and method | |
JP6066718B2 (en) | Imaging apparatus, control method thereof, and program | |
JP4646723B2 (en) | Image reproduction apparatus, imaging apparatus, and control method | |
JP6257310B2 (en) | Imaging apparatus, imaging control method, and program | |
JP5448498B2 (en) | Imaging apparatus, control method thereof, and program | |
JP2007143065A (en) | Imaging device and activation control method | |
JP5473470B2 (en) | Electronic device, control method therefor, and program | |
JP4766706B2 (en) | Image processing apparatus, control method therefor, program, and storage medium | |
JP2008047168A (en) | Generating method of animation format data, generating device of animation format data, animation reproducing method, animation reproducing device, program, and storage medium | |
JP2008077402A (en) | Image processor, its control method, computer program and storage medium | |
JP5225478B2 (en) | Imaging apparatus, control method therefor, and computer program | |
JP2016010044A (en) | Imaging device, control method of imaging device, program, and storage medium | |
JP4697927B2 (en) | Imaging device | |
JP2005051347A (en) | Imaging apparatus | |
JP5288962B2 (en) | Imaging apparatus and control method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20140704 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150216 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150223 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150424 |
|
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: 20150518 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150616 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5766050 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |