Next Article in Journal
Convex Aggregation Operators and Their Applications to Multi-Hesitant Fuzzy Multi-Criteria Decision-Making
Previous Article in Journal
Source Cell-Phone Identification in the Presence of Additive Noise from CQT Domain
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

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

School of Mechanical, Electrical and Information Engineering, Shandong University, Weihai 264209, China
*
Author to whom correspondence should be addressed.
Information 2018, 9(9), 206; https://doi.org/10.3390/info9090206
Submission received: 18 July 2018 / Revised: 11 August 2018 / Accepted: 18 August 2018 / Published: 21 August 2018

Abstract

:
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.

1. Introduction

In the field of image processing, image interpolation and compression are areas that are consistently improving [1]. The conventional mathematical transforms currently used in image compression are the Karhunen–Loève transform (KLT), discrete Fourier transform (DFT), Walsh-Hadamard transform (WHT), discrete cosine transform (DCT), discrete sine transform (DST), discrete wavelet transform (DWT), lapped biorthogonal transform (LBT), etc. Among them, DCT is the core transform of the widely used international standards of image and video compression. In the H.265/HEVC standard [2], along with DCT, DST was first implemented in the transform coding part. HEVC uses DCT-II and 4 × 4 DST-VII. It also uses 4 × 4, 8 × 8, 16 × 16, and 32 × 32 transform unit (TU) sizes. Zhou et al. [3] provided a more detailed overview of the mathematical transforms used in image and video coding. In recent years, to provide a significant improvement in compression performance over HEVC, the joint video experts team (JVET) has launched a project to develop a future video coding (FVC) standard H.266 termed versatile video coding (VVC). In addition to DCT-II and 4 × 4 DST-VII, which are adopted in HEVC [2], an adaptive multiple transform (AMT) scheme is used for residual coding for both inter-coded and intra-coded blocks. VVC uses five DCT/DST-based transform types known as DCT-II, DCT-V, DCT-VIII, DST-I, and DST-VII; and employs 4 × 4, 8 × 8, 16 × 16, 32 × 32, and 64 × 64 TU sizes [4]. The JVET established the first draft of the VVC standard specification and the VVC test model 1 (VTM1) encoding method at its 10th meeting (10–20 April 2018, San Diego, CA, USA). Tseng and Lee [5] developed a color digital image sharpening method by using DST-I and matrix low-pass Butterworth filters.
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.

2. Unified Construction Method of the All-phase Transform

2.1. 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 k th ( k = 0 , 1 , , N 1 ) data segment is k , and the k th 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 ) = k = 0 N 1 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 ω = 2 k π / N ). A more vivid illustration of “all-phases” is shown in Figure 2.

2.2. 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 N 1 (or the two-dimensional zero-phase digital filter of size ( 2 N 1 ) × ( 2 N 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:
[ h 1 / 2 ] N = [ h ( 0 ) , h ( 1 ) , , h ( N 1 ) ] T = G F N .
The two-dimensional APDF design formula can also be uniformly expressed as: h 1 / 4 = G F 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: h ( τ ) = h ( τ ) , among them τ = 0 , 1 , , N 1 , the N-dimensional sequency response vector F N of different orthogonal transform domains can be obtained by using h 1 / 2 = [ h ( 0 ) , h ( 1 ) , , h ( N 1 ) ] T :
F N = G 1 [ h 1 / 2 ] N .
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 F N × N = G 1 h 1 / 4 G T . For example, the sequency response vector [ F N ] DFT of the DFT domain may be converted into a sequency response vector [ F N ] DCT = G DCT 1 G DFT [ F N ] 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 [ F N × N ] DCT = G DCT 1 ( G DFT [ F N × N ] DFT G DFT T ) G DCT T of the DCT domain. 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.
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.

2.3. 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.):
W ( j , k ) = 1 N i = j N 1 [ B N 2 ( i ) B N 1 ( i j ) α N ( k , i ) α N ( k , i j ) ] ,   j = 0 , 1 , , N 1 ;   k = 0 , 1 , , N 1 ,
where B N 1 and B N 2 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 condition B N 2 ( i ) B N 1 ( i ) = L ( L is a real constant number, i = 0 , 1 , , N 1 ), 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: W ( 0 , k ) = 1 N i = 0 N 1 [ B N 2 ( i ) B N 1 ( i ) ] [ α N ( k , i ) ] 2 , k = 0 , 1 , , N 1 . If the front and back windows meet the condition B N 2 ( i ) B N 1 ( i ) = L ( L is the real constant, i = 0 , 1 , , N 1 ), then W ( 0 , k ) = L N i = 0 N 1 [ α N ( k , i ) ] 2 , k = 0 , 1 , , N 1 . If α N is the WHT matrix, then W ( 0 , k ) = L , k = 0 , 1 , , N 1 ; If α N is the DCT, IDCT, or DST matrix, then W ( 0 , k ) = L N , k = 0 , 1 , , N 1 . The remaining elements of the WAPBT matrix are:
W ( j , k ) = L N i = j   N 1 [ B N 1 ( i j ) B N 1 ( i ) α N ( k , i ) α N ( k , i j ) ] = L N i = j N 1 [ B N 2 ( i ) B N 2 ( i j ) α N ( k , i ) α N ( k , i j ) ] , j = 1 , 2 , , N 1 , k = 0 , 1 , , N 1 .
It can be seen from Property 1 that different window sequences will have a great impact on the property of the WAPBT matrix.  ☐
Property 2.
When the WAPBT front and back windows meet the condition B N 2 ( i ) = L B N 1 ( i ) , i = 0 , 1 , , N 1 , L is a constant, 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 .
Proof. 
From [8], H ( i , j ) = B N 2 ( i ) A ( i , j ) B N 1 ( j ) = 1 N B N 2 ( i ) B N 1 ( j ) k = 0 N 1 F N ( k ) α N ( k , i ) α N ( k , j ) , and H ( j , i ) = 1 N B N 2 ( j ) B N 1 ( i ) k = 0 N 1 F N ( k ) α N ( k , j ) α N ( k , i ) . Then, we can get: H ( i , j ) H ( j , i ) = B N 2 ( i ) B N 1 ( j ) B N 2 ( j ) B N 1 ( i ) .
Therefore, if and only if B N 2 ( i ) B N 1 ( j ) = B N 2 ( j ) B N 1 ( i ) , for example, if B N 2 ( i ) B N 1 ( i ) = B N 2 ( j ) B N 1 ( j ) , H ( i , j ) H ( j , i ) = 1 . It can be proved that the necessary and sufficient condition of B N 2 ( i ) B N 1 ( i ) = B N 2 ( j ) B N 1 ( j ) is B N 2 ( i ) = L B N 1 ( i ) , where i = 0 , 1 , , N 1 and L is a constant. It can be seen from [8] that under the condition H ( i , j ) = H ( j , i ) , h ( τ ) = h ( τ ) , τ = 0 , 1 , , N 1 . 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:
W ( j , k ) = L N i = j   N 1 B N 1 ( i ) B N 1 ( i j ) α N ( k , i ) α N ( k , i j ) , j = 0 , 1 , , N 1 , k = 0 , 1 , , N 1 .
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.  ☐
Property 3.
When both Property 1 and Property 2 are satisfied and L = 1 , which means that the front and back windows are rectangular windows B N 1 ( i ) = B N 2 ( i ) = 1 ( i = 0 , 1 , , N 1 ), 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.

2.4. 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:
[ F N ] DCT = G DCT 1 [ h N ] WDCT ,   [ F N ] IDCT = G IDCT 1 [ h N ] WIDCT ,
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 data x , we define the APT and the inverse transform as y = A x and x = A 1 y , respectively. For two-dimensional image matrix X , we define the APT and the inverse transform as Y = A X A 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.

3. 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):
S ( i , j ) = 2 N + 1 sin ( i + 1 ) ( j + 1 ) π N + 1 , i , j = 0 , 1 , , N 1 .
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):
W ( j , k ) = { 1 N , j = 0 ;   k = 0 , 1 , 2 , , N 1 , 2 N 2 + N   i = j N 1 sin ( i + 1 ) ( k + 1 ) π N + 1 sin ( i j + 1 ) ( k + 1 ) π N + 1 , j = 1 , 2 , , N 1 , k = 0 , 1 , , N 1 .
When N = 4 ,
W 4 × 4 = [ 0.2500 0.2500 0.2500 0.2500 0.2023 0.0773 0.0773 0.2023 0.1118 0.1118 0.1118 0.1118 0.0345 0.0905 0.0905 0.0345 ] .
When N = 8 ,
W s × s = [ 0.1250 0.1250 0.1250 0.1250 0.1250 0.1250 0.1250 0.1250 0.1175 0.0958 0.0625 0.0217 0.0217 0.0625 0.0958 0.1175 0.0090 0.0332 0.0417 0.0905 0.0905 0.0417 0.0332 0.0090 0.0747 0.0273 0.0833 0.0438 0.0438 0.0833 0.0273 0.0747 0.0496 0.0596 0.0417 0.0516 0.0516 0.0417 0.0596 0.0496 0.0279 0.0579 0.0208 0.0441 0.0441 0.0208 0.0579 0.0279 0.0122 0.0352 0.0417 0.0187 0.0187 0.0417 0.0352 0.0122 0.0032 0.0115 0.0208 0.0269 0.0269 0.0208 0.0115 0.0032 ] .
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 h 1 / 2 = [ h ( 0 ) , h ( 1 ) , , h ( N 1 ) ] 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 2 N 1 consists of Equation (8), Equation (11), and Equation (12):
[ h 1 / 2 ] N = [ h ( 0 ) , h ( 1 ) , , h ( N 1 ) ] T = W F N ,
h ( τ ) = h ( τ ) ,   τ = 0 , 1 , , N 1 .
Similarly, the above one-dimensional APDST filter method can be extended to the two-dimensional case. Let h ( 2 N 1 ) × ( 2 N 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 ( 2 N 1 ) × ( 2 N 1 ) consists of Equation (13) and Equation (14):
[ h 1 / 4 ] N × N = W F N × N W T ,
h ( m , n ) = h ( m , n ) = h ( m , n ) = h ( m , n ) , m , n = 0 , 1 , , N 1 ,
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.
When N = 4 , F 4 × 4 = [ 1 1 1 0.5 1 1 0.5 0 1 0.5 0 0 0.5 0 0 0 ] is substituted with Equation (9) into Equation (13), and the left-bottom quarter of the filter can be obtained, which is:
[ h 1 / 4 ] 4 × 4 = [ 0.5000 0.1710 0 0.0033 0.1710 0 0.0313 0 0 0.0313 0 0.0063 0.0033 0 0.0063 0 ] .
According to the zero-phase symmetry characteristic of APDF shown in Equation (14), the 7 × 7 APDST filter is obtained:
[ h ] 7 × 7 = [ 0 0.0063 0 0.0033 0 0.0063 0 0.0063 0 0.0313 0 0.0313 0 0.0063 0 0.0313 0 0.1710 0 0.0313 0 0.0033 0 0.1710 0.5000 0.1710 0 0.0033 0 0.0313 0 0.1710 0 0.0313 0 0.0063 0 0.0313 0 0.0313 0 0.0063 0 0.0063 0 0.0033 0 0.0063 0 ] .
As an interpolation filter, the two-dimensional APDST filter with an order of 7 × 7 is:
[ h ] 7 × 7 = 2 [ h ] 7 × 7 = [ 0 0.0125 0 0.0066 0 0.0125 0 0.0125 0 0.0625 0 0.0625 0 0.0125 0 0.0625 0 0.3420 0 0.0625 0 0.0066 0 0.3420 1 0.3420 0 0.0066 0 0.0625 0 0.3420 0 0.0625 0 0.0125 0 0.0625 0 0.0625 0 0.0125 0 0.0125 0 0.0066 0 0.0125 0 ] .
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 ( 2 N 1 ) × ( 2 N 1 )   ( N ) can be designed. For example, the filters with sizes of 3 × 3, 5 × 5, and 9 × 9 are shown in Equations (18)–(20):
[ h ] 3 × 3 = [ 0 0.25 0 0.25 1 0.25 0 0.25 0 ] ,
[ h ] 5 × 5 = [ 0 0.0393 0 0.0393 0 0.0393 0 0.3143 0 0.0393 0 0.3143 1 0.3143 0 0.0393 0 0.3143 0 0.0393 0 0.0393 0 0.0393 0 ] ,
[ h ] 9 × 9 = [ 0 0.0053 0 0.0024 0 0.0024 0 0.0053 0 0.0053 0 0.0232 0 0.0124 0 0.0232 0 0.0053 0 0.0232 0 0.0771 0 0.0771 0 0.0232 0 0.0024 0 0.0771 0 0.3571 0 0.0771 0 0.0024 0 0.0124 0 0.3571 1 0.3571 0 0.0124 0 0.0024 0 0.0771 0 0.3571 0 0.0771 0 0.0024 0 0.0232 0 0.0771 0 0.0771 0 0.0232 0 0.0053 0 0.0232 0 0.0124 0 0.0232 0 0.0053 0 0.0053 0 0.0024 0 0.0024 0 0.0053 0 ] .
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.

4. 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.
In addition, to fully demonstrate the experimental results, Figure 8 and Figure 9 show the subjective effects by partially magnifying a part of the captured images. From the images in Figure 8 and Figure 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.

5. 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 this paper, the constructed low-pass filter is used in image demosaicking to test its interpolation performance. As the topics of future research, more low-pass filters will be constructed and applied to image interpolation, image denoising [21], image resizing [22], and many other fields of image processing.

Author Contributions

X.Z. and C.W. conceived the algorithm and designed the experiments; Q.F. derived the three properties of APWBT; C.W. and Z.Z. performed the experiments; X.Z., C.W., and Z.Z. analyzed the results; X.Z. and C.W. drafted the manuscript; X.Z., C.W., and Z.Z. revised the manuscript. All authors read and approved the final manuscript.

Funding

This research was funded by the National Natural Science Foundation of China (Grant Nos. 61702303 and 61201371); the Shandong Provincial Natural Science Foundation, China (Grant Nos. ZR2017MF020 and ZR2015PF004); and the Research Award Fund for Outstanding Young and Middle-Aged Scientists of Shandong Province, China (Grant No. BS2013DX022).

Acknowledgments

The authors thank the anonymous reviewers and editors for their valuable comments to improve the presentation of the paper. The authors also thank Xiuhong Wei, Chi Wang, Mingtong Zhang, and Yangming Zhou for their kind help in revising this paper.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Bairagi, V.K.; Sapkal, A.M.; Gaikwad, M.S. The role of transforms in image compression. J. Inst. Eng. India Ser. B 2013, 94, 135–140. [Google Scholar] [CrossRef]
  2. Budagavi, M.; Fuldseth, A.; Bjøntegaard, G.; Sze, V.; Sadafale, M. Core transform design in the high efficiency video coding (HEVC) standard. IEEE J. Sel. Top. Signal Process. 2013, 7, 1029–1041. [Google Scholar] [CrossRef]
  3. Zhou, X.; Wang, C.; Jiang, B. All phase inverse discrete sine biorthogonal transform and its application in image coding. J. Commun. 2017, 12, 72–80. [Google Scholar] [CrossRef]
  4. Mert, A.C.; Kalali, E.; Hamzaoglu, I. High performance 2D transform hardware for future video coding. IEEE Trans. Consum. Electron. 2017, 63, 117–125. [Google Scholar] [CrossRef]
  5. Tseng, C.C.; Lee, S.L. Color image sharpening using DST-based matrix low-pass Butterworth filters. In Proceedings of the 4th IEEE International Conference on Consumer Electronics—Taiwan, Taipei, Taiwan, 12–14 June 2017; pp. 363–364. [Google Scholar]
  6. Hou, Z.X.; Wang, C.Y.; Yang, A.P. All phase biorthogonal transform and its application in JPEG-like image compression. Signal Process. Image Commun. 2009, 24, 791–802. [Google Scholar] [CrossRef]
  7. Hou, Z.; Yang, X. The all phase DFT filter. In Proceedings of the 10th IEEE Digital Signal Processing Workshop and the 2nd IEEE Signal Processing Education Workshop, Pine Mountain, GA, USA, 13–16 October 2002; pp. 221–226. [Google Scholar]
  8. Fu, Q.; Zhou, X.; Wang, C.; Jiang, B. Windowed all phase biorthogonal transform and its application in JPEG-like image compression. J. Commun. 2015, 10, 284–293. [Google Scholar] [CrossRef]
  9. Wang, C.; Shan, R.; Zhou, X. APBT-JPEG image coding based on GPU. KSII Trans. Internet Inf. Syst. 2015, 9, 1457–1470. [Google Scholar]
  10. Shan, R.; Zhou, X.; Wang, C.; Jiang, B. All phase discrete sine biorthogonal transform and its application in JPEG-like image coding using GPU. KSII Trans. Internet Inf. Syst. 2016, 10, 4467–4486. [Google Scholar]
  11. Wang, C. Bayer patterned image compression based on wavelet transform and all phase interpolation. In Proceedings of the 11th IEEE International Conference on Signal Processing, Beijing, China, 21–25 October 2012; pp. 708–711. [Google Scholar]
  12. Xie, S.; Wang, C.; Yang, Z. Bayer patterned image compression based on APIDCBT-JPEG and all phase IDCT interpolation. In Proceedings of the IEEE Third International Conference on Information Science and Technology, Yangzhou, China, 23–25 March 2013; pp. 1316–1319. [Google Scholar]
  13. Wang, C.; Jiang, B.; Yuan, H. Comparison of interpolation methods in Bayer CFA image compression based on structure separation and APBT-JPEG. Int. J. Signal Process. Image Process. Pattern Recogn. 2014, 7, 87–98. [Google Scholar] [CrossRef]
  14. Wang, D.; Yu, G.; Zhou, X.; Wang, C. Image demosaicking for Bayer-patterned CFA images using improved linear interpolation. In Proceedings of the 7th International Conference on Information Science and Technology, Da Nang, Vietnam, 16–19 April 2017; pp. 464–469. [Google Scholar]
  15. Kim, Y.; Jeong, J. Four-direction residual interpolation for demosaicking. IEEE Trans. Circ. Syst. Video Technol. 2016, 26, 881–890. [Google Scholar] [CrossRef]
  16. Shi, J.; Wang, C.; Zhang, S. Region-adaptive demosaicking with weighted values of multidirectional information. J. Commun. 2014, 9, 930–936. [Google Scholar] [CrossRef]
  17. Wang, L.; Jeon, G. Bayer pattern CFA demosaicking based on multi-directional weighted interpolation and guided filter. IEEE Signal Process. Lett. 2015, 22, 2083–2084. [Google Scholar] [CrossRef]
  18. Wang, L.; Wang, C.; Zhou, X. Deblocking scheme for JPEG-coded images using sparse representation and all phase biorthogonal transform. J. Commun. 2016, 11, 1095–1101. [Google Scholar] [CrossRef]
  19. Madhukar, B.N.; Jain, S. A duality theorem for the discrete sine transform (DST). In Proceedings of the 1st International Conference on Applied and Theoretical Computing and Communication Technology, Davangere, Karnataka, India, 29–31 October 2015; pp. 156–160. [Google Scholar]
  20. Zhou, X.; Yu, G.; Yu, K.; Wang, C. An effective image demosaicking algorithm with correlation among red-green-blue channels. Int. J. Eng. Trans. B Appl. 2017, 30, 1190–1196. [Google Scholar]
  21. Fahmy, M.F.; Fahmy, O.M. Efficient bivariate image denoising technique using new orthogonal CWT filter design. IET Image Process. 2018, 12, 1354–1360. [Google Scholar] [CrossRef]
  22. Won, C.S.; Jung, S.W. Near-reversible efficient image resizing for devices supporting different spatial resolutions. J. Supercomput. 2017, 73, 3021–3037. [Google Scholar] [CrossRef]
Figure 1. Demonstration of APDF (all outputs according to inputs x ( n ) ).
Figure 1. Demonstration of APDF (all outputs according to inputs x ( n ) ).
Information 09 00206 g001
Figure 2. Demonstration of all-phases (traversing all-phases of angular frequency, the value of which is ω = 2 k π / N , in the unit circle).
Figure 2. Demonstration of all-phases (traversing all-phases of angular frequency, the value of which is ω = 2 k π / N , in the unit circle).
Information 09 00206 g002
Figure 3. Unity of APDF in different orthogonal transform domains based on DFT, DCT, IDCT, WHT, and DST.
Figure 3. Unity of APDF in different orthogonal transform domains based on DFT, DCT, IDCT, WHT, and DST.
Information 09 00206 g003
Figure 4. Diagram of APT derived from APDF theory.
Figure 4. Diagram of APT derived from APDF theory.
Information 09 00206 g004
Figure 5. The frequency response of the APDST interpolation filter with an order of 7 × 7.
Figure 5. The frequency response of the APDST interpolation filter with an order of 7 × 7.
Information 09 00206 g005
Figure 6. The block diagram of the proposed image demosaicking method.
Figure 6. The block diagram of the proposed image demosaicking method.
Information 09 00206 g006
Figure 7. Kodak test images.
Figure 7. Kodak test images.
Information 09 00206 g007
Figure 8. A partial enlargement of Figure 7g: (a) original image, (b) bilinear interpolation, (c) APIDCT interpolation, and (d) APDST interpolation.
Figure 8. A partial enlargement of Figure 7g: (a) original image, (b) bilinear interpolation, (c) APIDCT interpolation, and (d) APDST interpolation.
Information 09 00206 g008
Figure 9. A partial enlargement of Figure 7s: (a) original image, (b) bilinear interpolation, (c) APIDCT interpolation, and (d) APDST interpolation.
Figure 9. A partial enlargement of Figure 7s: (a) original image, (b) bilinear interpolation, (c) APIDCT interpolation, and (d) APDST interpolation.
Information 09 00206 g009
Table 1. Comparisons of PSNR and CPSNR among bilinear interpolation [14], APIDCT interpolation [11], and APDST interpolation of Kodak images with a size of 512 × 768 or 768 × 512 in PNG format.
Table 1. Comparisons of PSNR and CPSNR among bilinear interpolation [14], APIDCT interpolation [11], and APDST interpolation of Kodak images with a size of 512 × 768 or 768 × 512 in PNG format.
Test ImagesBilinear [14]APIDCT [11]APDST
PSNR/dBCPSNR/dBPSNR/dBCPSNR/dBPSNR/dBCPSNR/dB
RGBRGBRGB
Figure 7a24.9729.4725.3026.1624.8831.1925.1126.2624.8731.2325.0826.25
Figure 7b31.8535.9231.4332.6531.7337.1231.2032.6631.7337.1631.1732.65
Figure 7c32.6336.6132.6833.6232.6437.8232.3933.6732.6537.9632.3633.69
Figure 7d32.2036.2232.2033.1732.3737.4832.1933.4332.3937.5532.1933.45
Figure 7e25.5129.1825.9926.6225.6230.6525.9626.8925.6230.7125.9426.89
Figure 7f26.4130.8826.7427.5926.2432.3326.4127.5826.2332.4726.3827.57
Figure 7g31.9935.9832.0232.9732.3137.5532.1733.4032.3437.7132.1633.44
Figure 7h22.4627.3522.7223.6822.3429.5422.5023.7822.3329.6122.4723.76
Figure 7i31.0635.4831.3332.2131.2037.4031.2632.4931.2137.5531.2632.51
Figure 7j31.0935.1331.1832.1131.1236.6731.0332.2831.1336.8031.0332.29
Figure 7k28.0732.2028.4029.2027.9833.3428.1829.2427.9733.3828.1629.23
Figure 7l31.1836.2032.0532.6631.2237.7131.8332.7831.2538.0331.8232.82
Figure 7m23.0226.4523.1223.9322.9026.9922.9123.8922.8926.9922.8923.88
Figure 7n28.0731.8828.2129.0728.0433.1428.0729.1928.0333.1928.0429.18
Figure 7o29.7434.4230.4031.0929.7435.5830.1631.1529.7435.7130.1431.16
Figure 7p29.9334.3629.7030.8729.6835.9029.3930.8229.6636.0129.3630.81
Figure 7q31.4334.5730.7631.9631.4235.4030.7632.1031.4135.4330.7632.10
Figure 7r27.1930.4526.9427.9327.1731.1926.8228.0027.1731.2026.8027.99
Figure 7s27.0231.7627.1328.1526.9734.0026.9928.3326.9634.0626.9728.32
Figure 7t29.9333.8029.7530.8129.8034.9829.7430.9229.8235.2029.7530.96
Figure 7u27.5631.5027.5328.5127.4832.7327.3528.5827.4632.7827.3328.57
Figure 7v29.8033.3329.3330.4929.7534.5029.2330.6129.7534.5729.2130.61
Figure 7w33.4337.5633.6234.5033.6939.3033.8434.9633.7339.5733.8435.01
Figure 7x26.3429.4325.3326.7226.2330.1725.2026.7326.2230.2025.1826.73
Table 2. Comparisons of SSIM and MSSIM among bilinear interpolation [14], APIDCT interpolation [11], and APDST interpolation of Kodak images with a size of 512 × 768 or 768 × 512 in PNG format.
Table 2. Comparisons of SSIM and MSSIM among bilinear interpolation [14], APIDCT interpolation [11], and APDST interpolation of Kodak images with a size of 512 × 768 or 768 × 512 in PNG format.
Test ImagesBilinear [14]APIDCT [11]APDST
SSIMMSSIMSSIMMSSIMSSIMMSSIM
RGBRGBRGB
Figure 7a0.74980.91200.76260.80810.74440.93160.75630.81080.74400.93210.75520.8104
Figure 7b0.88840.94320.86270.89810.88160.95130.85790.89690.88230.95160.85730.8970
Figure 7c0.91880.96540.91350.93260.91470.96770.90990.93080.91560.96910.91000.9316
Figure 7d0.89360.95110.89010.91160.89080.95630.88810.91170.89210.95680.88860.9125
Figure 7e0.94600.94000.84850.87820.84850.95520.84840.88400.84850.95580.84800.8841
Figure 7f0.81600.92800.79810.84740.80760.94190.78690.84550.80860.94440.78650.8465
Figure 7g0.94280.97560.94170.95340.94280.97730.94260.95430.94400.97880.94300.9553
Figure 7h0.77890.92220.77680.82590.77170.94250.76740.82720.77130.94330.76650.8270
Figure 7i0.90510.95840.89660.92000.89910.96050.89020.91660.90060.96180.89170.9180
Figure 7j0.90380.95970.89480.91940.89870.96430.88910.91740.89960.96540.89040.9185
Figure 7k0.84100.93660.83060.86940.83460.94900.82310.86890.83440.95000.82250.8690
Figure 7l0.88060.95680.88520.90750.87270.95970.87890.90380.87440.96320.87940.9057
Figure 7m0.71990.88260.71590.77280.71580.89640.70690.77300.71560.89680.70620.7728
Figure 7n0.84240.93490.83740.87160.84030.94710.83550.87430.84040.94780.83510.8745
Figure 7o0.89630.95430.89260.91440.89130.95290.88710.91040.89260.95570.88780.9120
Figure 7p0.84960.94260.84020.87750.84230.95400.83230.87620.84250.95560.83200.8767
Figure 7q0.91000.95990.90550.92510.90890.96350.90510.92580.90930.96360.90540.9261
Figure 7r0.84720.93150.82450.86770.84790.94150.82340.87090.84790.94160.82320.8709
Figure 7s0.85110.93580.82980.87220.84720.94540.82340.87200.84790.94610.82390.8727
Figure 7t0.92180.95980.87270.91810.91270.95430.86460.91060.91740.96060.86680.9149
Figure 7u0.87090.94360.85140.88860.86730.94850.84710.88770.86780.95020.84750.8885
Figure 7v0.86770.93840.84810.88480.86520.94670.84590.88600.86600.94790.84580.8866
Figure 7w0.94730.97490.94650.95620.94420.97360.94630.95470.94550.97540.94650.9558
Figure 7x0.84530.93880.84300.87570.84360.94990.83980.87780.84400.95100.87820.8782

Share and Cite

MDPI and ACS Style

Zhou, X.; Wang, C.; Zhang, Z.; Fu, Q. Interpolation Filter Design Based on All-Phase DST and Its Application to Image Demosaicking. Information 2018, 9, 206. https://doi.org/10.3390/info9090206

AMA Style

Zhou X, Wang C, Zhang Z, Fu Q. Interpolation Filter Design Based on All-Phase DST and Its Application to Image Demosaicking. Information. 2018; 9(9):206. https://doi.org/10.3390/info9090206

Chicago/Turabian Style

Zhou, Xiao, Chengyou Wang, Zhi Zhang, and Qiming Fu. 2018. "Interpolation Filter Design Based on All-Phase DST and Its Application to Image Demosaicking" Information 9, no. 9: 206. https://doi.org/10.3390/info9090206

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop