Image recording device and image recording method

By dividing pre-recording data into shorter units and recording them as separate files, the image recording device extends the pre-recording period beyond memory capacity limitations, improving user convenience and efficiency.

JP2025065989APending Publication Date: 2025-04-22CANON KK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023175545
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-10-10
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

The length of the pre-recording period in image recording devices is limited by the capacity of the internal memory, making it difficult to achieve a long pre-recording period.

Method used

The image recording device employs a method where pre-recording data is divided into units shorter than the pre-recording period and recorded as separate data files, allowing for the combination of these files with actual recording data into a single data file.

Benefits of technology

This approach alleviates the limitation on the length of the pre-recording period by allowing the device to store and manage pre-recording data more efficiently, thereby enhancing user convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025065989000001_ABST
    Figure 2025065989000001_ABST
Patent Text Reader

Abstract

To provide an image recording device and an image recording method, capable of relaxing a limitation in related to a length of a pre-recording period.SOLUTION: An image recording device can perform a pre-recording for starting a recording of an image imaged to a recording medium in prior to the start of an actual recording. The image recording device divides an image in a predetermined unit that is shorter than a pre-recording period in the pre-recording to the recording medium as a plurality of data files. Also, the image recording device records the image to the recording medium as one data file in the actual recording. The image recording device couples a data file that has to be stored with one data file from the plurality of data files with one data file when the actual recording is stopped.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image recording apparatus and an image recording method. [Background technology]

[0002] In image recording devices such as digital cameras, a function (pre-recording function) is known that prevents failure of intended image recording due to a delay in a recording instruction by starting recording without waiting for a recording instruction from the user (Patent Document 1). [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2001-257976 A Summary of the Invention [Problem to be solved by the invention]

[0004] The longer the period during which images are recorded by the pre-recording function (hereinafter referred to as the pre-recording period), the greater the convenience for the user. However, to achieve a long pre-recording period, it is necessary to store data for the pre-recording period. If data for the pre-recording period is stored in, for example, built-in memory (RAM), the length of the pre-recording period is limited by the available capacity of the built-in memory.

[0005] In one aspect, the present invention provides an image recording device and an image recording method that can relax the restriction on the length of the pre-recording period. [Means for solving the problem]

[0006] In one aspect, the present invention provides an image recording device capable of pre-recording, which starts recording a captured image on a recording medium prior to the start of actual recording, characterized in that the image recording device has a pre-recording means for dividing the image into predetermined units shorter than the pre-recording period and recording the divided images on the recording medium as multiple data files during the pre-recording, an actual recording means for recording the image on the recording medium as a single data file during the actual recording, and a combining means for combining a data file that should be saved together with one of the multiple data files with the single data file when the actual recording is stopped. Effect of the Invention

[0007] According to one aspect of the present invention, it is possible to provide an image recording device and an image recording method that can relax the restriction on the length of the pre-recording period. [Brief description of the drawings]

[0008] [Figure 1] FIG. 1 is a diagram for explaining a recording control operation according to an embodiment; [Diagram 2] FIG. 1 is a block diagram showing an example of the functional arrangement of a digital camera according to an embodiment; [Diagram 3] Flowchart of recording control operation according to the embodiment [Figure 4A] FIG. 1 is a diagram for explaining operations for implementing file operations in an embodiment. [Figure 4B] FIG. 1 is a diagram for explaining operations for implementing file operations in an embodiment. [Figure 4C] FIG. 1 is a diagram for explaining operations for implementing file operations in an embodiment. [Figure 4D] FIG. 1 is a diagram for explaining operations for implementing file operations in an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] The present invention will be described in detail below based on its exemplary embodiments with reference to the accompanying drawings. Note that the following embodiments do not limit the invention according to the claims. In addition, although multiple features are described in the embodiments, not all of them are necessarily essential to the invention, and multiple features may be combined arbitrarily. Furthermore, in the accompanying drawings, the same reference numbers are used for the same or similar configurations, and duplicated explanations are omitted.

[0010] In the following embodiment, the present invention will be described with respect to a case where the present invention is implemented in a digital camera. However, the present invention can be implemented in any electronic device having an imaging function. Such electronic devices include video cameras, computer devices (personal computers, tablet computers, media players, PDAs, etc.), mobile phones, smartphones, game consoles, robots, drones, and drive recorders. These are merely examples, and the present invention can also be implemented in other electronic devices.

[0011] FIG. 2 is a block diagram showing an example of the functional configuration of a digital camera 100 as an example of an image recording device according to this embodiment. The bus 101 includes an address bus, a data bus, and a control bus, and enables commands and data to be communicated between the connected functional blocks.

[0012] The CPU 102 loads a program stored in the ROM 103 into the RAM 104 and executes it to control the operation of each functional block of the digital camera 100 and realize the functions of the digital camera 100 .

[0013] The ROM 103 is a rewritable non-volatile memory, and stores the programs executed by the CPU 102, various setting values ​​of the digital camera 100, GUI data, and the like.

[0014] The RAM 104 is a volatile memory, and is used to temporarily store information necessary for executing the programs, such as programs executed by the CPU 102, and variables, etc. The RAM 104 is also used as a buffer memory for image data, a video memory for the display unit 116, etc.

[0015] The operation unit 105 is a general term for input devices (buttons, switches, dials, etc.) provided for the user to input various instructions to the digital camera 100. The input devices constituting the operation unit 105 have names according to the functions assigned to them. For example, the operation unit 105 includes a release switch, a shooting mode selection dial for selecting a shooting mode, a menu button, direction keys, an enter key, etc. The input devices may also be software buttons or keys using a touch display (which may or may not be the display unit 116). The operation unit 105 may also include an input device compatible with a non-contact input method, such as voice input or eye-gaze input.

[0016] The operation control unit 106 detects that the user has operated the operation unit 105, and notifies the CPU 102 of the detected operation.

