JP5396760B2 - Recording control apparatus and imaging apparatus - Google Patents

Recording control apparatus and imaging apparatus Download PDF

Info

Publication number
JP5396760B2
JP5396760B2 JP2008180916A JP2008180916A JP5396760B2 JP 5396760 B2 JP5396760 B2 JP 5396760B2 JP 2008180916 A JP2008180916 A JP 2008180916A JP 2008180916 A JP2008180916 A JP 2008180916A JP 5396760 B2 JP5396760 B2 JP 5396760B2
Authority
JP
Japan
Prior art keywords
cluster
data
write
recording
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008180916A
Other languages
Japanese (ja)
Other versions
JP2010020576A (en
Inventor
直樹 山肩
敏治 松田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nikon Corp filed Critical Nikon Corp
Priority to JP2008180916A priority Critical patent/JP5396760B2/en
Priority to US12/385,697 priority patent/US20090322905A1/en
Publication of JP2010020576A publication Critical patent/JP2010020576A/en
Priority to US13/554,708 priority patent/US20120284468A1/en
Priority to US13/927,651 priority patent/US20130290652A1/en
Application granted granted Critical
Publication of JP5396760B2 publication Critical patent/JP5396760B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Television Signal Processing For Recording (AREA)
  • Studio Devices (AREA)

Description

本発明は、記録制御装置及び撮像装置に関する。 The present invention relates to a record control apparatus and an imaging apparatus.

従来、メモリーカードやメモリスティック等の記憶媒体を装着可能なデジタルカメラ等の機器が普及している。このような記憶媒体の種類には、書き換え可能な記憶媒体、1度だけ書き込み可能なライトワンス型記憶媒体等がある。尚、下記の特許文献1及び特許文献2には、ライトワンス型の記憶媒体のファイル管理技術が開示されている。
特開2007−18528号公報 特開2003−196142号公報
2. Description of the Related Art Conventionally, devices such as digital cameras that can be mounted with a storage medium such as a memory card or a memory stick have become widespread. Such storage media include rewritable storage media, write-once storage media that can be written only once, and the like. The following Patent Document 1 and Patent Document 2 disclose file management techniques for write-once storage media.
JP 2007-18528 A JP 2003-196142 A

ところで、上述のメモリーカード等の記憶媒体は、FAT(File Allocation Tables)ファイルシステムを適用してフォーマットされていることが多い。このFATファイルシステムは、クラスタ単位の各データ記憶領域に対応するFATエントリで構成されたFATと呼ばれるファイル管理情報により、データ記憶領域に記録されるファイルの管理を行うものである。ファイルデータが記憶されている各クラスタのFATエントリには、ファイルデータの読み出し順序として、そのクラスタの次に読み出すクラスタ番号が記録され、読み出し順序が最後となるクラスタのFATエントリには終端記号が記録される。このようなFATファイルシステムが適用されたメモリーカード等の記憶媒体に、PCやデジタルカメラ等のホスト機器からデータを記録する場合、ホスト機器は、記録するファイルのデータを内蔵メモリに一時記憶し、内蔵メモリのデータを記憶媒体に記録する毎に、FATを参照してクラスタを確保し、確保したクラスタのFATエントリに読み出し順序と終端記号を記録し、対応するクラスタにデータを記録する。従って、例えば、記録中にファイルサイズが予測できない動画等のコンテンツを記録する場合には、1つのファイルデータを複数回に分けて記録することになり、記録する毎に、当該ファイルデータに対するFATエントリの終端記号が、その時点での書き込み済みデータの最終端のクラスタに対応するFATエントリに設定されるようFATエントリを書き換えて更新していく必要がある。また、1つのファイルデータを記録中に他の処理を割り込み可能とすること等を考慮し、1つのファイルデータを複数回に分けて記録する場合も、上記と同様に、記録毎に終端記号を書き換えて更新する必要がある。   By the way, the storage medium such as the above-mentioned memory card is often formatted by applying a FAT (File Allocation Tables) file system. This FAT file system manages files recorded in a data storage area by using file management information called FAT configured with FAT entries corresponding to each data storage area in cluster units. In the FAT entry of each cluster in which file data is stored, the cluster number to be read next to the cluster is recorded as the reading order of the file data, and the terminal symbol is recorded in the FAT entry of the cluster having the last reading order. Is done. When recording data from a host device such as a PC or digital camera on a storage medium such as a memory card to which such a FAT file system is applied, the host device temporarily stores the data of the file to be recorded in the built-in memory, Each time the data in the built-in memory is recorded in the storage medium, the cluster is secured by referring to the FAT, the reading order and the terminal symbol are recorded in the FAT entry of the secured cluster, and the data is recorded in the corresponding cluster. Therefore, for example, when recording a content such as a movie whose file size cannot be predicted during recording, one file data is recorded in a plurality of times. Each time recording is performed, a FAT entry for the file data is recorded. It is necessary to rewrite and update the FAT entry so that the terminal symbol is set to the FAT entry corresponding to the last cluster of the written data at that time. In addition, considering that it is possible to interrupt other processing while recording one file data, etc., when recording one file data divided into a plurality of times, a terminal symbol is recorded for each recording as described above. It needs to be rewritten and updated.

しかしながら、ライトワンス型の記憶媒体に、内蔵メモリの容量より大きい動画等のファイルデータを記録する場合、内蔵メモリに格納されたファイルデータの記録毎に読み出し順序と終端記号をFATエントリに記録してしまうと、FATエントリに記録した終端記号を書き換えることができないため、1つのファイルデータを複数回に分けて記録することができない。   However, when recording file data such as a moving image larger than the capacity of the built-in memory on the write-once storage medium, the reading order and the terminal symbol are recorded in the FAT entry for each recording of the file data stored in the built-in memory. In this case, the terminal symbol recorded in the FAT entry cannot be rewritten, and thus one file data cannot be recorded in a plurality of times.

本発明の記録制御装置は、データを一時的に記憶するメモリと、クラスタ単位で管理されたデータ記憶領域を有するライトワンス型記憶媒体へ前記メモリに記憶されている前記データを記録する場合、前記データのうちデータ書込単位に相当する第1データを前記ライトワンス型記憶媒体に記録するために必要なクラスタ群である第1クラスタ群に対応するFATエントリに次に読み出すべきクラスタを示す読出順序を設定した後、前記第1クラスタ群に対応するFATエントリに設定された読出順序に従ったときに最後に読み出されるべき第1確保クラスタへデータを記録することなく前記第1クラスタ群へ前記第1データを記録するよう制御し、前記第1データを前記ライトワンス型記憶媒体に記録しても前記ライトワンス型記憶媒体へ書き込むべき前記データが前記メモリに存在するときは、前記データのうちデータ書込単位に相当する第2データを前記ライトワンス型記憶媒体に記録するために必要なクラスタ群であって前記第1確保クラスタを含む第2クラスタ群に対応するFATエントリに次に読み出すべきクラスタを示す読出順序を設定した後、前記第2クラスタ群に対応するFATエントリに設定された読出順序に従ったときに最後に読み出されるべき第2確保クラスタへデータを記録することなく前記第2クラスタ群へ前記第2データを記録するよう制御し、前記第1データを前記ライトワンス型記憶媒体に記録することで前記ライトワンス型記憶媒体へ書き込むべき前記データが前記メモリに存在しないときは、前記第1確保クラスタへ終端記号を記録するよう制御する制御部とを備える。 Recording control apparatus of the present invention, when recording a memory for temporarily storing data, said data stored in said memory to write-once storage medium having a data storage area managed by the cluster units In the FAT entry corresponding to the first cluster group which is a cluster group necessary for recording the first data corresponding to the data writing unit of the data on the write-once storage medium, the cluster to be read next is indicated. After setting the reading order, the data is not recorded in the first reserved cluster to be read last when the reading order set in the FAT entry corresponding to the first cluster group is followed. Control is performed to record the first data, and even if the first data is recorded on the write-once storage medium, the write-once storage medium is recorded. When the data to be written exists in the memory, the data is a cluster group necessary for recording second data corresponding to a data writing unit of the data on the write-once storage medium, and After setting the reading order indicating the cluster to be read next to the FAT entry corresponding to the second cluster group including the reserved cluster, the last time when the reading order set in the FAT entry corresponding to the second cluster group is followed Recording the second data in the second cluster group without recording data in the second reserved cluster to be read, and recording the first data in the write-once storage medium. When the data to be written to the once-type storage medium does not exist in the memory, a terminal symbol is recorded in the first reserved cluster. And a control unit for controlling.

以下、本発明の実施形態に係る記録制御装置を含むカメラについて説明する。本実施形態では、カメラにおいて、1フレームの静止画ファイルを複数回に分けてメモリーカードに記録する処理について説明する。   Hereinafter, a camera including a recording control apparatus according to an embodiment of the present invention will be described. In the present embodiment, a process of recording a still image file of one frame on a memory card in a plurality of times in the camera will be described.

図1は、本実施形態のカメラの構成を示すブロック図である。同図に示す様に、カメラ1は、撮影レンズ11、CCD12、CCDドライバ13、プリプロセス回路14、A/D変換回路15、ASIC(Application Specific Integrated Circuit)16、メモリ17、カラーモニタ18、操作部19、メモリーカードI/F20、外部I/F21、及びCPU10を備えて構成されている。   FIG. 1 is a block diagram showing the configuration of the camera of this embodiment. As shown in the figure, the camera 1 includes a photographing lens 11, a CCD 12, a CCD driver 13, a preprocess circuit 14, an A / D conversion circuit 15, an ASIC (Application Specific Integrated Circuit) 16, a memory 17, a color monitor 18, and an operation. A unit 19, a memory card I / F 20, an external I / F 21, and a CPU 10 are configured.

CCD12は、撮影レンズ11を介した被写体光を撮像して被写体の明るさに応じた電荷を蓄積し、CCDドライバ13の制御の下、蓄積した電荷のアナログ信号をプリプロセス回路14に出力する。プリプロセス回路14は、CCD12から出力されたアナログ信号を増幅し、雑音除去や黒レベル調整等のアナログ処理を行い、A/D変換回路15は、プリプロセス回路14でアナログ処理されたアナログ信号をデジタル信号に変換する。また、ASIC16は、A/D変換回路15によって変換されたデジタル信号に対して輪郭補償やガンマ補正等の画像処理を行い、Exif(Exchangeable Image File Format)規格に従って、画像データの撮影日時、シャッタースピード、圧縮情報等を含むヘッダ情報データと、画像データの画像処理後の画像データを所定サイズに縮小したサムネイル画像データを生成し、ヘッダ情報データとサムネイル画像データと画像処理後の画像データ(以下、「主画像データ」と言う。)をJPEG等の方式で圧縮して画像ファイルを生成する。   The CCD 12 images subject light via the photographing lens 11 and accumulates charges corresponding to the brightness of the subject, and outputs an analog signal of the accumulated charges to the preprocess circuit 14 under the control of the CCD driver 13. The preprocess circuit 14 amplifies the analog signal output from the CCD 12 and performs analog processing such as noise removal and black level adjustment. The A / D conversion circuit 15 receives the analog signal analog-processed by the preprocess circuit 14. Convert to digital signal. Further, the ASIC 16 performs image processing such as contour compensation and gamma correction on the digital signal converted by the A / D conversion circuit 15, and in accordance with the Exif (Exchangeable Image File Format) standard, the shooting date and time of the image data, the shutter speed. Header information data including compression information and the like, and thumbnail image data obtained by reducing the image data after image processing of the image data to a predetermined size, and generating header information data, thumbnail image data, and image data after image processing (hereinafter, "Main image data") is compressed by a method such as JPEG to generate an image file.

メモリ17は、DRAM(Dynamic Random Access Memory)で構成され、CPU10がプログラムを実行する際に用いられるワーク用メモリであり、画像処理後の画像データ等を一時的に記憶する。カラーモニタ18は、液晶ディスプレイで構成され、画像やカメラの設定情報等を表示する。操作部19は、電源スイッチ、レリーズボタン等の操作ボタンを含んで構成されており、ユーザ操作を受付ける。   The memory 17 is composed of a DRAM (Dynamic Random Access Memory) and is a work memory used when the CPU 10 executes a program, and temporarily stores image data after image processing. The color monitor 18 includes a liquid crystal display, and displays images, camera setting information, and the like. The operation unit 19 includes operation buttons such as a power switch and a release button, and accepts user operations.

メモリーカードI/F20は、着脱可能なメモリーカード30との接続インタフェースであり、装着されたメモリーカードとカメラ1との間のリード/ライトコマンドやデータ等の送受信を中継する。外部I/F21は、PC等の機器を接続するUSB等の接続インタフェースであり、接続された機器とカメラ1との間の通信を中継する。   The memory card I / F 20 is a connection interface with the removable memory card 30 and relays transmission / reception of read / write commands, data, and the like between the mounted memory card and the camera 1. The external I / F 21 is a connection interface such as a USB for connecting a device such as a PC, and relays communication between the connected device and the camera 1.

メモリーカード30は、ライトワンス型のメモリーカードであり、データを記憶するフラッシュメモリと、メモリーカードI/F20を介してカメラ1から送信されるリード/ライトコマンドに応じて、データ書き込み又は読み出しの制御を行うメモリコントローラ、データ書き込み単位情報やライトワンス型媒体であることを示す情報等のカード属性情報を記憶するレジスタを含んで構成されており、FATファイルシステムを適用してフォーマットされている。尚、メモリーカード30は、カメラ1からコマンドを受信した際にコマンドレスポンスをカメラ1に送信し、データを書き込む毎にデータレスポンスをカメラ1に送信する。また、本実施形態のメモリーカード30のデータ書き込み単位は3クラスタ単位であるものとする。   The memory card 30 is a write-once memory card, and controls data writing or reading in accordance with a flash memory for storing data and a read / write command transmitted from the camera 1 via the memory card I / F 20. And a register for storing card attribute information such as data write unit information and information indicating that the medium is a write-once medium, and is formatted by applying a FAT file system. The memory card 30 transmits a command response to the camera 1 when receiving a command from the camera 1, and transmits a data response to the camera 1 every time data is written. Further, it is assumed that the data writing unit of the memory card 30 of the present embodiment is 3 cluster units.

CPU10は、図示しないROMに記憶されたプログラムを実行することによりカメラ1を構成する各部を制御する。また、メモリーカード30のFATファイルシステムを用いて、メモリ17から読み出した画像ファイルをDCF規格に従ってメモリーカード30に書き込むライトコマンドの発行、又は、メモリーカード30に記憶されている画像ファイルを読み出すリードコマンドの発行を行い、メモリーカード30との間でデータ転送を行う。尚、メモリ17に記憶された画像ファイルの画像データをメモリーカード30へ書き込む際は、複数回に分けて読み出し、読み出す毎にライトコマンドを発行する。   CPU10 controls each part which comprises the camera 1 by running the program memorize | stored in ROM which is not shown in figure. Also, using the FAT file system of the memory card 30, issue a write command to write the image file read from the memory 17 to the memory card 30 in accordance with the DCF standard, or read command to read the image file stored in the memory card 30 And data transfer to and from the memory card 30 is performed. In addition, when writing the image data of the image file stored in the memory 17 to the memory card 30, it is read in a plurality of times, and a write command is issued each time the data is read.

図2は、上述したFATファイルシステムの構成図である。FATファイルシステムは、BPB(BIOS Parameter Block)210、FAT(File Allocation Table)220、ROOT230を含むファイル管理領域と、複数セクタを含むクラスタ単位に管理されているデータ記憶領域240で構成されている。BPB210は、1クラスタに含まれるセクタ数、1セクタのバイト数、ルートディレクトリのサイズ、FAT16やFAT32のFATタイプ等の情報が記憶されている。   FIG. 2 is a configuration diagram of the FAT file system described above. The FAT file system includes a file management area including a BPB (BIOS Parameter Block) 210, a FAT (File Allocation Table) 220, and a ROOT 230, and a data storage area 240 managed in cluster units including a plurality of sectors. The BPB 210 stores information such as the number of sectors included in one cluster, the number of bytes in one sector, the size of the root directory, and the FAT type of FAT16 or FAT32.

ROOT230は、ルートディレクトリのフォルダ名とルートディレクトリ直下のサブディレクトリを記憶するクラスタのクラスタ番号が記憶されている。FAT220の各FATエントリ221は、データ記憶領域240の各クラスタと対応しており、クラスタ番号の順に並んでいる。例えば、クラスタ2に対応するのはFATエントリ222であり、クラスタ3に対応するのはFATエントリ223である。また、各FATエントリ221は、そのクラスタの次に読み出すべきクラスタ番号を読み出し順序として記憶する。   The root 230 stores the cluster name of the cluster that stores the folder name of the root directory and the subdirectories immediately below the root directory. Each FAT entry 221 in the FAT 220 corresponds to each cluster in the data storage area 240 and is arranged in the order of the cluster number. For example, the FAT entry 222 corresponds to the cluster 2, and the FAT entry 223 corresponds to the cluster 3. Each FAT entry 221 stores a cluster number to be read next to the cluster as a reading order.

データ記憶領域240は、クラスタ番号“2”の先頭クラスタから順にクラスタ番号が付与された複数のクラスタで構成され、各クラスタはJPEGデータやRAWデータ等のファイルデータを記憶する。   The data storage area 240 is composed of a plurality of clusters assigned with cluster numbers in order from the first cluster having the cluster number “2”, and each cluster stores file data such as JPEG data and RAW data.

次に、カメラ1の動作について、図3のフローチャートを用いて説明する。図3は、ライトワンス型の記憶媒体に画像ファイルを記録する処理のフローチャートである。CPU10は、ユーザにより操作部19を用いて電源がONに設定されると(ステップS11)、メモリーカードI/F20にメモリーカード30が装着されているか否か判断する(ステップS12)。   Next, the operation of the camera 1 will be described using the flowchart of FIG. FIG. 3 is a flowchart of processing for recording an image file on a write-once storage medium. When the power is set to ON by the user using the operation unit 19 (step S11), the CPU 10 determines whether or not the memory card 30 is attached to the memory card I / F 20 (step S12).

CPU10は、メモリーカードI/F20にメモリーカード30が装着されていないと判断した場合には(ステップS12:N)、処理を終了し、メモリーカード30が装着されていると判断した場合には(ステップS12:Y)、メモリーカード30からカード属性情報とFATファイルシステムを取得してメモリ17に記憶する(ステップS13)。   When the CPU 10 determines that the memory card 30 is not attached to the memory card I / F 20 (step S12: N), the CPU 10 terminates the process and determines that the memory card 30 is attached ( In step S12: Y), the card attribute information and the FAT file system are acquired from the memory card 30 and stored in the memory 17 (step S13).

CPU10は、操作部19のレリーズボタンがユーザにより全押しされたときに(ステップS14:Y)、被写体光を撮像してCCD12から出力した撮像信号に基づく画像データを生成してメモリ17に出力する(ステップS15)。そして、ASIC16により、メモリ17に記憶された画像データに画像処理を行い、サムネイル画像データを生成し、主画像データとサムネイル画像データをJPEG方式で圧縮する (ステップS16)。CPU10は、1フレームのヘッダ情報と圧縮されたサムネイル画像データ及び主画像データを含む画像データをメモリ17に記憶し(ステップS17)、メモリ17に記憶した1フレームの画像データをメモリーカード30に記録する処理を行う(ステップS18)。   When the release button of the operation unit 19 is fully pressed by the user (step S14: Y), the CPU 10 captures the subject light, generates image data based on the imaging signal output from the CCD 12, and outputs the image data to the memory 17. (Step S15). Then, the ASIC 16 performs image processing on the image data stored in the memory 17 to generate thumbnail image data, and compresses the main image data and the thumbnail image data by the JPEG method (step S16). The CPU 10 stores the header data of one frame, the image data including the compressed thumbnail image data and the main image data in the memory 17 (step S17), and records the one frame of image data stored in the memory 17 on the memory card 30. Is performed (step S18).

図4は、ステップS18の記録処理のフローチャートである。尚、メモリーカード30の書き込み単位はメモリ17の記憶容量より小さく、1フレームの画像データを複数回に分けてメモリーカード30に記録するものとする。   FIG. 4 is a flowchart of the recording process in step S18. The writing unit of the memory card 30 is smaller than the storage capacity of the memory 17, and one frame of image data is recorded on the memory card 30 in a plurality of times.

CPU10は、ステップS13において取得したカード属性情報によりメモリーカード30がライトワンス型媒体であることを認識すると共に、カード属性情報の書き込み単位を参照し、書き込み単位3クラスタ分の画像データをメモリ17から読み出す(ステップS201)。ここで、図5及び図6は、メモリーカード30に画像ファイルを記録する前から画像ファイルのデータを4回に分けて記録するまでのFATファイルシステムの例を示している。以下、図5及び図6を適宜参照しながら図4の各ステップを説明する。   The CPU 10 recognizes that the memory card 30 is a write-once medium from the card attribute information acquired in step S13, refers to the writing unit of the card attribute information, and stores image data for three clusters in the writing unit from the memory 17. Read (step S201). Here, FIG. 5 and FIG. 6 show an example of the FAT file system from before the image file is recorded on the memory card 30 until the image file data is recorded in four times. Hereinafter, each step of FIG. 4 will be described with reference to FIGS. 5 and 6 as appropriate.

図5(A)は、ステップS201において読み出したFATファイルシステムを示している。同図に示すように、ROOT230にはルートディレクトリとしてDCF規格に従って生成された“DCIM”フォルダが記憶され、DCIM直下のサブディレクトリを記憶するクラスタ“2”が記憶されている。また、DCIM直下のサブディレクトリを記憶するクラスタ2のデータ記憶領域241には、DCF規格に従って生成されたサブディレクトリ“100NIKON”と、100NIKONに格納する画像ファイルのファイル情報を記憶するディレクトリエントリ領域としてクラスタ番号“3”が記憶されており、クラスタ2とクラスタ3のFATエントリ220a、220bには、終端記号“E”が記憶されている。尚、本実施形態では、メモリ17から読み出した画像ファイルは、サブディレクトリ“100NIKON”直下に記録するものとし、その画像ファイルのファイル名とファイルが記憶されている開始クラスタとを含むファイル情報は、ディレクトリエントリ領域であるクラスタ3のデータ記憶領域242に記録する。   FIG. 5A shows the FAT file system read in step S201. As shown in the figure, the ROOT 230 stores a “DCIM” folder generated in accordance with the DCF standard as a root directory, and a cluster “2” that stores subdirectories directly under the DCIM. Further, the data storage area 241 of the cluster 2 that stores the subdirectories directly under the DCIM has a cluster as a directory entry area that stores the subdirectory “100NIKON” generated according to the DCF standard and the file information of the image file stored in the 100NIKON. The number “3” is stored, and the terminal symbol “E” is stored in the FAT entries 220 a and 220 b of the cluster 2 and the cluster 3. In this embodiment, the image file read from the memory 17 is recorded immediately under the subdirectory “100NIKON”, and the file information including the file name of the image file and the start cluster in which the file is stored is The data is recorded in the data storage area 242 of the cluster 3, which is a directory entry area.

CPU10は、図5(A)のFAT220を参照し、書き込み単位数の3クラスタに1を加算した4クラスタ分のクラスタ4〜7を確保し、確保したクラスタ4〜6に読み出した3クラスタ分の画像データを順次割り当て、クラスタ7を除くクラスタ4〜6の各FATエントリに次のクラスタ番号を示す読み出し順序を設定する(ステップS202)。尚、FAT上でクラスタを確保する際、読み出し順序又は終端記号が記憶されていない連続するFATエントリのクラスタを確保するものとする。   The CPU 10 refers to the FAT 220 in FIG. 5A, secures clusters 4 to 7 for 4 clusters obtained by adding 1 to 3 clusters of the number of write units, and reads the data for 3 clusters read to the secured clusters 4 to 6 Image data is sequentially assigned, and a reading order indicating the next cluster number is set in each FAT entry of the clusters 4 to 6 excluding the cluster 7 (step S202). Note that when securing a cluster on the FAT, a cluster of consecutive FAT entries in which the reading order or terminal symbol is not stored is secured.

CPU10は、確保した最後尾のクラスタ7を除くクラスタ4〜6のFATエントリに読み出し順序を書き込み、クラスタ4〜6の各データ記憶領域にステップS201で読み出した画像データを書き込むライトコマンドを発行し、読み出した画像データをメモリーカード30に対して送信する(ステップS203)。   The CPU 10 writes a read order to the FAT entries of the clusters 4 to 6 excluding the secured last cluster 7, and issues a write command for writing the image data read in step S201 to each data storage area of the clusters 4 to 6. The read image data is transmitted to the memory card 30 (step S203).

メモリーカード30は、メモリーカードI/F20を介してライトコマンドと画像データを受信するとコマンドレスポンスをカメラ1に送信し、受信したライトコマンドに従って各FATエントリに読み出し順序の書き込みを行い、クラスタ4のデータ記憶領域の先頭セクタから順に画像データの書き込みを行い、メモリーカードI/F20を介してデータレスポンスを送信する(ステップS204)。   When the memory card 30 receives the write command and the image data via the memory card I / F 20, the memory card 30 transmits a command response to the camera 1, writes the reading order to each FAT entry according to the received write command, and stores the data of the cluster 4 Image data is written sequentially from the first sector of the storage area, and a data response is transmitted via the memory card I / F 20 (step S204).

図5(B)は、メモリ17から1回目の画像データの読み出しを行い(ステップS201)、上記ステップS202〜204の処理を行った後のメモリーカード30のFATファイルシステムを示している。同図に示すように、確保した最後尾のクラスタ7のFATエントリ220dを除く、クラスタ4〜6の各FATエントリ220cには、次のクラスタ番号を示す読み出し順序“5、6、7”が記録され、クラスタ4〜6のデータ記憶領域243には画像ファイルのヘッダ情報、サムネイル画像データ、画像ファイルの主画像データの一部が記録される。尚、1回目のデータの読み出しによりクラスタ7のデータ記憶領域243’は確保するが、この時点ではデータが記録されない。   FIG. 5B shows the FAT file system of the memory card 30 after the first reading of image data from the memory 17 (step S201) and the processing of steps S202 to 204 described above. As shown in the figure, the reading order “5, 6, 7” indicating the next cluster number is recorded in each FAT entry 220c of the clusters 4 to 6 except for the FAT entry 220d of the last cluster 7 secured. In the data storage areas 243 of the clusters 4 to 6, the header information of the image file, the thumbnail image data, and a part of the main image data of the image file are recorded. Note that the data storage area 243 'of the cluster 7 is secured by the first data read, but no data is recorded at this time.

CPU10は、メモリ17内の画像データの読み出しを終了するまで(ステップS205:N)、ステップS201以下の処理を繰り返し行い、画像データの読み出し毎に、FA220において、書き込み単位数に1を加算した4クラスタ分のクラスタを確保して、確保したクラスタのFATエントリの書き込みを行い、書き込み単位3クラスタ分の主画像データを書き込む。   The CPU 10 repeats the processing from step S201 onward until reading of the image data in the memory 17 is completed (step S205: N), and each time the image data is read, the FA 220 adds 1 to the number of write units. The cluster for the cluster is secured, the FAT entry of the secured cluster is written, and the main image data for the write unit of 3 clusters is written.

図5(C)は、図5(B)に続いて2回目の画像データの読み出しを行い、FATエントリとデータ記憶領域への画像データの書き込みを行った後のFATファイルシステムを示している。同図に示すように、2回目の画像データの読み出しにより、クラスタ7〜10が確保され、確保した最後尾のクラスタ10のFATエントリ220fを除くFATエントリ220d、220eに対する読み出し順序が記録され、クラスタ10のデータ記憶領域244’を除くクラスタ7〜9のデータ記憶領域244に主画像データが記録される。   FIG. 5C shows the FAT file system after the image data is read for the second time following FIG. 5B and the image data is written to the FAT entry and the data storage area. As shown in the figure, clusters 7 to 10 are secured by the second readout of the image data, and the readout order for the FAT entries 220d and 220e excluding the FAT entry 220f of the secured last cluster 10 is recorded. Main image data is recorded in the data storage areas 244 of the clusters 7 to 9 except for the ten data storage areas 244 ′.

図6(A)は、図5(C)に続いて3回目の画像データの読み出しを行い、FATエントリとデータ記憶領域への画像データの書き込みを行った後のFATファイルシステムを示している。同図に示すように、3回目の画像データの読み出しにより、クラスタ10〜13が確保され、確保した最後尾のクラスタ13のFATエントリ220hを除くFATエントリ220f、220gに対する読み出し順序が記録され、クラスタ13のデータ記憶領域245’を除くクラスタ10〜12のデータ記憶領域245に主画像データが記録される。   FIG. 6A shows the FAT file system after the image data is read for the third time following FIG. 5C and the image data is written to the FAT entry and the data storage area. As shown in the figure, clusters 10 to 13 are secured by the third readout of the image data, and the readout order for the FAT entries 220f and 220g excluding the FAT entry 220h of the secured last cluster 13 is recorded. Main image data is recorded in the data storage areas 245 of the clusters 10 to 12 except for the 13 data storage areas 245 ′.

図6(B)は、図6(A)に続いて4回目の画像データの読み出しを行い、4回目の画像データの読み出しによりクラスタ13〜16が確保され、確保した最後尾のクラスタ16のFATエントリ220jを除くFATエントリ220h、220iに読み出し順序が記録され、クラスタ16のデータ記憶領域246’を除くクラスタ13〜15のデータ記憶領域246に主画像データが記録される。   In FIG. 6B, the image data is read for the fourth time following FIG. 6A, and the clusters 13 to 16 are secured by reading the image data for the fourth time, and the FAT of the last cluster 16 secured is secured. The reading order is recorded in the FAT entries 220h and 220i excluding the entry 220j, and the main image data is recorded in the data storage areas 246 of the clusters 13 to 15 excluding the data storage area 246 ′ of the cluster 16.

図4に戻り、CPU10は、メモリ17から画像ファイルの画像データの読み出しを終了するとき(ステップS205:Y)、最後に確保した最後尾のクラスタ16のFATエントリに終端記号を書き込み、クラスタ3のデータ記憶領域に、ファイル情報として画像ファイル名“DSC_0001.JPG”と画像ファイルの開始クラスタ番号“4”を書き込むライトコマンドを発行する(ステップS206)。メモリーカード30は、ステップS206で発行されたライトコマンドをメモリーカードI/F20を介して受信し、メモリーカードI/F20を介してコマンドレスポンスを送信し、受信したライトコマンドに従って、クラスタ16のFATエントリに終端記号を書き込み、クラスタ3のデータ記憶領域にファイル名“DSC_0001.JPG”と開始クラスタ番号“4”のファイル情報を書き込み、メモリーカードI/F20を介してデータレスポンスを送信する(ステップS207)。   Returning to FIG. 4, when the CPU 10 finishes reading the image data of the image file from the memory 17 (step S <b> 205: Y), the CPU 10 writes the terminal symbol in the FAT entry of the last secured cluster 16, and A write command for writing the image file name “DSC — 0001.JPG” and the start cluster number “4” of the image file as file information is issued to the data storage area (step S206). The memory card 30 receives the write command issued in step S206 via the memory card I / F 20, transmits a command response via the memory card I / F 20, and according to the received write command, the FAT entry of the cluster 16 Is written in the data storage area of cluster 3, file information of file name “DSC — 0001.JPG” and start cluster number “4” is written, and a data response is transmitted via memory card I / F 20 (step S207). .

図6(C)は、図6(B)の後、メモリ17からの画像データの読み出しを終了してステップS206〜207の終了処理を行った後のFATファイルシステムを示している。同図に示すように、最後尾のクラスタ16のFATエントリ220jには終端記号“E”が記録され、クラスタ3のデータ記憶領域242には画像ファイル名“DSC_0001.JPG”と開始クラスタ番号“4”のファイル情報が記録される。   FIG. 6C shows the FAT file system after the end of the reading of image data from the memory 17 and the end processing in steps S206 to S207 after FIG. 6B. As shown in the figure, the terminal symbol “E” is recorded in the FAT entry 220j of the last cluster 16, and the image file name “DSC — 0001.JPG” and the start cluster number “4” are stored in the data storage area 242 of the cluster 3. "Is recorded.

上述した実施形態は、所定サイズのデータをメモリから読み出す毎に、読み出した所定サイズのデータを書き込むのに必要なクラスタ数より1つ余分にクラスタを確保し、1ファイルの書き込みが終了するまで、データの読み出し毎に余分に確保したクラスタのFATエントリには何も書き込まない。そのため、データの書き込みを終了するまで連続して書き込むことができ、1ファイルのデータを複数回に分けて書き込むことができる。   In the above-described embodiment, every time data of a predetermined size is read from the memory, one extra cluster is secured from the number of clusters necessary for writing the read data of the predetermined size, and writing of one file is completed. Nothing is written in the FAT entry of the cluster reserved for each data read. Therefore, data can be written continuously until data writing is completed, and data of one file can be written in a plurality of times.

また、上述した実施形態では、データの書き込み処理を終了する際に確保した最後尾のクラスタのFATエントリには終端記号が記録されるが、そのクラスタのデータ記憶領域にはデータが記録されない状態で書き込み処理を終了するため、そのクラスタのデータ記憶領域は無駄になる。しかしながら、1ファイルの記録途中におけるFATエントリとデータ記憶領域は、データの記憶状態が一致するよう保たれているので、例えば、記録途中でメモリーカードが抜かれる等の割り込み処理が発生した場合であっても、ファイルシステム上で不整合が生じることがない。   In the above-described embodiment, the terminal symbol is recorded in the FAT entry of the last cluster secured when the data writing process is completed, but no data is recorded in the data storage area of the cluster. Since the writing process is completed, the data storage area of the cluster is wasted. However, since the FAT entry and the data storage area in the middle of recording one file are kept so that the data storage states coincide with each other, for example, an interrupt process such as a memory card being removed during recording occurs. However, there is no inconsistency on the file system.

次に、上述した実施形態の第1の変形例について説明する。上述した実施形態では、メモリーカード30に画像データを書き込み中に書き込みエラーが発生しない場合について説明したが、本変形例では、メモリーカード30において書き込みエラーが発生した場合のエラー処理について説明する。尚、本変形例に係るカメラの構成は、上述した実施形態に係るカメラと同じであり、実施形態と同じ符号を用いて説明する。また、本変形例では、メモリーカード30において書き込みエラーが発生した際に、メモリーカード30から書き込みエラー発生通知がカメラ1に送信されるものとする。   Next, a first modification of the above-described embodiment will be described. In the above-described embodiment, the case where a writing error does not occur while image data is being written to the memory card 30 has been described. In this modification, an error process when a writing error occurs in the memory card 30 will be described. The configuration of the camera according to the present modification is the same as that of the camera according to the above-described embodiment, and will be described using the same reference numerals as those in the embodiment. Further, in this modification, when a write error occurs in the memory card 30, a write error occurrence notification is transmitted from the memory card 30 to the camera 1.

図7は、本変形例に係るカメラ1の動作を示すフローチャートである。図7のステップS301〜304は、メモリーカード30に画像データを書き込む前の各処理を示す図4のステップS201〜204と同じであり、図7のステップS306〜308は、書き込みエラーが発生しない場合の画像データの書き込み処理を示す図4のステップS205〜207と同じであるため、ステップS301〜304及びステップS306〜308の詳細な説明は省略する。また、図8及び図9は、本変形例におけるメモリーカード30のFATファイルシステムの例を示しており、以下、各図を適宜参照しながら本変形例の動作を説明する。   FIG. 7 is a flowchart showing the operation of the camera 1 according to this modification. Steps S301 to S304 in FIG. 7 are the same as steps S201 to S204 in FIG. 4 showing each process before image data is written to the memory card 30, and steps S306 to S308 in FIG. 4 is the same as steps S205 to S207 in FIG. 4 showing the image data writing process, and detailed description of steps S301 to S304 and steps S306 to S308 is omitted. 8 and 9 show an example of the FAT file system of the memory card 30 in the present modification, and the operation of this modification will be described below with reference to each drawing as appropriate.

図8(A)は、画像データを記録する前のFATファイルシステムを示しており、クラスタ4のFATエントリ224には読み出し順序又は終端記号が記憶されていないが、クラスタ4のデータ記憶領域343にはデータが記憶されており、ファイルシステム上、不整合が生じている状態である。   FIG. 8A shows the FAT file system before recording image data. The FAT entry 224 of the cluster 4 does not store the reading order or the terminal symbol, but the data storage area 343 of the cluster 4 does not store it. Is a state where data is stored and inconsistency occurs in the file system.

図8(B)は、CPU10が、メモリ17から書き込み単位3クラスタ分の画像データを読み出し(ステップS301)、図8(A)のFAT220を参照してクラスタ4〜7を確保し、読み出した画像データを確保したクラスタ4〜6のデータ記憶領域に書き込むライトコマンドを発行した際のFATファイルシステムを示している。同図に示すように、メモリーカード30において、確保した最後尾のクラスタ7を除くFATエントリ224〜226には読み出し順序を記録し(ステップS301〜304)、クラスタ4のデータ記憶領域343の先頭セクタから画像データを書き込む際、既にクラスタ4のデータ記憶領域343にデータが記録されていることにより書き込みエラーが発生する。   In FIG. 8B, the CPU 10 reads out the image data for three clusters in writing unit from the memory 17 (step S301), secures the clusters 4 to 7 by referring to the FAT 220 in FIG. The FAT file system is shown when a write command for writing data in the data storage areas of clusters 4 to 6 in which data is secured is issued. As shown in the figure, in the memory card 30, the reading order is recorded in the FAT entries 224 to 226 excluding the secured last cluster 7 (steps S301 to S304), and the first sector of the data storage area 343 of the cluster 4 is recorded. When the image data is written from the above, a write error occurs because the data is already recorded in the data storage area 343 of the cluster 4.

図7に戻り、CPU10は、メモリーカード30から書き込みエラー発生通知のレスポンスを受信した場合(ステップS305:Y)、メモリ17から書き込み単位3クラスタ分の画像データの再読み出しを行い(ステップS301)、図8(B)のFAT220を参照して、書き込みエラー発生直前に確保した最後尾のクラスタ7以後のクラスタから、書き込み単位数に1を加算した4クラスタ分のクラスタを再確保する(ステップS302)。そして、メモリーカード30において、再確保したクラスタのFATエントリ及びデータ記憶領域にデータを記録する(ステップS303、S304)。   Returning to FIG. 7, when the CPU 10 receives a response to the writing error occurrence notification from the memory card 30 (step S305: Y), the CPU 10 rereads the image data for three clusters in writing unit from the memory 17 (step S301). With reference to the FAT 220 in FIG. 8B, four clusters corresponding to four clusters obtained by adding 1 to the number of write units are re-reserved from the cluster after the last cluster 7 secured immediately before the write error occurs (step S302). . Then, in the memory card 30, data is recorded in the FAT entry and the data storage area of the re-secured cluster (Steps S303 and S304).

図9(A)は、エラーが発生した後に上述したステップS301〜S304の処理を行った後のFATファイルシステムである。同図に示すように、エラー発生前に確保した最後尾のクラスタ7を含むクラスタ7〜10が再度確保され、クラスタ10のFATエントリ230を除く、クラスタ7〜9のFATエントリ227〜229に読み出し順序“8〜10”が記録され、クラスタ7〜9のデータ記憶領域346に再度読み出された画像データが再書き込みされる。   FIG. 9A shows the FAT file system after performing the above-described steps S301 to S304 after an error has occurred. As shown in the figure, the clusters 7 to 10 including the last cluster 7 secured before the occurrence of the error are secured again and read to the FAT entries 227 to 229 of the clusters 7 to 9 except the FAT entry 230 of the cluster 10. The order “8-10” is recorded, and the read image data is rewritten in the data storage area 346 of the clusters 7-9.

図7に戻り、CPU10は、画像ファイルの画像データの読み出しを終了する際、即ち、画像ファイルの書き込みを終了する際に(ステップS306:Y)、確保した最後尾のクラスタに終端記号を書き込み、ディレクトリエントリ領域にファイル情報の書き込みを行う(ステップS307、S308)。図9(B)は、画像データの読み出しを終了して画像ファイルの書き込みを終了したときのFATファイルシステムを示している。同図に示すように、最後尾のクラスタ10のFATエントリ230に終端記号“E”が記録され、ファイル情報として画像ファイル名“DSC_0001.JPG”と再書き込みを開始したクラスタ番号“7”がクラスタ3のデータ記憶領域342に記録される。従って、エラー発生直前に確保したクラスタ5、6のデータ記憶領域345と、画像データの読み出し終了時に確保した最後尾のクラスタ10のデータ記憶領域346’にはデータが記録されていない状態となる。   Returning to FIG. 7, when the reading of the image data of the image file is finished, that is, when the writing of the image file is finished (step S <b> 306: Y), the CPU 10 writes a terminal symbol in the secured last cluster, File information is written in the directory entry area (steps S307 and S308). FIG. 9B shows the FAT file system when reading of the image data is finished and writing of the image file is finished. As shown in the figure, the terminal symbol “E” is recorded in the FAT entry 230 of the last cluster 10, and the image file name “DSC — 0001.JPG” and the cluster number “7” that started rewriting are the cluster information. 3 data storage area 342. Accordingly, no data is recorded in the data storage areas 345 of the clusters 5 and 6 secured immediately before the occurrence of the error and the data storage area 346 ′ of the last cluster 10 secured at the end of reading of the image data.

上述した第1の変形例では、データを読み出す毎に余分に確保される最後尾のクラスタのFATエントリには読み出し順序や終端記号が記録されないため、書き込みエラーが発生した場合のエラー処理として、エラー発生直前に確保していた最後尾のクラスタから再書き込みを開始することができる。そのため、書き込みエラーや割り込み処理等が発生した場合でも、ファイルシステムにおいて不整合を生じさせることなく、データの読み出し毎に余分に確保されるクラスタの領域を無駄にすることなく利用することができる。また、画像ファイル名と開始クラスタのファイル情報を画像ファイルの書き込みを終了するときに書き込むことで、書き込みエラー発生後の再書き込み時において、書き込みエラー発生前と同じファイル名を設定することができる。   In the first modification described above, since the reading order and the terminal symbol are not recorded in the FAT entry of the last cluster that is reserved extra each time data is read, error handling is performed when a write error occurs. Rewriting can be started from the last cluster reserved immediately before the occurrence. Therefore, even when a write error or an interrupt process occurs, it is possible to use a cluster area that is reserved extra for each data read without causing inconsistency in the file system and without wasting it. Further, by writing the image file name and the file information of the start cluster when the writing of the image file is finished, the same file name as before the writing error can be set at the time of rewriting after the writing error occurs.

次に、実施形態の第2の変形例について説明する。本変形例は、メモリーカード30において書き込みエラーが発生した場合に第1の変形例とは異なるエラー処理を行う。尚、本変形例に係るカメラは、実施形態のカメラの構成と同じであり、実施形態と同じ符号を用いて説明する。また、本変形例では、メモリーカード30において書き込みエラーが発生した場合に、書き込みエラーが発生したエラークラスタの番号を含む書き込みエラー発生通知をメモリーカード30からカメラ1に送信するものとする。   Next, a second modification of the embodiment will be described. In this modification, when a write error occurs in the memory card 30, error processing different from that in the first modification is performed. Note that the camera according to this modification has the same configuration as the camera of the embodiment, and will be described using the same reference numerals as those of the embodiment. In the present modification, when a write error occurs in the memory card 30, a write error occurrence notification including the number of the error cluster in which the write error has occurred is transmitted from the memory card 30 to the camera 1.

図10は、本変形例に係るカメラ1の動作を示すフローチャートである。尚、ステップS401〜404は、メモリーカード30において書き込みエラーが発生するまでの処理を示す図4のステップS201〜204と同じであり、ステップS408〜410は、書き込みエラーが発生しない場合の画像データの書き込み処理を示す図4のステップS205〜207と同じであるため、ステップS401〜404及びステップS408〜410の詳細な説明は省略する。   FIG. 10 is a flowchart showing the operation of the camera 1 according to this modification. Steps S401 to S404 are the same as steps S201 to S204 in FIG. 4 showing processing until a write error occurs in the memory card 30, and steps S408 to S410 are image data when no write error occurs. Since this is the same as steps S205 to S207 in FIG. 4 showing the writing process, detailed description of steps S401 to S404 and steps S408 to 410 will be omitted.

上述した第1の変形例と同様、メモリーカード30において、CPU10が発行したライトコマンドで指定されたクラスタのデータ記憶領域に画像データを書き込む際、既に当該クラスタのデータ記憶領域にデータが記憶されていることにより書き込みエラーが発生し、CPU10は、メモリーカード30から書き込みエラー発生通知を受信したものとする(ステップS405:Y)。   As in the first modification described above, in the memory card 30, when image data is written to the data storage area of the cluster specified by the write command issued by the CPU 10, the data is already stored in the data storage area of the cluster. It is assumed that a write error has occurred and the CPU 10 has received a write error occurrence notification from the memory card 30 (step S405: Y).

その場合、本変形例に係るCPU10は、メモリ17から画像データを再度読み出し(ステップS406)、FAT上で、エラークラスタに後続するクラスタの中から書き込み単位数に1を加算した4クラスタ分のクラスタを再確保し(ステップS407)、ステップS403以下の処理を行う。   In that case, the CPU 10 according to the present modification reads the image data from the memory 17 again (step S406), and the cluster for 4 clusters obtained by adding 1 to the number of write units from the clusters following the error cluster on the FAT. Is secured again (step S407), and the processing from step S403 is performed.

図11は、本変形例におけるメモリーカード30のFATファイルシステムの例を示しており、第1の変形例において説明した図8と同様、FAT上でクラスタ4〜7が確保され、メモリーカード30において、クラスタ4のデータ記憶領域443で書き込みエラーが発生しているものとする。以下、上述した本変形例に係るエラー処理の各ステップと併せて各図を説明する。   FIG. 11 shows an example of the FAT file system of the memory card 30 in the present modification. As in FIG. 8 described in the first modification, clusters 4 to 7 are secured on the FAT, and the memory card 30 It is assumed that a write error has occurred in the data storage area 443 of the cluster 4. Hereinafter, each figure will be described together with each step of the error processing according to this modification described above.

図11(A)は、メモリーカード30からエラークラスタ番号“4”を含む書き込みエラー発生通知が送信された時のFATファイルシステムを示している。同図に示すように、FAT上でクラスタ4〜7が確保されて、クラスタ4〜6のFATエントリ224〜226に読み出し順序が記録されている。   FIG. 11A shows the FAT file system when a write error occurrence notification including the error cluster number “4” is transmitted from the memory card 30. As shown in the figure, clusters 4 to 7 are secured on the FAT, and the reading order is recorded in the FAT entries 224 to 226 of the clusters 4 to 6.

図11(B)は、クラスタ4のデータ記憶領域443において発生した書き込みエラーに対してエラー処理を行った後のFATファイルシステムを示している。同図に示すように、書き込みエラー発生通知後に再度読み出された3クラスタ分の画像データに対して、FAT上でエラークラスタ4に後続するクラスタ5〜8(FATエントリ225〜228)が再確保される(ステップS407)。そして、メモリーカード30において、クラスタ8のFATエントリ228を除くクラスタ5〜7のFATエントリ225〜227のうち、図11(A)において読み出し順序が記録されていなかったFATエントリ227に読み出し順序が記録され、クラスタ8のデータ記憶領域444’を除くクラスタ5〜7のデータ記憶領域444に再度読み出された3クラスタ分の画像データが再書き込みされる(ステップS403、S404)。   FIG. 11B shows the FAT file system after error processing is performed for a write error that has occurred in the data storage area 443 of the cluster 4. As shown in the figure, the clusters 5 to 8 (FAT entries 225 to 228) subsequent to the error cluster 4 on the FAT are re-reserved with respect to the image data of three clusters read again after the writing error occurrence notification. (Step S407). In the memory card 30, the reading order is recorded in the FAT entry 227 in which the reading order is not recorded in FIG. 11A among the FAT entries 225 to 227 in the clusters 5 to 7 except the FAT entry 228 in the cluster 8. Then, the read image data for three clusters is rewritten in the data storage areas 444 of the clusters 5 to 7 except for the data storage area 444 ′ of the cluster 8 (steps S403 and S404).

また、図11(C)は、図11(B)の後、メモリ17からの画像データの再読み出しを終了したときのFATファイルシステムを示している。同図に示すように、画像データの再読み出しの終了時に確保した最後尾のクラスタ8のFATエントリ228に終端記号“E”が記録され、画像ファイル名“DSC_0001.JPG”と再書き込みを開始したクラスタ番号“5”のファイル情報が、クラスタ3のデータ記憶領域442に記録される(ステップS408:Y、ステップS409、S410)。従って、実施形態と同様、最後に確保した最後尾のクラスタ8のデータ記憶領域444’のみデータが記録されない状態でファイルの書き込みを終了する。   FIG. 11C shows the FAT file system when the rereading of the image data from the memory 17 is completed after FIG. 11B. As shown in the figure, the terminal symbol “E” is recorded in the FAT entry 228 of the last cluster 8 secured at the end of rereading of the image data, and rewriting is started with the image file name “DSC — 0001.JPG”. The file information of the cluster number “5” is recorded in the data storage area 442 of the cluster 3 (Step S408: Y, Steps S409 and S410). Therefore, similarly to the embodiment, the file writing is finished in a state where data is not recorded only in the data storage area 444 ′ of the last cluster 8 secured last.

本変形例では、画像データをメモリーカード30に書き込み中、書き込みエラーが発生した場合に、エラークラスタに後続するクラスタの中からクラスタを再確保して画像データの再書き込みを開始することができる。そのため、書き込みエラーが、書き込み単位の最後のクラスタで発生する場合を除き、第1の変形例に比べて無駄になるクラスタ数を減らすことができる。   In this modification, when a write error occurs while writing image data to the memory card 30, it is possible to re-secure the cluster from the clusters following the error cluster and start rewriting the image data. For this reason, the number of useless clusters can be reduced as compared with the first modified example, except that a write error occurs in the last cluster of the write unit.

尚、上述した実施形態及び変形例では、記録制御装置としてカメラを用いて説明したが、ライトワンス型の記憶媒体を装着可能な携帯電話、PDA、PC等の情報機器であってもよい。   In the above-described embodiment and modification, the camera is used as the recording control device. However, the recording control device may be an information device such as a mobile phone, a PDA, or a PC that can be mounted with a write-once storage medium.

また、上述した実施形態及び変形例では、メモリーカードに記録するファイルデータとしてJPEG方式で圧縮した静止画像データを用いて説明したが、TIFF形式の画像データやRAW画像データであってもよいし、動画像データや音声データであってもよい。   In the above-described embodiment and modification, the description has been given using still image data compressed by the JPEG method as file data to be recorded on the memory card. However, TIFF image data or RAW image data may be used. It may be moving image data or audio data.

実施形態に係るカメラのブロック図である。It is a block diagram of the camera concerning an embodiment. 実施形態におけるFATファイルシステムの構成図である。It is a block diagram of the FAT file system in the embodiment. 実施形態に係るカメラの動作を示すフローチャートである。It is a flowchart which shows operation | movement of the camera which concerns on embodiment. 実施形態に係るカメラの画像データ記録処理を示すフローチャートである。It is a flowchart which shows the image data recording process of the camera which concerns on embodiment. 実施形態におけるFATファイルシステム例を示す図あり、(A)は画像ファイル記録前のFATファイルシステム、(B)は1回目の画像データ記録時のFATファイルシステム、(C)は2回目の画像データ記録時のFATファイルシステムである。2A and 2B are diagrams illustrating an example of a FAT file system in the embodiment, where FIG. 1A is a FAT file system before recording an image file, FIG. 1B is a FAT file system at the time of first image data recording, and FIG. This is a FAT file system at the time of recording. 実施形態におけるFATファイルシステム例を示す図であり、(A)は3回目の画像データ記録時のFATファイルシステム、(B)は4回目の画像データ記録時のFATファイルシステム、(C)は画像ファイルの記録終了時のFATファイルシステムである。2A and 2B are diagrams illustrating an example of a FAT file system in the embodiment, in which FIG. 3A is a FAT file system at the time of third image data recording, FIG. 2B is a FAT file system at the time of fourth image data recording, and FIG. This is a FAT file system at the end of file recording. 第1の変形例に係るカメラの動作を示すフローチャートである。It is a flowchart which shows operation | movement of the camera which concerns on a 1st modification. 第1の変形例におけるFATファイルシステム例を示す図であり、(A)は画像ファイル記録前のFATファイルシステム、(B)は画像データ記録時に書き込みエラーが発生時のFATファイルシステムである。It is a figure which shows the FAT file system example in a 1st modification, (A) is a FAT file system before image file recording, (B) is a FAT file system at the time of the writing error generate | occur | produced at the time of image data recording. 第1の変形例におけるFATファイルシステム例を示す図であり、(A)はエラー発生後の画像データ再書き込み時のFATファイルシステム、(B)は画像ファイルの記録終了時のFATファイルシステムである。It is a figure which shows the FAT file system example in a 1st modification, (A) is a FAT file system at the time of image data rewriting after an error occurrence, (B) is a FAT file system at the time of completion of recording of an image file. . 第2の変形例に係るカメラの動作を示すフローチャートである。It is a flowchart which shows operation | movement of the camera which concerns on a 2nd modification. 第2の変形例におけるFATファイルシステム例を示す図であり、(A)は書き込みエラー発生時のFATファイルシステム、(B)はエラー発生後の画像データ再書き込み時のFATファイルシステム、(C)は画像ファイルの記録終了時のFATファイルシステムである。FIG. 10 is a diagram illustrating an example of a FAT file system in a second modification, where (A) is a FAT file system when a write error occurs, (B) is a FAT file system when image data is rewritten after an error occurs, and (C). Is a FAT file system at the end of recording of an image file.

符号の説明Explanation of symbols

10・・・CPU、11・・・撮影レンズ、12・・・CCD、13・・・CCDドライバ、14・・・プリプロセス回路、15・・・A/D変換回路、16・・・ASIC、17・・・メモリ、18・・・カラーモニタ、19・・・操作部、20・・・メモリーカードI/F、21・・・外部I/F、30・・・メモリーカード   DESCRIPTION OF SYMBOLS 10 ... CPU, 11 ... Shooting lens, 12 ... CCD, 13 ... CCD driver, 14 ... Preprocess circuit, 15 ... A / D conversion circuit, 16 ... ASIC 17 ... Memory, 18 ... Color monitor, 19 ... Operation unit, 20 ... Memory card I / F, 21 ... External I / F, 30 ... Memory card

Claims (4)

ータを一時的に記憶するメモリと、
クラスタ単位で管理されたデータ記憶領域を有するライトワンス型記憶媒体へ前記メモリに記憶されている前記データを記録する場合、前記データのうちデータ書込単位に相当する第1データを前記ライトワンス型記憶媒体に記録するために必要なクラスタ群である第1クラスタ群に対応するFATエントリに次に読み出すべきクラスタを示す読出順序を設定した後、前記第1クラスタ群に対応するFATエントリに設定された読出順序に従ったときに最後に読み出されるべきクラスタである第1確保クラスタへデータを記録することなく前記第1クラスタ群へ前記第1データを記録するよう制御し、前記第1データを前記ライトワンス型記憶媒体に記録しても前記ライトワンス型記憶媒体へ書き込むべき前記データが前記メモリに存在するときは、前記データのうちデータ書込単位に相当する第2データを前記ライトワンス型記憶媒体に記録するために必要なクラスタ群であって前記第1確保クラスタを含む第2クラスタ群に対応するFATエントリに次に読み出すべきクラスタを示す読出順序を設定した後、前記第2クラスタ群に対応するFATエントリに設定された読出順序に従ったときに最後に読み出されるべきクラスタである第2確保クラスタへデータを記録することなく前記第2クラスタ群へ前記第2データを記録するよう制御し、前記第1データを前記ライトワンス型記憶媒体に記録することで前記ライトワンス型記憶媒体へ書き込むべき前記データが前記メモリに存在しないときは、前記第1確保クラスタへ終端記号を記録するよう制御する制御部とを備えること
を特徴とする記録制御装置。
A memory for temporarily storing the data,
When recording the data stored in the memory on a write-once storage medium having a data storage area managed in cluster units, the first data corresponding to the data write unit among the data is the write-once type After setting the reading order indicating the cluster to be read next to the FAT entry corresponding to the first cluster group which is a cluster group necessary for recording on the storage medium, the FAT entry corresponding to the first cluster group is set. Control to record the first data in the first cluster group without recording data in the first reserved cluster which is the cluster to be read last when the read order is followed, The data to be written to the write-once storage medium exists in the memory even if it is recorded on the write-once storage medium Corresponds to a second cluster group that is necessary for recording second data corresponding to a data writing unit in the data onto the write-once type storage medium and includes the first reserved cluster. After setting the reading order indicating the cluster to be read next in the FAT entry, the second reserved cluster which is the cluster to be read last when the reading order set in the FAT entry corresponding to the second cluster group is followed Control to record the second data in the second cluster group without recording data, and record the first data in the write-once storage medium to write the data in the write-once storage medium. when the data is not present in the memory, it comprises a control unit for controlling so as to record the terminal symbol into the first securing cluster Recording control apparatus according to claim.
請求項1に記載の記録制御装置において、The recording control apparatus according to claim 1,
前記制御部は、前記メモリに記憶されている前記データを前記ライトワンス型記憶媒体へ記録する場合、前記データのうちデータ書込単位に相当する前記第1データを前記ライトワンス型記憶媒体に記録するために必要なクラスタ群である前記第1クラスタ群に対応するFATエントリに次に読み出すべきクラスタを示す読出順序を設定した後、前記第1クラスタ群に対応するFATエントリに設定された読出順序に従ったときに最後に読み出されるべきクラスタである前記第1確保クラスタへデータを記録することなく前記第1クラスタ群へ前記第1データを記録する際にデータが既に記録されている記録済クラスタが前記第1クラスタ群に存在することで書込エラーが発生したときは、前記第1データを前記ライトワンス型記憶媒体に記録するために必要なクラスタ群であって前記第1確保クラスタ以後のクラスタからなる第3クラスタ群に対応するFATエントリに次に読み出すべきクラスタを示す読出順序を設定した後、前記第3クラスタ群に対応するFATエントリに設定された読出順序に従ったときに最後に読み出されるべきクラスタである第3確保クラスタへデータを記録することなく前記第3クラスタ群へ前記第1データを記録するよう制御することWhen recording the data stored in the memory on the write-once storage medium, the control unit records the first data corresponding to a data writing unit among the data on the write-once storage medium. A read order indicating a cluster to be read next is set in a FAT entry corresponding to the first cluster group which is a cluster group necessary for performing, and then a read order set in the FAT entry corresponding to the first cluster group A recorded cluster in which data is already recorded when the first data is recorded in the first cluster group without recording data in the first reserved cluster which is a cluster to be read last when Is written in the first cluster group, the first data is stored in the write-once storage medium. A read order indicating a cluster to be read next is set in a FAT entry corresponding to a third cluster group including the clusters after the first reserved cluster, which is necessary for the first cluster, and then the third cluster group Control is performed so that the first data is recorded in the third cluster group without recording data in the third reserved cluster which is the cluster to be read last when the reading order set in the corresponding FAT entry is followed. about
を特徴とする記録制御装置。A recording control apparatus.
請求項1に記載の記録制御装置において、The recording control apparatus according to claim 1,
前記制御部は、前記メモリに記憶されている前記データを前記ライトワンス型記憶媒体へ記録する場合、前記データのうちデータ書込単位に相当する前記第1データを前記ライトワンス型記憶媒体に記録するために必要なクラスタ群である前記第1クラスタ群に対応するFATエントリに次に読み出すべきクラスタを示す読出順序を設定した後、前記第1クラスタ群に対応するFATエントリに設定された読出順序に従ったときに最後に読み出されるべきクラスタである前記第1確保クラスタへデータを記録することなく前記第1クラスタ群へ前記第1データを記録する際にデータが既に記録されている記録済クラスタが前記第1クラスタ群に存在することで書込エラーが発生したときは、前記第1データを前記ライトワンス型記憶媒体に記録するために必要なクラスタ群であって前記記録済クラスタ以後のクラスタからなる第3クラスタ群に対応するFATエントリに次に読み出すべきクラスタを示す読出順序を設定した後、前記第3クラスタ群に対応するFATエントリに設定された読出順序に従ったときに最後に読み出されるべきクラスタである第3確保クラスタへデータを記録することなく前記第3クラスタ群へ前記第1データを記録するよう制御することWhen recording the data stored in the memory on the write-once storage medium, the control unit records the first data corresponding to a data writing unit among the data on the write-once storage medium. A read order indicating a cluster to be read next is set in a FAT entry corresponding to the first cluster group which is a cluster group necessary for performing, and then a read order set in the FAT entry corresponding to the first cluster group A recorded cluster in which data is already recorded when the first data is recorded in the first cluster group without recording data in the first reserved cluster which is a cluster to be read last when Is written in the first cluster group, the first data is stored in the write-once storage medium. A read order indicating a cluster to be read next is set in a FAT entry corresponding to a third cluster group including the clusters after the recorded cluster, and then corresponding to the third cluster group. Controlling to record the first data in the third cluster group without recording data in a third reserved cluster which is a cluster to be read last when the reading order set in the FAT entry is performed
を特徴とする記録制御装置。A recording control apparatus.
被写体を撮像して画像データを生成する撮像部と、An imaging unit that images a subject and generates image data;
請求項1から請求項3のいずれか一項に記載の記録制御装置とを備える撮像装置であって、An imaging apparatus comprising: the recording control apparatus according to any one of claims 1 to 3;
前記データは、前記撮像部により生成された前記画像データであることThe data is the image data generated by the imaging unit.
を特徴とする撮像装置。An imaging apparatus characterized by the above.
JP2008180916A 2008-06-25 2008-07-11 Recording control apparatus and imaging apparatus Expired - Fee Related JP5396760B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2008180916A JP5396760B2 (en) 2008-07-11 2008-07-11 Recording control apparatus and imaging apparatus
US12/385,697 US20090322905A1 (en) 2008-06-25 2009-04-16 Storage control device
US13/554,708 US20120284468A1 (en) 2008-06-25 2012-07-20 Storage control device
US13/927,651 US20130290652A1 (en) 2008-06-25 2013-06-26 Storage control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008180916A JP5396760B2 (en) 2008-07-11 2008-07-11 Recording control apparatus and imaging apparatus

Publications (2)

Publication Number Publication Date
JP2010020576A JP2010020576A (en) 2010-01-28
JP5396760B2 true JP5396760B2 (en) 2014-01-22

Family

ID=41705396

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008180916A Expired - Fee Related JP5396760B2 (en) 2008-06-25 2008-07-11 Recording control apparatus and imaging apparatus

Country Status (1)

Country Link
JP (1) JP5396760B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012146381A (en) 2011-01-14 2012-08-02 Canon Inc Moving image recording apparatus, moving image recording method, and program

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2635023B2 (en) * 1985-05-02 1997-07-30 株式会社日立製作所 Label writing method for file data
JPH02110725A (en) * 1988-10-20 1990-04-23 Nec Corp System for recovering file on unrewritable medium
JP2831369B2 (en) * 1989-02-15 1998-12-02 株式会社日立製作所 Information recording / reproducing method and system
JPH0779403A (en) * 1993-06-25 1995-03-20 Nikon Corp Electronic still camera
JPH0922375A (en) * 1995-07-06 1997-01-21 Canon Inc File management method

Also Published As

Publication number Publication date
JP2010020576A (en) 2010-01-28

Similar Documents

Publication Publication Date Title
JP5024351B2 (en) Image file generation device, camera, and image file generation program
US20050237396A1 (en) Data recording apparatus and electronic camera
JPH0837638A (en) Digital still camera
US20090115861A1 (en) Recording apparatus
US20130290652A1 (en) Storage control device
JP4751348B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP5396760B2 (en) Recording control apparatus and imaging apparatus
JP2010009205A (en) Recording control device
JP4492535B2 (en) Recording apparatus and recording control method
JP4455177B2 (en) Information recording apparatus and control method thereof
JP2002135711A (en) Electronic camera device and recording medium
JP3831472B2 (en) Electronic still camera erasing operation control device
JP3816401B2 (en) Data recording device
JP2006197561A (en) Data recording method and device
JP2010009206A (en) Recording control device
JP5109848B2 (en) Recording control apparatus and imaging apparatus
JP2001111920A (en) Image recorder and image recording method
JP5487758B2 (en) camera
JP2008219425A (en) Image processor and image processing method
JP2009171437A (en) Multi-image file creating method and multi-image file editing method
JP3552247B2 (en) Electronic still camera
US8446491B2 (en) Image capture device, method of controlling the same, and image capture system
JP3914411B2 (en) Imaging recording device
JP2002125188A (en) Digital camera
JP5407405B2 (en) camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110707

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120105

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130322

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130326

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130527

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: 20130924

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131007

R150 Certificate of patent or registration of utility model

Ref document number: 5396760

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees