JP2013016081A - Image processing apparatus and control method of the same - Google Patents

Image processing apparatus and control method of the same Download PDF

Info

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
Application number
JP2011149492A
Other languages
Japanese (ja)
Other versions
JP5766050B2 (en
Inventor
Shinji Hisamoto
慎二 久本
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 Inc filed Critical Canon Inc
Priority to JP2011149492A priority Critical patent/JP5766050B2/en
Publication of JP2013016081A publication Critical patent/JP2013016081A/en
Application granted granted Critical
Publication of JP5766050B2 publication Critical patent/JP5766050B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a technique advantageous in performing both protection and efficient writing of image data and management data.SOLUTION: An image processing apparatus to/from which a recording medium storing image data and management data for managing the image data can be attached/detached includes: recording means that reads and writes data from and to the recording medium; first storage means that stores one or more pieces of image data to be recorded in the recording medium; second storage means that stores the management data read from the recording medium by the recording means; updating means that updates the management data stored in the second storage means every time the image data stored in the first storage means are written into the recording medium by the recording means; and detecting means that detects a predetermined state where the image data stored in the first storage means may not be written into the recording medium.

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 Patent Documents 1 and 2).

一方、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).

特開平7−79403号公報JP-A-7-79403 特開2005−174263号公報JP 2005-174263 A 特開2007−28340号公報JP 2007-28340 A

しかしながら、管理データの書き込みが完了した後に画像データの書き込みを開始する技術では、画像データの書き込みが中断されると、書き込み中のクラスタに続いて使用する予定のクラスタは未使用であるが、管理データ上では使用されていることになる。従って、このような技術では、記録媒体の容量を有効に活用することができない。   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 Patent Document 1 can eliminate an area where invalid image data is recorded, it does not protect against writing to a management data recording area such as a FAT area. Further, when the recording medium is used in another device, the temporary file name cannot be determined by the other device, and the area cannot be used.

特許文献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.

本発明の一側面としての画像処理装置として機能する撮像装置の構成を示す概略図である。1 is a schematic diagram illustrating a configuration of an imaging apparatus that functions as an image processing apparatus according to an aspect of the present invention. 記録媒体におけるファイルシステムを示している。2 shows a file system in a recording medium. 図1に示す撮像装置による記録媒体への画像データの書き込み(記録)の概要を説明するための図である。FIG. 2 is a diagram for explaining an outline of writing (recording) of image data onto a recording medium by the imaging apparatus shown in FIG. 1. 第1の実施形態における記録媒体への画像データの保存処理を説明するためのフローチャートである。6 is a flowchart for explaining a process of storing image data in a recording medium according to the first embodiment. 第2の実施形態における記録媒体への画像データの保存処理を説明するためのフローチャートである。10 is a flowchart for explaining a process of storing image data in a recording medium according to the second embodiment. 第3の実施形態における記録媒体への画像データの保存処理を説明するためのフローチャートである。10 is a flowchart for explaining a process of storing image data in a recording medium according to a third embodiment. 第4の実施形態における記録媒体への画像データの保存処理を説明するためのフローチャートである。10 is a flowchart for explaining a process of storing image data in a recording medium according to a fourth embodiment. 第5の実施形態における記録媒体への画像データの保存処理を説明するためのフローチャートである。14 is a flowchart for explaining a process of storing image data in a recording medium according to a fifth embodiment. 第6の実施形態における記録媒体への画像データの保存処理を説明するためのフローチャートである。14 is a flowchart for explaining a process of storing image data in a recording medium according to a sixth embodiment. 図1に示す撮像装置の起動時の処理を説明するためのフローチャートである。3 is a flowchart for explaining processing at the time of activation of the imaging apparatus shown in FIG. 1.

以下、添付図面を参照して、本発明の好適な実施の形態について説明する。なお、各図において、同一の部材については同一の参照番号を付し、重複する説明は省略する。   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 imaging apparatus 1 that functions as an image processing apparatus according to one aspect of the present invention. In this embodiment, the imaging device 1 is a digital camera that captures an image of a subject and generates image data (still image data or moving image data). However, the imaging device 1 may be another imaging device such as a digital video camera capable of exchanging lenses. An external device such as a recording medium 30 or a personal computer (PC) 40 can be attached to and detached from the imaging device 1. As illustrated in FIG. 1, the imaging device 1 includes a lens unit 10 and a main body unit 20.

レンズ部10は、複数のレンズからなる撮像レンズ102と、絞り104と、レンズ部10と本体部20とを機械的及び電気的に接続するレンズ側マウント106と、レンズ部10の全体を制御するレンズ制御部108とを有する。レンズ制御部108は、例えば、撮像レンズ102のフォーカシングやズーミング、絞り104の絞り値などを制御する。レンズ部10は、レンズ制御部108の制御下で、撮像レンズ102に入射した光を、絞り104(及びレンズ側マウント106)を介して、撮像素子212に結像する(即ち、撮像素子212の上に光学像を形成する)。   The lens unit 10 controls the imaging lens 102 including a plurality of lenses, a diaphragm 104, a lens side mount 106 that mechanically and electrically connects the lens unit 10 and the main body unit 20, and the entire lens unit 10. A lens control unit 108. The lens control unit 108 controls, for example, focusing and zooming of the imaging lens 102, an aperture value of the aperture 104, and the like. Under the control of the lens control unit 108, the lens unit 10 forms an image of the light incident on the imaging lens 102 on the imaging device 212 via the aperture 104 (and the lens side mount 106) (that is, the imaging device 212). An optical image is formed on top).

本体部20において、本体側マウント202は、レンズ部10と本体部20とを機械的及び電気的に接続する。ミラー204及び206は、撮像レンズ102に入射した光を、一眼レフ方式で光学ファインダ208に導く。シャッタ210は、絞り機能を有する。撮像素子212は、レンズ部10(撮像レンズ102)によって形成される光学像を電気信号に変換する。A/D変換部214は、撮像素子212から出力されるアナログ信号をデジタル信号に変換する。   In the main body unit 20, the main body side mount 202 mechanically and electrically connects the lens unit 10 and the main body unit 20. The mirrors 204 and 206 guide the light incident on the imaging lens 102 to the optical viewfinder 208 by a single-lens reflex system. The shutter 210 has a diaphragm function. The imaging element 212 converts an optical image formed by the lens unit 10 (imaging lens 102) into an electrical signal. The A / D converter 214 converts an analog signal output from the image sensor 212 into a digital signal.

