METHOD OF CODING AND DECODING A COLORED FREEZE FRAME
TECHNICAL FIELD
The present invention relates to a method of coding and decoding colored freeze frames.
BACKGROUND ART
Interest on multimedia has been increased due to a sudden development of internet communication technology.
An increase of such interest on multimedia causes necessity of a method of coding and decoding freeze frames which may obtain better frame quality more rapidly at lower transmission speed. Various research on methods of coding and decoding quality freeze frames have been conducted.
The most important problem in digital freeze frames is the need to have large storage space when directly expressing freeze frames without compressing freeze frames. Accordingly, in order to record digital freeze frames in a storage medium or transmit digital freeze frames to a remote place through wire/wireless communication, compressing digital freeze frames, which minimizes loss of information included in the digital freeze frames and effectively removes redundancy of freeze frame data, is necessary.
Algorithms of compressing freeze frames are classified into two methods. One of the methods is a lossless coding method and the other is a lossy coding method.
The lossless coding method may preserve original information in spite of procedures of compression and decompression and, according to the lossy coding method, original information may not be completely restored due to distortions generated in procedures of compression and decompression. In other words, the lossless coding method has a better frame quality and worse compressibility, compared to the lossy coding method. In contrast, the lossy coding method has better compressibility and worse frame quality, compared to the lossless coding method.
In the beginning, a Discrete Cosine Transform (DCT) method in Europe, a Vector
Quantization (VQ) method in Japan and an Arithmetic Coding method in America contended with each other for being a standard method. Currently, algorithms that codes and decodes freeze frames by appropriately mixing the above-methods according to application fields have been introduced.
In elementary color meter (RGB), a correlation among each color component is very high and same bandwidth is given to .each component R, G and B when expressing colors, so that it is not effective in terms of compression of freeze frames.
Thus, color difference meter (YCbCr) has been used for coding colored freeze frames in order to increase efficiency of compression.
PEG, JPEG-2000, MPEG-1, MPEG-2, MPEG-4 and H.263 are representative methods among methods using the color difference meter (YCbCr). Recently, as demand for transmitting freeze frames through internet rapidly grows bigger, freeze frame data technology having more fast speed and a minimum loss, which may be a substitute for JPEG, JPEG-2000, MPEG-1, MPEG-2, MPEG-4 and H.263 is needed.
DISCLOSURE OF INVENTION
The present invention is to solve the above problem and the object of the present invention is to provide a method of coding and decoding colored freeze frames which has superior compressibility and superior quality frame considering compressibility, compared with the related art methods. According to a preferred embodiment of the present invention for achieving the above-objects, a method of coding and decoding colored freeze frames includes: color transforming that generates DCT coordinate signal by ttamforming elementary color meter (RGB) of colored freeze frames; wavelet fransfonning that decomposes the DCT coordinate signal up to a certain level according to size of freeze frame by iteratively performing one- dimensional Discrete Wavelet Transform in a horizontal direction and a vertical direction for the DCT coordinate signal generated during said color transforming; quantizing that quantizes coefficients generated during said wavelet transforming; suffling that maps positive coefficients generated during said quantizing into even numbers and negative coefficients generated during said quantizing into odd numbers; and arithmetic coding that obtains compressed data by arithmetically coding data mapped during said suffling.
Said arithmetic coding of the method of coding colored freeze frames according to additional embodiment of the present invention, includes: generating characters and deciding a scan direction, that expresses each symbol or successive symbols as certain characters according to statistical frequency of generation of data symbols mapped during said suffling and decides a direction of scanning characters according to distribution of symbols; searching characters and quantizing that searches characters in a scan direction decided during said generating characters and deciding a scan direction and reduces the searched characters into certain number of characters; and arithmetic coding that obtains compressed data by arithmetically coding characters generated during said searching characters and quantizing.
According to another embodiment of the present invention for achieving the above objects, a method of decoding colored freeze frames includes: arithmetic decoding that decodes compressed data by arithmetically processing the compressed data; inverse suffling that maps coefficients, even number, generated during said arithmetic decoding into positive number and coefficients, odd number, generated during said arithmetic decoding into negative number; inverse quantizing that inversely quantizes coefficients generated during said inverse suffling; inverse wavelet fransforming that generates DCT coordinate signal by composing coefficients generated during said inverse quantizing into high level using decomposed information of each frequency band; and color transfoirning that restores freeze frames by transforming DCT coordinate generated during said inverse wavelet transforming into general color coordinate.
According to additional embodiment of the present invention, said arithmetic decoding of the method of decoding freeze frames includes: arithmetic decoding that generates characters by arithmetically decoding compressed data; inverse quantizing that increases characters generated during said arithmetic decoding; and character tiansfoirning that transforms characters generated during said inverse quantizing into mapped data symbols.
BRIEF DESCRIPTION OF THE DRAWINGS
Figure 1 is a flow diagram that illustrates a method of coding colored freeze frames according to the present invention.
Figure 2 illustrates wavelet decomposition.
Figure 3 illustrates level one wavelet transform.
Figure 4a illustrates that characters are scanned in a horizontal direction.
Figure 4b illustrates that characters are scanned in a vertical direction. Figure 5 is a flow diagram that illustrates a method of decoding colored freeze frames according to the present invention.
Figure 6 illustrates inverse wavelet transform.
BEST MODE FOR CARRYING OUT THE INVENTION
Reference will now be made in detail to the preferred embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Figure 1 is a flow diagram illustrating a method of coding colored freeze frames according to the present invention.
A method of coding colored freeze frames according to the present invention, includes color fransforming step (SI 00), wavelet fransforming step (SI 10), quantizing step
(SI 20), suffling step (SI 30) and arithmetic coding step (SI 40). The arithmetic coding step (SI 40) includes generating characters and deciding a scan direction step (SI 40a), searching characters and quantizing step (SI 40b) and arithmetic coding step (SI 40c).
The color transforming step (SI 00) generates DCT coordinate signal by transforming elementary color meter (RGB) of colored freeze frames.
It is ineffective for elementary color meter (RGB) to compress freeze frames, because correlation among color components is very high and same bandwidth is given to each color component R, G and B when expressing colors. Accordingly, color difference meter (YCbCr) is used in MPEG-1, MPEG-2, MPEG-4, H.263, JPEG and JPEG-2000, in order to increase efficiency of compression. The present invention transforms elementary color meter (RGB) into DCT coordinate, which has better performance than color difference
meter, for more effective freeze frames compression. The DCT coordinate is based on kernel of DCT coordinate and make given signals have smaller variance than the color difference meter.
The above Equation 1 is an equation of Forward DCT kernel applied to a method of coding colored freeze frames according to the present invention. D component of the Equation 1 is derived from DC component of the DCT kernel. C component of the Equation 1 is derived from half periodic component. T component is derived from one periodic component. Color difference meter (YCbCr) gives most weight to G component, less weight to R component, and least weight to B component, considering human visual characteristics that is less sensitive to R component and is least sensitive to B component. However, DCT coordinate according to the present invention gives same weight to all components.
The wavelet fransfoiming step (SI 10) decomposes the DCT coordinate signal up to a certain level by iteratively performing one-dimensional discrete wavelet transform for DCT coordinate signal generated during said color transforming step (SI 00) in a horizontal direction and vertical direction. Wavelet is a function itself and freeze frames are processed by applying different scale and resolution to the function. In other words, wavelet processes freeze frames not by applying same resolution like MPEG, so that freeze frames are not shown to be broken when
adjusting scales of the freeze frames unlike MPEG that makes freeze frames be shown to be broken due to damages in pixels generated when adjusting scales and it is possible to decode freeze frames without any harm.
As a simple example of one-dimensional wavelet transform, a decomposition procedure is given with the following data. Signals are classified into a part having an average value and a part having a difference of value divided by 2. [8 4 1 3 7 9 5 3] : original data 6 2 8 4 [2 -1 -1 1]
4 6 [2 2] 5 [-1]
A rule obtaining from the original data values below the original data is that two data (a, b) are grouped into one and the values below the original data are obtained from the two data by processing two data according to (a+b)/2, [(a-b)/2]. Freeze frames may be thought as two-dimensional matrix, and wavelet transform of two-dimensional matrix according to the present invention makes up filter bank structure and is obtained by performing one-dimensional discrete wavelet transform for the DCT coordinates generated during said color transforming step (SI 00) repeatedly in a horizontal direction and a vertical direction. Figure 2 illustrates wavelet decomposition. LL, LH, HL and HH illustrated in
Figure 5 mean decomposed areas. L means filtering in a horizontal direction and H means filtering in a vertical direction. L is filtered using low frequency band pass filter (h(n)) and H is filtered using high frequency band pass filter (g(n)). Accordingly, freeze frames are decomposed up to appropriate composition possible level according to the size of freeze
frames.
Said quantizing step (SI 20) quantizes coefficients generated during said wavelet transforming step (SI 10).
Quantization means to express a range including certain values as several discrete sections and one value in each discrete section represents the each discrete section.
In other words, said quantizing step (SI 20) expresses all coefficients generated during said wavelet transforming step (SI 10) as small size numbers by dividing the coefficients by a certain number and rounding off to the nearest integer.
Said suffling step (SI 30) maps all coefficients generated during the quantizing step (SI 20) into even numbers if the coefficient is a positive number and odd numbers if the coefficient is a negative number.
Let's assume that 'a' is a coefficient in the step SI 30, and suffling is expressed in program as equation 2 below. [Equation 2] if(a> 0) {a=a*2} else {a=(-a)*2-l }
According to the equation 2, the coefficient 'a' is mapped into '0' if 'a' is zero, is mapped into '1' if 'a' is -1, is mapped into '2' if 'a' is 1 and is mapped into '3' if 'a' is -2.
Said arithmetic coding step (SI 40) obtains compressed data by arithmetically processing data mapped during said suffling step (S 130) .
Said arithmetic coding step (SI 40) includes generating characters and deciding a scan direction step (SI 40a), searching characters and quantizing step (SI 40b) and arithmetic coding step (SI 40c).
Said generating characters and deciding a scan direction step (S140a) expresses each
symbol or successive symbols as certain characters using entropy coding according to statistical frequency of generation of data symbols mapped during said suffling step (SI 30) and decides a direction of scanning characters according to distribution of symbols. In other words, said generating characters and deciding a scan direction step (SI 40a) generates characters to be used by checking values of symbols to be coded and decides scan direction according to distribution of data symbols to be coded.
Figure 3 illustrates level one wavelet transform. As illustrated in Figure 3, four sub-band is obtained from the original image by carrying out level one wavelet transform for the original image. LH band among four sub-bands scans characters in a vertical direction and HL band scans characters in a horizontal direction, thereby heightening coding performance.
Said searching characters and quantizing step (SI 40b) searches characters in the scan direction decided during said generating characters and deciding a scan direction step (SI 40a) and reduces the number of the searched characters into a certain number of characters. If a scan direction is horizontal, scan is carried out, as illustrated in Figure 4a. Else, scan is carried out in a vertical direction, as illustrated in Figure 4b. As illustrated in Figures 4a and 4b, when an object pixel is X, characters are searched using C0-C5, pixels surrounding the pixel X.
The number of characters searched by the above procedure is reduced into a certain number of characters through program operation of equation 3 according to one preferred embodiment.
[Equation 3] temp=(3*cl+c2+3*c3+c4+c6/3)+(c0 II c7)+(c5 II c8) ;
while(temp) { ctx++; temp=temp/4;
} if(ctx>3) ctx=31; return(ctx);
Said arithmetic coding step (SI 40c) obtains compressed data by arithmetic coding characters generated during said searching characters and quantizing step (SI 40b). Accordingly, if searched character is arithmetically coded by carrying out quantization, entropy increases up to conditional entropy, thereby getting excellent compression effect.
Figure 5 is a flow diagram that illustrates a method of decoding colored freeze frames according to the present invention. The method of decoding colored freeze frames according to the present invention is progressed in inverse order of the above-described method of coding colored freeze frames.
The method of decoding colored freeze frames according to the present invention includes arithmetic decoding step (S200), inverse suffling step (S210), inverse quantizing step (S220), inverse wavelet transforming step (S230) and color fransforming step (S240). The arithmetic decoding step (S200) decodes compressed data by arithmetically processing the compressed data and includes arithmetic decoding step (S200a), inverse quantizing step (S200b) and character fransforming step (S200c).
The arithmetic decoding step (S200a) is an inverse procedure of arithmetic coding step (SI 40c) in coding procedure, and generates a character by arithmetic decoding
compressed data.
Inverse quantizing step (S200b) is an inverse procedure of searching characters and quantizing step (SI 40b) in coding procedure, and the number of the character generated during the arithmetic decoding step (S200a) is increased. The character fransforming step (S200c) is an inverse procedure of generating characters and deciding a scan direction step (SI 40a) in coding procedure, and fransforms the character generated by the inverse quantizing step (S200b) into mapped data symbol.
The inverse suffling step (S210) is an inverse procedure of suffling step (SI 30) in coding procedure and maps even number into positive number and odd number into negative number, for all coefficients generated during the arithmetic decoding step (S200). This can be expressed in equation 4.
[Equation 4] if {(a%2)=0} a=a/2; else a= - (a+l)/2;
Accordingly, if coefficient a is 2, the coefficient a is mapped into 1. If coefficient a is 5, the coefficient a is mapped into -3. If coefficient a is 6, the coefficient a is mapped into 3. If coefficient a is 9, the coefficient a is mapped into -5.
The inverse quantizing step (S220) is an inverse procedure of quantizing step (SI 20) in coding procedure and increases quantity of codes by multiplying all coefficients generated during the inverse suffling step (S210) by a certain value.
The inverse wavelet step (S230) is an inverse procedure of wavelet fransforming step
(SI 00) in coding procedure and generates DCT coordinate by composing coefficients generated during the inverse quantizing step (S220) into a high level using decomposed information of each frequency band. In other words, the inverse wavelet step is a procedure of composing coefficients into a high level using decomposed information of each frequency band as illustrated in Figure 6.
The color transforming step (S240) restores freeze frames by fransforming DCT coordinate generated by the inverse wavelet fransforming step (S230) into general chromaticity.
Accordingly, colored freeze frames compressed during the coding procedure can be restored during decoding procedure.
INDUSTRIAL APPLICABILITY
As apparent from the above description of the present invention, the method of coding and decoding colored freeze frames may have better compressibility and frame quality considering compressibility.
Although the preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, without departing from the scope and spirit of the invention as disclosed in the accompanying claims.