Interpolation Filter Design Based on All-Phase DST and Its Application to Image Demosaicking

Based on a deep understanding of all-phase digital filter (APDF) design and all-phase biorthogonal transform (APBT), this paper will further study the windowed all-phase digital filter (WAPDF) and windowed all-phase biorthogonal transform (WAPBT), discuss the principle of the WAPBT, and provide a unified construction method of the all-phase transform (APT). Based on a type of orthogonal transform, i.e., discrete sine transform (DST), an interpolation filter called an all-phase DST (APDST) filter is constructed and used for image demosaicking; it is compared with bilinear interpolation and all-phase inverse discrete cosine transform (APIDCT) interpolation filters, to test its performance in image interpolation and provide analysis and discussion. The experimental results show that APIDCT and APDST filters with a size of 7 × 7 are similar in interpolation performance, but better than the bilinear interpolation method. In addition to its use in image interpolation demosaicking, the low-pass filter designed in this paper can also be widely used in image interpolation, image denoising, image resizing, and other fields of image processing.

To solve the problem of the serious blocking artifacts at low bit rates in image compression, Hou et al. [6] deduced the expression of the arbitrary order all-phase biorthogonal transform (APBT) matrix based on the design of the all-phase digital filter (APDF) [7], WHT, DCT, inverse DCT (IDCT), and other orthogonal transforms, and proposed a kind of JPEG-like coding algorithm based on the APBT.Because the APBT has good energy concentration characteristic and high-frequency attenuation characteristic, by using the APBT instead of the DCT image transform with a simple uniform quantization to replace the complex quantization table in JPEG, which was designed in accordance with the visual characteristics of human eyes, the effects of low-frequency fine-grained and high-frequency coarse-grained components can be achieved simultaneously, and the algorithm can be simplified.Experimental results show that when the APBT is used for image coding, the quality of the reconstructed image is better than that of the conventional DCT.Especially at low bit rates, the blocking artifacts can be effectively removed from reconstructed images.
To improve the quality of the reconstructed image, starting from the construction of the windowed all-phase digital filter (WAPDF), Fu et al. [8] constructed an efficient signal transform method, windowed all-phase biorthogonal transform (WAPBT); used the optimization algorithm to design the optimized window function of the WAPBT; obtained a WAPBT matrix that is more in line with the image coding requirements; and proposed JPEG-like image coding framework based on WAPBT.It improved the coding performance.Meanwhile, the algorithm is simpler, due to the uniform quantization.
To improve the speed of APBT-based image coding, Wang et al. [9] used CUDA development tools to implement GPU parallelism of APBT and applied it in the JPEG coding framework, achieving parallel processing of transform, quantization, Huffman coding, inverse quantization, inverse transform, and Huffman decoding in image compression, which increases the image coding speed.Experimental results show that parallel processing of parts with higher computational complexity in image compression can facilitate a hundred times faster acceleration than serial processing based on a CPU.In terms of image quality, parallel and serial algorithms have similar reconstructed images at the same compression rate.
Combining with the DST and APDF, Shan et al. [10] proposed the all-phase discrete sine biorthogonal transform (APDSBT).Moreover, they further improved the APBT theory in order to use it in JPEG coding instead of the conventional DCT, which yields JPEG-like coding based on parallel APDSBT.The parallel APDSBT-JPEG image coding algorithm improves the efficiency of the algorithm while solving the blocking artifacts caused by conventional JPEG coding at low bit rates, which improves the subjective and objective performance compared with that of the conventional JPEG coding.
Wang [11] constructed an all-phase IDCT (APIDCT) filter and applied it to a Bayer-patterned image compression system based on wavelet transform and all-phase interpolation.Based on APBT, Xie et al. [12] proposed a new Bayer-patterned image compression algorithm in which the compression process uses JPEG-like compression, and in the interpolation stage, a new APIDCT interpolation filter is adopted and compared with the conventional interpolation method.Simulation results show that both JPEG-like compression and APIDCT interpolation can further improve Bayer-patterned image compression quality.
Wang et al. [13] compared the image compression performance of different interpolation methods based on structure separation and APBT-JPEG.Compared with the conventional DCT-JPEG, APBT-JPEG uses uniform quantization, eliminating the need for quantization table storage, which reduces complex multiplication.Compared with the performance of the commonly used interpolation methods, i.e., nearest interpolation, bilinear interpolation, and cubic convolution, the performance of the APIDCT interpolation is similar to that of the conventional interpolation method and particularly superior to that of the conventional method at high bit rates.Based on the APIDCBT-JPEG compression algorithm, the composite peak signal-to-noise ratio (CPSNR) between the image reconstructed by different interpolation methods and the original image is compared.Experimental results show that the proposed algorithm exceeds the Bayer-patterned color image compression algorithm based on structure separation and is more suitable for compressing Bayer-patterned images.
Wang et al. [14] proposed an improved linear interpolation method for demosaicking of Bayer-patterned color filter array (CFA) images.Experimental results show that the interpolation performance is more effective than bilinear interpolation.Kim and Jeong [15] proposed a four-direction residual interpolation, obtaining a difference between tentative and original images, in which the edge distortion is decreased to some degree.Shi et al. [16] divided the input image into two parts, a smooth region and an edge region, applying bilinear interpolation to the smooth area, and processing the edge region with multi-directional weighted information for interpolation.Wang and Jeon [17] introduced a gradient-based interpolation algorithm.First, an eight-direction weighted interpolation is applied for G component interpolation, and then the obtained G plane is used for R and B components interpolation.Because more weighting information is obtained, the value of CPSNR is larger.
Based on a deep understanding of APDF design and APBT, this paper will further study the WAPDF and WAPBT, discuss the principle of the WAPBT, and then provide a unified construction method of the all-phase transform (APT).Based on the DST, an interpolation filter named all-phase DST (APDST) filter is constructed and used for image interpolation demosaicking, and it is compared with bilinear interpolation and APIDCT interpolation filters to test its performance for image interpolation and provide analysis and discussion.In this paper, the proposed filter corrects the interpolation coefficient using a bilinear method without considering correlation among color components.Thus, the interpolation performance is better than that of the bilinear method, especially for the G component.
The remainder of this paper is organized as follows.Section 2 gives a unified construction method of the APT based on a deep understanding of APDF and APBT.Based on the windowed all-phase discrete sine transform (WAPDST), Section 3 designs several low-pass filters for image interpolation.Section 4 uses the low-pass filter designed in this paper for color interpolation demosaicking, simulates the test image, provides the experimental results and compares them with those of bilinear interpolation and APIDCT interpolation, and presents analysis and discussion.The conclusion and future work are finally given in Section 5.