画像処理部216は、A/D変換部214からの画像データ又はメモリ制御部218からの画像データに対して所定の画像処理(画素補間処理や色変換処理)を行う。画像処理部216は、必要に応じて、A/D変換部214からの画像データを用いて所定の演算処理を行い、その演算結果に基づいて、TTL(スルー・ザ・レンズ)方式のホワイトバランス(AWB)処理を行う。また、画像処理部216は、所定の演算処理の演算結果をシステム制御部228に出力する。システム制御部228は、画像処理部216からの演算結果に基づいて、TTL(スルー・ザ・レンズ)方式のオートフォーカス(AF)処理、自動露出(AE)処理及びフラッシュプリ発光(EF)処理を行う。   The image processing unit 216 performs predetermined image processing (pixel interpolation processing or color conversion processing) on the image data from the A / D conversion unit 214 or the image data from the memory control unit 218. The image processing unit 216 performs predetermined calculation processing using the image data from the A / D conversion unit 214 as necessary, and based on the calculation result, a TTL (through the lens) type white balance. (AWB) Processing is performed. In addition, the image processing unit 216 outputs a calculation result of a predetermined calculation process to the system control unit 228. The system control unit 228 performs TTL (through-the-lens) type autofocus (AF) processing, automatic exposure (AE) processing, and flash pre-flash (EF) processing based on the calculation result from the image processing unit 216. Do.

メモリ制御部218は、A/D変換部214、画像処理部216、画像表示メモリ220及びD/A変換部222を制御する。A/D変換部214からの画像データは、画像処理部216及びメモリ制御部218を介して、或いは、メモリ制御部218のみを介して、画像表示メモリ220又はメモリ224に書き込まれる(記録される)。   The memory control unit 218 controls the A / D conversion unit 214, the image processing unit 216, the image display memory 220, and the D / A conversion unit 222. The image data from the A / D conversion unit 214 is written (recorded) in the image display memory 220 or the memory 224 via the image processing unit 216 and the memory control unit 218 or only through the memory control unit 218. ).

メモリ224は、撮像素子212から順次入力される画像データを記憶するためのメモリであって、所定の数(1つ以上)の画像データを記憶するための十分な記憶容量を備えている。従って、複数の静止画像データを連続して撮影する連写撮像やパノラマ撮像を行う場合にも、高速、且つ、大量な画像データの書き込みをメモリ224に対して行うことができる。また、メモリ224は、システム制御部228の作業領域として使用することもできる。   The memory 224 is a memory for storing image data sequentially input from the image sensor 212 and has a sufficient storage capacity for storing a predetermined number (one or more) of image data. Therefore, even when performing continuous shooting or panoramic imaging in which a plurality of still image data are continuously captured, a large amount of image data can be written to the memory 224 at high speed. The memory 224 can also be used as a work area for the system control unit 228.

表示部226は、例えば、TFT方式のLCDなどで構成される。表示部226は、デジタル信号をアナログ信号に変換するD/A変換部222を介して、画像表示メモリ220に書き込まれた表示用の画像データに対応する画像を表示する。表示部226において、撮像素子212からの画像データを逐次表示することで、電子ビューファインダ(EVF)機能を実現することができる。また、表示部226は、撮像装置1の状態(撮像モード(静止画撮像モード、動画撮像モードなど)、撮像可能枚数、撮像条件(シャッタ速度や絞り値など)、記録媒体30やPC40などの着脱状態など)も表示することが可能である。   The display unit 226 is configured by, for example, a TFT LCD. The display unit 226 displays an image corresponding to the display image data written in the image display memory 220 via the D / A conversion unit 222 that converts a digital signal into an analog signal. An electronic viewfinder (EVF) function can be realized by sequentially displaying the image data from the image sensor 212 on the display unit 226. The display unit 226 also displays the state of the imaging apparatus 1 (imaging mode (still image imaging mode, moving image imaging mode, etc.), the number of images that can be captured, imaging conditions (shutter speed, aperture value, etc.) Status etc.) can also be displayed.

システム制御部228は、CPUやメモリなどを含み、本体部20の全体(動作)を制御する。例えば、システム制御部228は、上述したように、AF処理、AE処理及びEF処理を行う。なお、AF処理を行うためのAF処理部、AE処理を行うためのAE処理部及びEF処理を行うためのEF処理部を個別に設けてもよい。   The system control unit 228 includes a CPU, a memory, and the like, and controls the entire body unit 20 (operation). For example, the system control unit 228 performs AF processing, AE processing, and EF processing as described above. Note that an AF processing unit for performing AF processing, an AE processing unit for performing AE processing, and an EF processing unit for performing EF processing may be provided separately.

不揮発性メモリ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 recording medium 30 attached to or detached from the imaging apparatus 1 (main body unit 20) (for example, the type) or the recording medium 30 attached to the imaging apparatus 1 has been replaced. A history including such as is stored.

操作部232は、ユーザの操作を受け付ける(動作指示を入力する)ためのスイッチ、ダイヤル、タッチパネル、ボタンなどで構成される。操作部232は、例えば、静止画撮像モード(単写撮像モード又は連写撮像モード)や動画撮像モードなどの撮像モードを設定するためのモードダイヤル、表示部226に画像を表示(再生)するための再生ボタンを含む。また、操作部232は、各種メニューボタン、各種設定ボタン、移動ボタン、記録媒体30を撮像装置1から取り外す際に開けられる蓋や電池を撮像装置1から取り外す際に開けられる蓋の蓋開けスイッチも含む。なお、単写撮像モードとは、第2のスイッチSW2がON状態となった場合に、1コマの撮像を行って待機状態となるモードであり、連写撮像モードとは、第2のスイッチSW2がON状態となっている間、連続して撮像を行うモードである。   The operation unit 232 includes switches, dials, a touch panel, buttons, and the like for receiving user operations (inputting operation instructions). The operation unit 232 is, for example, a mode dial for setting an imaging mode such as a still image imaging mode (single shooting imaging mode or continuous shooting imaging mode) or a moving image imaging mode, and for displaying (reproducing) an image on the display unit 226. Includes play button. The operation unit 232 also includes various menu buttons, various setting buttons, a movement button, a lid that can be opened when the recording medium 30 is removed from the imaging apparatus 1, and a lid opening switch that can be opened when the battery is removed from the imaging apparatus 1. . The single shooting mode is a mode in which one frame is shot and the standby mode is set when the second switch SW2 is turned on. The continuous shooting mode is the second switch SW2. This is a mode in which imaging is continuously performed while is in the ON state.

シャッターボタン234は、被写体の撮像を指示するためのボタンであって、第1のスイッチSW1と、第2のスイッチSW2とを含む。第1のスイッチSW1は、シャッターボタン234の操作途中(半押し)でON状態となり、AF処理、AE処理、AWB処理、EF処理などの開始を指示する。第2のスイッチSW2は、シャッターボタン234の操作完了(全押し)でON状態となり、撮像素子212からの画像信号の読み出しから記録媒体30などに画像データを書き込むまでの一連の撮像処理(露光処理、現像処理及び記録処理)の開始を指示する。   The shutter button 234 is a button for instructing imaging of a subject, and includes a first switch SW1 and a second switch SW2. The first switch SW1 is turned on in the middle of the operation of the shutter button 234 (half-pressed), and instructs to start AF processing, AE processing, AWB processing, EF processing, and the like. The second switch SW2 is turned on when the operation of the shutter button 234 is completed (fully pressed), and a series of imaging processing (exposure processing) from reading of an image signal from the imaging device 212 to writing of image data to the recording medium 30 or the like. , Development processing and recording processing).

電源スイッチ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 power switch 236 is a switch for switching the imaging apparatus 1 to a power-on state or a power-off state. The power supply unit 238 includes a battery detection circuit, a DC-DC converter, a switch circuit that switches a block to be energized, and the like, and detects whether or not a battery is installed in the power supply unit 240, the type of battery, and the battery voltage (remaining capacity). . In addition, the power supply unit 238 includes the recording medium 30 for a necessary period of time through a DC-DC converter based on each detection result in the power supply unit 240 and an instruction from the system control unit 228. 1 is supplied to each part. The power supply unit 240 detachably holds a primary battery such as an alkaline battery or a lithium battery, a secondary battery such as a NiCd battery, a NiMH battery, or a Li battery, an AC adapter, or the like. The power supply unit 240 is provided with a lid that prevents a battery attached to the power supply unit 240 from jumping out of the power supply unit 240 and is opened when the battery is removed from the imaging device 1 (power supply unit 240). Yes.

第1の接続部242は、インタフェース(I/F)やコネクタを含み、撮像装置1(本体部20)と記録媒体30とを接続する。第2の接続部244は、インタフェース(I/F)やコネクタを含み、撮像装置1(本体部20)とPC40とを接続する。I/F及びコネクタは、撮像装置1と記録媒体30又はPC40との間で画像データや画像データを管理するための管理データを転送することができるように、種々の記録媒体やPCの規格に準拠して構成される。   The first connection unit 242 includes an interface (I / F) and a connector, and connects the imaging apparatus 1 (main body unit 20) and the recording medium 30. The second connection unit 244 includes an interface (I / F) and a connector, and connects the imaging device 1 (main body unit 20) and the PC 40. The I / F and connector comply with various recording medium and PC standards so that image data and management data for managing image data can be transferred between the imaging apparatus 1 and the recording medium 30 or the PC 40. Constructed in compliance.

検知部246は、画像データを記録媒体30やPC40に書き込むことが不可能となりえる予め定められた状態を検知する。ここで、予め定められた状態とは、記録媒体30を撮像装置1から取り外す際に開けられる蓋が開状態であること、電池を撮像装置1から取り外す際に開けられる蓋が開状態であること、電池の電圧が予め定められた電圧よりも低くなった状態であることなどを含む。なお、電池を撮像装置1から取り外す際に開けられる蓋が開状態であること、及び、電池の電圧が予め定められた電圧よりも低くなった状態であることは、電源供給部238が検知することも可能である。   The detection unit 246 detects a predetermined state in which image data cannot be written to the recording medium 30 or the PC 40. Here, the predetermined state means that the lid that can be opened when the recording medium 30 is removed from the imaging device 1 is in the open state, and the lid that can be opened when the battery is removed from the imaging device 1 is in the open state. And the battery voltage is lower than a predetermined voltage. Note that the power supply unit 238 detects that the lid that is opened when the battery is removed from the imaging device 1 is in an open state and that the voltage of the battery is lower than a predetermined voltage. It is also possible.

記録媒体30は、記録媒体30と撮像装置1(本体部20)とを接続する接続部302と、画像データや管理データを保存する記憶部304とを有する。記録媒体30は、例えば、PCMCIAカードやSDメモリカードなどのメモリカード、磁気ディスク、DAT、光磁気ディスク、光ディスク、相変化型光ディスクなどを含む。   The recording medium 30 includes a connection unit 302 that connects the recording medium 30 and the imaging apparatus 1 (main body unit 20), and a storage unit 304 that stores image data and management data. The recording medium 30 includes, for example, a memory card such as a PCMCIA card and an SD memory card, a magnetic disk, a DAT, a magneto-optical disk, an optical disk, a phase change optical disk, and the like.

PC40は、PC40と撮像装置1(本体部20)とを接続する接続部402と、画像データや管理データを保存する記憶部404とを有する。記憶部404は、磁気ディスクなどで構成される。   The PC 40 includes a connection unit 402 that connects the PC 40 and the imaging apparatus 1 (main body unit 20), and a storage unit 404 that stores image data and management data. The storage unit 404 is composed of a magnetic disk or the like.

図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 imaging apparatus 1 will be described. Here, it is assumed that the continuous shooting imaging mode is set as the imaging mode of the imaging apparatus 1. Further, the writing of the image data to the storage unit 404 of the PC 40 by the imaging device 1 is the same as the image data saving process to the recording medium 30, and thus the description thereof is omitted here.

図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 storage unit 304 of the recording medium 30. Such a file system includes an FSINFO area 304a, a first FAT area 304b, a second FAT area 304c, a root directory area 304d, and a data area 304e. Free capacity information IF indicating the free capacity of the recording medium 30 is recorded in the FSINFO area 304a. The first FAT area 304b is an area for recording FAT information FAT1 including chain information of image data. The second FAT area 304c is an area for recording FAT information FAT2 having contents obtained by copying the contents of the FAT information FAT1. The root directory area 304d is an area for recording directory information DIR indicating the file name of the image data, the number of the cluster that started recording, the size of the recorded image data, and the like. The data area 304e is an area for recording image data DATA. The free space information IF, the FAT information FAT1 and FAT2, and the directory information DIR are management data for managing the image data DATA.

図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 system control unit 228 writes and reads data to and from the recording medium 30 when recording image data on the recording medium 30. The memory 224 includes an internal buffer (first storage unit) 504 and a cache unit (second storage unit) 506. The internal buffer 502 stores (accumulates) one or more image data to be recorded on the recording medium 30. The cache unit 504 stores management data read from the recording medium 30, that is, free capacity information IF, FAT information FAT1 and FAT2, and directory information DIR.

システム制御部228の処理の一例を説明する。なお、本実施形態では、従来技術のように、記録媒体30に対して、1つの画像データごとに、画像データの書き込みと管理データの書き込み(書き戻し)とを繰り返すことはせず、画像データや管理データの効率的な書き込みを実現する。   An example of processing of the system control unit 228 will be described. In this embodiment, unlike the prior art, image data writing and management data writing (writing back) are not repeated for each piece of image data on the recording medium 30, and image data is not repeated. And efficient writing of management data.

図3を参照するに、まず、システム制御部228は、記録媒体30から空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIRを含む管理データを読み出し、かかる管理データをキャッシュ部504に記憶させる。内部バッファ502に画像データが記憶(蓄積)され、ファイル作成が指示されると、システム制御部228はファイルのオープンを行い、キャッシュ部504に記憶されたディレクトリ情報DIRを更新するが、記録媒体30への書き込みは行わない。   Referring to FIG. 3, first, the system control unit 228 reads management data including free capacity information IF, FAT information FAT1 and FAT2, and directory information DIR from the recording medium 30, and stores the management data in the cache unit 504. . When image data is stored (accumulated) in the internal buffer 502 and file creation is instructed, the system control unit 228 opens the file and updates the directory information DIR stored in the cache unit 504, but the recording medium 30 Do not write to.

