The present invention relates to motion vector detecting and, more particularly, to adaptive motion vector detecting.
Motion vector detecting is employed in an MPEG system, which was developed in accordance with standards established by the Motion Picture Experts Group (MPEG). The MPEG system provides encoding and decoding of a high-definition television broadcast which minimizes the amount of transmitted data. Motion vectors designate the direction and magnitude of change of an image block comprising part of an individual frame in the television broadcast. By defining all image blocks of the frame in terms of motion vectors instead of individual pixels, the MPEG system can reduce the amount of data required to be broadcast. Such a system is known as interframe predictive encoding system because the motion vectors are employed to determine differences between different frames.
As shown in FIG. 8, a predictive encoding apparatus receives a current frame of a television picture at input 100. The current frame is forwarded to both a motion vector detecting circuit 101 and a subtractor 102. The motion vector detecting circuit extracts the motion vectors from the current frame and supplies them to the motion compensating circuit 103. The motion compensating circuit, then, performs motion compensation on the previous frame stored in the frame memory 104 to obtain a motion compensated reference frame. The subtractor, then, subtracts the current frame from the reference frame to obtain difference data. The difference data is compressed by a discrete cosine transform (DCT) circuit 106, quantized by the quantizer 107, and forwarded for broadcast from output 108.
The predictive encoding apparatus transforms the current frame into the previous frame stored in the frame memory by performing the above-described steps in reverse and storing the result in the frame memory 104. Thus, the quantized difference data is decoded by an inverse quantizer 109 and an inverse DCT circuit 110. The adder 105 adds the decoded difference data to the reference frame generated by the motion compensating circuit, thus, regenerating the current frame. The current frame is, then, stored in the frame memory and becomes the previous frame when the subsequent frame is received at input 100. In this manner, each of the frames comprising the television broadcast are predictively encoded and forwarded for broadcast through output 108.
A problem exists, however, that the motion vector detecting circuit 101 may generate an erroneous motion vector. Normally, the motion vector detecting circuit generates a motion vector employing a fixed block matching method. A check block is moved within a predetermined vector search range and a block that is most matched with a reference block of the current frame is detected. The motion vector is calculated by comparing the reference block to the matched block and this motion vector then is forwarded to the motion compensating circuit 103. An erroneous motion vector is generated when the check block may be matched to the wrong reference block.
A better understanding of the problem can be ascertained by way of an example explained with reference to FIGS. 9, 10 and 11A to 11C. In FIG. 9, the reference block 152 of Mxc3x97N pixels is disposed within the reference frame 150. A search frame 151 (i.e., subsequent frame) is received and the motion vector detecting circuit begins the block matching method. A border 153 is xe2x80x9cmovedxe2x80x9d within a vector search range, the pixels within the border at each position making up the check block. Thus, the check block 153 of Mxc3x97N pixels is xe2x80x9cmovedxe2x80x9d within the vector search range 154 until a satisfactory match between the check block 153 and the reference block 152 is determined. The motion vector detecting circuit, then, executes an arithmetic operation on the basis of the differences between the matched check block and the reference block to obtain a motion vector. The motion vector has a magnitude (hereinafter referred to as the residual difference) which is the mathematical absolute value sum of the minimum difference between the pixel values at the same position in both the reference block and the check block. In the alternative, the residual difference may be calculated as a square sum of the differences of the pixel values. A unit direction of the motion vector is also generated by the motion vector detecting circuit, thus complementing the residual difference value.
The block matching method will be explained in detail with reference to FIGS. 10 and 11A to 11C. To reduce the burden on the arithmetic processor, the motion vector detector performs subsampling of the reference block and the check block. FIG. 10, for example, depicts sampling the four hatched pixels of a 4xc3x974 block (i.e., sixteen pixel block), thus performing fixed sampling at a 4:1 ratio. The reference block of FIG. 11A and the check block of FIG. 11B are sampled in the same manner as the block in FIG. 10. Then, the check block is moved within the vector search range (FIG. 9) until the four sampled pixels of the check block match the four pixels in the reference frame. This block matching method works well only when the reference block is significantly similar to the search area making up the check block as shown in FIGS. 11A and 11B.
However, when the search block making up the check block has a very different pattern as, for example, shown by FIG. 11C, the motion vector detector may erroneously match the wrong block of the search area to the reference block. Since all of the pixels have a value of xe2x80x9c1xe2x80x9d in the example of FIG. 11C, the check block will be matched to the reference block in any number of different positions in the search area. Thus, the motion vector detecting circuit 101 may generate an erroneous motion vector, resulting in a distorted television broadcast.
An object of the invention, therefore, is to eliminate a mismatch between the check block and the reference block. A further object of the invention is to increase the signal-to-noise ratio of the television broadcast.
An even further object of the invention is to provide an apparatus and method for adaptively detecting motion vectors.
In accordance with the above objectives, a first embodiment of the present invention provides an adaptive motion vector detecting apparatus and method for adaptively selecting pixels employed in detecting motion vectors between a first frame and a second frame of a video broadcast. The first frame includes a reference block of pixels and the second frame includes a check block of pixels. An analyzing circuit adaptively determines positions of a first subset of pixel values in the reference block from a variable feature of the reference block. A selecting circuit samples the first subset of pixel values in the reference block and a second subset of pixel values in the check block at the positions determined by the analyzing circuit.
In a second embodiment, a dividing circuit divides the reference and check blocks into sets of sub reference blocks and sub check blocks. An analyzing circuit adaptively determines a set of positions of a first subset of pixel values for each sub reference block, each set of positions being determined from a variable feature in each sub reference block. A selecting circuit samples a respective sub reference block and one of the sub check blocks at the set of positions determined for the respective sub reference block.
USPTO Backgrounds
USPTO Backgrounds