APDF
De-blocking or compressing the image with conventional filters or transforms will always result in blocking artifacts at the edges of the block [18].Although this can be improved by increasing the size of the filter or transform matrix, the amount of computation increases and the blocking artifacts still exist.The reason is that the size of a two-dimensional discrete transform is always finite; moreover, a number of finite non-overlapping blocks are processed separately and then spliced back into a single image.Two-dimensional overlapping filtering overlaps conventional methods and performs filtering after moving left and right or up and down on the original basis, the final output of which is the superposition of these overlapping filters.Since the high-frequency errors of the blocks are reversed after moving in the opposite direction, the blocking artifacts after the overlapping process are greatly reduced.
Design of APDF is the method that uses the maximum overlapping filtering and takes all the segmentation of an input sample into account.As shown in Figure 1, assuming that the length of a segment time series is N, then for any one of the input points x(n), there are only N data segments x n , x n+1 , • • • , x n+N−1 that contain the point with different interception phases.The position of x(n) in the kth (k = 0, 1, • • • , N − 1) data segment is k, and the kth output obtained is y (k) (n) at the time.
x(n) traverses all data segments to produce N outputs, and the arithmetic average of N outputs is used as the output y(n) = N−1 ∑ k=0 y (k) (n) according to the input x(n).This is the basic idea of APDF.As data are the continuous input, a continuous output is obtained, eliminating the truncation effect of conventional filtering due to the segmentation.Another outstanding advantage is facilitating the control of the signal frequency.When a certain condition is met, a complete linear phase can be achieved, and the amplitude-frequency characteristic shows the disappearance of passband and stopband ripple and the increase in attenuation.APDF is essentially an N-order filter, maximizing (N − 1)/N, i.e., the overlap of each input, and the corresponding output is obtained after traversing all-phases in the unit circle (angular frequency is ω = 2kπ/N).A more vivid illustration of "all-phases" is shown in Figure 2.
Information 2018, 9, x FOR PEER REVIEW 4 of 17 APDF.As data are the continuous input, a continuous output is obtained, eliminating the truncation effect of conventional filtering due to the segmentation.Another outstanding advantage is facilitating the control of the signal frequency.When a certain condition is met, a complete linear phase can be achieved, and the amplitude-frequency characteristic shows the disappearance of passband and stopband ripple and the increase in attenuation.APDF is essentially an N -order filter, maximizing − ( 1) / N N, i.e., the overlap of each input, and the corresponding output is obtained after traversing all-phases in the unit circle (angular frequency is ω = 2 π / k N ).A more vivid illustration of "allphases" is shown in Figure 2. x n ).
Demonstration of all-phases (traversing all-phases of angular frequency, the value of which is ω = 2 π / k N , in the unit circle).