次いで、システム制御部228は、内部バッファ502に記憶された画像データDATAを記録媒体30に書き込むと共に、キャッシュ部504に記憶された、対応する空き容量情報IF、FAT情報FAT1及びFAT2を更新する。そして、ファイルをクローズする際に、システム制御部228は、キャッシュ部504に記憶されている、更新された最新のFAT情報FAT1及びディレクトリ情報DIRを記録媒体30に書き込み(書き戻す)。なお、FAT情報FAT2及び空き容量情報IFに関しては、キャッシュ部504に記憶されているFAT情報FAT2及び空き容量情報IFのみを更新する。   Next, the system control unit 228 writes the image data DATA stored in the internal buffer 502 to the recording medium 30, and updates the corresponding free capacity information IF, FAT information FAT1 and FAT2 stored in the cache unit 504. When the file is closed, the system control unit 228 writes (writes back) the latest updated FAT information FAT1 and directory information DIR stored in the cache unit 504 to the recording medium 30. As for the FAT information FAT2 and the free capacity information IF, only the FAT information FAT2 and the free capacity information IF stored in the cache unit 504 are updated.

この処理は繰り返し行われ、記録媒体30への画像データの書き込みを終了する際に、キャッシュ部504に記憶されている、更新された最新の空き容量情報IF及びN個の画像データに対応するFAT情報FAT2をまとめて記録媒体30に書き込む(書き戻す)。   This process is repeated, and when the writing of the image data to the recording medium 30 is finished, the latest updated free space information IF and the FAT corresponding to the N pieces of image data stored in the cache unit 504 are stored. The information FAT2 is collectively written (written back) to the recording medium 30.

例えば、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 recording medium 30, the conventional technique needs to write 5N times including writing of management data corresponding to each of the N pieces of image data to the recording medium 30. However, in this embodiment, it is only necessary to write 3N + 2 times. This indicates that when the number of image data to be written to the recording medium 30 is two or more, that is, when the imaging mode is the continuous shooting imaging mode or the moving image imaging mode, the number of writing is reduced as compared with the conventional technique. ing. As described above, in this embodiment, the image data DATA is written continuously, and the free capacity information IF and the FAT information FAT2 are collectively written last, thereby realizing efficient writing of image data and management data. ing.

以下、各実施形態において、撮像装置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 imaging device 1 will be described in detail. In each embodiment, the detection unit 246 opens the lid that is opened when the recording medium 30 is removed from the imaging apparatus 1 as a predetermined state in which image data cannot be written to the recording medium 30. Is detected. However, the detection unit 246 may detect that the lid that is opened when the battery is removed from the imaging device 1 is in an open state or that the battery voltage is lower than a predetermined voltage. These may be combined.

<第1の実施形態>
図4は、第1の実施形態における記録媒体30への画像データの保存処理を説明するためのフローチャートである。ここでは、撮像装置1の撮像モードとして静止画撮像モード(単写撮像モード又は連写撮像モード)が設定されているものとする。
<First Embodiment>
FIG. 4 is a flowchart for explaining a process for storing image data in the recording medium 30 according to the first embodiment. Here, it is assumed that a still image imaging mode (single shooting imaging mode or continuous shooting imaging mode) is set as the imaging mode of the imaging apparatus 1.

S1002において、システム制御部228は、記録媒体30から管理データ(空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIR)を読み出す。なお、システム制御部228は、記録媒体30から読み出した管理データをメモリ224のキャッシュ部504に記憶させる。   In S1002, the system control unit 228 reads management data (free capacity information IF, FAT information FAT1 and FAT2, and directory information DIR) from the recording medium 30. The system control unit 228 stores the management data read from the recording medium 30 in the cache unit 504 of the memory 224.

S1004において、シャッターボタン234の全押しによる撮像処理が開始されると、メモリ224の内部バッファ502は、撮像素子212から順次入力される画像データを記憶(蓄積)する。   In step S <b> 1004, when imaging processing is started by fully pressing the shutter button 234, the internal buffer 502 of the memory 224 stores (accumulates) image data sequentially input from the imaging element 212.

S1006において、システム制御部228は、ファイルのオープンを行い、S1002でキャッシュ部504に記憶されているディレクトリ情報DIRを更新する。また、システム制御部228は、S1004で内部バッファ502に記憶された画像データのうち1つの画像データを記録媒体30に書き込む。この際、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIR(即ち、管理データ)を更新する。   In S1006, the system control unit 228 opens the file, and updates the directory information DIR stored in the cache unit 504 in S1002. Further, the system control unit 228 writes one image data of the image data stored in the internal buffer 502 in S1004 to the recording medium 30. At this time, the system control unit 228 updates the free capacity information IF, the FAT information FAT1 and FAT2, and the directory information DIR (that is, management data) stored in the cache unit 504.

S1008において、システム制御部228は、管理データの更新ができないほどキャッシュ部504の予め決められた領域が使用されているか、即ち、キャッシュ部504がフル状態であるか否かを判定する。キャッシュ部504がフル状態である場合には、S1010に移行し、システム制御部228は、キャッシュ部504に記憶されているFAT情報FAT1及びFAT2、ディレクトリ情報DIRを記録媒体30に書き戻す(書き込む)。一方、キャッシュ部504がフル状態でない場合には、S1012に移行する。   In step S1008, the system control unit 228 determines whether a predetermined area of the cache unit 504 is used so that the management data cannot be updated, that is, whether the cache unit 504 is full. If the cache unit 504 is full, the process proceeds to S1010, and the system control unit 228 writes (writes) the FAT information FAT1 and FAT2 and the directory information DIR stored in the cache unit 504 back to the recording medium 30. . On the other hand, if the cache unit 504 is not full, the process proceeds to S1012.

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 system control unit 228 determines whether the detection unit 246 has detected that the lid that is opened when the recording medium 30 is detached from the imaging apparatus 1 is in the open state. If it is not detected that the lid is open, the process proceeds to S1014, and the system control unit 228 writes the FAT information FAT1 and the directory information DIR stored in the cache unit 504 back to the recording medium 30. On the other hand, if it is detected that the lid is open, the process proceeds to S1016, and the system control unit 228 displays the free capacity information IF, the FAT information FAT1 and FAT2, and the directory information DIR stored in the cache unit 504. Write back to the recording medium 30.

S1018において、システム制御部228は、内部バッファ502に画像データが残っていないか、即ち、内部バッファ502が空になっているか否かを判定する。内部バッファ502が空になっていない場合には、S1006に移行し、内部バッファ502が空になっている場合には、S1020に移行する。   In step S1018, the system control unit 228 determines whether no image data remains in the internal buffer 502, that is, whether the internal buffer 502 is empty. If the internal buffer 502 is not empty, the process proceeds to S1006. If the internal buffer 502 is empty, the process proceeds to S1020.

