This application claims the priority benefit of Taiwan application serial no. 100143592, filed on Nov. 28, 2011. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of this specification.
1. Field of the Invention
The present invention generally relates to a motion interpolation technology, in particular, to a motion vector refining device for dynamically refining a motion vector and a video refining method thereof.
2. Description of Related Art
Currently, manners for displaying a video on a display apparatus may be roughly classified into the interlace mode (usually applied in cathode-ray tube (CRT) television) and the progressive scan mode (usually applied in digital television or films). In the interlace mode, only half of scan lines of a video are transmitted or played each time. That is, odd scan lines (called an odd field) or even scan lines (called an even field) of a frame are played in an interlaced manner. Each frame field only has data of odd scan lines or even scan lines, so that during playing, the video is not continuous in a vertical direction. That is, the resolution of a frame in the vertical direction decreases. In contrast, in the progressive scan mode, scan lines of a video are played one by one, but a frame rate of the mode is far lower than that of the interlace mode, thereby resulting in defects such as video discontinuity or motion blur.
In order to increase the video resolution to make the video clearer and to reduce the defects of video discontinuity and video blur, the motion adaptive deinterlacing technology and the motion compensated deinterlacing technology are usually employed, so as to enable an interlace mode video to have increased vertical resolution with respect to the motion video. In recent years, the motion interpolation technology is employed to increase the frame rate, as shown in to
Referring to
In the motion interpolation technology, in order to make distribution of motion vectors of the same moving object be more consistent, smoothing processing is performed on motion vectors of closing blocks, so as to reduce variations of the motion vectors. However, when the smoothing processing is performed on a video junction of two dynamic regions or edge portions of dynamic and static regions, an error may be incurred to estimation of a motion vector, which instead incurs video defects (such as a halo defect and a zigzag-shaped artificial defect).
In order to solve the above problems, in relevant motion interpolation technologies, generally a plurality of motion vectors is used to capture corresponding pixel data, and the pixels are mixed to form an interpolated frame. However, the method dramatically increases the frequency of capturing frame data, which can only be achieved by using a large frame memory bandwidth. Therefore, many manufacturers are seeking for a motion interpolation technology that can reduce video defects and decrease frequency of accessing frame data.
The present invention is directed to a motion vector refining device, which employs spatial and temporal reliability analysis to avoid instability of a motion vector on an edge of a moving object, so as to reduce video defects during motion interpolation and reduce a frequency of accessing frame data.
On the other hand, the present invention is directed to a video refining method for modifying a motion vector, in which spatial and temporal reliability analysis is employed to instability of a motion vector on an edge of a moving object, and an interpolated frame is produced according to a refined motion vector, so as to reduce video defects caused by smoothing processing. That is, according to the present invention, the effect of decreasing video defects can be achieved without accessing a large plurality of pixels. In other words, the frequency of accessing frame data is decreased.
The present invention provides a motion vector refining device, which includes a motion estimation unit, a reliability analysis module and a motion vector mixing module. The motion estimation unit may receive a video signal having a plurality of frames or use historical information (for example, motion vectors of closing frames) previously calculated by the motion estimation unit, so as to estimate many aggregate motion vectors. The aggregate motion vectors includes N target motion vectors, N is a positive integer. The reliability analysis module is coupled to the motion estimation unit, and receives and analyzes a spatial reliability factor and a temporal reliability factor of the N target motion vectors, so as to dynamically estimate and adjust N reliability weight values corresponding to the N target motion vectors. The motion vector mixing module is coupled to the motion estimation unit and the reliability analysis module, and dynamically mixes the target motion vectors and the reliability weight values, so as to produce a refined motion vector.
In other aspects, the present invention provides a video refining method for modifying a motion vector, which includes the following steps: receiving a video signal having many frames to estimate a plurality of aggregate motion vectors, where the aggregate motion vectors include N target motion vectors; analyzing a spatial reliability factor and a temporal reliability factor of the N target motion vectors, so as to dynamically estimate and adjust N reliability weight values corresponding to the N target motion vectors; and using the reliability weight values to dynamically mix the target motion vectors, so as to produce a refined motion vector.
Based on the above, in the embodiments of the present invention, reliability weight values are scored and estimated with respect to selected motion vectors (for example, a motion vector on the same frame and motion vectors on adjacent frames). Mixing is performed by using the motion vectors and the corresponding weight values to produce a new motion vector, so as to avoid instability of the motion vector on an edge of a moving object. During motion interpolation, the single motion vector may be used to select an interpolated pixel, so as to reduce occurring of video defects and decrease a frequency of accessing frame data. On the other hand, reliability of the motion vector may be known according to an estimation result, so as to determine whether a pixel blurring operation is to be performed on the interpolated pixel, thereby reducing video defects.
In order to make the aforementioned features and advantages of the present invention more comprehensible, embodiments are described in detail below with the accompanying drawings.
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
Reference will now be made in detail to the present embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts.
An actuation manner and a hardware architecture of the motion vector refining device 210 are illustrated herein. The motion estimation unit 220 receives a plurality of frames of a video signal 10, so as to estimate a plurality of aggregate motion vectors corresponding to each block in each frame. It should be easy for persons skilled in the art to know relevant implementation and the hardware architecture of the motion estimation unit 220, which are not repeated herein. Further, the motion estimation unit 220 may also use historical information already calculated by the motion estimation unit 220 with respect to different frames at a previous time. The historical information is, for example, previously calculated motion vectors, motion blocks and relevant parameters (for example, a calculated spatial reliability factor and a calculated temporal reliability factor in the following description) of different frames.
The reliability analysis module 230 is coupled to the motion estimation unit 220. The reliability analysis module 230 obtain motion vectors for reference (the motion vectors for reference are called target motion vectors TMV1-TMVN herein, and N is a positive integer) from the aggregate motion vectors, and use the target motion vectors TMV1-TMVN and the relevant historical information to analyze a plurality of reliability factors, so as to perform a scoring mechanism (for example, to analyze factors such as spatial reliability, temporal reliability, a pixel difference value of adjacent blocks, texture complexity, and still information), and dynamically estimate and adjust reliability weight values W1-WN corresponding to the target motion vector TMV1-TMVN.
Referring to
Further, in the embodiment, the motion vector refining device 210 further includes a frame buffer 270 and a historical data memory unit 260. The frame buffer 270 receives and temporarily stores a plurality of frames in the video signal 10, which are for the motion estimation unit 220 and the pixel mixing module 250 to access and reference. The historical data memory unit 260 may receive and store the pixel difference value, the texture complexity and the still information corresponding to each motion block. The information is provided to the reliability analysis module 230 as a reference for estimation of the reliability weight value. Further, the information may be provided by other video processing devices, such as the motion estimation unit 220 and a texture complexity calculation element.
In the embodiment, the reliability analysis module 230 may further use the reliability weight values W1-WN to estimate and calculate an analysis result WR. If the value of the analysis result WR is great, it indicates that the refined motion vector RMV is reliable and accurate. In contrast, if the value of the analysis result WR is small, it indicates that the refined motion vector RMV is inaccurate.
Therefore, the pixel mixing module 250 of the motion interpolation apparatus 200 may use the refined motion vector RMV to obtain a corresponding target pixel group and a plurality of adjacent pixel groups close to the target pixel group from a transmission bus 275 of the frame buffer 270, and perform a pixel blurring operation with reference to the value of the analysis result WR, so as to produce an interpolated frame Fk+0.5 of an output video signal Vout. For example, herein a target pixel is used as the target pixel group, and the pixel mixing module 250 captures, for example, a 16×16 pixel array centering on the target pixel from the frame buffer 270, which is used as the adjacent pixel group, but the present invention is not limited thereto.
When the analysis result WR is greater than a reliability threshold value, it indicates that the refined motion vector RMV is very accurate, so that the pixel mixing module 250 directly outputs the target pixel. On the other hand, when the value of the analysis result WR is smaller than the reliability threshold value and the reliability analysis module 230 is raising the analysis result WR, the pixel mixing module 250 may decrease intensity of the pixel blurring operation, so as to make the output interpolated pixel group be closer to the target pixel. In contrast, when the value of the analysis result WR is smaller than the reliability threshold value and the reliability analysis module 230 is lowering the analysis result WR, the pixel mixing module 250 may increase the intensity of the pixel blurring operation to increase the dependence of the interpolated pixel group on the adjacent pixel group (for example, the 16×16 pixel array is averaged to output a pixel value), so as to reduce the occurring of video defects.
It should be noted that the target motion vector may be selected by a person implementing the embodiment according to design requirements thereof. The target motion vectors may be selected from adjacent motion vectors (called spatially adjacent motion vectors) of the same frame, motion vectors (temporally adjacent motion vectors) in an adjacent frame and in the same or closing position and a zero motion vector MV0. Illustration is provided here through an example. As shown in
The parameter u represents an offset of adjacent frames on a time axis. The embodiment of the present invention does not limit the number of frames between adjacent frames. When the frame rate is low, a time difference between adjacent frames is too big, which causes the temporal reliability to be inaccurate. A person implementing the embodiment may adjust the parameter u to decrease the number of frames between the adjacent frame for reference and the Kth frame, so as to improve the accuracy of a temporal reliability weight value. For ease of illustration, in the embodiment, the parameter u is set to 1 in
Referring to
On the other hand, b1-bn and c1-cp are also offset vectors of the position vector x, and n and p are positive integers. Therefore, MVk+u (x+b1) to MVk+u (x+bn) of a (k+u)th frame are spatially adjacent motion vectors of MVk+u (x), MVk+u (x+c1) to MVk−u (x+cp) of a (k−u)th frame are spatially adjacent motion vectors of MVk−u(x), and MVk+u (x) and MVk−u (x) are adjacent frames of the MVk (x), so that MVk+u (x+b1) to MVk+u (x+bn) and MVk−u (x+c1) to MVk−u (x+cp) are temporally adjacent motion vectors of MVk (x). Herein, MVK (x), MVK (x+a1) to MVK (x+am), MVK+h (x+b1)−MVK+u (x+bn), and MVK−u (x+c1) to MVK−u (x+cp) are all defined as target motion vectors TMV1 to TMVN, where N is equal to (1+m+n+p). In the embodiment, the motion vectors, for example, MVk+u (x+b1) to MVk+u (x+bn) and MVk−u (x+c1) to MVk−u (x+cp) may all be calculated by the motion estimation unit 220 at a previous time, so that the motion estimation unit 220 may temporarily store the motion vectors in advance, which are used repeatedly in following motion estimation, saving the need of calculating the same motion vectors and relevant historical information repeatedly each time.
Actuation principles and a functional architecture of the reliability analysis module 230 are illustrated herein in detail.
The reliability analysis unit 410—i includes a plurality of scoring mechanisms. In the embodiment, a spatial reliability analysis unit 510 and a temporal reliability analysis unit 520 are the main scoring mechanisms, in combination with scoring mechanisms related to historical information, such as a block difference estimation unit 530, a texture reliability analysis unit 540 and a still information analysis unit 550, so as to produce many weight values. Herein, the weight value produced by each of the scoring mechanisms is called an aggregation weight value, for example, a spatial weight value SW, a temporal weight value TW, a block weight value BW, a texture weight value EW and a still weight value DW, and an estimation manner of the weight values are illustrated in the following description. The reliability analysis unit 410—i uses a value mixer 580 to perform mixing calculation on the aggregation weight values, so as to produce a reliability weight value Wi corresponding to the target motion vector TMVi.
The scoring mechanism of the spatial reliability analysis unit 510 is illustrated below. The spatial reliability analysis unit 510 uses the target motion vector TMVi and the spatially adjacent motion vectors NSMVi thereof to calculate a spatial variance SVar, and uses the spatial variance SVar to estimate the spatial weight value SW.
Specifically, a hardware architecture of the spatial reliability analysis unit 510 is shown in
In the embodiment, the spatial variance SVar may be calculated by two methods. In one method, the difference calculators 610_1-610—m calculate the value difference between the motion vectors, which is the square of the difference between the motion vectors, as shown in an equation (1):
In the other method of calculating the spatial variance SVar, the difference calculators 610_1-610—m calculate the value difference between the motion vectors, which is the absolute value of the difference between the motion vectors, as shown in an equation (2):
Then, the reliability generator 630 uses the spatial variance SVar to estimate the spatial weight value SW by looking into a table or by other manners. In the embodiment, the reliability generator 630 performs the estimation by using a relationship diagram of the spatial variance SVar and the spatial weight value SW shown by
Compared with the above, the hardware architecture of the temporal reliability analysis unit 520 is similar to that of the spatial reliability analysis unit 510, and a difference is as follows. The temporal reliability analysis unit 520 uses the target motion vector TMVi (that is, MVL(y)) and the temporally adjacent motion vectors NTMVi (that is, MVL+1 (x+b1) to MVL+1 (x+bn) and MVL−1 (x+c1) to MVL−1 (x+cp)) to calculate a temporal variance TVar, and estimates the temporal weight value TW by using the temporal variance TVar. The temporal reliability analysis unit 520 may perform the estimation by using by using a relationship diagram of the temporal variance TVar and the temporal weight value TW shown by
On the other hand, referring to
The block difference estimation unit 530 obtains the target motion vector TMVi and a corresponding pixel difference value BDV thereof from the historical data memory unit 260 of
The texture reliability analysis unit 540 obtains texture complexity EC of the motion block MBL (y) from the historical data memory unit 260, and estimates the texture weight value EW by using a relationship diagram of the texture complexity EC and the texture weight value EW shown by
The reason for employing the texture factor is as follows. In the motion estimation technologies, when the texture complexity (the texture distribution density) of the motion block MBL (y) is high, the corresponding motion vector MVL (y) thereof is accurate. Therefore, as shown in
Further, the still information analysis unit 550 obtains the target motion vector TMVi and corresponding still information SI thereof from the historical data memory unit 260, and uses relationship diagrams of the still information SI, the target motion vector TMVi and a still weight value SIW of
For example, referring to
When the still information SI is smaller than the maximum still threshold value STHmax and is greater than or equal to a minimum still threshold value STHmin, the still information analysis unit 550 uses the lower relationship diagram of
When the above functions are implemented, the motion vector mixing module 240 may have two implementation manners. One is shown in
In the other implementation manner, a multiplexer is used as the motion vector mixing module 240, and may select a target motion vector TMVi corresponding to a greatest reliability weight value Wi and use the target motion vector TMVi as the output refined motion vector RMV, which also complies with the spirit of the embodiment.
Further, during implementation the pixel mixing module 250 may be as what is shown in
On the other hand, an embodiment of the present invention provides a video refining method for modifying a motion vector.
In Step S1030, the motion vector mixing module 240 dynamically mixes the target motion vectors TMV1-TMVN and the reliability weight values W1-WN, so as to produce a refined motion vector RMV. Then, in Step S1040, the reliability analysis module 230 uses the reliability weight values W1-WN to calculate and judge an analysis result WR. The pixel mixing module 250 obtains a target pixel corresponding to the refined motion vector RMV and adjacent pixel groups in Step S1050. In Step S1060, the pixel mixing module 250 uses a target pixel group, the adjacent pixel groups and the analysis result WR to perform a pixel blurring operation, and the intensity of the pixel blurring operation is adjusted according to the analysis result WR, so as to produce an interpolated pixel group of an interpolated frame in an output video signal. Other detailed steps of the embodiment are included in the above embodiments, and therefore are not repeated herein.
In view of the above, in the embodiments of the present invention, reliability weight values are scored and estimated with respect to selected motion vectors (for example, a motion vector on the same frame and motion vectors on adjacent frames). Mixing is performed by using the motion vectors and the corresponding weight values to produce a new motion vector, so as to avoid instability of the motion vector on an edge of a moving object. During motion interpolation, the single motion vector may be used to select an interpolated pixel, so as to reduce occurring of video defects and decrease a frequency of accessing frame data. On the other hand, the motion interpolation apparatus may further know reliability of the motion vector according to an estimation result, so as to determine whether a pixel blurring operation is to be performed on the interpolated pixel, thereby reducing video defects.
It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the present invention cover modifications and variations of this invention provided they fall within the scope of the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
100143592 | Nov 2011 | TW | national |