APBT
By analyzing the design of APDF in different orthogonal transform domains, such as DFT, DCT, IDCT, WHT, and DST, we can find a commonality: APDF is a zero-phase digital filter that overcomes the Gibbs effect with overlapping digital filtering.If the range of elements of the sequency response vector (or matrix) is extended to the complex field, then the one-dimensional zero-phase digital filter of length − 2 1 N (or the two-dimensional zero-phase digital filter of size ) can find the corresponding sequency response vector by using the transition matrix.Using the transition matrix, the unit impulse response and the sequency response vector (or matrix) of the APDF in the time domain can be connected, as shown in Figure 3. Simultaneously, because the DFT spectrum directly reflects the frequency domain characteristics of the filter, when designing the APDF, the filter can be designed directly from the corresponding sequency response in the DFT domain according to the frequency response requirements.In other orthogonal transform domains (DCT, IDCT, WHT, DST, etc.), the sequency response cannot directly reflect the frequency response of the filter, so the sequency response cannot be obtained directly from the frequency response requirements.However, if the transition matrix G and the inverse transition matrix −1 G are used as bridges, the conversion between the sequency response vectors (or matrices) of different orthogonal transform domains can be realized, and the filter design of each orthogonal transform domain can be unified.
If G is used to represent different transition matrices uniformly, N F is the N-dimensional sequency response vector, and h is the unit impulse response of the APDF, then the one- APDF.As data are the continuous input, a continuous output is obtained, eliminating the truncation effect of conventional filtering due to the segmentation.Another outstanding advantage is facilitating the control of the signal frequency.When a certain condition is met, a complete linear phase can be achieved, and the amplitude-frequency characteristic shows the disappearance of passband and stopband ripple and the increase in attenuation.APDF is essentially an N -order filter, maximizing − ( 1) / N N, i.e., the overlap of each input, and the corresponding output is obtained after traversing all-phases in the unit circle (angular frequency is ω = 2 π / k N ).A more vivid illustration of "allphases" is shown in Figure 2. x n ).
Demonstration of all-phases (traversing all-phases of angular frequency, the value of which is ω = 2 π / k N , in the unit circle).

APBT
By analyzing the design of APDF in different orthogonal transform domains, such as DFT, DCT, IDCT, WHT, and DST, we can find a commonality: APDF is a zero-phase digital filter that overcomes the Gibbs effect with overlapping digital filtering.If the range of elements of the sequency response vector (or matrix) is extended to the complex field, then the one-dimensional zero-phase digital filter of length ) can find the corresponding sequency response vector by using the transition matrix.Using the transition matrix, the unit impulse response and the sequency response vector (or matrix) of the APDF in the time domain can be connected, as shown in Figure 3. Simultaneously, because the DFT spectrum directly reflects the frequency domain characteristics of the filter, when designing the APDF, the filter can be designed directly from the corresponding sequency response in the DFT domain according to the frequency response requirements.In other orthogonal transform domains (DCT, IDCT, WHT, DST, etc.), the sequency response cannot directly reflect the frequency response of the filter, so the sequency response cannot be obtained directly from the frequency response requirements.However, if the transition matrix G and the inverse transition matrix −1 G are used as bridges, the conversion between the sequency response vectors (or matrices) of different orthogonal transform domains can be realized, and the filter design of each orthogonal transform domain can be unified.
If G is used to represent different transition matrices uniformly, N F is the N-dimensional sequency response vector, and h is the unit impulse response of the APDF, then the one-

