Abstract:
An apparatus and method for post processing image data which previously was encoded using a discrete cosine transform in order to remove resulting blocking effects. Possible blocking points are examined to determine whether blocking points exist. If blocking points are determined, an adjustment value for each blocking point is computed and proportionately utilized to adjust the adjacent and neighboring pixels.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to the removal of blocking effects in images previously compressed and decompressed. More particularly, the present invention relates to the removal of blocking effects in images compressed in accordance with MPEG, JPEG and other DCT based image coding formats. 
     2. Art Background 
     The need to compress digital image data, whether static or dynamic (i.e., video images) images has dramatically increased. One reason is the dramatic popularity of multimedia computer systems and software. Another reason is switch to digital broadcasts of station programming. One example of the latter is direct satellite broadcasts, such as DSS™. In order to minimize the bandwidth required to transmit broadcasts of programs or to minimize the amount of storage space required to store certain images, compression techniques are utilized. Thus, the image data is transmitted or stored in a compressed format and prior to the display of the image, the image data is decompressed. Examples of widely utilized compression algorithms are those that comply with the MPEG (Moving Pictures Experts Group) and JPEG (Joint Picture Experts Group) standards. 
     Many compression processes, including those that comply with MPEG or JPEG standards, utilize transform coding. In a transform coding process, an image is divided into small blocks. The transform of each block is taken, the coefficients of which are quantized in accordance with a determined quantization factor q. The most popular transform is the discrete cosine transform (DCT). 
     However, one negative effect of the process is referred to as the &#34;blocking effect&#34;. By dividing the image into blocks prior to encoding, discontinuities (referred to as blocking effects) between adjacent blocks occurs. This is represented in a displayed decompressed image by clear jumps between colors or greyscales as opposed to a smooth change. 
     Pre-processing and post-processing techniques are utilized to minimize blocking effects. Pre-processing techniques dictate that the originator of the image data must perform certain steps to minimize blocking effects. Post-processing techniques, although logistically better as the correction is performed after decompression, has its problems. For example, one of the simplest techniques is to process the decompressed image data through a low pass filter. Although the blocking effects are decreased, the sharpness of the displayed image is negatively affected. 
     SUMMARY OF THE INVENTION 
     In the method and circuit of the present invention post processing is performed on decompressed image data to detect and minimize blocking effects without affecting the sharpness of the image. 
     First pixels subject to blocking errors are detected. Preferably the difference in pixel values (e.g., luminance) between neighboring pixels is examined to determine whether the difference value is within a range identified to be a blocking errors. Once a blocking error is detected, adjustment terms are added to the pixels detected and neighboring pixels in the image. The amount of adjustment is proportional to the number of pixels away from where blocking has been detected. The resulting image exhibits minimal blocking effects while maintaining a consistent sharp image. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The objects, features and advantages of the present invention will be apparent to one skilled in the art in light of the following detailed description in which: 
     FIG. 1 is a simplified block diagram of a system that operates in accordance with the teachings of the present invention. 
     FIG. 2 is a simplified flow diagram depicting the process for minimizing blocking effects. 
     FIG. 3 is a diagram illustrating blocks and block boundaries in a digital image. 
     FIG. 4 is a flow diagram illustrating one embodiment process to be performed on a block by block basis. 
     FIG. 5a is a simplified block diagram of a circuit that performs a process for minimizing blocking effects, and FIG. 5b is a simplified block diagram of an illustrative processor system which performs the steps to reduce blocking effects in accordance with the teachings of the present invention. 
     FIG. 6a and FIG. 6b illustrate the process for a single row accross a single boundary and the result achieved. 
    
    
     DETAILED DESCRIPTION 
     The present invention provides a simple but effective apparatus and method for minimizing blocking effects that occur in discrete transformed images. In the following description, for purposes of explanation, numerous details are set forth, in order to provide a thorough understanding of the present invention. However, it will be apparent to one skilled in the art that these specific details are not required in order to practice the present invention. In other instances, well known electrical structures and circuits are shown in block diagram form in order not to obscure the present invention unnecessarily. 
     A simplified block diagram of an exemplary system that operates in accordance with the teachings of the present invention is illustrated in FIG. 1. To minimize on transmission bandwidth and/or to save on the amount of space required to store an image, the image is frequently formatted in a compressed form which utilizes discrete transforms. Popular examples of formats include those that comply with the JPEG Joint Picture Experts Group) and MPEG (Motion Picture Experts Group) standards. The system illustrated includes the receiver/display system 10 and display 40. One example of a receiver/display system 10 is a Video CD player. Another example is a direct satellite receiver such as one manufactured by Sony Corporation. Other types of receivers/players/storage/display systems are also contemplated. 
     The receiver 10 receives the compressed image. The receiver may be one of many types of receiving devices configured to receive image data. Alternately, the receiver may be one to receive television broadcast signals or a device coupled to directly to a storage unit (e.g., memory, VCR, CD ROM or the like) to receive images retrieved from storage. For purposes of explanation, the image data is received in a format compatible with the MPEG specification; however, the other types of compressed formats that use discrete transforms to compress the data can also be used. 
     Once the image data is received, the data is decoded on a block by block basis (i.e., decompressed) by decoder 20 and processed by post-processor 30 in order to remove blocking effects created by the encoding and decoding processes. The modified image data subsequently displayed by display subsystem 40 shows an image in which the blocking effects are minimized. 
     The process performed by post-processor 30 is generally described with reference to FIG. 2. In the present invention, the adjacent pixels at each boundary point around the block are examined to determine if a blocking point exists between the pixels, step 200. If a blocking point is identified, an adjustment value is determined and applied to the pixels, step 220. This adjustment value is applied to the adjacent and neighboring pixels in a graduated or manner proportional to the distance from the blocking point. By adjusting not only the adjacent pixels, but also the neighboring pixels, the adjustment result in a smoother image in the areas surrounding block boundaries. 
     The detection process can be applied to each pair of adjacent pixels in the image, for example on a column by column or row by row basis. Preferably, to minimize processing time, while maintaining effectiveness, the pixels adjacent to block boundaries are examined. This is best illustrated with reference to FIG. 3. As noted earlier, the image 300 is divided into blocks (e.g., blocks 305, 310, 320, 330) and the DCT and quantization process are applied to each block of pixels. The blocking effects occur at the blocking boundaries (e.g., block boundaries 340, 345, 350, 355 of block 330). For example, if a vertical boundary 345 is examined, the pixels in the rows affected, the adjacent pixels on both sides of the blocking boundary in rows 351-358 are examined to determine if a blocking point exists and the adjustments are performed on the adjacent and predetermined neighboring pixels in the corresponding row. Similarly, if a horizontal boundary 340 is examined, the adjacent pixels in the columns 361-368 are examined to determine the existence of blocking points and the adjacent and neighboring pixels in those columns are adjusted. 
     One embodiment of the process for detecting and minimizing blocking effects is described with reference to FIG. 4. As noted earlier, the difference between adjacent pixels (blocking step) at each block boundary is compared to a pre-specified range of values indicative of a boundary point. 
     The upper and lower limits of the range of values indicative of a blocking point can be determined a variety of ways. Preferably the upper and lower limits are selected such that normal minor image variations between pixels are not detected as blocking points and significant image variations, for example indicative of different objects in the image itself, are not detected as blocking points. The upper and lower limits can be pre-specified values empirically determined. Other ways for determining the upper and lower limits are also contemplated. For example, the values can be dynamically determined. However, it is preferred that the lower limit value be the local variance for the neighborhood of pixels. 
     At step 400, the local variance of the neighborhood around the block is determined. Preferably, the local variance is determined for each potential location of a blocking point. The size of the neighborhood (i.e., the number of pixels) and the location of the pixels examined can vary. In the present example, if a vertical boundary is examined, the portion of a row utilized to determine a particular potential vertical boundary point contains the following pixels: 
     
         x+4 x+5 x+6 x+7 | x+8 x+9 x+10 x+11 
    
     (where | represents the location of the boundary point) 
     The local variance of a neighborhood of pixels can be defined a variety of ways. In the present embodiment the local variance is determined as the average of the summation of the absolute values of the difference between luminance values of adjacent pixels of neighborhood used. In the present example, the neighborhood is composed of 6 pixels (i+5, i+6, i+7, i+8, i+9, i+10); therefore the following equation is used: 
     
         local variance=abs (p[i+6][ ]-p[i+5][ ])+abs (p[i+7][ ]-p[i+6][ ]+abs (p[i+9][ ]-p[i+8][ ])+abs(p[i+10][ ]-p[i+9][ ])/4 
    
     where abs represents an absolute value function and p[ ][ ] represents pixel data. 
     The upper limit value of can similarly be determined a variety of ways. However, in the present embodiment a predetermined, empirically determined value is used. This value is chosen to reflect a possible error that is larger than an error that can be caused by the quantizing of the block during the coding process. For example in the present embodiment a value of 32 is used. 
     Once the local variance is determined and therefore the range of values indicative of a blocking point are identified, the blocking step between pixels adjacent to the block boundary is determined, step 410. Continuing with the above example, the difference between pixels x+7 and x+8 is determined. Preferably, the difference value is composed of the difference between the luminance components in each pixel, although other components of the image data can be used. 
     At step 420, the blocking step is compared to the range of values to determine whether a blocking point exists. If a blocking point exists, the adjustment value is determined, step 430. 
     The adjustment value can be determined a variety of ways. The value is chosen to minimize or eliminate the detected blocking point. Preferably, the adjustment value is determined such that the step on the blocking point (i.e., at the blocking point) will be adjusted to the local variance in the corresponding region or neighborhood. Continuing with the present example, if the blocking step is greater than zero, the adjustment value is equal to the difference of the blocking step and the local variance (adjustment --  value=blocking --  step-local variance); otherwise the adjustment value is equal to the sum of the blocking step and local variance (adjustment --  value=blocking --  step+local --  variance). 
     Once the adjustment value is determined it is added to the appropriate pixels to minimize or eliminate the blocking effect. Preferably proportionate amounts of the adjustment value is added to the pixels adjacent to the detected blocking point and neighboring pixels. The number of neighboring pixels and the proportionate amounts added can vary. However, it is preferred that the following pixels and proportionate amounts of the adjustment value be used to minimize the blocking effect: 
     p&#39;[i+8][ ]=p[i+8][ ]-adjustment --  value/2 
     p&#39;[i+7][ ]=p[i+7][ ]+adjustment --  value/2 
     p&#39;[i+9][ ]=p[i+9][ ]-adjustment --  value/4 
     p&#39;[i+6][ ]=p[i+6][ ]+adjustment --  value/4 
     p&#39;[i+10][ ]=p[i+10][ ]-adjustment --  value/8 
     p&#39;[i+5][ ]=p[i+5][ ]+adjustment --  value/8 
     p&#39;[i+11][ ]=p[i+11][ ]-adjustment --  value/16 
     p&#39;[i+4][ ]=p[i+4][ ]+adjustment --  value/16 
     As can be seen by the above, the present example adjusts the two adjacent pixels and six neighboring pixels. The fraction of the adjustment value added is proportionate to the distance from the blocking point. To simplify the circuitry used to implement this functionality, fractional amounts corresponding to powers of 2 are used. However it is readily apparent that other fractional amounts and percentages can be used to gain the desired effect. 
     A circuit implementation is illustrated by the block diagram of FIG. 5a. FIG. 5a represents one implementation; it is readily apparent that the present invention can be implemented in a dedicated microcontroller circuit, in logic circuitry or as software operable on a general purpose computer. Referring to FIG. 5a, the blocking image is input to local variance block 505 and calculation of blocking step block 510. The local variance block determines the local variance for use as a lower threshold as described above. Block 510 calculates the blocking step using the blocking image as input. Block 515 determines, using the blocking step, local variance and upper bound as inputs, whether a blocking point occurs. If a blocking point occurs, blocks 520, 525 calculate the adjustment, using the blocking image and identification of the blocking point as inputs and adjusts the neighboring pixels accordingly to generate the adjusted image through multiplexing block 530. If a blocking point does not occur, the original image (blocking image) is output. 
     A simplified block diagram of a processor system upon which this can be implemented is illustrated in FIG. 5b. The blocking image is received through input port circuitry 540 which forwards the blocking image to processor 545. Processor 545 includes a central processing unit 550 which executes instructions from the memory 555 to perform the steps described above to reduce blocking effects. 
     The advantages of the present invention are readily seen by the following example set forth in FIGS. 6a and 6b which illustrate the process for a single row across a block boundary. The process is preferably performed for each row and column affected by the block boundaries. 
     The invention has been described in conjunction with the preferred embodiment. It is evident that numerous alternatives, modifications, variations and uses will be apparent to those skilled in the art in light of the foregoing description.