[0017] In this embodiment, the digital camera 100 has a still image mode and a video mode as operation modes. The operation modes can be switched by the operation unit 105. In the still image mode, the CPU 102 recognizes the half-pressed state of the release switch as an instruction to prepare for shooting, and the full-pressed state as an instruction to start shooting. In the video mode, the CPU 102 recognizes the operation of the release switch in the shooting standby state as an instruction to start recording a video. In addition, the CPU 102 recognizes the operation of the release switch during video recording and in a state where the operation of the release switch is not detected as an instruction to stop recording a video. In the video mode, the CPU 102 regards both the half-pressed state and the full-pressed state of the release switch as the operation of the release switch, and does not distinguish between them.

[0018] Note that operation unit 105 may have a movie recording switch in addition to the release switch. In this case, digital camera 100 records still images or movies in a shooting standby state according to the operated switch, regardless of the operation mode. Specifically, CPU 102 recognizes the half-pressed state of the release switch as an instruction to prepare for shooting a still image, and the full-pressed state as an instruction to start shooting a still image. CPU 102 also recognizes the operation of the movie recording switch in a shooting standby state as an instruction to start recording a movie, and recognizes the operation of the movie recording switch while a movie is being recorded as an instruction to stop recording the movie.

[0019] The recording medium 107 is a removable and non-volatile recording medium such as a memory card. The recording medium 107 is generally used for actual recording, not for pre-recording. Actual recording is recording that is started in response to an explicit instruction from a user, such as an instruction to start shooting a still image or recording a video. However, in this embodiment, still image and video data generated by the digital camera 100 is recorded on the recording medium 107 both during pre-recording and actual recording. Note that the recording medium 107 may be an external non-volatile recording medium (e.g., HDD, SSD, etc.) accessible by the digital camera 100.

[0020] In this specification, the term "data to be recorded" refers to data to be used for recording (i.e., data before recording), and the term "recorded data" refers to data in a state recorded on a recording medium, etc. (i.e., data after recording).

[0021] The recording medium control unit 108 controls reading and writing of data from and to the recording medium 107. Specifically, when the recording medium control unit 108 receives a read command from the request source, the recording medium control unit 108 reads data to be read that is recorded on the recording medium 107 at a constant size at a time and stores it in the RAM 104. When the recording medium control unit 108 receives a write command from the request source, the recording medium control unit 108 writes data to be written that is buffered in the RAM 104 at a constant size at a time to the recording medium 107. Note that the buffer for the data to be written is intended to stably perform the write operation, and is different from the buffer for pre-recording data for the pre-recording period.

[0022] Furthermore, when the recording medium control unit 108 receives a delete command from the request source, it deletes the data recorded on the recording medium 107. Deleting the data may be by writing data of a specific value, or by changing the management information of the data so that the data appears as if it has been deleted.

[0023] Furthermore, when the recording medium control unit 108 receives a file merging command, it merges the multiple data files to be merged. The recording medium control unit 108 merges the multiple data files by changing the data management information so that the multiple data files to be merged are managed as a single data file. By merging the multiple data files by changing the management information, high-speed file merging can be achieved.

[0024] The recording medium control unit 108 notifies the request source of the completion of the file operation according to the command. The request source may be, for example, any one of the CPU 102, the pre-recording processing unit 109, the actual recording processing unit 110, the file deletion unit 112, and the file combination unit 113.

[0025] The recording medium control unit 108 is capable of acquiring information about the recording medium 107 to be controlled. The recording medium control unit 108 stores the acquired information in the RAM 104. The acquired information includes the cluster size of the recording medium 107. The cluster size is a management unit of data files in a file system, and is also called the allocation unit size.

[0026] The recording medium control unit 108 also notifies the CPU 102, the pre-recording processing unit 109, the actual recording processing unit 110, etc. of the free space of the recording medium 107 in response to requests from the CPU 102, the pre-recording processing unit 109, the actual recording processing unit 110, etc. The recording medium control unit 108 can also be configured to notify the CPU 102, the pre-recording processing unit 109, the actual recording processing unit 110, etc. when the recording medium 107 reaches a predetermined state, such as when the free space of the recording medium 107 has run out.

[0027] The imaging optical system 114 forms an optical image of a subject on the imaging surface of the image sensor 115. The imaging optical system 114 has movable lenses, such as a focus lens that adjusts the focal distance and a zoom lens that changes the angle of view, an aperture with a variable aperture, and a drive mechanism for the movable lens and the aperture. The operations of the movable lens and the aperture are controlled by the CPU 102.

[0028] The image sensor 115 (imaging section) may be, for example, a known CCD or CMOS color image sensor having a primary color Bayer array color filter. The image sensor 115 has a pixel array in which a plurality of pixels are arranged two-dimensionally, and a peripheral circuit for reading out a signal from each pixel. Each pixel generates an electric charge according to the amount of incident light by a photoelectric conversion function. A pixel signal group (analog image signal) representing an optical image of a subject formed on the imaging surface is obtained by reading out a signal having a voltage according to the amount of electric charge generated during an exposure period from each pixel. The image sensor 115 A / D converts the analog image signal to generate a digital image signal (image data), and stores it in the RAM 104. The A / D conversion may be performed by a circuit external to the image sensor 115.

[0029] The CPU 102 applies predetermined image processing to image data stored in the RAM 104, generates signals and image data according to the application, and acquires and / or generates various information. The CPU 102 stores the generated image data in the RAM 104 according to the application. The CPU 102 also controls the operation of other functional blocks using the acquired information.

[0030] The image processing applied by the CPU 102 can include, for example, pre-processing, color interpolation processing, correction processing, detection processing, data processing, evaluation value calculation processing, special effect processing, and the like. Pre-processing may include signal amplification, reference level adjustment, defective pixel correction, etc. Color interpolation processing is performed when a color filter is provided on an image sensor, and is a process for interpolating values ​​of color components that are not included in the individual pixel data that constitutes the image data. Color interpolation processing is also called demosaic processing. The correction processing can include white balance adjustment, gradation correction, correction of image degradation caused by optical aberration of the imaging optical system 114 (image restoration), correction of the effect of peripheral light falloff of the imaging optical system 114, color correction, and the like. The detection process may include detection of feature regions (for example, face regions or human body regions) and their movements, person recognition processing, and the like. Data processing may include processes such as area extraction (trimming), synthesis, scaling, encoding and decoding, header information generation (data file generation), etc. Data processing also includes the generation of image data for display or image data for recording. The evaluation value calculation process can include processes such as generation of a signal and evaluation value used in automatic focus detection (AF) and generation of an evaluation value used in automatic exposure control (AE). The special effects processing may include adding a blur effect, changing color tones, relighting, and the like. Note that these are examples of processes that can be applied by the CPU 102, and do not limit the processes that can be applied by the CPU 102. Note that at least a part of the image processing may be applied using a hardware circuit other than the CPU 102. The hardware circuit may be, for example, an ASIC (Application Specific Integrated Circuit), a DSP (Digital Signal Processor), or a GPU (Graphics Processing Unit).

[0031] The CPU 102 uses the evaluation value for AF to drive the focus lens of the imaging optical system 114, thereby adjusting the focal distance of the imaging optical system 114. The CPU 102 also determines the exposure conditions using the evaluation value for AE, and drives the aperture of the imaging optical system 114 according to the aperture value included in the exposure conditions.

[0032] The display unit 116 is a display device such as a liquid crystal display, an organic EL display, etc. The display unit 116 displays display image data generated by the CPU 102, a menu screen, etc. The display unit 116 functions as an electronic viewfinder (EVF) by displaying image data for live view display.

[0033] The pre-recording processing unit 109, the actual recording processing unit 110, the pre-recording start position calculation unit 111, the file deletion unit 112, and the file combination unit 113 are functional blocks that execute operations related to pre-recording and actual recording. Although these functional blocks 109 to 113 are illustrated as separate functional blocks for convenience, they do not need to be implemented as separate circuits. For example, one or more of the functional blocks 109 to 113 may be realized by the CPU 102 executing a program.

[0034] When CPU 102 detects that a pre-recording start condition has been satisfied while pre-recording is enabled, it controls the operation of each unit to start pre-recording. The user can set whether pre-recording is enabled or disabled, for example, by operating a menu screen via operation unit 105. The start condition for pre-recording may be, for example, a standby state for video recording (a state in which a recording start instruction can be input) in video mode. Also, in still image mode, it may be that the release switch has been continuously detected as being half-pressed rather than fully pressed for a certain period of time. Note that these are examples of the start conditions for pre-recording, and other conditions may also be used.

[0035] In conventional pre-recording, pre-recording data for a pre-recording period is generated and buffered in memory before a recording start instruction is input by the user. On the other hand, in the pre-recording of this embodiment, generation and recording of pre-recording data are performed in parallel from before a recording start instruction is input by the user. Pre-recording is performed from the time when a start condition is satisfied until a recording start instruction is input (or immediately before the start of actual recording). Then, of the pre-recorded data (pre-recording data), data for a certain period (pre-recording period) immediately before the input of a recording start instruction (or immediately before the start of actual recording) is stored in association with data recorded in response to the input of a recording start instruction (actual recording data).

[0036] Regardless of the length of the period during which pre-recording was performed, the data for the pre-recording period is stored in association with the actual recording data. Specifically, the pre-recording data for the period going back by the length of the pre-recording period from the input of the recording start instruction is stored in association with the actual recording data. The length of the pre-recording period can be set by the user, for example, by operating a menu screen via the operation unit 105. In both the moving image mode and the still image mode, pre-recording is performed at a frame rate according to a predetermined setting.

[0037] The pre-recorded data and the actual recording data can be associated with each other in any manner, but in this embodiment, one data file that stores the pre-recorded data and the actual recording data is ultimately generated.

[0038] In the present embodiment, in the pre-recording, recording is started before the input of the instruction to start the actual recording. Therefore, the operations related to image capture and recording in the pre-recording may be the same as those in the actual recording. However, in the case of the still image mode, even if the setting is made to use the mechanical shutter in the actual recording, image capture may be performed in the pre-recording without using the mechanical shutter so as not to affect the live view display during the pre-recording.

[0039] When the CPU 102 detects that the pre-recording start condition is satisfied in the imaging standby state, it changes imaging parameters as necessary and then starts generating pre-recording data. The pre-recording data may be encoded data in a predetermined format. The CPU 102 stores the generated pre-recording data in the RAM 104 for writing. The CPU 102 also notifies the pre-recording processing unit 109 of the start of pre-recording.

[0040] When the pre-recording processing unit 109 is notified of the start of pre-recording by the CPU 102, it transmits a write command to the recording medium control unit 108 and starts writing the pre-recording data stored in the RAM 104 to the recording medium 107. The pre-recording processing unit 109 transmits a write command, for example, every time a write unit of data is stored in the RAM 104. In this way, by sequentially recording the pre-recording data stored in the RAM 104 to the recording medium 107, the pre-recording processing unit 109 prevents the capacity of the RAM 104 used as a buffer for the pre-recording data from exceeding a predetermined fixed capacity. The pre-recording processing unit 109 may also notify the pre-recording start position calculation unit 111 of information on the start position of pre-recording (for example, a frame number, a timestamp, etc.). The frame number may be, for example, a number starting from 1, which is the frame number at the start of pre-recording.

[0041] The pre-recording processing unit 109 records moving image data for a predetermined pre-recording period on the recording medium 107. When a time corresponding to the pre-recording period has elapsed since the start of pre-recording, the old data is overwritten, thereby maintaining the state in which the moving image data for the most recent pre-recording period is recorded on the recording medium 107.

[0042] The pre-recording processing unit 109 divides the video data for the pre-recording period into predetermined units shorter than the pre-recording period and records them in a chronological order (as separate data files). The predetermined units may be, for example, a fixed number of frames or a fixed time. Alternatively, if the pre-recording data is inter-frame predictive coded video data, the data may be divided into an integer multiple of a GOP (Group Of Pictures) according to the coding method and recorded.

[0043] As an example, the pre-recording processor 109 records the video data for the pre-recording period in chronological order as separate data files for each GOP. The number of frames constituting a GOP can vary depending on the encoding method, but is assumed to be 15 here. Therefore, if the frame rate of the video is 30 frames / second, one data file stores 0.5 seconds of video data.

[0044] Furthermore, the pre-recording processor 109 records the data file so that the size of the data file is a multiple of a cluster size determined according to the file system of the recording medium 107. The pre-recording processor 109 pads free space in the cluster with predetermined data so that the file size is a multiple of the cluster size. Furthermore, the pre-recording processor 109 does not record header information, as is recorded in normal video data files, in the pre-recording data file, but records only video data. In this way, by adjusting the data and size to be recorded in the data file at the time of recording, the data files can be combined later by simple processing.

[0045] The pre-recording processor 109 can store information that associates identification information of a data file (e.g., a file name) with the range of frame numbers in which the data is stored, in the RAM 104. The pre-recording processor 109 updates this information sequentially until actual recording starts.

[0046] When the CPU 102 detects that the start condition for actual recording is satisfied, it notifies the start of actual recording to the pre-recording processing unit 109 and the actual recording processing unit 110. The start condition for actual recording may be, for example, detection of a release switch operation during pre-recording in the video mode, or detection of a fully pressed state of the release switch in the still image mode. Note that these are examples of the start condition for actual recording, and other conditions may also be used.

[0047] Furthermore, when the CPU 102 detects that the start condition for actual recording is satisfied, it ends the generation of pre-recording data with the current frame. Furthermore, the CPU 102 changes parameters related to imaging as necessary, then starts the operation of generating data for actual recording, and stores the generated data for actual recording in the RAM 104. Note that in the video mode, the operation of generating pre-recording data may be continued, and the operation of generating data for actual recording may be executed from the next frame. In this case, the video data to be pre-recorded and the video data to be actually recorded have consecutive frame numbers. Furthermore, the CPU 102 notifies the pre-recording processing unit 109 and the actual recording processing unit 110 of the start of actual recording.

[0048] When the pre-recording processing unit 109 is notified of the start of actual recording by the CPU 102 during pre-recording, it notifies information capable of identifying the start position of actual recording (for example, identification information of the last frame of the pre-recording data) to the actual recording processing unit 110 and the pre-recording start position calculation unit 111. When the pre-recording processing unit 109 records a data file storing the last frame of the pre-recording data on the recording medium 107, it stops operating.

[0049] When the actual recording processing unit 110 is notified of the start of actual recording by the CPU 102, it transmits a write command to the recording medium control unit 108 and starts writing the data for actual recording stored in the RAM 104 to the recording medium 107. The actual recording processing unit 110 starts actual recording from a recording start position on the recording medium 107 that is specified based on the information notified from the pre-recording processing unit 109. Like the pre-recording processing unit 109, the actual recording processing unit 110 transmits a write command to the recording medium control unit 108, for example, every time a write unit of data is stored in the RAM 104.

[0050] The actual recording processing unit 110 records the data for actual recording in one data file as long as the file size does not reach the upper limit defined by the file system. The actual recording processing unit 110 notifies the CPU 102 of information related to the start position of actual recording (for example, the frame number when actual recording starts, a timestamp, etc.).

[0051] When the CPU 102 detects that the stop condition of the actual recording is satisfied, it controls the operation of each part so as to stop the actual recording. The stop condition of the actual recording may be the detection of a stop instruction, for example, the detection of the release switch operation during the actual recording in the video mode, or the disappearance of the detection of the release switch being fully pressed in the still image mode. Note that these are examples of the stop condition of the actual recording, and other conditions may be used.

[0052] When the CPU 102 detects that the actual recording stop condition is satisfied, the CPU 102 stops creating data for actual recording with the current frame, and notifies the actual recording processing unit 110 of the stop of actual recording.

[0053] When the actual recording processing unit 110 is notified by the CPU 102 to stop the actual recording, it records the actual recording data for the current frame onto the recording medium 107 and then stops operation.

[0054] When the pre-recording start position calculation unit 111 is notified of information on the start position of the actual recording from the actual recording processing unit 110, it obtains information on the start position of the pre-recording data to be stored in association with the actual recording data. The information on the start position of the pre-recording data to be stored in association with the actual recording data may be a frame number, a time stamp, etc. The pre-recording start position calculation unit 111 notifies the file deletion unit 112 and the file combination unit 113 of the obtained information.

[0055] The pre-recording start position calculation unit 111 obtains the number of frames corresponding to a predetermined pre-recording period based on, for example, the frame rate of the pre-recording data. The pre-recording start position calculation unit 111 can obtain a frame number (pre-recording start frame number) corresponding to the start position of the pre-recording data to be saved by subtracting the obtained number of frames from the frame number at which the actual recording started. Alternatively, the pre-recording start position calculation unit 111 can obtain a timestamp (pre-recording start time) corresponding to the recording start position of the pre-recording data to be saved by subtracting the pre-recording time from a timestamp corresponding to the start position of the actual recording.

[0056] The file deletion unit 112 deletes unnecessary pre-recorded data from the pre-recorded data in the recording medium 107. Specifically, the file deletion unit 112 first identifies data files to be deleted from data files present in the recording medium 107. The file deletion unit 112 identifies data files that are older than a data file that stores data of the pre-recording start frame number or time stamp as data files to be deleted.

[0057] For example, assume that the start frame number of pre-recording is 119, and there exists a data file that stores pre-recorded data of frame numbers 106 to 120. In this case, the file deletion unit 112 identifies the data file that stores the pre-recorded data of frame numbers 105 and earlier as the data file to be deleted.

[0058] In this example, strictly speaking, frame numbers 106 to 118 are data from before the pre-recording period, but because deletion and combining are performed on a data file basis, frame numbers 106 to 118 are also saved as pre-recording data.

[0059] The file deletion unit 112 can, for example, inquire of the pre-recording processing unit 109 or refer to information stored in the RAM 104 to identify the name of the data file to be deleted, which stores the pre-recorded data before frame number 105.

[0060] The file deletion unit 112 transmits a file deletion command specifying the identified file name to the recording medium control unit 108. Upon receiving this command, the recording medium control unit 108 deletes the data file having the file name specified by the command from the recording medium 107. As will be described later, the recording medium control unit 108 deletes the data file by, for example, manipulating management information of the file system of the recording medium 107. It is not necessary to erase the data itself by manipulating the management information so that the data file appears to have been deleted.

