Method for picture sharpening in a digital transform coder

Abstract: The invention relates to a method for processing a data signal which is transformed into an n-dimensional matrix form and which is to be processed by an n-dimensional quantizing matrix. In the invention the n-dimensional quantizing matrix is processed by an n-dimensional transfer function matrix before processing the data signal. In order to form the transfer function matrix at least one transfer function is selected, and it is given a fixed point in the n-dimensional transfer matrix. At least a part of the elements of the transfer function matrix are processed by at least one transfer function, so that elements at a predetermined distance from the fixed point are processed by a processing quantity dependent on the transfer function.

Description: The invention relates to a method for processing a data signal which is transformed into an n-dimensional matrix form and which is to be processed by an n-dimensional quantizing matrix (W(i,j)). In recent years the progress of digital technology has been very vigorous, and thus different methods have been developed to transmit and store a video signal in digital form. Advantages of the digital technology are i.e. better reproducibility, less interference and no wear, and that quality degradation can be avoided in a copying process. Further it is possible to include data about the contents of the stored program in a digital storage means, whereby it is easy to retrieve a desired item. The large amount of data required by a digital format has delayed the introduction of digital technology in the transmission and storage of video signals. In a conventional television transmission a new picture is updated 25 times per second, so that usually there are quite small differences between consecutive pictures. This characteristic has been used to develop picture compression methods aiming at a reduced amount of transmitted information, and yet maintaining a sufficiently good picture quality at the receiving end. A well-known picture compression method is presented in the MPEG standard (Moving Pictures Expert Group). The MPEG standard was designed so that it takes into account the human visual system (HVS). The aim in the compression phase is to remove all such information in the video signal that the eye can not detect in the viewing situation. In the compression method according to the MPEG standard the picture is divided into blocks. The block size is 8 x 8 pixels. A macro block comprises four blocks; in other words the macro block size is 16 x 16 pixels. In video signal processing we can utilize the fact that consecutive pictures generally do not differ very much. In predicted pictures we try to generate the picture with the aid of other pictures. Then it is not necessary to transmit the original picture instead of the predicted picture, but only motion vectors and the error in the predicted picture generated with these vectors. At the receiving end the picture generating decoder restores the predicted picture with the aid of the motion vectors. However, a new picture generated with the aid of motion vectors only does not necessarily correspond to the correct picture, because there could also have been other changes in the picture. This error is called the prediction error. In the MPEG standard the above mentioned macro block is the smallest unit which is processed with the motion vector. The MPEG standard defines three different picture types, namely: an internally encoded I-picture (Intra), a P-picture (Predicted) which is predicted from one picture, and a B-picture (Bi-directional) which is based on bi-directional prediction. Only data which is present in the actual picture is used for the encoding of I-pictures. In the decoding the I-pictures act as fixed points at which any accumulation of errors will stop, and the decoding can be started. A complete picture can be independently decoded only with the aid of I-pictures. The P-pictures are generated by prediction from a previous I- or P-picture. A P-picture is not an independent picture, but it contains the prediction error, and therefore the transmission of a P-picture requires less data than the transmission of an I-picture. The P-pictures are then used for the prediction of the next P- or B-pictures. Errors can accumulate in consecutive predicted pictures. Therefore I-pictures must be transmitted sufficiently often. The B-pictures based on bi-directional prediction use as reference both the previous and the next I-picture or P-picture. The video signal, or any data signal to be processed by the method, must be in a digital form so that the compression method according to the MPEG standard can be applied. A common color video signal comprises both luminance and chrominance information. When a video signal is digitized, both luminance and chrominance information is transformed separately, usually at a resolution of 8 bits. In several picture compression methods the digitized video signal is processed by a discrete cosine transform (DCT) before the video signal is transmitted on the transmission link. The DCT transformation is a type of the Fourier transformation which can be used to calculate the frequency spectrum of a periodic signal, in other words it can make a transformation from the time domain into the frequency domain. The term 'discrete' means in this context that discrete points instead of continuous functions are processed in the transformation. A two-dimensional transformation is required when the discrete cosine transform is used to compress an individual picture. The picture's width and height coordinates X and Y are used as variables instead of time. Moreover, the frequency is not the number of periods per second as usually, but the frequency represents e.g. the luminance gradient in the direction of the position coordinates X and Y. This is called the spatial frequency. The formula (1a) represents the DCT transformation and the formula (1b) the represents the inverse DCT transformation. where: C u = 1 / 2 , when u = 0 C v = 1 / 2 , when v = 0 else C u , C v = 1 S yx luminance or chrominance values, S vu frequency components of the DCT transformation, N size of the picture block to be transformed at a time. A picture surface containing numerous fine details will exhibit high spatial frequencies. For instance, parallel lines in the picture correspond to a frequency which is the higher the closer together they are. During the picture processing diagonal frequencies exceeding a certain limit can be quantized to a higher degree without perceptible degradation of the picture quality. In MPEG compression the DCT transformation is made by blocks, so that the block size is 8 x 8 pixels for the luminance signal, and for the chrominance signal an area of 16 x 16 pixels is used. The different block sizes are mainly due to the fact that the eye will better detect changes in the luminance than in the chrominance, so that an area of 2 x 2 pixels is encoded with the same chrominance value. When for instance luminance values are transformed into the DCT domain the pixel block to be transformed is represented by the luminance values and the horizontal and vertical spatial frequencies calculated with the aid of these values. Each frequency component is calculated using all values of the block to be transformed. Thus the elements of the frequency matrix obtained by the discrete cosine transform do not correspond to single pixels in the block to be transformed. In the frequency matrix the horizontal frequency components represent horizontal changes in the transformed block, and correspondingly the vertical frequency components represent vertical changes in the transformed block. The first element of the first row in the upper left comer of the matrix represents the zero frequency value of the picture block to be transformed, because it is proportional to the average value of the pixels in the block to be transformed. The frequency matrix elements ac(i,j) are quantized when the frequency matrix has been calculated, in other words after the DCT transformation the elements are put into suitable quantizing levels taking into account the human system of vision. Figure 4a shows an example of a quantizing matrix used in the quantization of an I-picture, and figure 4b shows an example of the quantizing matrix W(i,j) used in the quantization of P- and B-pictures. The quantization is made according to formula (2a). A similar quantizing matrix W(i,j) according to formula (2b) is used in the inverse transformation (iDCT) made at the receiving. On the basis of the quantizing matrices (figures 4a and 4b) and the formulas (2a) and (2b) we can see that fewer quantizing levels are used at higher frequencies and in the diagonal direction than at frequencies close to the zero frequency. This is particularly due to the fact that frequencies close to zero frequency and substantially horizontal and vertical frequencies are more important to the human system of vision than the higher diagonal frequencies. The variable mquant in the formulas (2a) and (2b) depends i.e. on the activity of the macro blocks and on the filling level of the data buffer used in the encoding. Thus the variable mquant can vary during the transmission of the video signal, but it does not influence the contents of the quantizing matrix. (2a) QAC ( i,j ) = ( 16· ac ( i , j ) 2· mquant · W ( i , j ) ) (2b) R ec ( i , j ) = 2· mquant · W ( i , j )· QAC ( i , j ) 16 When the video signal is compressed the picture quality will be somewhat degraded, mainly due to the quantization of the matrix in the DCT domain. The amount of quantization noise can vary in different parts of the picture and the quantization noise may be seen as jitter of details in the picture. A few methods were developed for the sharpening of an MPEG compressed picture. Conventional methods realized in the picture plane are mainly optimized for analog systems, in which the noise level is substantially lower and the noise distribution follows the Gaussian curve. In analog systems the noise does not either depend on the structure of the video signal, whereas the quantization in MPEG coimpression causes noise depending on the structure of the picture. The amplitude of the quanti-zation noise increases at the edge regions of details, thus strongly decreasing the local signal to noise ratio. Due to a low local signal to noise ratio conventional sharpening methods in the picture plane do not function properly, and they amplify quantization noise, particularly at the edge regions, so that the noise will become more obvious. The quantization effect also depends on the contents of the block to be encoded, whereby adjacent blocks can be quantized to a different degree, which can make the block edges visible. On the other hand, picture plane filtering which extends over the block boundaries will amplify the differences between the blocks, whereby the block edges will become visible. A well-known method for the sharpening of a picture is based on conventional spatial filtering, in which the filtering is made in the receiver after the decoding. The most commonly used filters are one- and two-dimensional filters. Figures 1a to 1c show some filter structures in use. The publication Kuge T: "Linear scaler quantizers design optimized to visual modulation transfer functions of HDTV coding", SIGNAL PROCESSING OF HDTV, VI. PROCEEDINGS OF THE INTERNATIONAL WORKSHOP ON HDTV 94, PROCEEDINGS OF THE INTERNATIONAL WORKSHOP ON SIGNAL PROCESSING OF HDTV, VI, TURIN, ITALY, 26-28 OCT. 1994, 1995, AMSTERDAM, NETHERLANDS, ELSEVIER, NETHERLANDS, PAGE(S) 201-209 XP002112095ISBN: 0-444-82283-6 discloses various aspects of selecting optimal quantization matrices for video compression and encoding. The patent US 5,295,077 to Hiroki Fukuoka discloses certain aspects of quantization table selection and scaling in digital electronic still cameras. The object of the present invention is to provide a method with which the sharpness of the picture can be increased without enhancing block edges. The invention is based on the idea that the n-dimensional quantizing matrix is processed by an n-dimensional transfer function matrix before processing the data signal. The transfer function matrix used in the processing is preferably formed so that: at least one transfer function is selected; the transfer function is given at least one fixed point in the n-dimensional transfer function matrix, and at least a part of the elements of the transfer function matrix are determined with the aid of the transfer function; and at least a part of the elements of the n-dimensional transfer function matrix are formed with the aid of at least one transfer function so that transfer function matrix elements which are at a predetermined distance from the fixed point are generated with the aid of a processing quantity dependent on the transfer function. In a preferred application of the invention an one-dimensional transfer function is formed using a discrete Fourier transform (DFT). A transfer function formed with a DFT transformation has preferably as many elements as there are columns in the transfer function matrix to be processed, but it is preferable to use a more accurate DFT transformation, e.g. with a 64-fold accuracy. The first element of the first row in the transfer function matrix is selected as the fixed point, and this element is given the value of the first element in the transfer function. The distance between each element of the transfer function matrix and the selected fixed point is calculated. The value of each element in the transfer function matrix is obtained with the aid of the calculated distance so that the transfer function element which most closely corresponds to the calculated distance is selected as the element of the transfer function matrix. When the distance is greater than the number of the transfer function elements, then for example the last element of the transfer function or some other suitable value is selected as the element of the transfer function matrix. The method according to this invention provides substantial advantages over presently known methods. The increased sharpness of details appearing in the picture is not substantially dependent on their spatial direction when the method according to the present invention is used. This intra-block method does not enhance the edges of the picture blocks. When the method according to the invention is applied in the decoder of a receiver the viewer must have a possibility to select different elements of the transfer function matrix. The invention is described in more detail below with reference to the enclosed figures, in which: figures 1a to 1c show prior art filters; figure 2 shows in a block diagram the simplified structure of an encoder based on the MPEG standard; figure 3 shows in a block diagram the simplified structure of a decoder based on the MPEG standard; figure 4a shows a quantizing matrix used in the encoding and decoding of I-pictures; figure 4b shows a quantizing matrix used in the encoding and decoding of P- and B-pictures; figure 5a shows an one-dimensional transfer function; figure 5b shows in a matrix form the elements of the transfer function matrix which were calculated with the aid of the transfer function of figure 5a; figure 5c shows in a 3-dimensional diagram the elements of the transfer function matrix according to figure 5b; and figure 5d shows the quantizing matrix of figure 4a, which is processed with the transfer function matrix according to figure 5b and used in the quantization and dequantization of I-pictures. The video signal video in to be transformed is supplied to the encoder 21 (ENCODER) shown in figure 2. In the encoder 21 the video signal video in according to the P- and B-pictures is subtracted from the signal MC out delivered by the motion compensator 22. The difference signal is supplied to the DCT transformer 23 (DCT). The I-pictures are supplied directly to the DCT transformer 23. At the output of the DCT transformer 23 we obtain a transformed signal ac(i,j), where i,j = 1...8, which is quantized in the quantizing means 24 according to the formula (1). The quantized signal QAC(i,j), where i,j = 1...8, is then supplied to a variable length encoder 25 VLC (Variable Length Coding), so that the low frequency components are transmitted first, e.g. in the following order: QAC(1,2), QAC(2,1), QAC(3,1), QAC(2,2), QAC(1,3), QAC(1,4), QAC(2,3), and so on. The zero frequency component is compressed by a separate DPCM encoding, which generates the difference between the zero frequency components of adjacent blocks. At the output of the variable length encoder 25 we obtain an encoded video signal VLC data , which is amplified and transmitted on the transmission path. The receiver has a decoder 31, which generates the reconstructed video signal from the encoded video signal. The encoded video signal VLC data is supplied to the decoder's 31 variable length encoder 32, which generates the quantized video signal QAC(i,j). The quantized video signal QAC(i,j) is supplied to a dequantizing means 33, at the output of which we get the DCT transformed signal Rec(i,j). The signal Rec(i,j) in DCT-form is processed by an inverse DCT transformation in the inverse DCT-transformer 34. The inverse-DCT transformed signal is also used for motion compensation, and only then the decoder output provides a signal video out , which substantially corresponds to the original video signal. The method according to the invention is preferably put into practice so that we design a suitable one-dimensional transfer function H(k) in the DFT domain, where k = 1...N; and N is preferably a multiple of the number of columns in the quantizing matrix. When a suitable transfer function H(k) has been designed, then with the aid of the transfer function H(k) we form a transfer function matrix P(i,j), where i,j = 1...M, and where each element corresponds to the equivalent elements of the quantizing matrix W(i,j); where i,j = 1...M. The quantizing matrix W(i,j) of the decoder, which can be located e.g. in the receiver, is processed with the transfer function matrix P(i,j). Preferably M is 8 and N is e.g. 64*8 = 512, when applied to a video signal according to the MPEG standard. In the most preferred application of this invention the size of the transfer function matrix is selected as M = 8; the number of elements in the transfer function H(k) is selected as 512, or N = 64 * 8; and the first element P(1,1) on the first row of the transfer function matrix is selected as the fixed point. Then the selected fixed point gets the value of the first element H(1) of the transfer function, because the distance is 0. The point H(65) corresponds to the distance 1, H(129) corresponds to the distance 2, and so on. Then the distance d(x,y) of each element P(x,y), x,y = 1 ... 8, in the transfer function matrix is calculated by the formula: (3) d ( x , y )= ( x - 1) 2 + ( y -1) 2 (4) d ( x,y ) = 2 ·M-d ( x , y ) We obtain the element of the transfer function matrix with the aid of the transfer function H(k) on the basis of the distance d(x,y) so that we select that transfer function element which is closest to the calculated distance d(x,y). For instance, according to formula (3) the distance between the matrix element W(2,3) and the quantizing matrix element W(1,1) is 5 or about 143/64. Thus we obtain as the transfer function matrix element the 144th element H(144) of the transfer function. When the distance is greater than 8 we preferably utilize the symmetry of the DFT transformation when we select the transfer function matrix element, whereby we select as the value of the transfer function matrix that element, which is closest to the value d'(x,y) calculated from the transfer function according to formula (4). When all elements in the transfer function matrix have been calculated, the elements of the quantizing matrix W(i,j) are processed by multiplying each element of the quantizing matrix W(i.j) by the corresponding element of the transfer function matrix P(i,j). The elements of the transfer function matrix according to the above example are calculated in figure 5b, and figure 5c illustrates the transfer function matrix elements according to figure 5b in a three-dimensional diagram. The figure 5d further shows the matrix used for the quantization and dequantization of the I-pictures of figure 4a, whereby the matrix was processed by the method according to the invention. The processing of the quantizing matrix may be performed either in the encoder or in the decoder. If the processing is made in the encoder the video signal sender can control the processing of the video signal. In the encoder the transfer function matrix P(i,j) according to the invention is preferably combined with the quantizing means shown in figure 2, where also the data signal processing is made. When the processing is made in the decoder of the receiver, then it is possible to provide the decoder with several quantizing matrices processed by different elements of the transfer function matrix so that the viewer can select a desired quantizing matrix. The viewer is also able to switch off the processing. In the receiver the transfer function matrix P(i,j) according to the invention is preferably combined with the decoder's dequantizing means 33 shown in figure 3, where also the data signal processing is made. It is also possible to apply the method according to the invention so that we select a suitable one-dimensional transfer function H(k), where k = 1...M. The elements on the first row in the transfer function matrix P(i,j) are processed by the corresponding elements of the transfer function, in other words the element P(1.1) of the transfer function matrix is multiplied by the first element H(1) of the transfer function, the second element P(1,2) on the first row in the transfer function matrix is multiplied by the second element H(2) of the transfer function. and so on. The elements of other rows are multiplied in a corresponding way. Then the calculation is correspondingly made by columns, so that the columns of the transfer function matrix are processed by the same transfer function so that the first element P(1.1) of the first column is multiplied by the first element H(1) of the transfer function, and so on. The method according to the present invention is not only limited to a video signal according to the MPEG standard, but the method is also applicable to other data signals, which with a suitable transformation can be brought into a matrix form. The size of the processed matrix is not limited to the size 8 x 8, but it could also be smaller or larger than this. In the method according to the present invention the transfer function can also depend on several variables, such as on the direction of the processed element in relation to the fixed point. The invention is also applicable to the processing of signals in an n-dimensional matrix form, where n > 2. The invention is further applicable so that each element of the formed transfer function matrix P(i,j) is processed by the same weighting factor Z. The processing is preferably made so that each element of the transfer function matrix P(i,j) is multiplied by the same weighting factor Z. Particularly when this is realized in the receiver the magnitude of the effect of the transfer function matrix can be controlled with the aid of the weighting factor in order to obtain a result which is the most suitable for the viewer. Then the processing is preferably made so that one transfer function matrix P(i,j) and one or more weighting factors Z are combined with the receiver's dequantizing means 33, whereby the factors can also be adjustable.

Claims: A method for processing a data signal in which an n-dimensional coefficient matrix represents the frequency content of a discrete piece of data and n is an integer greater than or equal to two, the method comprising the step of: processing the coefficient matrix by an n-dimensional quantization matrix; characterized in that the method comprises additionally the steps of: selecting a one-dimensional transfer function that is represented by a finite string of discrete values, associating one of the values of the transfer function with a fixed point in an n-dimensional transfer function matrix, thus making said one of the values of the transfer function to appear as the element at said fixed point in said transfer function matrix, selecting for each element of the transfer function matrix a value of the transfer function by determining the distance of said element from said fixed point and selecting for that element a value of the transfer function so that the location of the selected value in said finite string of discrete values corresponds to the determined distance, and multiplying each element of a predefined quantization matrix by a corresponding element of said transfer function matrix, thus obtaining a processed quantization matrix; so that the step of processing the coefficient matrix involves processing the coefficient matrix by the processed quantization matrix. A method according to claim 1, characterized in that the element of the first row and first column in the transfer function matrix is selected as said fixed point. A method according to claim 2, characterized in that the value to be associated with said fixed point is the first value in said finite string of discrete values. A method according to claim 1, characterized in that the value of n is two. A method according to claim 1, characterized in that the step of processing the coefficient matrix by the processed quantization matrix is performed in a transmitting arrangement before transmitting the data signal. A method according to claim 1, characterized in that the step of processing the coefficient matrix by the processed quantization matrix is performed in a receiving arrangement after receiving the data signal. A method according to claim 6, characterized in that in addition to said transfer function matrix a weighting factor is used in obtaining said processed quantization matrix, and the method comprises the step of selecting a transfer function matrix and a weighting factor to be used. A device for processing a data signal in which an n-dimensional coefficient matrix represents the frequency content of a discrete piece of data and n is an integer greater than or equal to two, the device comprising: means (24, 33) for storing an n-dimensional quantization matrix and means (24, 33) for processing a coefficient matrix by a stored quantization matrix; characterized in that the device additionally comprises: means (24, 33) for providing an n-dimensional transfer function matrix by selecting a one-dimensional transfer function that is represented by a finite string of discrete values, associating one of the values of the transfer function with a fixed point in said n-dimensional transfer function matrix, thus making said one of the values of the transfer function to appear as the element at said fixed point in said transfer function matrix, and selecting for each element of the transfer function matrix a value of the transfer function by determining the distance of said element from said fixed point and selecting for that element a value of the transfer function so that the location of the selected value in said finite string of discrete values corresponds to the determined distance, and means (24, 33) for multiplying each element of a predefined quantization matrix by a corresponding element of said transfer function matrix, thus obtaining a processed quantization matrix; so that the means (24, 33) for processing the coefficient matrix are arranged to process the coefficient matrix by the processed quantization matrix. A device according to claim 8, characterized in that at least one transfer function matrix is stored in the device, and the device further comprises: means (24, 33) for storing a weighting factor and means (24, 33) for selecting a stored transfer function matrix and a stored weighting factor for use in obtaining said processed quantization matrix. A device according to claim 8, characterized in that it is located in an encoder (21) to be used for transmitting the data signal. A device according to claim 8, characterized in that it is located in a decoder (31) to be used for receiving the data signal.

Inventors: VEHVILAEINEN MARKKU, VEHVILAEINEN, MARKKU, Vehviläinen, Markku
Applicants: NOKIA TECHNOLOGY GMBH
Application year: 1996
Main classification: H04N7
IPC codes: H04N7, G06T5