APBT
By analyzing the design of APDF in different orthogonal transform domains, such as DFT, DCT, IDCT, WHT, and DST, we can find a commonality: APDF is a zero-phase digital filter that overcomes the Gibbs effect with overlapping digital filtering.If the range of elements of the sequency response vector (or matrix) is extended to the complex field, then the one-dimensional zero-phase digital filter of length 2N − 1 (or the two-dimensional zero-phase digital filter of size (2N − 1) × (2N − 1)) can find the corresponding sequency response vector by using the transition matrix.Using the transition matrix, the unit impulse response and the sequency response vector (or matrix) of the APDF in the time domain can be connected, as shown in Figure 3.
Simultaneously, because the DFT spectrum directly reflects the frequency domain characteristics of the filter, when designing the APDF, the filter can be designed directly from the corresponding sequency response in the DFT domain according to the frequency response requirements.In other orthogonal transform domains (DCT, IDCT, WHT, DST, etc.), the sequency response cannot directly reflect the frequency response of the filter, so the sequency response cannot be obtained directly from the frequency response requirements.However, if the transition matrix G and the inverse transition matrix G −1 are used as bridges, the conversion between the sequency response vectors (or matrices) of different orthogonal transform domains can be realized, and the filter design of each orthogonal transform domain can be unified.
If G is used to represent different transition matrices uniformly, F N is the N-dimensional sequency response vector, and h is the unit impulse response of the APDF, then the one-dimensional APDF design formula of different orthogonal transform domains can be uniformly expressed as: The two-dimensional APDF design formula can also be uniformly expressed as: h 1/4 = GF N×N G T .Among them, F N×N is the sequency response matrix with size of N × N, and h 1/4 is one-fourth of the two-dimensional APDF.
If we think it about the converse, assuming that the unit impulse response of the zero-phase digital filter is known, the sequency response vectors (or matrices) of the different orthogonal transform domains may be found, which helps analyze the characteristics of the sequency response.Since one-dimensional zero-phase filters have symmetry: (2) For two-dimensional zero-phase digital filter h, also based on the symmetry, h 1/4 can be used to obtain different orthogonal transform domain sequency response matrix For example, the sequency response vector [F N ] DFT of the DFT domain may be converted into a sequency response vector DFT of the DCT domain; the sequency response matrix [F N×N ] DFT of the DFT domain may be transformed into a sequency response matrix Similarly, the N-dimensional sequency response vector (or matrix) of the DFT domain can also be converted into the sequency response vectors (or matrices) of the IDCT, WHT, DST domains.dimensional APDF design formula of different orthogonal transform domains can be uniformly expressed as: ] The two-dimensional APDF design formula can also be uniformly expressed as:

F
is the sequency response matrix with size of × N N , and 1/ 4 h is one-fourth of the two-dimensional APDF.
If we think it about the converse, assuming that the unit impulse response of the zero-phase digital filter is known, the sequency response vectors (or matrices) of the different orthogonal transform domains may be found, which helps analyze the characteristics of the sequency response.Since one-dimensional zero-phase filters have symmetry: , the N-dimensional sequency response vector N F of different orthogonal transform domains can be obtained by using

] h h h N h
: For two-dimensional zero-phase digital filter h , also based on the symmetry, 1/ 4 h can be used to obtain different orthogonal transform domain sequency response matrix example, the sequency response vector  In conclusion, in the APDF design, the sequency response F N of the orthogonal transform domain and the unit impulse response h of the time domain are connected by a transition matrix G.In [6], this transform matrix derived from APDF was called the APBT matrix.

