1. Field of the Invention
The present invention generally relates to motion compensation, and more particularly to a method of occlusion handling adaptable to frame rate up conversion (FRUC).
2. Description of Related Art
Frame rate up conversion (FRUC) is commonly used in a digital image display such as digital TV to generate one or more intermediate frames between two original adjacent frames, such that the display frame rate may be increased, for example, from 60 Hz to 120 Hz or 240 Hz. The generation of the intermediate frame is typically performed by using an interpolation of motion compensation technique.
However, some area in the video frame may turn out not to exist in the previous frame or the current frame. The interpolation based on nonexistent pixels or blocks may thus result in error. Shown in
For the reason that conventional motion compensation usually suffers from distortion due to occlusion effect, a need has arisen to propose a novel scheme in order to effectively and correctly handle the occlusion effect.
In view of the foregoing, it is an object of the embodiment of the present invention to provide a method of occlusion handling that may determine and then correct occlusion regions in order to correctly perform motion compensation.
According to one embodiment of the present invention, a reference frame and a current frame are first provided, and at least one foreground object is determined. At least a covered region or an uncovered region with respect to the foreground object is determined. The covered region is then interpolated exclusively accordingly to the current frame, or the uncovered region is interpolated exclusively according to the reference frame. The embodiment may further include a step of correcting the motion vector of the covered or the uncovered region. Specifically, at least one macroblock (MB) of the current frame is inversely mapped to the interpolated frame. At least two inverse-mapped MBs in the interpolated frame closest to the interpolated MB are selected as candidates. Among the candidates, the MB that has a motion vector (MV) substantially consistent with the MVs of the MBs adjacent to the interpolated MB is selected as the MV of interpolated MB.
In step 21, a previous frame (which is usually called a reference frame) and a current frame are first provided, such that a new frame may be generated between the previous frame and the current frame by use of an interpolation technique. Generally speaking, a frame at time N and a frame at time N+2 are provided, such that an interpolated frame may be generated at time N+1 by motion estimation and motion compensation. The motion estimation and motion compensation may be either pixel-based or block-based. Regarding the block-based motion estimation and motion compensation, each frame is divided into non-overlapping rectangular regions called macroblocks (MBs). Each of the MBs may have a size of, for example, 4×4 or 16×16. The block-based motion estimation is disclosed in a co-pending U.S. patent application No. 12/756,459, filed Apr. 8, 2010, Cheng et al., entitled “Method of block-based motion estimation,” assigned to the same assignee, the disclosure of which is hereby incorporated by reference.
Subsequently, in step 22, at least one foreground object is determined or detected. As the foreground object commonly moves faster than the background, that is, the motion vector (MV) of the foreground is commonly greater than the MV of the background, the foreground object is accordingly determined in the embodiment as the object that has a greater motion vector.
Exemplified in
In step 23, at least a covered region and an uncovered region adjacent to a foreground object are determined. In the embodiment, a region located toward a direction opposite to the moving direction of the foreground object is determined as the covered region. On the other hand, a region located toward a direction the same as the moving direction of the foreground object is determined as the uncovered region.
Afterwards, in step 24, the covered region (e.g., the region 32 in
It is noted that the motion vector (MV) of the covered/uncovered region may be error-prone due to the moving foreground object. In order to resolve this problem, the erroneous MV of the covered/uncovered region may be corrected before the covered/uncovered region is to be or being interpolated. With respect to the block-based motion estimation method disclosed in the aforementioned co-pending U.S. patent application, entitled “Method of block-based motion estimation,” during inversely mapping the MBs of the current frame back to the interpolated frame, at least two MBs in the interpolated frame closest to the interpolated MB are selected as candidates. Among the candidates, the MB that has the MV substantially consistent with the MVs of the macroblocks adjacent to (e.g., left and top of) the interpolated MB is finally selected as the motion vector of interpolated MB.
Although specific embodiments have been illustrated and described, it will be appreciated by those skilled in the art that various modifications may be made without departing from the scope of the present invention, which is intended to be limited solely by the appended claims.