The present invention relates to image processing, and more particularly to edge directed deinterlacing in video image processing.
In television systems, a specific scan format called “interlaced scan format” is widely utilized. Due to the advent of digital television (DTV) signals, deinterlacing is utilized for converting from the interlaced scan format into a progressive scan format for DTV applications. There are two main deinterlacing techniques: an inter-field (or motion-compensated) interpolation technique and an intra-field (or spatial) interpolation technique. The inter-field technique requires more than one field as an input while the intra-field technique requires only one field to process.
In
An existing implementation for intra-field deinterlacing includes simple line doubling and vertical line averaging. However, the video qualities of these two implementations produce various artifacts, such as edge jaggedness or edge blurring, making them unsuitable for DTV applications.
A more advanced intra-field deinterlacing technique utilizes edge directed interpolation (EDI). Conceptually, the EDI intra-field deinterlacing technique takes advantage of the direction of edges in an image represented by the two fields, to interpolate the missing pixels. More specifically, the direction of edges associated with each missing pixel is calculated and the set of existing pixels along that calculated edge direction is used to interpolate a missing pixel. The edge detections in many implementations of the EDI intra-field deinterlacing technique are usually determined based on the maximum correlation of a pair of vectors formed by the set of existing pixels immediately above and below the missing pixel.
However, there are many drawbacks to the conventional EDI intra-field deinterlacing technique. First, noise can complicate proper detection of edge direction. Though setting a wider vector can help reduce this effect, it also increases the probability of misdetection in certain areas. Second, in certain areas, such as thin lines and complex detail areas, the vector correlation tends to result in incorrect direction detection. Third, the number of possible directions are limited to a preset number, and directions such as steep angles (close to vertical direction), are usually inaccessible. There is, therefore, a need for a deinterlacing technique that performs edge directed deinterlacing that addresses the above drawbacks.
The present invention provides a method and a system for deinterlacing interlaced video comprising an interlaced image field f including scan lines of multiple pixels. In one embodiment, such deinterlacing involves detecting the one or more edge directions in the image field f using principal component analysis (PCA), and performing spatial interpolation to reconstruct a pixel value in the image field f substantially along a detected edge direction. The pixel value corresponds to a missing pixel in the interlaced field f. Performing interpolation further includes performing directional interpolation on existing pixels neighboring the missing pixel in the field f to obtain an interpolated signal fd as the reconstructed missing pixel.
In addition, existing pixels neighboring the missing pixel in the field f are filtered, to obtain a filtered signal fv, and one of the signals fv and fd is selected as an output signal fp representing the reconstructed missing pixel. The selection is based on the mean value of existing pixels neighboring the missing pixel.
Detecting one or more edge directions includes determining a set of horizontal gradients and vertical gradients associated with existing pixels neighboring the missing pixel and then determining a covariance matrix from the horizontal gradients and the vertical gradients, wherein the principal component of the covariance matrix is based on PCA. Then, based on the covariance matrix, an eigenvector is determined which represents a detected edge direction.
In addition, eigenvalues are determined based on the covariance matrix, and are used to calculate a reliability factor that indicates the level of reliability of said eigenvector as the direction of a detected edge. Then, the interpolated signal fd is determined by mixing the directional interpolated value and the filtered signal fv as a function of the reliability factor.
These and other features, aspects and advantages of the present invention will become understood with reference to the following description, appended claims and accompanying figures.
In the drawings, like references refer to similar elements.
The present invention provides an intra-field interpolation deinterlacing technique that utilizes an edge directed deinterlacing technique based on PCA. PCA provides for the representation of shape, orientation and appearance. Application of PCA to the edge direction detection in deinterlacing provides accurate edge direction detection even when the edges are in noisy image areas. The detected edge directions are denoted by eigenvectors which can represent infinite number of directions including those at very steep angles.
The V-Filter 210 interpolates the missing pixels along the vertical direction only. It is applied to the missing pixels belonging to image areas that do not include strong edges or bisection (e.g., textured) areas (i.e., bMap=0).
As is known to those skilled in the art, principal component analysis is a technique for simplifying a data set, by reducing multidimensional data sets to lower dimensions for analysis. The PCA-based EDI 220 performs interpolation on missing pixels along a detected edge direction. PCA-based EDI is applied only to the missing pixels belonging to image areas that include strong edges but no bisection (i.e., bMap=1). In effect, the missing pixels that belong to strong edges but not to bisection areas, are represented by fd, while the other remaining missing pixels are represented by fv.
The binary map bMap is used by a multiplexer 240 to determine which of the resulting signals fv or fd is selected as an output signal fp of the system 200.
In
An example of calculating fv or fd by the V-Filter 210 and the PCA-based EDI 220, respectively, are now described. A vertical filtered result fv[y][x] is calculated by applying the V-Filter 210 to the existing neighbors of the missing pixel 302 in the window 304. The resulting vertical filtered signal fv[y][x] can be represented by relation (2) below:
fv[y][x]=(f[y−5][x]−12f[y−3][x]+75f[y1][x]+75f[y+1][x]−12f[y+3][x]+f[y+5][x])/128. (2)
In this example, the V-Filter 210 utilizes a set of filter coefficients that comprise: 1/128[1 −12 75 75 −12 1]. Conceptually, a value fv[y][x] for the missing pixel 302 is calculated by the V-Filter 210 from a weighted average (according to V-Filter coefficients) of the neighboring existing pixels along a vertical direction (i.e., window 304). The set of V-Filter coefficients used in relation (2) has 6 taps for low-pass filtering, but other examples are possible. Other sets of coefficients with shorter or longer numbers of taps can be used in the same manner. Another example of the V-Filter 210 may be a Vertical-Temporal (VT) filter such as described by N. Seth-Smith and G. Walker, “Flexible upconversion for high quality TV and multimedia displays,” in Proc. ICCE, Chicago, Ill., June 1996, pp. 338-339, and G. de Haan and E. B. Bellers, “Deinterlacing—An Overview,” Proceedings of the IEEE, Vol. 86, No. 9, September 1998, pp. 1839-1857.
The horizontal gradient calculator 402 implements relation (3) below for each existing pixel:
gH[i][j]=f[i][j]−f[i][j−1],
wherein iεI={y−5,y−3,y−1,y+1,y+3,y+5}, and
jεJ={x−5,x−4,x−3, . . . ,x+5}. (3)
Relation (3) calculates the set of horizontal gradients at each existing pixel location (i, j) relative to the missing pixel f[y][x] (i and j denote vertical and horizontal indices, respectively). The gradients represent differences between pixel values along the horizontal direction. Therefore, at a location (i, j), the horizontal gradient is calculated by subtracting the immediate left neighboring existing pixel f[i] [j−1] from the existing pixel f[i] [j].
The vertical gradient calculator 404 determines the vertical gradients by implementing relation (4) below for each existing pixel:
gv[i][j]=f[i][j]−f[i−1][j]. (4)
For the vertical gradients, at each location (i, j), the vertical gradient is calculated by subtracting the immediate above neighboring existing pixel f[i−1] [j] from the existing pixel f[i] [j].
Next, a matrix A, which is the covariance matrix of the horizontal and vertical gradients, is determined. The matrix AεR2×2 is formed by a matrix formation unit 406 according to relation (5) below:
After the resulting matrix A is formed, its eigenvalues λ1 and λ2 and an eigenvector v1=[vx vy]T associated with the smaller eigenvalue λ1 (assuming λ1≦λ2), are calculated by an eigen calculator 408, according to relations (6) and (7) below:
Relations (6) and (7) are standard closed form relations for calculating eigenvalue and eigenvectors when the input covariance matrix is of size 2×2 as in relation (5). As such, the gradient calculators 402, 404, the matrix formation unit 406 and the eigen calculator 408, together implement an edge detector that performs edge detection including edge direction detection which in this example provides the eigenvector v1 that is proportional to the direction of a detected edge.
Once both eigenvalues λ1 and λ2 are obtained, a reliability factor α is calculated by a reliability calculator 410 according to relation (8) below:
wherein the thresholds RE_THR1 and RE_THR2 are used for limiting the reliability factor a within the range from 0.0 to 1.0. The ratio λ2/λ1 in relation (8) indicates how reliable eigenvector v1 is as the direction of a detected edge. The reliability factor α ranges from 0.0 (not reliable) to 1.0 (very reliable). If the ratio λ2/λ1 is less than or equal to RE_THR1, the reliability factor α is set to 0.0 (not reliable). If the ratio λ2/λ1 is greater than or equal to RE_THR2, the reliability factor α is set to 1.0 (very reliable). When the ratio λ2/λ1 is in-between RE_THR1 and RE_THR2, the reliability factor α is proportional to the ratio λ2/λ1 and has a value from 0.0 to 1.0.
The typical values for RE_THR1 and RE_THR2 are set to e.g., 4.0 and 12.0, respectively. If the ratio λ2/λ1, is less than or equal 4.0, then the detected edge direction according to eigenvector v1 is not reliable (α=0). On the other hand, if the ratio λ2/λ1 is greater than or equal to 12.0, the detected edge direction according to eigenvector v1 is highly reliable (α=1). When the ratio λ2/λ1 is in between 4.0 and 12.0, the reliability factor is proportional to the ratio and has a value from 0.0 to 1.0. The two threshold values were selected by the inventors as default values, based on extensive experimentation.
It is noted that when λ1≦λ2, the orientation of the eigenvector v1=[vx vy]T associated with the smaller eigenvalue λ1 is proportional to the dominant edge direction in the window 306 whose center is the missing pixel f[y][x](302 in
The directional interpolator 412 determines an edge direction proportional to v1=[vx vy]T and generates a directional interpolated value d (i.e., d[y][x]) associated with the missing pixel f[y][x] along the edge direction. At the final stage, the vertical filtered signal fv[y][x] from the V-Filter 210 (
fd[y][x]=α·d[y][x]+(1−α)fv[y][x]. (9)
As such, the signal fd[y][x] is calculated by mixing between d[y][x] and fv[y][x] with a contribution ratio of αand its complement, 1−α, respectively.
The set of 13 edge directions {510, 511, . . . , 522} in
The bisection detector 602 generates a binary decision bBS (0 or 1) indicating whether or not the missing pixel f[y][x] (302 in
Suppose the sample mean of all existing pixels within the window 306 (
As such, for each existing pixel location (i,j) within the window 306, the associated binary value bij is set to 1 if f[i][j] is greater than or equal to the mean value of at least a plurality of the existing pixel values within the window 306 neighboring the missing pixel 302, otherwise bij is set to 0.
For each row iεI in binary matrix B, the number of sign changes are counted along the horizontal direction according to relation (11) below:
Similarly, for each column jεJ, the number of sign changes are counted along the vertical direction according to relation (12) below:
Then, the binary decisions BSh and BSv in the horizontal and vertical directions are obtained in accordance to relations (13) and (14), respectively:
wherein the sets I′ and J′ can be equal to, or a subset of, respectively, I={y−5,y−3,y−1,y+1,y+3,y+5} and J={x−5,x−4,x−3, . . . ,x+5}. In this description, I′={y−1,y+1} and J′={x−1,x+1}. If the number of sign changes in every row i in set I′ is not greater than 1, then the missing pixel at location (x, y) belongs to a bisection area along the horizontal direction (i.e., BSh=1). Otherwise, the missing pixel does not belong to the bisection area (i.e., BSh=0). In a similar fashion, if the number of sign changes in every column j in set J′ is not greater than 1, then the missing pixel at location (x, y) belongs to a bisection area along the vertical direction (i.e., BSv=1). Otherwise, the missing pixel does not belong to the bisection area (i.e., BSv=0).
In this example, the set I′ contains row indices immediately above and below the missing pixel, and the set J′ contains column indices immediately to the left and right of the missing pixel.
Once both the horizontal binary decision BSh and the vertical binary decision BSv are determined, the binary decision bBS in both directions is determined by the bisection detector 602 according to relation (15) below:
bBS=AND(BSh, BSv) (15)
where the AND( ) is the logical AND operation.
Preferably, in parallel to operation of the bisection detector 602 described above, the strong edge detector 604 detects strong edges in the input field f. Suppose the mean and approximated local variance of the window 306 whose center pixel 302 is f[y][x], are denoted by μ and σ, respectively. The approximate local variance σ is determined according to relation (16) below:
Relation (16) provides calculation of an approximate local variance for the missing pixel 302, by averaging the absolute difference between the pixel values within the window 306 and the sample mean of the missing pixel 302. In this example, the window 306 is of size 6-by-11 pixels, such that the total number of pixels within the window 306 is 66.
The binary decision bSE from the strong edge detector 604 indicates whether or not the missing pixel 302 belongs to a strong edge area. The binary decision bSE is determined according to relation (17) below:
As such, the binary decision bSE is determined by using a hard threshold SE_THR. That is, if the local variance σis greater than or equal to SE_THR, then the missing pixel 302 is considered to belong to the strong edge area (bSE=1), otherwise, it is not (bSE=0).
After both binary decisions from detectors 602 and 604 are determined, they are input to a combiner (e.g., logical AND gate) 606 to obtain the final resulting binary decision map bMap from the detector 230.
As is known to those skilled in the art, the aforementioned example architectures described above, according to the present invention, can be implemented in many ways, such as program instructions for execution by a processor, as logic circuits, as an application specific integrated circuit, as firmware, etc.
The present invention has been described in considerable detail with reference to certain preferred versions thereof; however, other versions are possible. Therefore, the spirit and scope of the appended claims should not be limited to the description of the preferred versions contained herein.
Number | Name | Date | Kind |
---|---|---|---|
5625421 | Faroudja et al. | Apr 1997 | A |
5661525 | Kovacevic et al. | Aug 1997 | A |
5786862 | Kim et al. | Jul 1998 | A |
5929918 | Marques Pereira et al. | Jul 1999 | A |
6133957 | Campbell | Oct 2000 | A |
6577345 | Lim et al. | Jun 2003 | B1 |
6614484 | Lim et al. | Sep 2003 | B1 |
7099509 | Wang et al. | Aug 2006 | B2 |
7403234 | Lertrattanapanich et al. | Jul 2008 | B2 |
20020015508 | Hannigan et al. | Feb 2002 | A1 |
20020030762 | Kishimoto | Mar 2002 | A1 |
20040207753 | Jung | Oct 2004 | A1 |
20050073607 | Ji et al. | Apr 2005 | A1 |
20050276506 | Kwon et al. | Dec 2005 | A1 |
20060039590 | Lachine et al. | Feb 2006 | A1 |
20100157147 | Bellers | Jun 2010 | A1 |
Number | Date | Country | |
---|---|---|---|
20080231746 A1 | Sep 2008 | US |