WAPDF and WAPBT
APDF has the characteristics of the conventional frequency sampling method and the original signal weighting and superposition, along with features of the window function design.Therefore, it has advantages of window adding and frequency domain design.To improve the filter performance with the method of windowing, a slightly wider transition band of a flatter passband and stopband characteristics is used.In the design of the WAPDF in [8], the WAPDF sequency response is related to a unit impulse response in its time domain by a conversion matrix, and this matrix is similar to the DCT matrix, which has a good sequency property and can transform images from the spatial domain into the sequency domain.Thus, this matrix, which is called the WAPBT matrix, can be used in image compression, and the corresponding transform is called WAPBT.When the front and back windows are rectangular, WAPDF is APDF, and the WAPBT matrix is the APBT matrix.Therefore, WAPBT can be seen as a special case of APBT.
When α N is the WHT matrix, the corresponding matrix W is called the windowed all-phase Walsh-Hadamard transform (WAPWHT); when α N is the DCT matrix, the corresponding matrix W is called the windowed all-phase discrete cosine transform (WAPDCT); when α N is the IDCT matrix, the corresponding matrix W is called the windowed all-phase inverse discrete cosine transform (WAPIDCT); and when α N is the DST matrix, the corresponding matrix W is called WAPDST.In addition, the corresponding WAPBT can also be constructed based on other orthogonal transforms.
In [8], the general form of the WAPBT matrix was deduced and used for grayscale image coding.Starting from the design of APDF, the general form of the WAPBT matrix is deduced under arbitrary orthogonal transforms (DFT, DCT, IDCT, WHT, DST, etc.): where B 1 N and B 2 N are the front and back windows of the windowed all-phase digital filter, respectively; N is the order of the filter; and α N is the corresponding orthogonal transform matrix.α N is a complex matrix in the DFT domain and a real matrix in other domains.
Next, three important properties of WAPBT will be demonstrated.
Property 1.When the WAPBT front and back windows meet the conditionB 2 , elements in the first row are equivalent to constants in the WAPBT matrix, which ensures that after the image transform, the first coefficient in the upper left corner of the WAPBT transform domain is the DC coefficient.
Proof.The first row of WAPBT matrix: If the front and back windows meet the condition The remaining elements of the WAPBT matrix are: It can be seen from Property 1 that different window sequences will have a great impact on the property of the WAPBT matrix.and α N is an orthogonal transform (for example, WHT, DCT, IDCT, or DST), WAPDF is a zero-phase digital filter, and WAPBT strictly connects the α domain and time domain h.

Property 2. When the WAPBT front and back windows meet the condition B
Then, we can get: .
Therefore, if and only if , It can be proved that the necessary and sufficient condition of and L is a constant.It can be seen from [8] that under the condition Therefore, WAPDF is a zero-phase digital filter, and the connection between the filter's unit impulse response h and the N-dimensional sequency response vector F N is completely established by W. Thus, under this condition, WAPBT matrix W strictly connects the α domain and time domain h.At this time, elements in the WAPBT matrix are: In Equations ( 4) and ( 5), constant L is multiplied by each element in WAPBT matrix.Therefore, the condition that L = N will not affect the property of the WAPBT matrix.
, the WAPBT transform matrix is the APBT matrix.Correspondingly, in this case, WAPBT is APBT.
Property 3 establishes the connection between WAPBT and APBT.Because APBT can be seen as a special case when a rectangular window is added, the study of the windowed situation has more universal significance.