S1020において、システム制御部228は、過去に(即ち、S1012で)検知部246によって記録媒体30を撮像装置1から取り外す際に開けられる蓋が開状態であることが検知されているか否かを判定する。換言すれば、S1020では、内部バッファ502に記憶された画像データの記録媒体30への書き込みが開始され、且つ、内部バッファ502に画像データが残っているときに、蓋が開状態であることが検知されているか否かを判定する。   In step S1020, the system control unit 228 determines whether or not the detection unit 246 has detected that the lid that is opened when the recording medium 30 is removed from the imaging apparatus 1 is open in the past (that is, in step S1012). To do. In other words, in S1020, when the writing of the image data stored in the internal buffer 502 to the recording medium 30 is started and the image data remains in the internal buffer 502, the lid may be open. It is determined whether or not it has been detected.

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 cache unit 504 is written back to the recording medium 30 in S1016. The image data saving process ends. On the other hand, if it is not detected in S1012 that the lid is open, the process proceeds to S1022.

S1022において、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IF、FAT情報FAT2を記録媒体30に書き戻し、記録媒体30への画像データの保存処理を終了する。   In step S1022, the system control unit 228 writes the free capacity information IF and the FAT information FAT2 stored in the cache unit 504 back to the recording medium 30, and ends the image data saving process on the recording medium 30.

本実施形態では、内部バッファ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 internal buffer 502 is started and the image data remains in the internal buffer 502, it is detected that the lid is open, and the lid is Different processing is performed depending on whether or not the open state is detected. Specifically, when it is detected that the lid is open, the latest updated management data (free capacity information IF, FAT1, FAT2, DIR) stored in the cache unit 504 is stored in the recording medium 30. Write. Therefore, even when image data cannot be written to the recording medium 30 in the still image capturing mode (during recording of a still image), the management data is written to the recording medium 30, so Image data can be read out. In other words, it is possible to avoid the loss of the image data until immediately before it becomes impossible to write the image data to the recording medium 30. Further, when it is not detected that the lid is open, at least a part of the data (FAT1, DIR) necessary for reading out the image data among the latest management data stored in the cache unit 504 is recorded on the recording medium. Write to 30. Therefore, even when image data cannot be written to the recording medium 30 in the still image capturing mode (during recording of a still image), the image data (image data up to immediately before) can be read from the recording medium 30. it can. If it is not detected that the lid is open, the management data stored in the cache unit 504 is stored when all the image data stored in the internal buffer 502 has been written to the recording medium 30. The remaining data (IF, FAT2) are written in the recording medium 30. Therefore, as described above, efficient writing of image data and management data is realized.

<第2の実施形態>
図5は、第2の実施形態における記録媒体30への画像データの保存処理を説明するためのフローチャートである。ここでは、撮像装置1の撮像モードとして動画撮像モードが設定されているものとする。
<Second Embodiment>
FIG. 5 is a flowchart for explaining a process for storing image data in the recording medium 30 according to the second embodiment. Here, it is assumed that the moving image imaging mode is set as the imaging mode of the imaging apparatus 1.

S1102において、システム制御部228は、記録媒体30から管理データ(空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIR)を読み出す。なお、システム制御部228は、記録媒体30から読み出した管理データをメモリ224のキャッシュ部504に記憶させる。   In step S1102, the system control unit 228 reads management data (free capacity information IF, FAT information FAT1 and FAT2, and directory information DIR) from the recording medium 30. The system control unit 228 stores the management data read from the recording medium 30 in the cache unit 504 of the memory 224.

S1104において、システム制御部228は、動画を圧縮記録する際の最小単位である1コマを効率的に管理するために必要なデータの集まりであるGOP(Group Of Pictures)を構成するフレーム数Fを取得する。また、システム制御部228は、管理データの記録媒体30への書き戻し間隔をFに設定する。   In S1104, the system control unit 228 calculates the number of frames F constituting a GOP (Group Of Pictures), which is a collection of data necessary to efficiently manage one frame, which is the minimum unit when compressing and recording a moving image. get. Further, the system control unit 228 sets the interval for writing back management data to the recording medium 30 to F.

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 internal buffer 502 of the memory 224 stores (accumulates) image data sequentially input from the imaging element 212 for each frame. Further, the system control unit 228 initializes the frame count f (f = 0).

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 system control unit 228 opens the file and updates the directory information DIR stored in the cache unit 504 in step S1102. In addition, the system control unit 228 writes the image data stored in the internal buffer 502 in S1106 to the recording medium 30 for each frame. At this time, the system control unit 228 updates the free capacity information IF, the FAT information FAT1 and FAT2, and the directory information DIR (that is, management information) stored in the cache unit 504. Further, the system control unit 228 increments the frame count f (f = f + 1).

S1110において、システム制御部228は、管理データの更新ができないほどキャッシュ部504の予め決められた領域が使用されているか、即ち、キャッシュ部504がフル状態であるか否かを判定する。キャッシュ部504がフル状態である場合には、S1112に移行し、システム制御部228は、キャッシュ部504に記憶されているFAT情報FAT1及びFAT2、ディレクトリ情報DIRを記録媒体30に書き戻す(書き込む)。一方、キャッシュ部504がフル状態でない場合には、S1114に移行する。   In step S1110, the system control unit 228 determines whether a predetermined area of the cache unit 504 is used so that the management data cannot be updated, that is, whether the cache unit 504 is full. If the cache unit 504 is full, the process proceeds to S1112 and the system control unit 228 writes (writes) the FAT information FAT1 and FAT2 and the directory information DIR stored in the cache unit 504 back to the recording medium 30. . On the other hand, if the cache unit 504 is not full, the process proceeds to S1114.

S1114において、システム制御部228は、検知部246が記録媒体30を撮像装置1から取り外す際に開けられる蓋が開状態であることを検知したか否かを判定する。蓋が開状態であることを検知していない場合には、S1116に移行し、システム制御部228は、キャッシュ部504に記憶されているFAT情報FAT1及びディレクトリ情報DIRを記録媒体30に書き戻す。一方、蓋が開状態であることを検知した場合には、S1118に移行する。   In step S <b> 1114, the system control unit 228 determines whether the detection unit 246 has detected that the lid that is opened when the recording medium 30 is removed from the imaging apparatus 1 is in the open state. If it is not detected that the lid is open, the process proceeds to S1116, and the system control unit 228 writes the FAT information FAT1 and directory information DIR stored in the cache unit 504 back to the recording medium 30. On the other hand, if it is detected that the lid is open, the process proceeds to S1118.

S1118において、システム制御部228は、フレームカウントfが管理データの書き戻し間隔Fに等しい(f=F)か否かを判定する。フレームカウントfが管理データの書き戻し間隔Fと等しくない場合には、S1108に移行し、フレームカウントfが管理データの書き戻し間隔Fと等しい倍には、S1120に移行する。   In step S1118, the system control unit 228 determines whether the frame count f is equal to the management data write-back interval F (f = F). If the frame count f is not equal to the management data write-back interval F, the process proceeds to S1108. If the frame count f is equal to the management data write-back interval F, the process proceeds to S1120.

S1120において、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IF、FAT情報FAT1及びFAT2、ディレクトリ情報DIRを記録媒体30に書き戻す。また、システム制御部228は、フレームカウントfを初期化(f=0)する。   In S1120, the system control unit 228 writes back the free capacity information IF, the FAT information FAT1 and FAT2, and the directory information DIR stored in the cache unit 504 to the recording medium 30. Further, the system control unit 228 initializes the frame count f (f = 0).

