Device for compressing still image data

Abstract: A device for compressing still image data has a discrete cosine transformer (20) for discrete-cosine-transforming video data output in block units from a frame buffer in a digital camcorder, a quantizer (22) for quantizing the video data transformed in the discrete cosine transformer (20), a variable-length coder (24) for variable-length-coding the video data quantized in the quantizer (22), and a quantization interval determiner (26) for producing a quantizer number for controlling a quantization interval, and outputting the quantizer number to the quantizer. The device further has a comparator (28) for comparing the bit number of video data variable-length-coded at quantization intervals for the first frame with a reference bit number for the best image quality, and outputting a flag signal on the basis of the comparison, and a flag buffer (30) for temporally storing the flag signal output from the comparator (28), so that a quantization interval is determined according to the result of the comparison output from the flag buffer (30) to make the bit number of video data of the frames following the first frame approximate to the predetermined reference bit number for the best image quality. Since the bit number of variable-length-coded data of the first frame is compared with its reference bit number, and a quantizer number for the following frame is determined on the basis of the comparison, so that the bit number of the second frame data is approximate to its reference bit number.

Description: The present invention relates to a device for compressing video data, and more particularly, to a device for compressing still image data to obtain a still image of high image quality. Generally, a digital camcorder functionally provides a still image photographing mode as well as a moving picture photographing mode. In the moving picture photographing mode, video data is compressed frame by frame and continuously recorded in a recording medium, while in the still image photographing mode, a frame of video data is stored in a frame buffer, compressed, and recorded on a tape for several to tens of seconds. The human eye is more sensitive to the quality of a reproduced still image than that of a reproduced moving picture, since the reproduced image is displayed in a still state. Also, in many cases, a photographed still image is output according to its uses by equipment (e.g., a color printer) capable of displaying an image of high resolution, thus increasing the need for high image quality. Figure 1 is a schematic block diagram of a conventional device for compressing still image data. The still-image data compression device of Figure 1 is comprised of a discrete cosine transformer 10 for discrete-cosine transforming and zigzag-scanning video data received in 8×8 block units from a frame buffer (not shown) in a digital camcorder, a quantizer 12 for quantizing the video data output from discrete cosine transformer 10 at predetermined quantization intervals, a quantization interval determiner 16 for determining a quantizer number according to the complexity of the video data output in block units from discrete cosine transformer 10, so that quantizer 12 selects an adequate quantization interval or step size for each of macroblocks per second, and a variable-length coder 14 for variable-length-coding the video data quantized at the predetermined quantization intervals in quantizer 12, and outputting the variable-length-coded data to an error correction coder (not shown). The quantizer number output from quantization interval determiner 16 has a direct impact on the determination of the image quality. In the prior art of Figure 1, however, identical quantizer numbers are selected when determining a quantization interval in both still image photographing and moving picture photographing modes. As a rule, errors are typically present in video data processed in variable-length coder 14. Nevertheless, despite the presence of an error in the value of a quantizer number selected for the data of the first frame, a high-quality image can be reproduced only if a more accurate quantizer number is selected for the next frame data on the basis of the comparison of a reference bit number with the bit number of the first frame data, since frames per second possess identical video data in a still image. In the prior art, however, high image quality cannot be obtained since an identical quantizer number selected in a moving picture photographing mode is also used in a still image photographing mode. EP 684 739 discloses a device for compressing image data and optimising a quantization interval of the image data so as to bring the number of coded bits per macro block of an image into accordance with a target number of bits per macro block. With a view to overcoming or reducing the above problem, the aim of embodiments of the present invention is to provide a device for compressing still image data to obtain a still image of high image quality. According to of the invention, there is provided a device for compressing still image data comprising video data of a single repeated video frame, the device comprising: a discrete cosine transformer for discrete cosine transforming video data output in block units from a frame buffer in a digital camcorder; a quantizer for quantizing the video data transformed in the discrete cosine transformer; a variable length coder for variable length coding the video data quantized by the quantizer; and a quantization interval determiner for determining a quantization interval, and outputting the quantization interval to the quantizer, wherein the device is characterised in that it further includes means for comparing a bit number representing the number of variable length coded bits per frame output from the variable length coder and a reference bit number representing a target number of bits per frame and, on the basis of the result of this comparison for a first frame, outputting a signal to the quantization interval determiner to modify the quantization interval if appropriate on the basis of the comparison result so as to bring the bit number into closer correspondence with the reference bit number for subsequent frames. Preferably, if the bit number is less than the reference bit number then the quantization interval is reduced. Preferably, if the bit number is greater than the reference bit number then the quantization interval is increased. Preferably, said means for comparing comprises: a comparator for comparing the bit number with the reference bit number and outputting a flag signal on the basis for comparison; and a flag buffer for temporarily storing the flag signal output from the comparator. For a better understanding of the invention, and to show how embodiments of the same may be carried into effect, reference will now be made, by way of example, to the accompanying diagrammatic drawings, in which: Figure 1 is a schematic block diagram of a conventional device for compressing still image data; and Figure 2 is a schematic block diagram of a device for compressing still image data according to an embodiment of the present invention. In Figure 2, showing an embodiment of a device for compressing still image data according to the present invention, the still-image data compressing device is comprised of a discrete cosine transformer 20 for discrete-cosine transforming and zigzag-scanning video data received in 8×8 block units from a frame buffer (not shown) in a digital camcorder, a quantizer 22 for quantizing the video data output from discrete cosine transformer 20, a variable-length coder 24 for variable-length-coding the video data quantized in quantizer 22 and outputting the variable-length-coded data to an error correction coder (not shown), a quantization interval determiner 26 for determining a quantization interval according to the activation degree of the video data output from discrete cosine transformer 20, a comparator 28 for comparing a predetermined reference bit number with the bit number of the variable-length-coded data output from variable-length coder 24, and outputting respective flag signals for the data bit number larger than, smaller than, and equal to the reference bit number, and a flag buffer 30 for temporarily storing the flag signal output in frame units from comparator 28 and outputting the flag signal to quantization interval determiner 26. Here, a signal "LENGTH" input from variable-length coder 24 to comparator 28 indicates the bit number of variable-length-coded data. The "DELTA" signals input from comparator 28 to flag buffer 30 and from flag buffer 30 to quantization interval determiner 26 indicate the result of the comparison between the reference bit number and the bit number of the variable-length-coded data, that is, above, below or equal. To achieve the best image quality, quantization interval determiner 26 determines a quantizer number according to a received flag signal, so that the bit number of frame data is approximate to its reference bit number. Quantizer 22 performs a quantization operation on the basis of the determined quantizer number. The still-image data compressing device as constituted above operates as follows. Fixing the number of data bits is needed for search and high-speed playback operations in a sequential recording medium such as a recording tape, and this fixed bit-number unit can be modified, when necessary for applications. Given an 8×8 block as a discrete cosine block, a macroblock has four luminance blocks and two color difference blocks. A single fixed bit-number unit is comprised of at least one macroblock. Data is generally produced in macroblock units. When a macroblock of data is variable-length-coded, the bit number of the data may be larger than, smaller than, or equal to a reference bit number. If the bit number of the data is less than the reference bit number, image quality is lowered, in comparison with the case where they are identical. On the other hand, if the bit number of the data exceeds the reference bit number, the excess bits are wasted (not recorded). With the waste of the excess video data bits from a low frequency area, which is an important factor determining image quality, a high-frequency coefficient is absent, thereby preventing the display of a subtle portion of an image, and causing blocking due to difference from an adjacent block. When a still image is photographed, the human eye is very sensitive to its image quality, since a signal stored in the frame buffer is recorded as the same video data for several to tens of seconds. On the contrary, a possible momentary distortion of a signal for a moving picture is elusive to the human eye. Therefore, the still image should be accurately played back. For this purpose, a quantizer number for more accurately determining a quantization interval should be determined, when still image data is compressed. When a still image photographing mode is set in a camcorder, quantization interval determiner 26 detects a control signal for the still image photographing mode, and a signal stored in the frame buffer is input to discrete cosine transformer 20, a quantizer number for the video data of the first frame is determined according to the activation degree of a discrete cosine parameter, in the same manner as in a moving picture photographing mode. However, since each frame has an identical signal in the still image photographing mode, quantization intervals for frames from the second are adjusted on the basis of the comparison between the bit number of variable-length-coded data in the first frame and its reference bit number, thereby narrowing the difference between the bit number of the video data in the other frames and the reference bit number. Thus, intended high image quality can be achieved. As described above, the device for compressing still image data of the present invention compares the bit number of variable-length-coded video data of the first frame with its reference bit number for the best image quality, and adjusts quantization intervals for the other frames on the basis of the comparison, so that the bit numbers of the other frames are approximate to their reference bit numbers. Therefore, higher image quality can be achieved in a still image photographing mode than in a moving picture photographing mode.

Claims: A device for compressing still image data comprising video data of a single repeated video frame, the device comprising: a discrete cosine transformer (20) for discrete cosine transforming video data output in block units from a frame buffer in a digital camcorder; a quantizer (22) for quantizing the video data transformed in the discrete cosine transformer; a variable length coder (24) for variable length coding the video data quantized by the quantizer (22); and a quantization interval determiner (26) for determining a quantization interval, and outputting the quantization interval to the quantizer (22), wherein the device is characterised in that it further includes means for comparing a bit number representing the number of variable length coded bits per frame output from the variable length coder (24) and a reference bit number representing a target number of bits per frame and, on the basis of the result of this comparison for a first frame, outputting a signal to the quantization interval determiner (26) to modify the quantization interval if appropriate on the basis of the comparison result so as to bring the bit number into closer correspondence with the reference bit number for subsequent frames. A device according to claim 1, wherein if the bit number is less than the reference bit number then the quantization interval is reduced. A device according to claim 1 or 2, wherein if the bit number is greater than the reference bit number then the quantization interval is increased. A device according to any of claims 1 to 3, wherein said means for comparing comprises: a comparator (28) for comparing the bit number with the reference bit number and outputting a flag signal on the basis for comparison; and a flag buffer (30) for temporarily storing the flag signal output from the comparator (28).

Inventors: HONG MIN-SUK, HONG, MIN-SUK
Applicants: SAMSUNG ELECTRONICS CO LTD, SAMSUNG ELECTRONICS CO., LTD.
Application year: 1996
Main classification: H04N7
IPC codes: H04N1, H04N5, H04N7, G06T9