[0061] The file deletion unit 112 and the recording medium control unit 108 (deletion means) can delete unnecessary pre-recorded data when the actual recording starts or stops. If data is deleted when the actual recording starts, the capacity of the recording medium 107 available for actual recording can be increased. Also, if data is deleted when the actual recording stops, it is possible to avoid a conflict between an access to the recording medium 107 for actual recording and an access to the recording medium 107 for deleting the pre-recorded data.

[0062] The file combining unit 113 identifies a data file to be combined with the data file storing the actual recording data based on the information on the start position of the pre-recording. Specifically, the file combining unit 113 identifies, among the data files storing the pre-recording data, a data file storing data after the start frame number or timestamp of the pre-recording as the data file to be combined.

[0063] The file combination unit 113 transmits a file combination command specifying the identified file name to the recording medium control unit 108. Upon receiving this command, the recording medium control unit 108 combines the data file with the file name specified in the command with the data file storing the actual recording data. The recording medium control unit 108 manipulates the management information of the recording medium 107 so that the multiple data files to be combined are managed as a single data file. The file combination unit 113 and the recording medium control unit 108 function as a combining unit.

[0064] The recording medium control unit 108 may apply processing such as containerization to the combined data file as necessary. Containerization is a process of wrapping recording data in a known container format such as MP4 or MXF (Material eXchange Format).

[0065] Fig. 1 is a diagram showing a recording operation in this embodiment. During execution of pre-recording, the pre-recording data is divided into predetermined units and recorded in separate data files (pre-recording 1 to 3). Fig. 1 shows an example in which the data is divided into GOPs (e.g., 15 consecutive frames) in inter-frame predictive coding used to generate the pre-recording data.

[0066] After that, when actual recording starts, the data for actual recording is recorded in one data file. When actual recording ends, the data file storing the data for actual recording and the multiple data files storing the pre-recording data for the pre-recording period are combined into one data file. The management information of the combined data file is configured so that the data for the pre-recording period and the actual recording period are stored in chronological order. Also, in the example shown in FIG. 1, a header is added to the beginning of the combined data file by containerization.

[0067] In the example of FIG. 1, all of pre-recordings 1 to 3 are stored, but if there is a data file that stores pre-recording data that is not to be stored, it is deleted.

[0068] Next, the recording operation in this embodiment will be further described with reference to the flowchart shown in Fig. 3. This operation is performed in a state where pre-recording is enabled. In addition, the pre-recording data outside the pre-recording period is deleted at the start of actual recording.

[0069] In digital camera 100, operations up to when CPU 102 generates data for recording, such as operations related to capturing moving images and still images, may be any known operations. Therefore, the following description will focus on the control operations of pre-recording and actual recording of data generated by CPU 102. Here, it is assumed that the division unit during the pre-recording period and pre-recording is determined in advance through, for example, the operation of a menu screen by operation unit 105. Also, the division unit is assumed to be GOP (15 frames).

[0070] In S301, the recording medium control unit 108 acquires the cluster size of the recording medium 107 and stores it in the RAM 104. Note that S301 may be executed when the digital camera 100 is started up or when attachment of the recording medium 107 is detected.

[0071] In S303, the CPU 102 determines whether the pre-recording start condition is satisfied, and if it is determined that the pre-recording start condition is satisfied, the process proceeds to S304, and if not, the process proceeds to S303. As described above, the pre-recording start condition may be, for example, a standby state for video recording in video mode (a state in which a recording start instruction can be input). Also, in still image mode, the pre-recording start condition may be that the release switch is not fully pressed but is continuously pressed halfway for a certain period of time. Note that it may be determined that the pre-recording start condition is satisfied when pre-recording is set to enabled.

[0072] In S304, the CPU 102 starts generating pre-recording data and notifies the pre-recording processing unit 109 of the start of pre-recording. The pre-recording data is video data encoded using inter-frame predictive encoding, and the GOP of encoding is assumed to be 15 frames. The pre-recording processing unit 109 starts recording the pre-recording data on the recording medium 107. The pre-recording processing unit 109 also stores information associating the data file with the stored frame number in the RAM 104, and updates the information sequentially.

[0073] In S305, the CPU 102 determines whether or not the start condition for actual recording is satisfied. If it is determined that the start condition is satisfied, the CPU 102 executes S314, and if not, the CPU 102 executes S306.

[0074] In S306, the CPU 102 increments the value of a variable for counting the number of frames F by 1 in response to the generation of pre-recording data and recording of one frame of the pre-recording data on the recording medium 107. The value of the variable is stored, for example, in the RAM 140. The initial value of the number of frames F is 0, and when S306 is executed for the first time, the number of frames F becomes 1.

[0075] In S307, the CPU 102 judges whether the number of frames F has reached a preset number (here, a multiple of 15), and if it is judged that the number of frames F has reached the preset number, the CPU 102 executes S313, and if it is not judged that the number of frames F has reached the preset number, the CPU 102 executes S305. Here, the preset number is set to an integer multiple of the number of frames in the GOP to be encoded. If the length of the pre-recording period is configured to be selectable by a user operation such as a menu setting, the CPU 102 may set the preset number based on the length of the pre-recording period selected by the user and the number of frames in the GOP. For example, if the length of the pre-recording period set is short (for example, about 1 second), the CPU 102 sets the preset number to 15, which is 1 time the number of frames in the GOP. If the length of the pre-recording period is set to 2 seconds or more, the CPU 102 sets the preset number to twice the number of frames in the GOP. If the pre-recording time is set to 2 seconds or more, the preset number may be set to a larger number as the pre-recording period becomes longer, for example, by setting the preset number to (number of frames in the GOP) x (length of the pre-recording period (unit: seconds)). Alternatively, a predetermined number may be set so that the division unit in the pre-recording is the same as the length of the set pre-recording period.

[0076] In S313, the CPU 102 notifies the pre-recording processing unit 109 and initializes the value of a variable that counts the number of frames F to zero.