S1122において、システム制御部228は、内部バッファ502に画像データが残っていないか、即ち、内部バッファ502が空になっているか否かを判定する。内部バッファ502が空になっていない場合には、S1108に移行し、内部バッファ502が空になっている場合には、S1124に移行する。   In step S1122, the system control unit 228 determines whether there is no image data remaining in the internal buffer 502, that is, whether the internal buffer 502 is empty. If the internal buffer 502 is not empty, the process proceeds to S1108. If the internal buffer 502 is empty, the process proceeds to S1124.

S1124において、システム制御部228は、過去に(即ち、S1114で)検知部246によって記録媒体30を撮像装置1から取り外す際に開けられる蓋が開状態であることが検知されているか否かを判定する。換言すれば、S1124では、内部バッファ502に記憶された画像データの記録媒体30への書き込みが開始され、且つ、内部バッファ502に画像データが残っているときに、蓋が開状態であることが検知されているか否かを判定する。   In S1124, the system control unit 228 determines whether or not the detection unit 246 detects in the past (in S1114) that the lid that is opened when the recording medium 30 is removed from the imaging device 1 is in the open state. To do. In other words, in S1124, when the writing of the image data stored in the internal buffer 502 to the recording medium 30 is started and the image data remains in the internal buffer 502, the lid may be open. It is determined whether or not it has been detected.

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 cache unit 504 has been written back to the recording medium 30 in S1120. The image data saving process ends. On the other hand, if it is not detected in S1114 that the lid is open, the process proceeds to S1126.

S1126において、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IF、FAT情報FAT2を記録媒体30に書き戻し、記録媒体30への画像データの保存処理を終了する。   In step S1126, the system control unit 228 writes the free capacity information IF and the FAT information FAT2 stored in the cache unit 504 back to the recording medium 30, and ends the image data saving process on the recording medium 30.

本実施形態では、内部バッファ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 internal buffer 502 is started and the image data remains in the internal buffer 502, it is detected that the lid is open, and the lid is Different processing is performed depending on whether or not the open state is detected. Specifically, when it is detected that the lid is open, the latest updated management data (free capacity information IF, FAT1, FAT2, DIR) stored in the cache unit 504 is stored in the recording medium 30. Write. Therefore, even when the image data cannot be written to the recording medium 30 in the moving image capturing mode (moving image recording), since the management data is written to the recording medium 30, the image is recorded from the recording medium 30. Data can be read out. In other words, it is possible to avoid the loss of the image data until immediately before it becomes impossible to write the image data to the recording medium 30. Further, when it is not detected that the lid is open, at least a part of the data (FAT1, DIR) necessary for reading out the image data among the latest management data stored in the cache unit 504 is recorded on the recording medium. Write to 30. Therefore, even when it becomes impossible to write image data to the recording medium 30 in the moving image capturing mode (during recording of a moving image), the image data (image data up to the previous time) can be read from the recording medium 30. If it is not detected that the lid is open, the management data stored in the cache unit 504 is stored when all the image data stored in the internal buffer 502 has been written to the recording medium 30. The remaining data (IF, FAT2) are written in the recording medium 30. Therefore, as described above, efficient writing of image data and management data is realized.

<第3の実施形態>
図6は、第3の実施形態における記録媒体30への画像データの保存処理を説明するためのフローチャートである。ここでは、撮像装置1の撮像モードとして静止画撮像モード(単写撮像モード又は連写撮像モード)が設定されているものとする。
<Third Embodiment>
FIG. 6 is a flowchart for explaining a process for storing image data in the recording medium 30 according to the third embodiment. Here, it is assumed that a still image imaging mode (single shooting imaging mode or continuous shooting imaging mode) is set as the imaging mode of the imaging apparatus 1.

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 system control unit 228 writes the free capacity information IF, the FAT information FAT1, and the directory information DIR stored in the cache unit 504 back to the recording medium 30. At this time, the system control unit 228 does not write back the FAT information FAT2 corresponding to the writing of one image data.

S1224において、システム制御部228は、S1216において書き戻していない、キャッシュ部504に記憶されているFAT情報FAT2をまとめて記録媒体30に書き戻す。   In S1224, the system control unit 228 collectively writes back to the recording medium 30 the FAT information FAT2 stored in the cache unit 504 that has not been written back in S1216.

本実施形態では、内部バッファ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 internal buffer 502 is started and the image data remains in the internal buffer 502, it is detected that the lid is open, and the lid is Different processing is performed depending on whether or not the open state is detected. Specifically, when it is detected that the lid is open, the latest updated management data (free capacity information IF, FAT1, DIR) stored in the cache unit 504 is written in the recording medium 30. Therefore, even when image data cannot be written to the recording medium 30 in the still image capturing mode (during recording of a still image), the management data is written to the recording medium 30, so Image data can be read out. In other words, it is possible to avoid the loss of the image data until immediately before it becomes impossible to write the image data to the recording medium 30. Further, when it is not detected that the lid is open, at least a part of the data (FAT1, DIR) necessary for reading out the image data among the latest management data stored in the cache unit 504 is recorded on the recording medium. Write to 30. Therefore, even when image data cannot be written to the recording medium 30 in the still image capturing mode (during recording of a still image), the image data (image data up to immediately before) can be read from the recording medium 30. it can. If it is not detected that the lid is open, the management data stored in the cache unit 504 is stored when all the image data stored in the internal buffer 502 has been written to the recording medium 30. The remaining data (IF, FAT2) are written in the recording medium 30. Therefore, as described above, efficient writing of image data and management data is realized.

なお、本実施形態では、蓋が開状態であることを検知した場合であっても、内部バッファ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 recording medium 30 when image data remains in the internal buffer 502 (S1216). When all the image data has been written to the recording medium 30, the FAT information FAT2 is collectively written back to the recording medium 30 (S1224). Therefore, in this embodiment, when it is detected that the lid is in the open state, management data can be written to the recording medium 30 more efficiently than in the first embodiment.

<第4の実施形態>
図7は、第4の実施形態における記録媒体30への画像データの保存処理を説明するためのフローチャートである。ここでは、撮像装置1の撮像モードとして動画撮像モードが設定されているものとする。
<Fourth Embodiment>
FIG. 7 is a flowchart for explaining a process for storing image data in the recording medium 30 according to the fourth embodiment. Here, it is assumed that the moving image imaging mode is set as the imaging mode of the imaging apparatus 1.

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 system control unit 228 writes back the free capacity information IF, the FAT information FAT1, and the directory information DIR stored in the cache unit 504 to the recording medium 30. At this time, the system control unit 228 does not write back the FAT information FAT2 corresponding to the writing of one image data.

S1328において、システム制御部228は、S1320において書き戻していない、キャッシュ部504に記憶されているFAT情報FAT2をまとめて記録媒体30に書き戻す。   In S1328, the system control unit 228 collectively writes the FAT information FAT2 stored in the cache unit 504, which has not been written back in S1320, back to the recording medium 30.