APT Derived from APDF Theory
Taking transition matrix G and inverse transition matrix G −1 as the bridges and combining windowed situation with the non-windowed situation, a windowed filter with good amplitude frequency response can be obtained under the non-windowed situation, which simplifies the filter structure.For example, windowed DCT and windowed IDCT can be converted into the corresponding non-windowed situation: where WDCT denotes the windowed DCT and WIDCT represents the windowed IDCT.In summary, the sequency response of the transform domain and unit impulse response of the time domain are connected by the transition matrix G. Using G as a bridge, the sequency responses of different orthogonal transform domains can also be mutually obtained.In the same way, the windowed case is similar to this.The transition matrix at this time is denoted G W . G and G W are uniformly defined as APT matrix A.
Definition 1.For one-dimensional datax, we define the APT and the inverse transform as y = Ax and x = A −1 y, respectively.For two-dimensional image matrix X, we define the APT and the inverse transform as Y = AXA T and X = A −1 Y(A −1 ) T , respectively, where Y is the transform coefficient matrix.If transform matrix A takes different forms in the orthogonal transform domain, such as DFT, DCT, IDCT, WHT, or DST, the corresponding transforms are defined as APDFT, APDCT, APIDCT, APWHT, and APDST, respectively.
In [6], Hou et al. constructed APBT on the basis of APDF theory.Inspired by this, Fu et al. [8] started from the design of WAPDF and constructed WAPBT by designing the window function to obtain a transform matrix better suited for image coding.APBT and WAPBT are uniformly called APT.In summary, a diagram of APT derived from APDF theory is shown in Figure 4.
responses of different orthogonal transform domains can also be mutually obtained.In the same way, the windowed case is similar to this.The transition matrix at this time is denoted W G .G and W G are uniformly defined as APT matrix A .
Definition 1.For one-dimensional data x , we define the APT and the inverse transform as = y Ax and − = 1 x A y , respectively.For two-dimensional image matrix X , we define the APT and the inverse transform , respectively, where Y is the transform coefficient matrix.If transform matrix A takes different forms in the orthogonal transform domain, such as DFT, DCT, IDCT, WHT, or DST, the corresponding transforms are defined as APDFT, APDCT, APIDCT, APWHT, and APDST, respectively. In

Interpolation Filter Design Based on APDST
When N α is the DST-I matrix, the DST matrix ( , ) i j S with a size of × N N is shown in Equation ( 7): ( 1)( 1)π 2 ( , ) sin , , 0,1, , 1 1 1 The DST-I matrix is a symmetric matrix [19], i.e., = T S S .When the front and back windows are rectangular windows and N α is the DST-I matrix, according to Property 1 of WAPBT, substituting Equation ( 7) into Equation ( 5) provides the WAPBT as shown in Equation ( 8):

Interpolation Filter Design Based on APDST
When α N is the DST-I matrix, the DST matrix S(i, j) with a size of N × N is shown in Equation ( 7): The DST-I matrix is a symmetric matrix [19], i.e., S = S T .When the front and back windows are rectangular windows and α N is the DST-I matrix, according to Property 1 of WAPBT, substituting Equation ( 7) into Equation ( 5) provides the WAPBT as shown in Equation ( 8): When N = 4, When N = 8, The 8 × 8 WAPBT in Equation ( 10) takes the place of DCT in [8] and is used in the JPEG image coding system.In addition, the simpler uniform quantization is used as the quantization method.A compression coding performance comparable to that of APBT-JPEG has been achieved in the sense of the peak signal-to-noise ratio (PSNR) and mean structural similarity (MSSIM).
There are many methods for designing a two-dimensional diamond interpolation filter, and most of them based on the half-band filter.This paper uses APDF theory based on DST to design a new diamond filter, which is a low-pass interpolation filter. Let ] T be the unit impulse response vector of the one-dimensional APDST filter and F N be a column response vector of length N, then the design of one-dimensional APDST filter h of length 2N − 1 consists of Equation ( 8), Equation (11), and Equation ( 12): Similarly, the above one-dimensional APDST filter method can be extended to the two-dimensional case.Let h (2N−1)×(2N−1) be a two-dimensional APDST filter unit impulse response matrix and F N×N be the ideal low-pass filter response matrix with an order of N × N, then the design of a two-dimensional APDST filter with an order of (2N − 1) × (2N − 1) consists of Equation (13) and Equation ( 14): where the definition of matrix W is the same as in Equation ( 8).
In the following section, the design of the APDST filter is taken as an example to illustrate a construction method of a low-pass filter that can be used for image interpolation demosaicking.
is substituted with Equation ( 9) into Equation ( 13), and the left-bottom quarter of the filter can be obtained, which is: According to the zero-phase symmetry characteristic of APDF shown in Equation ( 14), the 7 × 7 APDST filter is obtained: As an interpolation filter, the two-dimensional APDST filter with an order of 7 × 7 is: The frequency response perspective is shown in Figure 5.It can be seen from Figure 5 that the interpolation filter is a low-pass filter which is flat in frequency domain and has little leakage at the low-frequency portion.The all-phase interpolation filter has good interpolation performance.
According to the zero-phase symmetry characteristic of APDF shown in Equation ( 14), the 7 × 7 APDST filter is obtained: As an interpolation filter, the two-dimensional APDST filter with an order of 7 × 7 is: The frequency response perspective is shown in Figure 5.It can be seen from Figure 5 that the interpolation filter is a low-pass filter which is flat in frequency domain and has little leakage at the low-frequency portion.The all-phase interpolation filter has good interpolation performance.Similarly, an interpolation filter with an arbitrary order of (2N − 1) × (2N − 1) (N ∈ N) can be designed.For example, the filters with sizes of 3 × 3, 5 × 5, and 9 × 9 are shown in Equations ( 18)-( 20): As seen in Equations ( 17)-( 20), except for the center of each interpolation template, the sum of each weight coefficient is 1.In addition, each weight coefficient is symmetrical at the center vertical line, the value of which is interlaced to 0. This can achieve interpolation of the G component in Bayer CFA images to reconstruct the G plane.If the filter above is rotated by 45 • , then the R and B planes can be reconstructed by image interpolation in the same way.Finally, the full-color RGB images are obtained.

