Imaging apparatus, imaging method, and program
A dual compression method with controlled buffer allocation improves imaging device burst shooting performance by efficiently managing data storage in separate memory areas, addressing the limitations of variable-length compression in existing technologies.
Patent Information
- Application Number
- JP2023214723
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2025-07-02
AI Technical Summary
Existing imaging devices face limitations in burst continuous shooting performance due to the mismatch between data processing speed and recording medium capacity, particularly when variable-length compression fails to significantly reduce data size, leading to buffer overflow and reduced shooting time.
Implementing a dual compression method involving fixed-length and variable-length compression, with controlled allocation of buffer space based on estimated data size relationships, allowing for efficient storage and management of compressed data in separate memory areas.
Enhances burst shooting performance by optimizing buffer utilization, extending the continuous shooting time by storing more images in the buffer, even under varying image complexity and ISO sensitivity conditions.
Smart Images

Figure 2025098529000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an imaging device, an imaging method, and a program.
Background Art
[0002] In imaging devices such as digital cameras, the number of pixels of the captured image and the continuous shooting speed of still images have been increasing year by year. Along with this, in imaging devices, it is required to process data at higher speeds. On the other hand, in an imaging device, the data rate when recording an image on a recording medium may be slower than the data rate corresponding to the maximum continuous shooting speed of still images.
[0003] In such a case, at the maximum of still images, the captured still images cannot be recorded on the recording medium in real time. For this reason, it is necessary to temporarily store the still image data in the middle of processing in a buffer. Therefore, the burst continuous shooting time (continuous shooting time of still images) of still images is limited to the time until the buffer capacity becomes full.
[0004] At this time, if the still image data is compressed and then stored in the buffer, more images can be stored in the buffer with a finite buffer capacity. For this reason, the burst continuous shooting time of still images can be extended.
[0005] In data compression, when compression by a variable length compression method is performed, the compression rate varies depending on the image before compression. When the spatial redundancy of the image before compression is high, the compression efficiency is high and the data size after compression can be reduced. On the other hand, when the image before compression is complex and the amount of information contained in the image is large, the compression efficiency is low, and in the worst case, the data size after compression may not be smaller than that before compression.
[0006] Therefore, in Patent Document 1, further reversible (Lossless) variable-length compression is performed on the compressed data that has undergone fixed-length compression. Since reversible (Lossless) compression is performed instead of irreversible (Lossy) compression, even if double compression is performed, the fixed-length compressed data can be restored in the subsequent decompression process.
Prior Art Documents
Patent Documents
[0007]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0008] However, in Patent Document 1, since further reversible (Lossless) variable-length compression is performed on the compressed data after fixed-length compression, the possibility of further reducing the data size of the compressed data after fixed-length compression by this variable-length compression process is low. For this reason, there has been a problem that compressed data compressed to a smaller size cannot be stored in the buffer, and thus the burst shooting performance of still images is not improved.
[0009] Therefore, an object of the present invention is to provide a technique that contributes to improving the burst shooting performance of still images.
Means for Solving the Problems
[0010] One aspect of the present invention is imaging means, a memory, first compression means for obtaining first compressed data by performing fixed-length compression on the image data from the imaging means, first recording control means for recording the first compressed data in a first area of the memory, second compression means for obtaining second compressed data by performing variable-length compression on the image data obtained by restoring the first compressed data, Second recording control means for recording the second compressed data in a second area of the memory; Setting means for setting an operation mode to either a first mode or a second mode in which an estimated data size relationship between the first compressed data and the second compressed data is different; Control means for controlling the size of the first area and the size of the second area according to the operation mode set by the setting means; An imaging device, characterized by comprising the above.
[0011] One aspect of the present invention is A first compression step of obtaining first compressed data by performing fixed-length compression on image data obtained by imaging means; A first recording control step of recording the first compressed data in a first area of a memory; A second compression step of obtaining second compressed data by performing variable-length compression on image data obtained by restoring the first compressed data; A second recording control step of recording the second compressed data in a second area of the memory; A setting step of setting an operation mode to either a first mode or a second mode in which an estimated data size relationship between the first compressed data and the second compressed data is different; A control step of controlling the size of the first area and the size of the second area according to the operation mode set in the setting step; An imaging method, characterized by comprising the above.
Effect of the Invention
[0012] According to the present invention, it is possible to contribute to improving the burst shooting performance of still images.
Brief Description of the Drawings
[0013]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Mode for Carrying Out the Invention
[0014] <Embodiment 1> FIG. 1 shows the configuration of an imaging apparatus 20 according to Embodiment 1. The imaging apparatus 20 is a digital camera, a smartphone, a computer, or the like. The imaging apparatus 20 includes an imaging optical unit 201, an imaging sensor 202, an A / D conversion circuit 203, an imaging processing unit 204, a data transfer control unit 205, a DRAM 206, a signal processing unit 207, a CPU 208, a display unit 209, and a recording control unit 210.
[0015] The imaging optical unit 201 includes a lens and a diaphragm, etc. The imaging optical unit 201 performs focus adjustment and exposure adjustment.
[0016] The imaging sensor 202 is an imaging unit that performs imaging by converting an optical image into an electrical signal. The imaging sensor 202 acquires an analog image signal by imaging. The imaging sensor 202 is, for example, a CMOS (Complementary Metal Oxide Semiconductor) sensor or the like.
[0017] The A / D conversion circuit 203 samples the analog image signal acquired from the imaging sensor 202 and converts it into digital image data with a predetermined bit length.
[0018] The imaging processing unit 204 performs image processing such as noise removal on the digital image data output from the A / D conversion circuit 203.
[0019] The data transfer control unit 205 controls the writing / reading of data to / from the DRAM 206. Specifically, the data transfer control unit 205, as a recording control unit, controls the writing / reading of the first compressed data and the second compressed data, which will be described later. The DRAM 206 is a memory (Dynamic Random Access Memory) in which various types of data are stored. The signal processing unit 207 performs development processing to generate a YUV signal from the image data. The signal processing unit 207 also performs processing such as generating a JPEG image from the YUV signal (JPEG processing).
[0020] The CPU 208 is a control unit that controls various operations via a bus according to a program. The display unit 209 includes a liquid crystal monitor or the like. The display unit 209 displays an image based on the image data on which signal processing has been performed. The recording control unit 210 includes a recording medium. The recording control unit 210 records the image data on which signal processing has been performed on the recording medium.
[0021] Referring to FIG. 2, the detailed internal configurations of the imaging processing unit 204, the DRAM 206, and the signal processing unit 207 will be described. The imaging processing unit 204 includes a fixed-length compression unit 2041, a fixed-length decompression unit 2042, a sensor correction unit 2043, and a variable-length compression unit 2044. The DRAM 206 includes an A buffer 2061 and a B buffer 2062. The signal processing unit 207 includes a variable-length decompression unit 2071, a development unit 2072, and a JPEG compression unit 2073.
[0022] Each pixel of the imaging sensor 202 is provided with RGB color filters in a Bayer array, and analog image data of each RGB color is output from the imaging sensor 202. In Embodiment 1, for example, in one frame, image data of 4K (3840 horizontal pixels × 2160 vertical pixels) is output. The A / D conversion circuit 203 converts each RGB image data (Bayer signal) from the imaging sensor 202 into digital image data with a predetermined bit length (e.g., 10 bits) per pixel and outputs it to the imaging processing unit 204. The fixed-length compression unit 2041 compresses the image data output as a Bayer signal from the A / D conversion circuit 203 (hereinafter referred to as "input image data"). When continuously shooting still images, the input image data is input to the fixed-length compression unit 2041 at a data rate corresponding to the continuous shooting speed (frame rate) of the still images.
[0023] The A buffer 2061 is an area secured in the DRAM 206. The image data compressed by the fixed-length compression unit 2041 (hereinafter referred to as "first compressed data") is written into the A buffer 2061 by the data transfer control unit 205.
[0024] Generally, in an imaging sensor, the data output rate cannot be instantaneously and rapidly decreased during data output. Therefore, it is necessary to ensure (design) the usage bandwidth of the DRAM 206 so that data can be reliably written into the DRAM 206 at the data rate output by the imaging sensor 202. Thus, in Embodiment 1, the data size per frame of the first compressed data compressed by the fixed-length compression unit 2041 is a fixed size.
[0025] According to such a design, the writing rate of the output data of the imaging sensor 202 to the DRAM 206 can be ensured to a certain extent. Thereby, even if the imaging sensor 202 outputs data at a high speed rate, the output data from the imaging sensor 202 can be reliably written into the DRAM 206. Therefore, the design and ensuring of the usage bandwidth of the DRAM 206 are easy to perform.
[0026] In the fixed-length expansion unit 2042, the first compressed data written in the A buffer 2061 is read out by the data transfer control unit 205. Note that the first compressed data read out to the fixed-length expansion unit 2042 is deleted from the recording area of the A buffer 2061. Then, the fixed-length expansion unit 2042 generates data obtained by expanding (restoring) the first compressed data (hereinafter referred to as "expanded data").
[0027] The sensor correction unit 2043 performs various corrections such as noise removal on the expanded data.
[0028] The variable-length compression unit 2044 compresses the expanded data subjected to various corrections to generate second compressed data. The data size of the second compressed data varies according to the input image data. When the spatial redundancy of the input image data is high, the variable-length compression unit 2044 can generate second compressed data with a small size compressed at a high compression rate by the fixed-length compression unit 2041. On the other hand, when the input image data is complex and the amount of information contained in the input image data is large, the compression efficiency does not increase, and in the worst case, the data size of the second compressed data may not be smaller than the expanded data.
[0029] The B buffer 2062 is an area secured in the DRAM 206. The second compressed data generated by the variable-length compression unit 2044 is written into the B buffer 2062 by the data transfer control unit 205.
[0030] In the variable-length expansion unit 2071, the second compressed data written in the B buffer 2062 is read out by the data transfer control unit 205. The data transfer control unit 205 reads out the second compressed data from the B buffer 2062 at a "processing capacity rate of the recording medium for recording image data" slower than the still image continuous shooting frame rate. Note that the second compressed data read out to the variable-length expansion unit 2071 is deleted from the recording area of the B buffer 2062. The variable-length expansion unit 2071 generates uncompressed data by expanding the read second compressed data.
[0031] The developing unit 2072 converts the uncompressed data, which is a Bayer signal, into a YUV signal.
[0032] The JPEG compression unit 2073 generates a JPEG signal according to the YUV signal. The generated JPEG signal is recorded on a recording medium such as an SD card by the recording control unit 210.
[0033] In addition, in Embodiment 1, the data processing capability of the signal processing unit 207 is lower than that of the imaging processing unit 204. This is because it is normal that the processing capability of the recording medium of the recording control unit 210 for recording image data is lower than that of the imaging processing unit 204. Also, if the signal processing unit 207 is designed such that the data processing capability of the signal processing unit 207 is the same as that of the imaging processing unit 204, the circuit scale of the signal processing unit 207 will become very large.
[0034] Therefore, in Embodiment 1, when continuous shooting of still images starts, compressed data accumulates (is stored) in the A buffer 2061 and the B buffer 2062 of the DRAM 206. Thus, the time from when compressed data starts to be written into the A buffer 2061 and the B buffer 2062 until the free space in these buffers runs out (the buffer full state) limits the continuous shooting time of still images.
[0035] FIG. 3 is a diagram for explaining the compression ratio of fixed-length compression (fixed-length compression ratio) and the compression ratio of variable-length compression (variable-length compression ratio) according to Embodiment 1. In Embodiment 1, when data is compressed at a certain compression ratio, compressed data with a data size obtained by multiplying the data size of the data by the numerical value of the compression ratio can be acquired. And it can be said that the smaller the numerical value of the compression ratio, the higher the achievable compression ratio of compression.
[0036] In Embodiment 1, the compression ratio of the fixed-length compression unit 2041 is fixed at 1 / 2. Therefore, the fixed-length compression unit 2041 can halve the data size after compression compared to the data size before compression. In Embodiment 1, if compression is performed at a compression ratio higher than 1 / 2 in fixed-length compression, the image quality of the image data may deteriorate, so the compression ratio is fixed at 1 / 2.
[0037] Also, in Embodiment 1, the user can select (set) whether to record the RAW image on the recording medium (recording control unit 210). When it is selected not to record the RAW image on the recording medium (hereinafter referred to as the "RAW non-recording mode"), only the JPEG image generated by the JPEG compression unit 2073 is recorded on the recording medium (recording control unit 210). On the other hand, when it is selected to record the RAW image on the recording medium (hereinafter referred to as the "RAW recording mode"), not only the JPEG image but also the Bayer signal (RGB image) before the developing unit 2072 converts the image into a YUV signal is recorded on the recording medium.
[0038] The variable-length compression unit 2044 operates in either of two compression modes: a reversible compression (Lossless) mode that performs reversible compression of data and a non-reversible compression (Lossy) mode that performs non-reversible compression of data.
[0039] In Embodiment 1, when the RAW non-recording mode is selected, the variable-length compression unit 2044 operates in the non-reversible compression mode. When the RAW recording mode is selected, the variable-length compression unit 2044 operates in the reversible compression mode. This is because when recording the RAW image on the recording medium, it is necessary to obtain a RAW image with higher image quality than the JPEG image.
[0040] In the non-reversible compression mode, the compression ratio of the variable-length compression unit 2044 is 1 / 5 in the typical case and 1 / 1 in the worst case. Therefore, in the non-reversible compression mode, in many cases, the data size of the input image data can be compressed to 1 / 5, but in the worst case, the data size of the input image data does not change before and after compression.
[0041] On the other hand, in the reversible compression mode, the compression ratio of the variable-length compression unit 2044 is 1 / 1.5 under normal conditions and 1 / 1 in the worst case. Therefore, in the reversible compression mode, in many cases, the data size of the input image data can be compressed to 1 / 1.5, but in the worst case, the data size of the input image data does not change before and after compression.
[0042] Therefore, when the RAW non-recording mode is selected, it is presumed that variable-length compression can reduce the data size after compression more than fixed-length compression. On the other hand, when the RAW recording mode is selected, it is presumed that fixed-length compression can reduce the data size after compression more than variable-length compression. That is, in the RAW non-recording mode (irreversible compression mode), it is presumed that the second compressed data after variable-length compression has a smaller data size than the first compressed data after fixed-length compression. On the other hand, in the RAW recording mode (reversible compression mode), it is presumed that the first compressed data after fixed-length compression has a smaller data size than the second compressed data after variable-length compression. Thus, in the RAW recording mode and the RAW non-recording mode, the presumed magnitude relationship between the first compressed data and the second compressed data is different.
[0043] In the continuous shooting of still images according to Embodiment 1, compressed data is written into the DRAM 206 (A buffer 2061 and B buffer 2062), and the time until the buffer runs out of free space (buffer full) is the continuous shooting time of still images. Also, it is assumed that the total buffer capacity of the A buffer 2061 and the B buffer 2062 combined is fixed at 2G (gigabyte).
[0044] Here, when more compressed data is stored (accumulated) in the buffer that stores the compressed data with a smaller data size among the A buffer 2061 and the B buffer 2062, more image data can be stored in the DRAM 206. Therefore, in such a case, the burst continuous shooting time of still images can be extended.
[0045] Therefore, in Embodiment 1, when the RAW non-recording mode is selected, the buffer capacity of Buffer A 2061 is 0.2 GB, and the buffer capacity of Buffer B 2062 is 1.8 GB. Also, in the RAW non-recording mode, the data transfer control unit 205 stores the compressed data in Buffer B 2062 while preventing the compressed data from accumulating in Buffer A 2061.
[0046] In the RAW non-recording mode, in many cases, the data size of the compressed data after variable-length compression is smaller than the data size of the compressed data after fixed-length compression. For this reason, storing a large amount of image data in Buffer B 2062 that stores the compressed data after variable-length compression improves the burst shooting performance of still images.
[0047] Therefore, in Embodiment 1, in the RAW recording mode, the buffer capacity of Buffer A 2061 is 1.8 GB, and the buffer capacity of Buffer B 2062 is 0.2 GB. Also, in the RAW recording mode, the data transfer control unit 205 stores the compressed data in Buffer A 2061 while preventing the compressed data from accumulating in Buffer B 2062.
[0048] In the RAW recording mode, in many cases, the data size of the compressed data after fixed-length compression is smaller than the data size of the compressed data after variable-length compression. For this reason, storing a large amount of image data in Buffer A 2061 that stores the compressed data after fixed-length compression improves the burst shooting performance of still images.
[0049] With reference to the flowchart of FIG. 4, the process of performing shooting while storing compressed data in a buffer (shooting process for continuous shooting of still images) according to Embodiment 1 will be described.
[0050] In step S401, the CPU 208 determines whether the operation mode of the imaging device 20 is set to the RAW recording mode. For example, the CPU 208 sets the operation mode to either the RAW recording mode or the non-RAW recording mode according to the user's operation. If it is determined that the RAW recording mode is set, the process proceeds to step S402. If it is determined that the non-RAW recording mode is set, the process proceeds to step S403.
[0051] In step S402, the CPU 208 allocates a larger buffer capacity (buffer size) for the A buffer 2061 that stores the first compressed data than for the B buffer 2062 that stores the second compressed data. In Embodiment 1, the CPU 208 sets the buffer capacity of the A buffer 2061 to 1.8 GB and sets the buffer capacity of the B buffer 2062 to 0.2 GB.
[0052] In step S403, the CPU 208 allocates a larger buffer capacity (buffer size) for the B buffer 2062 that stores the second compressed data than for the A buffer 20 61 that stores the first compressed data. In Embodiment 1, the CPU 208 sets the buffer capacity of the A buffer 2061 to 0.2 GB and sets the buffer capacity of the B buffer 2062 to 1.8 GB.
[0053] In step S404, the CPU 208 determines whether shooting has been instructed by the user. If it is determined that shooting has been instructed, the process proceeds to step S405. If it is determined that shooting has not been instructed, the process of step S404 is repeated.
[0054] In step S405, the CPU 208 starts imaging and recording of the image data. In Embodiment 1, since the data processing ability of the signal processing unit 207 is lower than that of the imaging processing unit 204, compressed data accumulates in the A buffer 2061 or the B buffer 2062.
[0055] In step S406, the CPU 208 determines whether the operation mode of the imaging device 20 is set to the RAW recording mode. If it is determined that the RAW recording mode is set, the process proceeds to step S407. If it is determined that the RAW non-recording mode is set, the process proceeds to step S408.
[0056] In step S407, the CPU 208 controls to store (accumulate) the first compressed data in the A buffer 2061 without storing the second compressed data in the B buffer 2062. Specifically, the CPU 208 performs the process until writing the first compressed data to the A buffer 2061 (generation of the first compressed data and writing of the first compressed data) at a data rate corresponding to the continuous shooting speed of still images. On the other hand, the CPU 208 performs the process after the process of reading the first compressed data from the A buffer 2061 at a data rate corresponding to the processing capacity of the recording medium for recording the image data. The process after the process of reading the first compressed data includes, for example, reading of the first compressed data, generation of decompressed data, generation of the second compressed data, writing of the second compressed data to the B buffer 2062, and reading of the second compressed data.
[0057] In this case, when the writing of one piece of image data to the recording medium is completed, the next one-piece worth of first compressed data stored in the A buffer 2061 is read out. Thus, the compressed data can be stored in the A buffer 2061 instead of the B buffer 2062.
[0058] In step S408, the CPU 208 controls to store (accumulate) the second compressed data in the B buffer 2062. Specifically, the CPU 208 performs the process until writing the second compressed data to the B buffer 2062 at a data rate corresponding to the continuous shooting speed of still images. On the other hand, the CPU 208 performs the process after the process of reading the second compressed data from the B buffer 2062 at a data rate corresponding to the processing capacity of the recording medium for recording the image data.
[0059] In this case, regardless of whether the writing of one piece of image data to the recording medium has been completed or not, when one piece of image data accumulates in the A buffer 2061, the one piece of image data accumulated in the A buffer 2061 is read out at a data rate corresponding to the continuous shooting speed of still images. As a result, the compressed data can be stored not in the A buffer 2061 but in the B buffer 2062.
[0060] In step S409, the CPU 208 determines whether or not the user has instructed the end of shooting. If it is determined that the end of shooting has been instructed, the process proceeds to step S411. If it is determined that the end of shooting has not been instructed, the process proceeds to step S410.
[0061] In step S410, the CPU 208 determines whether at least one of the areas of the A buffer 2061 and the B buffer 2062 is full (there is no free area for storing the next data). If it is determined that neither of the areas of the A buffer 2061 and the B buffer 2062 is full, the process of step S405 is executed for the next input image data (the input image data of the next frame). If it is determined that at least one of the areas of the A buffer 2061 and the B buffer 2062 is full, the process proceeds to step S411.
[0062] In step S411, the CPU 208 instructs the imaging sensor 202 to stop imaging. The CPU 208 stops the recording process when the recording control unit 210 has finished writing all the captured image data to the recording medium.
[0063] As described above, according to Embodiment 1, the imaging device 20 can accumulate compressed data of a smaller size in the DRAM 206 by using both fixed-length compression and variable-length compression and controlling the buffer capacity. Therefore, the burst shooting performance of still images is improved.
[0064] In Embodiment 1, the CPU 208 changes the buffer capacity of the buffer that stores the compressed data according to whether it is set to the RAW recording mode or the RAW non-recording mode. However, the CPU 208 may switch (or control) between the reversible compression mode and the irreversible compression mode according to other settings or user operations.
[0065] Also, the CPU 208 may change the buffer capacity of the buffer that stores the compressed data according to the ISO sensitivity of the imaging sensor 202 during imaging. When shooting is performed with a high ISO sensitivity on a digital camera or the like, high-sensitivity shooting is realized. Therefore, when variable-length compression of an image is generally performed, the data size after compression tends to increase. Thus, even in the RAW non-recording mode, if the set ISO sensitivity is greater than a preset value, the data size after variable-length compression is likely to be larger than that after fixed-length compression. For this reason, if the set ISO sensitivity is greater than the preset value, the CPU 208 may operate in the same manner as in the RAW recording mode and set the buffer capacity of the A buffer 2061 to be larger than the buffer capacity of the B buffer 2062.
[0066] <Embodiment 2> In Embodiment 2, the imaging device 20 changes the buffer capacity according to the compression rate of the variable-length compression unit. Since the configuration of the imaging device 20 according to Embodiment 2 and the "compression rate of fixed-length compression and compression rate of variable-length compression" are the same as those in Embodiment 1, the description thereof is omitted.
[0067] FIG. 5 is a diagram for explaining the detailed internal configurations of the imaging processing unit 204, the DRAM 206, and the signal processing unit 207.
[0068] Similar to the variable-length compression unit 2044 according to Embodiment 1, the variable-length compression unit 2045 generates second compressed data by variable-length compression. The variable-length compression unit 2045 also includes a compression rate calculation unit 2046. The compression rate calculation unit 2046 calculates the compression rate by comparing the data sizes before and after the compression of one piece of image data (compression by the variable-length compression unit 2045). Since the other configurations shown in FIG. 5 are the same as those shown in FIG. 2 according to Embodiment 1, the description thereof is omitted.
[0069] In Embodiment 2, before being instructed by the user to take a picture, buffer capacities of the same size are allocated to the A buffer 2061 and the B buffer 2062. The total buffer capacity of the A buffer 2061 and the B buffer 2062 is fixed at 2 GB. In the state before the start of shooting, the buffer capacities of the A buffer 2061 and the B buffer 2062 are each 1 GB. Note that the buffer capacities of the A buffer 2061 and the B buffer 2062 can be changed according to the compression rate of the variable-length compression of the first captured image data.
[0070] In Embodiment 2, when instructed by the user to take a picture, the CPU 208 executes processes such as capturing the first piece of image data, fixed-length compression / decompression, and variable-length compression. The compression rate calculation unit 2046 calculates the variable-length compression rate of the first piece of image data by comparing the data sizes before and after the variable-length compression.
[0071] Here, when the variable-length compression rate of the first piece of image data is higher than the fixed-length compression rate (= 1 / 2), the CPU 208 changes the buffer capacity of the A buffer 2061 to 0.2 GB. That is, when the compression by the variable-length compression unit 2045 can reduce the data size more than the compression by the fixed-length compression unit 2041, the CPU 208 changes the buffer capacity of the A buffer 2061 to 0.2 GB. Then, the CPU 208 changes the buffer capacity of the B buffer 2062 to 1.8 GB.
[0072] Also, in this case, the imaging device 20 operates in a mode where it stores the compressed data in the B buffer 2062 instead of storing it in the A buffer 2061. This is because it is possible to increase the time until the buffer becomes full (i.e., the burst shooting time for still images) by storing more compressed data in the B buffer 2062 where compressed data with a smaller data size is stored.
[0073] When the variable-length compression rate of the first image data is lower than the fixed-length compression rate (= 1 / 2), the CPU 208 changes the buffer capacity of the A buffer 2061 to 1.8 GB. That is, when the compression by the fixed-length compression unit 2041 can reduce the data size more than the compression by the variable-length compression unit 2045, the CPU 208 changes the buffer capacity of the A buffer 2061 to 1.8 GB. Then, the CPU 208 changes the buffer capacity of the B buffer 2062 to 0.2 GB.
[0074] Also, in this case, the imaging device 20 operates in a mode where it stores the compressed data in the A buffer 2061 instead of storing it in the B buffer 2062. This is because it is possible to increase the time until the buffer becomes full (i.e., the burst shooting time for still images) by storing more compressed data in the A buffer 2061 where compressed data with a smaller data size is stored.
[0075] In Embodiment 2, for the image data after the second image in the burst shooting of still images, the CPU 208 does not change the size allocation of the buffer capacities of the A buffer 2061 and the B buffer 2062. This is because the plurality of input image data during continuous shooting are likely to have a high degree of similarity, so the variable-length compression rate of the input image data after the second image is likely to be close to the variable-length compression rate of the first image.
[0076] In addition, when the next shooting (second continuous shooting) is instructed after the continuous shooting is instructed to stop, the CPU 208 calculates the variable-length compression rate of the first input image data of the second continuous shooting, and changes the buffer capacity size allocation according to the calculated compression rate. This is because the input image data of the second continuous shooting is not necessarily highly similar to the input image data of the first continuous shooting, and it cannot be said that the compression rates of variable-length compression are likely to be close.
[0077] Referring to the flowchart of FIG. 6, the shooting process of burst continuous shooting of still images in Embodiment 2 will be described.
[0078] In step S601, the CPU 208 determines whether or not a shooting start has been instructed by the user. If it is determined that a shooting start has been instructed, the process proceeds to step S602. If it is determined that a shooting start has not been instructed, the process of step S601 is repeated.
[0079] In step S602, the CPU 208 allocates buffer capacities of a temporary size to the A buffer 2061 and the B buffer 2062. In Embodiment 2, the CPU 208 allocates buffer capacities of the same size to the A buffer 2061 and the B buffer 2062, and allocates a buffer capacity of 1 GB to each.
[0080] In step S603, the CPU 208 starts imaging and recording of the first image data.
[0081] In step S604, the CPU 208 instructs the variable-length compression unit 2045 to calculate the compression rate of the first image data. For this purpose, the CPU 208 controls the variable-length compression unit 2045 to calculate the variable-length compression rate of the first image data.
[0082] In step S605, the CPU 208 determines whether the variable-length compression rate of the calculated first image data is lower than the fixed-length compression rate. That is, in step S605, the CPU 208 determines the magnitude relationship between the data sizes of the first compressed data and the second compressed data. If it is determined that the fixed-length compression rate is higher than the variable-length compression rate, the process proceeds to step S606. If it is determined that the fixed-length compression rate is lower than the variable-length compression rate, the process proceeds to step S607.
[0083] In step S606, the CPU 208 operates in an operation mode of storing the compressed data in the A buffer 2061. The CPU 208 allocates a larger buffer capacity for the A buffer 2061 than the buffer capacity of the B buffer 2062. In Embodiment 2, the CPU 208 sets the buffer capacity of the A buffer 2061 to 1.8 GB and sets the buffer capacity of the B buffer 2062 to 0.2 GB.
[0084] In step S607, the CPU 208 operates in an operation mode of storing the compressed data in the B buffer 2062. The CPU 208 allocates a larger buffer capacity for the B buffer 2062 than the buffer capacity of the A buffer 2061. The CPU 208 sets the buffer capacity of the A buffer 2061 to 0.2 GB and sets the buffer capacity of the B buffer 2062 to 1.8 GB.
[0085] In step S608, the CPU 208 controls to store the first compressed data in the A buffer 2061 without storing the second compressed data in the B buffer 2062. For this reason, the CPU 208 performs the process until writing the first compressed data to the A buffer 2061 at a data rate corresponding to the continuous shooting speed of still images. The CPU 208 performs the process after reading the first compressed data from the A buffer 2061 at a data rate corresponding to the processing capacity of the recording medium for recording the image data.
[0086] In step S609, the CPU 208 controls to store the second compressed data in buffer B 2062 without storing the first compressed data in buffer A 2061. For this purpose, the CPU 208 performs the process until writing the second compressed data to buffer B 2062 at a data rate corresponding to the continuous shooting speed of still images. The CPU 208 performs the processes after the process of reading the second compressed data from buffer B 2062 at a data rate corresponding to the processing ability of the recording medium that records the image data.
[0087] In step S610, the CPU 208 determines whether or not an instruction to end shooting has been given from the user. If it is determined that an instruction to end shooting has been given, the process proceeds to step S613. If it is determined that an instruction to end shooting has not been given, the process proceeds to step S611. If it is determined that an instruction to end shooting has not been given, the process proceeds to step S611.
[0088] In step S611, the CPU 208 determines whether or not at least one of the areas of buffer A 2061 and buffer B 2062 is full (there is no free area for storing the next data). If it is determined that at least one of the areas of buffer A 2061 and buffer B 2062 is full, the process proceeds to step S613. If it is determined that neither of the areas of buffer A 2061 and buffer B 2062 is full, the process proceeds to step S612.
[0089] In step S612, the CPU 208 starts imaging and recording the next image data.
[0090] In step S613, the CPU 208 instructs the imaging sensor 202 to stop imaging. Then, when the recording control unit 210 finishes recording all the imaged image data on the recording medium, the CPU 208 stops the recording process.
[0091] As described above, according to the second embodiment, the imaging device 20 can store compressed data with a smaller data size by changing the buffer capacity according to the compression ratio of the variable-length compression of the first image data. Therefore, the burst shooting performance of still images can be further improved compared to the first embodiment.
[0092] In each of the embodiments, the fixed-length compression and variable-length compression with the compression ratios shown in FIG. 3 are used, but fixed-length compression and variable-length compression with compression ratios different from these compression ratios may be used.
[0093] Also, in each of the embodiments, the total buffer capacity of the A buffer 2061 and the B buffer 2062 is fixed at 2 GB, but it may be a capacity different from 2 GB or a variable buffer capacity. The buffer capacities allocated to the A buffer 2061 and the B buffer 2062 may be different from the sizes described above.
[0094] In each of the embodiments, the buffer for storing the compressed data is the DRAM 206, but it may be another storage device (storage unit) such as an SRAM. Also, the fixed-length compression unit 2041, the variable-length compression unit 2044, the A buffer 2061, the B buffer 2062, and the CPU 208 may be mounted in the imaging sensor 202.
[0095] In Embodiment 2, the imaging device 20 changes the buffer capacity for storing compressed data according to the compression rate of variable-length compression of the image data of the first frame of continuous shooting. However, the imaging device 20 may calculate the compression rate of variable-length compression of the image data using the image data from the second frame onward and change the buffer capacity for storing the compressed data. For example, when the process of step S612 ends, instead of proceeding to step S610, the process may proceed to step S604. Then, for the next image data, calculation of the compression rate of variable-length compression (step S604), comparison of the variable-length compression rate with the fixed-length compression rate (step S605), setting of the buffer capacity (steps S606, S607), etc. may be performed. Alternatively, in step S604, the CPU 208 may calculate a representative value (such as an average value, median value, minimum value, or maximum value) of the compression rates of variable-length compression of a plurality of most recent image data, and in step S605, compare the magnitude relationship between the representative value and the fixed-length compression rate. That is, the CPU 208 may control the operation mode (buffer capacities of the A buffer 2061 and the B buffer 2062) based on the compression rates of variable-length compression of each of the plurality of image data.
[0096] Note that the CPU 208 may control the buffer capacities of the A buffer 2061 and the B buffer 2062 according to the estimated data size magnitude relationship between the first compressed data and the second compressed data (which of any plurality of modes with different magnitude relationships is set).
[0097] For example, the above magnitude relationship varies according to the shooting mode, shooting scene, or brightness of ambient light. Therefore, the CPU 208, for example, increases the buffer capacity of the B buffer 2062 compared to the buffer capacity of the A buffer 2061 in a mode for shooting a landscape where the data size of the second compressed data is estimated to be small. On the other hand, the CPU 208, for example, increases the buffer capacity of the A buffer 2061 compared to the buffer capacity of the B buffer 2062 in a mode for shooting a complex subject such as a person where the data size of the second compressed data is estimated to be large.
[0098] For example, the above magnitude relationship is different depending on whether it is a fixed-length compression method or a variable-length compression method. Therefore, for example, in a mode where a fixed-length compression method in which it is estimated that the data size of the first compressed data is large is set, the CPU 208 makes the buffer capacity of the B buffer 2062 larger than the buffer capacity of the A buffer 2061. On the other hand, for example, in a mode where a fixed-length compression method in which it is estimated that the data size of the first compressed data is small is set, the CPU 208 makes the buffer capacity of the A buffer 2061 larger than the buffer capacity of the B buffer 2062.
[0099] As described above, the present invention has been described in detail based on its preferred embodiments. However, the present invention is not limited to these specific embodiments, and various forms within the scope not departing from the gist of the present invention are also included in the present invention. Some of the above-described embodiments may be appropriately combined.
[0100] Also, in the above, “When A is greater than or equal to B, proceed to step S1, and when A is smaller (lower) than B, proceed to step S2” may be read as “When A is greater (higher) than B, proceed to step S1, and when A is less than or equal to B, proceed to step S2”. Conversely, “When A is greater (higher) than B, proceed to step S1, and when A is less than or equal to B, proceed to step S2” may be read as “When A is greater than or equal to B, proceed to step S1, and when A is smaller (lower) than B, proceed to step S2”. Therefore, as long as there is no contradiction, “A or more” may be read as “greater (higher; longer; more) than A”, and “A or less” may be read as “smaller (lower; shorter; less) than A”. And “greater (higher; longer; more) than A” may be read as “A or more”, and “smaller (lower; shorter; less) than A” may be read as “A or less”.
[0101] Note that each functional unit in each of the above embodiments (each modification example) may be individual hardware or not. The functions of two or more functional units may be realized by common hardware. Each of the multiple functions of one functional unit may be realized by individual hardware. Two or more functions of one functional unit may be realized by common hardware. Also, each functional unit may or may not be realized by hardware such as an ASIC, FPGA, or DSP. For example, the device may have a processor and a memory (storage medium) in which a control program is stored. And the functions of at least some of the functional units of the device may be realized by the processor reading and executing the control program from the memory.
[0102] (Other Embodiments) The present invention can also be realized by supplying a program that realizes one or more functions of the above embodiments to a system or device via a network or a storage medium, and having one or more processors in the computer of the system or device read and execute the program. It can also be realized by a circuit (for example, an ASIC) that realizes one or more functions.
[0103] The disclosure of the above embodiments includes the following configurations, methods, and programs. (Configuration 1) Imaging means, A memory, First compression means for obtaining first compressed data by performing fixed-length compression on the image data from the imaging means, First recording control means for recording the first compressed data in a first area of the memory, Second compression means for obtaining second compressed data by performing variable-length compression on the image data obtained by restoring the first compressed data, Second recording control means for recording the second compressed data in a second area of the memory, Setting means for setting an operation mode to either a first mode or a second mode in which an estimated data size relationship between the first compressed data and the second compressed data is different; Control means for controlling the size of the first area and the size of the second area according to the operation mode set by the setting means; An imaging device characterized by comprising the above. (Configuration 2) In the first mode, the control means controls so that the first compressed data is accumulated in the first area, and in the second mode, the control means controls so that the second compressed data is accumulated in the second area. The imaging device according to Configuration 1, characterized by the above. (Configuration 3) The first mode is a mode in which it is estimated that the data size of the first compressed data is smaller than the data size of the second compressed data. The second mode is a mode in which it is estimated that the data size of the second compressed data is smaller than the data size of the first compressed data. The control means: 1) In the first mode, sets the size of the first area to be larger than the size of the second area; 2) In the second mode, sets the size of the second area to be larger than the size of the first area. The imaging device according to Configuration 2, characterized by the above. (Configuration 4) Image data is input to the first compression means at a first rate. The second compressed data is read from the second area at a second rate slower than the first rate. The imaging device according to Configuration 3, characterized by the above. (Configuration 5) In the first mode, the control means controls each of the first compression means and the first recording control means to execute processing at the first rate, and controls each of the second compression means and the second recording control means to execute processing at the second rate. The imaging device according to Configuration 4, characterized by the above. (Configuration 6) In the second mode, the control means controls each of the first compression means, the first recording control means, the second compression means, and the second recording control means to execute processing at the first rate. The imaging device according to Configuration 4 or 5, wherein the imaging device is characterized in that. (Configuration 7) The first mode is a mode in which the variable-length compression is reversible compression. The second mode is a mode in which the variable-length compression is irreversible compression. The imaging device according to any one of Configurations 1 to 6, wherein the imaging device is characterized in that. (Configuration 8) The imaging device has third recording control means for recording image data based on the second compressed data on a recording medium. The first mode is a mode in which image data of a RAW image is recorded on the recording medium. The second mode is a mode in which image data of a RAW image is not recorded on the recording medium. The imaging device according to any one of Configurations 1 to 6, wherein the imaging device is characterized in that. (Configuration 9) The imaging means performs imaging for acquiring image data input to the first compression means. The setting means sets the operation mode according to the ISO sensitivity at the time of imaging by the imaging means. The imaging device according to any one of Configurations 1 to 6, wherein the imaging device is characterized in that. (Configuration 10) The imaging device further has calculation means for calculating the compression rate of the variable-length compression. The setting means sets the operation mode based on the compression rate of the variable-length compression calculated by the calculation means. The imaging device according to any one of Configurations 1 to 6, wherein the imaging device is characterized in that. (Configuration 11) The calculation means calculates the compression rate of the variable-length compression of the first image data. The setting means sets the operation mode based on the compression ratio of the variable-length compression of the first image data calculated by the calculation means when a plurality of image data continuously captured after the first image data are compressed. The imaging device according to Configuration 10, characterized in that. (Configuration 12) The calculation means calculates the compression ratio of the variable-length compression for each of the plurality of image data. The setting means sets the operation mode based on the compression ratio of the variable-length compression for each of the plurality of image data calculated by the calculation means. The imaging device according to Configuration 10, characterized in that. (Method) A first compression step of obtaining first compressed data by performing fixed-length compression on image data obtained by an imaging means; A first recording control step of recording the first compressed data in a first area of a memory; A second compression step of obtaining second compressed data by performing variable-length compression on the image data obtained by restoring the first compressed data; A second recording control step of recording the second compressed data in a second area of the memory; A setting step of setting an operation mode to either a first mode or a second mode in which the estimated data size relationship between the first compressed data and the second compressed data is different; A control step of controlling the size of the first area and the size of the second area according to the operation mode set in the setting step; An imaging method, characterized by comprising the above. (Program) A program for causing a computer to function as each means of the imaging device according to any one of Configurations 1 to 12.
Explanation of Signs
[0104] 20: Imaging device, 202: Imaging sensor, 204: Imaging processing unit 205: Data transfer control unit, 206: DRAM (memory), 208: CPU, 2041: Fixed-length compression unit, 2044: Variable-length compression unit, 2061: A buffer, 2062: B buffer
Claims
1. An imaging means, a memory, a first compression means for obtaining first compressed data by performing fixed-length compression on image data from the imaging means, a first recording control means for recording the first compressed data in a first area of the memory, a second compression means for obtaining second compressed data by performing variable-length compression on the image data obtained by restoring the first compressed data, a second recording control means for recording the second compressed data in a second area of the memory, a setting means for setting an operation mode to either a first mode or a second mode in which an estimated data size relationship between the first compressed data and the second compressed data is different, a control means for controlling the size of the first area and the size of the second area according to the operation mode set by the setting means, An imaging device, characterized by comprising the above components.
2. In the first mode, the control means controls so that the first compressed data is accumulated in the first area, and in the second mode, the control means controls so that the second compressed data is accumulated in the second area. The imaging device according to claim 1, characterized by the above.
3. The first mode is a mode in which it is estimated that the data size of the first compressed data is smaller than the data size of the second compressed data, The second mode is a mode in which it is estimated that the data size of the second compressed data is smaller than the data size of the first compressed data, The control means: 1) in the first mode, sets the size of the first area to be larger than the size of the second area; 2) in the second mode, sets the size of the second area to be larger than the size of the first area. The imaging device according to claim 2, characterized by the above.
4. Image data is input to the first compression means at a first rate, The second compressed data is read from the second area at a second rate slower than the first rate. The imaging device according to claim 3, characterized by the above.
5. In the first mode, the control means controls each of the first compression means and the first recording control means to execute processing at the first rate, and controls each of the second compression means and the second recording control means to execute processing at the second rate. The imaging device according to claim 4, characterized by the above.
6. In the second mode, the control means controls each of the first compression means, the first recording control means, the second compression means, and the second recording control means to execute processing at the first rate. The imaging device according to claim 4 or 5, characterized in that.
7. The first mode is a mode in which the variable-length compression is reversible compression. The second mode is a mode in which the variable-length compression is irreversible compression. The imaging device according to any one of claims 1 to 5, characterized in that.
8. It has third recording control means for recording image data based on the second compressed data on a recording medium. The first mode is a mode of recording image data of a RAW image on the recording medium. The second mode is a mode of not recording image data of a RAW image on the recording medium. The imaging device according to any one of claims 1 to 5, characterized in that.
9. The imaging means performs imaging for acquiring image data input to the first compression means. The setting means sets the operation mode according to the ISO sensitivity at the time of imaging by the imaging means. The imaging device according to any one of claims 1 to 5, characterized in that.
10. It further has calculation means for calculating the compression rate of the variable-length compression. The setting means sets the operation mode based on the compression rate of the variable-length compression calculated by the calculation means. The imaging device according to any one of claims 1 to 5, characterized in that.
11. The calculation means calculates the compression rate of the variable-length compression of the first image data. The setting means sets the operation mode when a plurality of image data continuously captured after the first image data are compressed, based on the compression rate of the variable-length compression of the first image data calculated by the calculation means. The imaging device according to claim 10, characterized in that.
12. The calculation means calculates the compression rate of the variable-length compression of each of the plurality of image data. The setting means sets the operation mode based on the compression rate of the variable-length compression of each of the plurality of image data calculated by the calculation means. The imaging device according to claim 10, characterized in that.
13. A first compression step of obtaining first compressed data by performing fixed-length compression on image data obtained by an imaging means. A first recording control step of recording the first compressed data in a first area of a memory; A second compression step of obtaining second compressed data by performing variable-length compression on image data obtained by restoring the first compressed data; A second recording control step of recording the second compressed data in a second area of the memory; A setting step of setting an operation mode to either a first mode or a second mode in which an estimated data size relationship between the first compressed data and the second compressed data is different; A control step of controlling the size of the first area and the size of the second area according to the operation mode set in the setting step; An imaging method characterized by comprising the above.
14. A program for causing a computer to function as each means of the imaging apparatus according to any one of Claims 1 to 5.
Citation Information
Patent Citations
Picture signal encoding device
JP1995226848A