本実施形態では、内部バッファ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 internal buffer 502 is started and the image data remains in the internal buffer 502, it is detected that the lid is open, and the lid is Different processing is performed depending on whether or not the open state is detected. Specifically, when it is detected that the lid is open, the latest updated management data (free capacity information IF, FAT1, DIR) stored in the cache unit 504 is written in the recording medium 30. Therefore, even when the image data cannot be written to the recording medium 30 in the moving image capturing mode (moving image recording), since the management data is written to the recording medium 30, the image is recorded from the recording medium 30. Data can be read out. In other words, it is possible to avoid the loss of the image data until immediately before it becomes impossible to write the image data to the recording medium 30. Further, when it is not detected that the lid is open, at least a part of the data (FAT1, DIR) necessary for reading out the image data among the latest management data stored in the cache unit 504 is recorded on the recording medium. Write to 30. Therefore, even when image data cannot be written to the recording medium 30 in the still image capturing mode (during recording of a still image), the image data (image data up to immediately before) can be read from the recording medium 30. it can. If it is not detected that the lid is open, the management data stored in the cache unit 504 is stored when all the image data stored in the internal buffer 502 has been written to the recording medium 30. The remaining data (IF, FAT2) are written in the recording medium 30. Therefore, as described above, efficient writing of image data and management data is realized.

なお、本実施形態では、蓋が開状態であることを検知した場合であっても、内部バッファ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 internal buffer 502, the FAT information FAT2 is not written back to the recording medium 30 (S1320). When all the image data has been written to the recording medium 30, the FAT information FAT2 is collectively written back to the recording medium 30 (S1328). Therefore, in this embodiment, when it is detected that the lid is in the open state, management data can be written to the recording medium 30 more efficiently than in the second embodiment.

<第5の実施形態>
図8は、第5の実施形態における記録媒体30への画像データの保存処理を説明するためのフローチャートである。ここでは、撮像装置1の撮像モードとして静止画撮像モード(単写撮像モード又は連写撮像モード)が設定されているものとする。
<Fifth Embodiment>
FIG. 8 is a flowchart for explaining a process of storing image data in the recording medium 30 according to the fifth embodiment. Here, it is assumed that a still image imaging mode (single shooting imaging mode or continuous shooting imaging mode) is set as the imaging mode of the imaging apparatus 1.

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 system control unit 228 writes the free capacity information IF, the FAT information FAT1 and FAT2, and the directory information DIR stored in the cache unit 504 back to the recording medium 30, and performs processing for storing image data in the recording medium 30. finish. In other words, in S1420, when all the image data stored in the cache unit 504 has been written to the recording medium 30, all the management data is written back.

本実施形態では、内部バッファ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 internal buffer 502 is started and the image data remains in the internal buffer 502, it is detected that the lid is open, and the lid is Different processing is performed depending on whether or not the open state is detected. Specifically, when it is detected that the lid is open, the latest updated management data (free capacity information IF, FAT1, DIR) stored in the cache unit 504 is written in the recording medium 30. Therefore, even when image data cannot be written to the recording medium 30 in the still image capturing mode (during recording of a still image), the management data is written to the recording medium 30, so Image data can be read out. In other words, it is possible to avoid the loss of the image data until immediately before it becomes impossible to write the image data to the recording medium 30. If it is not detected that the lid is open, management data (free capacity information IF, FAT1, FAT2, DIR) is collectively stored in the recording medium 30 after all the image data has been written to the recording medium 30. Write. Therefore, the number of times data is written to the recording medium 30 can be greatly reduced, and image data and management data can be written to the recording medium 30 more efficiently. However, if the writing of the image data is suddenly interrupted due to unplugging of the AC adapter or the like, the management data has not been written to the recording medium 30, so there is a possibility that the image data cannot be read from the recording medium 30. Therefore, the present embodiment is effective when the AC adapter is designed so as not to be unplugged as much as possible.

<第6の実施形態>
図9は、第6の実施形態における記録媒体30への画像データの保存処理を説明するためのフローチャートである。ここでは、撮像装置1の撮像モードとして動画撮像モードが設定されているものとする。
<Sixth Embodiment>
FIG. 9 is a flowchart for explaining a process of storing image data in the recording medium 30 according to the sixth embodiment. Here, it is assumed that the moving image imaging mode is set as the imaging mode of the imaging apparatus 1.

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 system control unit 228 writes the free capacity information IF, the FAT information FAT1 and FAT2, and the directory information DIR stored in the cache unit 504 back to the recording medium 30, and stores image data in the recording medium 30. finish. In other words, in S1524, when all the image data stored in the cache unit 504 has been written to the recording medium 30, all the management data is written back.

本実施形態では、内部バッファ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 internal buffer 502 is started and the image data remains in the internal buffer 502, it is detected that the lid is open, and the lid is Different processing is performed depending on whether or not the open state is detected. Specifically, when it is detected that the lid is open, the latest updated management data (free capacity information IF, FAT1, DIR) stored in the cache unit 504 is written in the recording medium 30. Accordingly, even when the image data cannot be written to the recording medium 30 in the moving image capturing mode (during the recording of the moving image), the management data is written to the recording medium 30. Can be read out. In other words, it is possible to avoid the loss of the image data until immediately before it becomes impossible to write the image data to the recording medium 30. If it is not detected that the lid is open, management data (free capacity information IF, FAT1, FAT2, DIR) is collectively stored in the recording medium 30 after all the image data has been written to the recording medium 30. Write. Therefore, the number of times data is written to the recording medium 30 can be greatly reduced, and image data and management data can be written to the recording medium 30 more efficiently. However, if the writing of the image data is suddenly interrupted due to unplugging of the AC adapter or the like, the management data has not been written to the recording medium 30, so there is a possibility that the image data cannot be read from the recording medium 30. Therefore, the present embodiment is effective when the AC adapter is designed so as not to be unplugged as much as possible.

<第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 recording medium 30 is detected, the writing of the image data may be interrupted suddenly due to the unplugging of the AC adapter. In such a case, there is a possibility that the management data, specifically, the free space information IF or the FAT information FAT2 is not correctly written in the recording medium 30. In the seventh embodiment, processing at the time of startup of the imaging apparatus 1 for solving such a problem will be described.

図10は、撮像装置1の起動時の処理を説明するためのフローチャートである。ここでは、撮像装置1が起動され、且つ、撮像装置1に記録媒体30が装着されているものとする。   FIG. 10 is a flowchart for explaining processing at the time of activation of the imaging apparatus 1. Here, it is assumed that the imaging apparatus 1 is activated and the recording medium 30 is attached to the imaging apparatus 1.

S1602において、システム制御部228は、不揮発性メモリ230に記憶されている履歴を取得して、記録媒体30が交換されたか否かを判定する。記録媒体30が交換されていない場合には、処理を終了する。一方、記録媒体30が交換されている場合には、S1604に移行する。   In S1602, the system control unit 228 acquires the history stored in the nonvolatile memory 230, and determines whether or not the recording medium 30 has been replaced. If the recording medium 30 has not been exchanged, the process ends. On the other hand, if the recording medium 30 has been replaced, the process proceeds to S1604.