[0077] In S308, when the pre-recording processing unit 109 records the pre-recording data of the frame at the time of receiving the notification from the CPU 102, it closes the data file being recorded. At this time, the pre-recording processing unit 109 performs data padding as necessary so that the size of the data file to be closed becomes an integer multiple of the cluster size of the recording medium 107. In other words, when the size of the data file to be closed is not an integer multiple of the cluster size of the recording medium 107, data padding is performed. The value of the data used for padding is a predetermined fixed value (for example, 0x00 or 0xFF). Furthermore, the pre-recording processing unit 109 stores the size of the data file in the RAM 140. When multiple data files are recorded on the recording medium 107 in the pre-recording, the pre-recording processing unit 109 stores the file size of each data file in the RAM 140. After the file is closed, the pre-recording data is recorded in a new data file.

[0078] In this embodiment, the CPU 102 monitors the frame number F, and notifies the pre-recording processing unit 109 when the frame number F reaches the division unit. However, the pre-recording processing unit 109 may monitor the frame number F. Also, instead of monitoring the frame number, the number of GOPs may be monitored, and the file may be closed when the number of GOPs reaches a preset number.

[0079] In S309, the CPU 102 judges whether or not the erase flag is valid by, for example, referring to the value of the erase flag stored in the RAM 104. For example, the erase flag is valid if its value is 1, and invalid if its value is 0. If the CPU 102 judges that the erase flag is valid, it executes S310, and if not, it executes S311.

[0080] In S310, the CPU 102 instructs the pre-recording processing unit 109 to delete the oldest data file generated during pre-recording. In response to the instruction from the CPU 102, the pre-recording processing unit 109 deletes the corresponding data file from the recording medium 107.

[0081] For example, assume that the frame rate of the video to be recorded is 30 frames / second. In this case, the pre-recording data is divided into 0.5-second chunks and recorded. If the pre-recording period is set to 10 seconds, a minimum of 20 and a maximum of 21 data files are required to delete and combine files by manipulating the management information. Therefore, data files older than the most recently generated 21 data files are deleted in S310. This makes it possible to ensure free space on the recording medium 107 even if the time between the start of pre-recording and the start of actual recording becomes long.

[0082] In S311, the CPU 102 determines whether or not pre-recording of a predetermined length exceeding the pre-recording period has been performed. For example, the CPU 102 determines that pre-recording of a predetermined length has been performed if the number of data files for recording pre-recording data of a length equal to the pre-recording period + 2 has been recorded. If it is determined that pre-recording of a predetermined length exceeding the pre-recording period has been performed, the CPU 102 executes S312, and if not, executes S305.

[0083] In S311, the CPU 102 enables the erase flag. Then, the CPU 102 executes S305.

[0084] In S314, when the generation of the pre-recording data for the current frame is completed, the CPU 102 starts generating data for actual recording. The pre-recording processing unit 109 also notifies the actual recording processing unit 110 of the frame number of the actual recording start position, updates the information indicating the data file and the stored frame number stored in the RAM 104, and stops operation. The actual recording processing unit 110 writes the actual recording data generated by the CPU 102 to the recording medium 107 as a new data file, in order from the frame number notified by the pre-recording processing unit 109.

[0085] In S315, the CPU 102 determines whether or not the actual recording stop condition is satisfied. If it is determined that the condition is satisfied, the CPU 102 executes S316. If it is not satisfied, the CPU 102 repeatedly executes S315.

[0086] In S316, CPU 102 stops creating data for actual recording with the current frame. CPU 102 also notifies actual recording processing unit 110 of the stop of actual recording. When notified of the stop of actual recording by CPU 102, actual recording processing unit 110 stops operation upon completion of recording of data for actual recording of the current frame. Furthermore, file deletion unit 112 deletes from recording medium 107 any data file that stores unnecessary pre-recorded data.

[0087] At S317, the file combining unit 113 identifies the files to be combined. Then, the file combining unit 113 transmits a file combining command specifying the files to be combined to the recording medium control unit 108. The recording medium control unit 108 generates header information to be included in the data file obtained by combining. Here, the recording medium control unit 108 generates offset information indicating the start position of the data of each frame, size information of the data file, and the like, based on the size of each data file generated by pre-recording and stored in RAM 140. Then, the recording medium control unit 108 records the generated information as header information in the data file that stores the actual recording data.

[0088] In S318, the recording medium control unit 108 combines the header information with the data file specified by the file combining unit 113 to form one data file.

[0089] In S319, the CPU 102 disables the deletion flag. Then, the CPU 102 executes S303.

[0090] Next, specific examples of file operations (deletion and joining) executed by the recording medium control unit 108 in this embodiment will be described with reference to Figures 4A to 4D. Figures 4A to 4D show management information of a FAT (File Allocation Table) file system as an example of management information of a file system recorded on the recording medium 107. Here, of the management information of the FAT file system, particularly a directory entry and the FAT (File Allocation Table) are shown.

[0091] The directory entry includes, for each data file, the file name, the first cluster number where the file is recorded, and a valid / invalid flag. The valid / invalid flag indicates whether the file is valid (not deleted) or invalid (deleted). The FAT is information (cluster chain) that indicates the cluster numbers where data files are recorded, starting from the first cluster. If the FAT is not the last cluster, the next cluster number is stored, and if it is the last cluster, data indicating that it is the end of the file is stored. The FAT file system is well known, so a detailed description will be omitted.

[0092] 4A shows the state of the directory entries and the FAT when the actual recording is completed. Here, five data files Pre1.dat to Pre5.dat have been recorded in the pre-recording, and one data file Main.dat has been recorded in the actual recording.

[0093] The first cluster number of the data file Pre1.data is 100. The FAT entry corresponding to cluster number 100 indicates that the cluster number next to where Pre1.dat is recorded is "101". The FAT entry corresponding to cluster number 101 indicates that the cluster number next to where Pre1.dat is recorded is "102". Similarly, by tracing the FAT entries, data indicating the end of the file is finally recorded in the FAT entry corresponding to cluster number 199. In this way, a series of cluster numbers in which data files are recorded is called a cluster chain. For ease of explanation and understanding, when a data file is recorded across multiple clusters, it is assumed that the data file is recorded in consecutive clusters. Therefore, Pre1.dat is recorded in cluster numbers 100 to 199. Similarly, PreN.dat (N is 2, 3, 4, or 5) is recorded in cluster numbers n00 to n99. Also, Main.dat is recorded in cluster numbers 1001 to 1199.

[0094] Fig. 4B shows the state of the directory entry and FAT at the time when unnecessary pre-recorded data is deleted after the actual recording shown in Fig. 4A is completed. For convenience, it is assumed here that an instruction to start actual recording is detected at the timing when 15 frames of pre-recording data are recorded in Pre5.dat. When the frame rate is 30 frames / second and the pre-recording period is 1.5 seconds, Pre1.dat and Pre2.dat are unnecessary. In this case, the file deletion unit 112 sends a deletion command for Pre1.dat and Pre2.dat to the recording medium control unit 108.

[0095] The recording medium control unit 108 changes the valid / invalid flag in the directory entry for Pre1.dat and Pre2.dat specified by the delete command to invalid (0) and changes the first cluster number to a value indicating unused. The recording medium control unit 108 also changes the value of the FAT entry corresponding to the cluster number used by Pre1.dat and Pre2.dat to a value indicating unused. As a result, the data files Pre1.dat and Pre2.dat are in a deleted state in terms of the management information. Even if the management information is changed, the data of Pre1.dat is recorded in cluster numbers 100 to 199. The same applies to Pre2.dat.

[0096] 4C shows the state of the directory entry and FAT at the time when the header information for the combined data file is recorded as a separate data file Header.dat on the recording medium 107. Here, it is assumed that Header.dat is recorded in cluster numbers 1200 to 1299. Header.dat contains information on predetermined items such as offset information indicating the start position of the data of each frame stored in the combined data file, and size information of the data file.

[0097] Fig. 4D shows the state of the directory entry and the FAT after executing file combination from the state shown in Fig. 4C. The recording medium control unit 108 combines Pre3.dat to Pre5.dat, Main.dat, and Header.dat according to the file combination command from the file combination unit 113. The recording medium control unit 108 changes the management information so that the combined data file becomes a data file in which data is recorded in the order shown on the right side of Fig. 1. Specifically, the recording medium control unit 108 changes the value of the FAT entry for the combined data file so that the cluster chains of Header.dat, Pre3.dat to Pre5.dat, and Main.dat are connected in order.

[0098] In the example of FIG. 4D, the recording medium control unit 108 performs the following operations (in no particular order): -Changed the value of the last FAT entry in the cluster chain of Header.dat from the value indicating the end of the data file to the first cluster number 300 of Pre3.dat. -Change the value of the last FAT entry in the cluster chain of Pre3.dat from the value indicating the end of the data file to the first cluster number 400 of Pre4.dat. -Change the value of the last FAT entry in the cluster chain of Pre4.dat from the value indicating the end of the data file to the first cluster number 500 of Pre5.dat. -Changed the value of the last FAT entry in the cluster chain of Pre5.dat from the value indicating the end of the data file to the first cluster number 1000 of Main.dat. Change the name of the Header.dat file to the combined data file name (Movie.MP4) Change the directory entries of Pre3.dat~Pre5.dat and Main.dat to deleted state (change the enable / disable flag to disabled (0) and change the first cluster number to a value that indicates unused)

[0099] In this way, the recording medium control unit 108 executes the deletion and combination of data files by changing the management information of the recording medium 107. This has the advantage that access to the recording medium 107 for deleting and combining data files can be completed in a short time.

[0100] In this embodiment, pre-recording is performed on the recording medium on which actual recording is performed, and unnecessary pre-recording data is deleted from the recording medium after the pre-recording is completed. Therefore, the pre-recording period can be set regardless of the capacity of the built-in memory (RAM 104) available for holding the pre-recording data. Also, during pre-recording, image data is divided into predetermined units shorter than the pre-recording period and recorded in multiple data files in chronological order. Therefore, the pre-recording data can be handled on a file-by-file basis, and unnecessary pre-recording data can be deleted after the start of actual recording, or the actual recording data and the pre-recording data can be combined, by simple processing.

[0101] (Other embodiments) In the above embodiment, the recording control operation for pre-recording and actual recording in the video mode has been mainly described, but the same recording control operation can also be executed in the still image mode. In the still image mode, the actual recording may be a single still image shot, or still images may be continuously shot while the release switch is kept fully pressed. In the still image mode, multiple data files generated by the pre-recording and actual recording data are stored in association with each other.

[0102] The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions.