Image Demosaicking Using Interpolation Filters Based on APDST
The block diagram of the proposed image demosaicking method is shown in Figure 6.To show the performance of the APDST interpolation filters designed in this paper, 24 Kodak test images [20] were chosen for image interpolation experiments.These test images are shown in Figure 7, and their size is 768 × 512 or 512 × 768.For the boundary of the images, we extend it with a symmetric boundary extension.All experiments were performed in MATLAB R2012a.
As seen in Equations ( 17)-( 20), except for the center of each interpolation template, the sum of each weight coefficient is 1.In addition, each weight coefficient is symmetrical at the center vertical line, the value of which is interlaced to 0. This can achieve interpolation of the G component in Bayer CFA images to reconstruct the G plane.If the filter above is rotated by °45 , then the R and B planes can be reconstructed by image interpolation in the same way.Finally, the full-color RGB images are obtained.

Image Demosaicking Using Interpolation Filters Based on APDST
The block diagram of the proposed image demosaicking method is shown in Figure 6.To show the performance of the APDST interpolation filters designed in this paper, 24 Kodak test images [20] were chosen for image interpolation experiments.These test images are shown in Figure 7, and their size is 768 × 512 or 512 × 768.For the boundary of the images, we extend it with a symmetric boundary extension.All experiments were performed in MATLAB R2012a.For APIDCT and APDST, a filter with a size of 7 × 7 is used to interpolate the G component, while the R and B components are interpolated using the rotated filter with a size of 11 × 11 (the same 7 × 7 filter is rotated by °45 ).For bilinear interpolation, the R, G, and B components are interpolated by the bilinear method.The experimental results of the PSNR and CPSNR to the 24 images are given in Table 1.It can be seen from Table 1 that the performance of the APIDCT is close to that of the APDST filter with the size of 7 × 7, but both of them are better than the bilinear interpolation method, especially the PSNR of the G component, which is approximately 1.5 dB higher than that from the bilinear method.The experimental results of the structural similarity (SSIM) and MSSIM to the 24 images are given in Table 2. Experimental results in Table 2 demonstrate that the performance of APDST filters is a little better than that of the APIDCT with the size of 7 × 7, and the SSIM of G component of APDST is the highest among these three methods.For APIDCT and APDST, a filter with a size of 7 × 7 is used to interpolate the G component, while the R and B components are interpolated using the rotated filter with a size of 11 × 11 (the same 7 × 7 filter is rotated by 45 • ).For bilinear interpolation, the R, G, and B components are interpolated by the bilinear method.The experimental results of the PSNR and CPSNR to the 24 images are given in Table 1.It can be seen from Table 1 that the performance of the APIDCT is close to that of the APDST filter with the size of 7 × 7, but both of them are better than the bilinear interpolation method, especially the PSNR of the G component, which is approximately 1.5 dB higher than that from the bilinear method.The experimental results of the structural similarity (SSIM) and MSSIM to the 24 images are given in Table 2. Experimental results in Table 2 demonstrate that the performance of APDST filters is a little better than that of the APIDCT with the size of 7 × 7, and the SSIM of G component of APDST is the highest among these three methods.
In addition, to fully demonstrate the experimental results, Figures 8 and 9 show the subjective effects by partially magnifying a part of the captured images.From the images in Figures 8 and 9, it is difficult to distinguish that which method can obtain better performance by naked eyes.It also means that the similar performance in subjective aspect can be obtained by these three methods.In addition, to fully demonstrate the experimental results, Figures 8 and 9 show the subjective effects by partially magnifying a part of the captured images.From the images in Figures 8 and 9, it is difficult to distinguish that which method can obtain better performance by naked eyes.It also means that the similar performance in subjective aspect can be obtained by these three methods.

Conclusions
Based on in-depth research on APDF and WAPDF, this paper unifies the construction methods of APDF.The features of the WAPBT are analyzed first, and the theory that the WAPBT with rectangular windows is exactly the conventional APBT is concluded.Thus, WAPBT is a generalized form of APBT.The unity of the definition of APT is also given in this paper.The interpolation filters based on DST are applied to image demosaicking.The filter with a size of 7 × 7 is used to interpolate the G component, while the R and B components are interpolated using a rotated filter with a size of 11 × 11.The interpolated image of the proposed scheme has good visual performance and is similar to that of other two methods in subjective aspect.Compared with other two methods, experimental results show that although APDF has more computational complexity than bilinear interpolation, it, including the APIDCT filter and APDST filter, can achieve better quality reconstructed images in objective aspect.In addition, to fully demonstrate the experimental results, Figures 8 and 9 show the subjective effects by partially magnifying a part of the captured images.From the images in Figures 8 and 9, it is difficult to distinguish that which method can obtain better performance by naked eyes.It also means that the similar performance in subjective aspect can be obtained by these three methods.

Conclusions
Based on in-depth research on APDF and WAPDF, this paper unifies the construction methods of APDF.The features of the WAPBT are analyzed first, and the theory that the WAPBT with rectangular windows is exactly the conventional APBT is concluded.Thus, WAPBT is a generalized form of APBT.The unity of the definition of APT is also given in this paper.The interpolation filters based on DST are applied to image demosaicking.The filter with a size of 7 × 7 is used to interpolate the G component, while the R and B components are interpolated using a rotated filter with a size of 11 × 11.The interpolated image of the proposed scheme has good visual performance and is similar to that of other two methods in subjective aspect.Compared with other two methods, experimental results show that although APDF has more computational complexity than bilinear interpolation, it, including the APIDCT filter and APDST filter, can achieve better quality reconstructed images in objective aspect.

Conclusions
Based on in-depth research on APDF and WAPDF, this paper unifies the construction methods of APDF.The features of the WAPBT are analyzed first, and the theory that the WAPBT with rectangular windows is exactly the conventional APBT is concluded.Thus, WAPBT is a generalized form of APBT.The unity of the definition of APT is also given in this paper.The interpolation filters based on DST are applied to image demosaicking.The filter with a size of 7 × 7 is used to interpolate the G component, while the R and B components are interpolated using a rotated filter with a size of 11 × 11.The interpolated image of the proposed scheme has good visual performance and is similar to that of other two methods in subjective aspect.Compared with other two methods, experimental results show that although APDF has more computational complexity than bilinear interpolation, it, including the APIDCT filter and APDST filter, can achieve better quality reconstructed images in objective aspect.

Figure 2 .
Figure 2. Demonstration of all-phases (traversing all-phases of angular frequency, the value of which is ω = 2kπ/N, in the unit circle).

Figure 3 .
Figure 3. Unity of APDF in different orthogonal transform domains based on DFT, DCT, IDCT, WHT, and DST.

Property 3 .
When both Property 1 and Property 2 are satisfied andL = 1, which means that the front and back windows are rectangular windows B 1 N

Figure 4 .
Figure 4. Diagram of APT derived from APDF theory.

Figure 5 .Figure 5 .
Figure 5.The frequency response of the APDST interpolation filter with an order of 7 × 7.

Figure 6 .
Figure 6.The block diagram of the proposed image demosaicking method.Figure 6.The block diagram of the proposed image demosaicking method.

Figure 6 .
Figure 6.The block diagram of the proposed image demosaicking method.Figure 6.The block diagram of the proposed image demosaicking method.