S1604において、システム制御部228は、記録媒体30のマスターブート領域に記録されているMBR情報を読み出し、記録媒体30のブートセクタ領域に記録すべきBPB情報のオフセットを算出する。また、システム制御部228は、記録媒体30のブートセクタ領域に記録されているBPB情報を読み出し、予約セクタ数、クラスタのサイズ、FAT当たりのセクタ数を算出する。   In step S <b> 1604, the system control unit 228 reads the MBR information recorded in the master boot area of the recording medium 30 and calculates an offset of BPB information to be recorded in the boot sector area of the recording medium 30. Further, the system control unit 228 reads the BPB information recorded in the boot sector area of the recording medium 30, and calculates the number of reserved sectors, the size of the cluster, and the number of sectors per FAT.

S1606において、システム制御部228は、BPB情報のオフセット、予約セクタ数、クラスタのサイズから第1のFAT情報FAT1のオフセットを算出し、記録媒体30から第1のFAT情報FAT1を読み出してキャッシュ部504に記憶させる。   In S1606, the system control unit 228 calculates the offset of the first FAT information FAT1 from the offset of the BPB information, the number of reserved sectors, and the size of the cluster, reads the first FAT information FAT1 from the recording medium 30, and cache unit 504 Remember me.

S1608において、システム制御部228は、FAT1のオフセット、クラスタのサイズ、FAT当たりのセクタ数から第2のFAT情報FAT2のオフセットを算出し、記録媒体30から第2のFAT情報FAT2を読み出してキャッシュ部504に記憶させる。   In step S1608, the system control unit 228 calculates the offset of the second FAT information FAT2 from the FAT1 offset, the cluster size, and the number of sectors per FAT, reads the second FAT information FAT2 from the recording medium 30, and caches the cache unit. 504 is stored.

S1610において、システム制御部228は、キャッシュ部504に記憶されている第1のFAT情報FAT1に含まれる連鎖情報を探索して(連鎖情報が「0」である場合に空きとすることで)、記録媒体30の空き容量を算出する。   In S1610, the system control unit 228 searches for the chain information included in the first FAT information FAT1 stored in the cache unit 504 (by making it empty when the chain information is “0”), The free capacity of the recording medium 30 is calculated.

S1612において、システム制御部228は、キャッシュ部504に記憶されている空き容量情報IFをS1610で算出した空き容量に対応する空き容量情報に更新する。   In S1612, the system control unit 228 updates the free capacity information IF stored in the cache unit 504 with the free capacity information corresponding to the free capacity calculated in S1610.

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 system control unit 228 determines whether or not the first FAT information FAT1 read in S1606 is different from the second FAT information FAT2 read in S1608. If the first FAT information FAT1 and the second FAT information FAT2 are not different, the process is terminated. On the other hand, if the first FAT information FAT1 and the second FAT information FAT2 are different, the process proceeds to S1616.

S1616において、システム制御部228は、キャッシュ部504に記憶されている第1のFAT情報FAT1の内容を、第2のFAT情報FAT2の内容としてコピーして第2のFAT情報FAT2を更新する。そして、システム制御部228は、S1612で更新された空き容量情報及びS1616で更新された第2のFAT情報を記録媒体30に書き込む。   In step S1616, the system control unit 228 copies the content of the first FAT information FAT1 stored in the cache unit 504 as the content of the second FAT information FAT2, and updates the second FAT information FAT2. Then, the system control unit 228 writes the free capacity information updated in S1612 and the second FAT information updated in S1616 to the recording medium 30.

本実施形態では、記録媒体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 recording medium 30, and to write such information on the recording medium 30. This embodiment is effective when writing of image data is suddenly interrupted due to plugging of the AC adapter and the like, and there is a possibility that the free capacity information IF and the FAT information FAT2 are not correctly written in the recording medium 30.

なお、第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 recording medium 30, but the management data is written to the recording medium 30 by other methods. A write back interval may be set. For example, at the start of moving image recording, dummy data is written in an unused area of the recording medium 30 (storage unit 304), and the writing speed is obtained by measuring the time, and moving image recording parameters (resolution, bit number, Frame rate). Based on these pieces of information, the write-back interval of the management data to the recording medium 30 may be set so as not to cause a frame drop due to the overhead when writing back the management data.

また、上述した実施形態では、撮像装置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 recording medium 30 has been described as an example. However, the imaging device 212 and the image processing unit 216 are not essential components. Absent. For example, a configuration (image processing apparatus such as a PC) that writes image data prepared in advance to the recording medium 30 may be used.

以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されないことはいうまでもなく、その要旨の範囲内で種々の変形及び変更が可能である。   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に記載の画像処理装置。   The detection unit according to claim 1, wherein the detection unit detects, as the predetermined state, that a lid that is opened when the recording medium is removed from the image processing apparatus is in an open state. Image processing device. 前記検知手段は、前記予め定められた状態として、前記記録媒体に電源を供給する電池を前記画像処理装置から取り外す際に開けられる蓋が開状態であることを検知することを特徴とする請求項1乃至3のうちいずれか1項に記載の画像処理装置。   The detection means detects, as the predetermined state, that a lid that is opened when a battery that supplies power to the recording medium is removed from the image processing apparatus is in an open state. The image processing apparatus according to any one of 1 to 3. 前記検知手段は、前記予め定められた状態として、前記電池の電圧が予め定められた電圧よりも低くなった状態であることを検知することを特徴とする請求項4に記載の画像処理装置。   The image processing apparatus according to claim 4, wherein the detection unit detects, as the predetermined state, a state in which a voltage of the battery is lower than a predetermined voltage. 被写体を連続して撮像して生成される画像データを前記第1の記憶手段に順次入力する撮像手段を更に有することを特徴とする請求項1乃至5のうちいずれか1項に記載の画像処理装置。   6. The image processing according to claim 1, further comprising an imaging unit that sequentially inputs image data generated by continuously imaging a subject to the first storage unit. apparatus. 画像データと、前記画像データを管理するための管理データとを保存する記録媒体を着脱可能であり、前記記録媒体に記録する1つ以上の画像データを記憶する第1の記憶手段と、前記記録媒体から読み出された前記管理データを記憶する第2の記憶手段と、を有する画像処理装置の制御方法であって、
記録手段が、前記記録媒体に対して、データの書き込み及び読み出しを行う記録ステップと、
更新手段が、前記第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つ以上の画像データを記憶する第1の記憶手段と、前記記録媒体から読み出された前記管理データを記憶する第2の記憶手段と、を有する画像処理装置の制御方法であって、
記録手段が、前記記録媒体に対して、データの書き込み及び読み出しを行う記録ステップと、
更新手段が、前記第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.
JP2011149492A 2011-07-05 2011-07-05 Image processing apparatus and control method Expired - Fee Related JP5766050B2 (en)

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)

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

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

Patent Citations (8)

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

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