[0103] The disclosure of the present embodiment includes the following image recording device, image recording method, and program. (Item 1) An image recording device capable of pre-recording, which starts recording a captured image on a recording medium prior to the start of actual recording, comprising: a pre-recording means for dividing an image into a predetermined unit shorter than a pre-recording period and recording the divided image as a plurality of data files on the recording medium in the pre-recording; an actual recording means for recording an image on the recording medium as one data file in the actual recording; an image recording device further comprising: a combining unit that combines, when the actual recording is stopped, a data file among the plurality of data files that should be saved together with the one data file with the one data file. (Item 2) 2. The image recording device according to item 1, wherein the predetermined unit is a number of frames based on an encoding method of the image to be pre-recorded. (Item 3) the encoding method uses interframe predictive encoding, The predetermined unit is a multiple of the number of frames constituting a GOP (Group Of Pictures) in the inter-frame predictive coding. 3. The image recording device according to item 2, (Item 4) The recording apparatus further includes a setting unit for setting a pre-recording period in response to a user operation, the pre-recording means determines the predetermined unit based on the number of frames based on an encoding method of the image to be pre-recorded and the pre-recording time. 3. The image recording device according to item 2, (Item 5) 5. The image recording device according to any one of items 1 to 4, further comprising a deletion means for deleting from the recording medium, among the plurality of data files, data files that are not to be saved together with the one data file. (Item 6) 6. The image recording device according to item 5, wherein the deletion means performs the deletion by changing management information of the recording medium. (Item 7) 7. The image recording device according to item 6, wherein the management information is management information of a FAT (File Allocation Table) file system. (Item 8) 8. The image recording device according to item 7, wherein the deleting means performs the deletion by manipulating a directory entry of the data file to be deleted. (Item 9) 9. The image recording device according to any one of items 1 to 8, wherein the combining unit performs the combining by changing management information of the recording media. (Item 10) 10. The image recording apparatus according to item 9, wherein the management information is management information of a FAT (File Allocation Table) file system. (Item 11) Item 11. The image recording device according to item 10, wherein the combining means manipulates a directory entry and a FAT so that the cluster chain of the data file related to the actual recording is connected to the cluster chain of the data file related to the pre-recording. (Item 12) a storage unit for storing a file size of each of the plurality of data files recorded on the recording medium during the pre-recording; the actual recording means generates header information of the one data file based on a file size of a data file to be stored together with the one data file among the multiple file sizes stored in the storage means; 2. The image recording device according to item 1, (Item 13) The image recording device described in item 12, characterized in that the actual recording means generates offset information of the pre-recorded image based on the file size of a data file to be saved together with the one data file among the multiple file sizes stored in the storage means, and records it as header information of the one file. (Item 14) 2. The image recording device according to item 1, wherein the pre-recording means records the data file so that the file size is an integer multiple of a cluster size of the recording medium. (Item 15) The image recording device described in item 14, characterized in that, when the file size of the data file of the image divided into the predetermined units is not an integer multiple of the cluster size, the pre-recording means performs data padding so that the file size of the data file becomes an integer multiple of the cluster size. (Item 16) 1. An image recording method executed by an image recording device capable of pre-recording, which starts recording a captured image on a recording medium prior to the start of actual recording, comprising: In the pre-recording, the image is divided into a predetermined unit shorter than a pre-recording period and recorded on the recording medium as a plurality of data files; In the actual recording, recording the image as one data file on the recording medium; when the actual recording is stopped, combining a data file among the plurality of data files that should be saved together with the one data file with the one data file. (Item 17) A program for causing a computer to function as each of the means included in the image recording device according to any one of items 1 to 15.

[0104] The present invention is not limited to the above-described embodiments, and various modifications and variations are possible without departing from the spirit and scope of the invention. Therefore, the following claims are appended to disclose the scope of the invention. [Explanation of symbols]

[0105] 100... digital camera, 102... CPU, 104... RAM, 107... recording medium, 108... recording medium control unit, 109... pre-recording processing unit, 110... actual recording processing unit, 111... pre-recording start position calculation unit, abnormal stop determination unit, 112... file deletion unit, 113... file combination unit

Claims

1. An image recording device capable of pre-recording, which starts recording a captured image on a recording medium prior to the start of actual recording, comprising: a pre-recording means for dividing an image into a predetermined unit shorter than a pre-recording period and recording the divided image as a plurality of data files on the recording medium in the pre-recording; an actual recording means for recording an image on the recording medium as one data file in the actual recording; an image recording apparatus comprising: a combining unit which combines, when the actual recording is stopped, a data file among the plurality of data files that should be saved together with the one data file with the one data file.

2. 2. The image recording apparatus according to claim 1, wherein the predetermined unit is a number of frames based on a coding method of the image to be pre-recorded.

3. the encoding method uses interframe predictive encoding, the predetermined unit is a multiple of the number of frames constituting a GOP (Group Of Pictures) in the inter-frame predictive coding; 3. The image recording apparatus according to claim 2.

4. The recording apparatus further includes a setting unit for setting a pre-recording period in response to a user operation, the pre-recording means determines the predetermined unit based on the number of frames based on an encoding method of the image to be pre-recorded and the pre-recording time.

3. The image recording apparatus according to claim 2.

5. 2. The image recording apparatus according to claim 1, further comprising a deletion unit for deleting, from said recording medium, data files among said plurality of data files that are not to be stored together with said one data file.

6. 6. The image recording apparatus according to claim 5, wherein the deleting means performs the deletion by changing management information of the recording medium.

7. 7. The image recording apparatus according to claim 6, wherein the management information is management information of a FAT (File Allocation Table) file system.

8. 8. The image recording apparatus according to claim 7, wherein said deleting means performs said deletion by manipulating a directory entry of the data file to be deleted.

9. 2. The image recording apparatus according to claim 1, wherein said combining means performs said combining by changing management information of said recording media.

10. 10. The image recording apparatus according to claim 9, wherein the management information is management information of a FAT (File Allocation Table) file system.

11. 11. The image recording apparatus according to claim 10, wherein the linking means manipulates a directory entry and a FAT so that the cluster chain of the data file related to the actual recording is connected to the cluster chain of the data file related to the pre-recording.

12. a storage unit for storing a file size of each of the plurality of data files recorded on the recording medium during the pre-recording; the actual recording means generates header information of the one data file based on a file size of a data file to be stored together with the one data file among the multiple file sizes stored in the storage means; 2. The image recording apparatus according to claim 1,

13. The image recording device according to claim 12, characterized in that the actual recording means generates offset information of the pre-recorded image based on the file size of a data file to be saved together with the one data file among the multiple file sizes stored in the memory means, and records the offset information as header information of the one file.

14. 2. The image recording apparatus according to claim 1, wherein said pre-recording means records said data file so that the file size becomes an integral multiple of a cluster size of said recording medium.

15. The image recording device according to claim 14, characterized in that the pre-recording means, when the file size of the data file of the image divided into the predetermined units is not an integer multiple of the cluster size, performs data padding so that the file size of the data file becomes an integer multiple of the cluster size.

16. 1. An image recording method executed by an image recording device capable of pre-recording, which starts recording a captured image on a recording medium prior to the start of actual recording, comprising: In the pre-recording, the image is divided into a predetermined unit shorter than a pre-recording period and recorded on the recording medium as a plurality of data files; In the actual recording, recording an image on the recording medium as one data file; when the actual recording is stopped, combining one data file with a data file among the plurality of data files that should be saved together with the one data file.

17. A program for causing a computer to function as each of the means included in the image recording apparatus according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • Electronic camera

    JP2001257976A