The present invention relates to a video processing scheme, and more particularly, to a video processing method and related device for determining a target motion vector.
Generally speaking, for generating interpolated frames to comply with the frame rate of video display, it is necessary to compensate motion in original frames. Motion vectors are estimated by a motion estimator and fed to a motion compensated frame interpolator such as a motion judder canceller (MJC) for interpolated frame generation. In a case of neighboring blocks containing a boundary of objects moving in different direction or with different speed, the visual quality of the interpolated frame derived based on the motion vectors may be unsatisfied. The image quality of the interpolated frames can be improved by post-processing the motion vectors before providing to the motion compensated frame interpolator.
U.S. Pat. No. 5,699,499 discloses a motion vector post-processing scheme for preventing deterioration of the visual quality of interpolated pictures. The motion vector post-processing scheme utilizes a magnitude calculator and an order statistics filter to process the motion vectors. Specifically, magnitudes of motion vectors of a noted block and blocks adjacent thereto are obtained. The value of the motion vector of the noted block is substituted with a motion vector less than a magnitude at the center in the increasing order of magnitudes of the motion vectors.
One of the objectives of the present invention is to provide a video processing method and related device for determining a target motion vector to improve the visual quality of the interpolated frames especially at moving object boundaries.
According to an embodiment of the claimed invention, a video processing method for determining a target motion vector of a target image block is disclosed. The video processing method comprises steps of the following: selecting a specific directional group from a plurality of directional groups by comparing penalty or likelihood of directions specified by the directional groups, wherein the penalty or likelihood of a direction is calculated by comparing a candidate motion vector of the target image block with a motion vector of each neighboring image block in the corresponding directional group, and each of the directional groups is configured to include the target image block and at least a neighboring image block; and determining the target motion vector according to the candidate motion vector of the target image block and a motion vector of each neighboring image block in the specific directional group.
According to an embodiment of the claimed invention, a video processing device for determining a target motion vector of a target image block is further disclosed The video processing method comprises a selecting unit and a determining unit. The selecting unit is used for selecting a specific directional group from a plurality of directional groups by comparing penalty or likelihood of directions specified by the directional groups, wherein the penalty or likelihood of a direction is calculated by comparing a candidate motion vector of the target image block with a motion vector of each neighboring image block in the corresponding directional group, and each of the directional groups is configured to include the target image block and at least a neighboring image block. The determining unit is coupled to the selecting unit and used for determining the target motion vector according to the candidate motion vector of the target image block and a motion vector of each neighboring image block in the specific directional group.
According to an embodiment of the claimed invention, a video processing method for determining a target motion vector of a target image block, comprising steps of the following: selecting the target image block and at least a neighboring image block to form a specific directional group by comparing penalty or likelihood of a candidate motion vector of the target image block with a motion vector of neighboring image blocks; determining the target motion vector according to the candidate motion vector of the target image block and a motion vector of each neighboring image block in the specific directional group; and generating an interpolated frame based on the determined target motion vector.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Certain terms are used throughout the description and following claims to refer to particular components. As one skilled in the art will appreciate, electronic equipment manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. In the following description and in the claims, the terms “include” and “comprise” are used in an open-ended fashion, and thus should be interpreted to mean “include, but not limited to . . . ”. Also, the term “couple” is intended to mean either an indirect or direct electrical connection. Accordingly, if one device is coupled to another device, that connection may be through a direct electrical connection, or through an indirect electrical connection via other devices and connections.
In some other embodiments, the penalty of each direction is calculated by the following formula:
S
n
=abs(MVA.x−MVC.x)+abs(MVA.y−MVC.y)+abs(MVB.x−MVC.x)+abs(MVB.y−MVC.y);
Where MVC is the motion vector of the target image block, MVA and MVB are the motion vectors of two neighboring blocks, and x and y are horizontal and vertical components of the motion vector respectively.
After the selecting unit 2151 selects the specific directional group, the determining unit 2153 determines the target motion vector of the target image block (e.g. B5). A simple example for determining the target motion vector of the image block B5 is to determine the target motion vector by a median value of motion vectors of image blocks in the specific directional group; in other words, the determining unit 2153 is considered as a median filter. An advantage of using the median value is to avoid selecting an erroneous or outlying motion vector in the specific directional group as the target motion vector of the image block B5. For an example of the directional group D1 as the specific directional group, if the candidate motion vector of the image block B5 or one of the motion vectors of the image blocks B3 and B7 is substantially different from the others, a better image quality can still be ensured by taking a median value of the motion vectors of the image blocks in the directional group as the target motion vector of the image block B5. Additionally, the determining unit 2153 can also determine the target motion vector as a result of the law of large numbers according to motion vectors of image blocks in the specific directional group. That is, the determining unit 2153 takes a motion vector that occupies a bigger part of the motion vectors of the image blocks in the specific directional group as the target motion vector. Furthermore, in another embodiment, the determining unit 2153 can generate the target motion vector by calculating a vector average of the motion vectors of the image blocks in the specific directional group. In other words, for the above-described example, instead of using the median value, the determining unit 2153 utilizes a vector average of the motion vectors in the specific directional group as the target motion vector; this also aids in obtaining a preferred target motion vector. Of course, using the above-mentioned directional groups is not intended to be a limitation of the present invention. Any modification regarding directional groups should fall within the scope of the present invention. For example,
In addition, the image area A1 is not limited to being a 3*3 image area including the image blocks B1-B9; for example, in other embodiments, the image area A1 can be a 4*4 image area including sixteen image blocks or any image areas having different numbers of image blocks.
Additionally, in other embodiments, for each directional group, some neighboring image blocks are not immediately adjacent to the target image block.
By using the image area A2 or A3, the image quality may be further improved since an image area distributed over a broader range can prevent the image quality from being influenced by erroneous motion vectors of some closely gathered image blocks. Similarly, generating a target motion vector by deriving a median or an average of the motion vectors selected in the image area A2 or A3 may improve image quality of interpolated frames. This also obeys the spirit of the present invention.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention.