Iterative based image and video denoising by fractional block matching and transform domain filtering

This paper presents an iterative algorithm for image and video denoising which is based on fractional block-matching and transform domain filtering. We propose fractional motion estimation technique to find the most accurate similar blocks for each block of an image which improves sparsity enabling effective image denoising. By taking the advantage of blocks similarity and wavelet transform domain filtering along with weighted average function (WAF) in an iterative based manner, we achieve a higher level of sparsity and a better exploiting of blocks similarity redundancies of noisy images that increase the chance of preserving details and edges in the restored image. Since our algorithm is iterative, we can tradeoff between image denoising degree and computational complexity. In addition, we develop a video denoising algorithm based on the proposed image denoising algorithm. The simulation results of images and videos contaminated by additive white Gaussian noise demonstrate that our algorithm substantially achieves better denoising performance compared with previously published algorithms in terms of subjective and objective measures.


I. Introduction
Nowadays, image and video have many applications in our life such as medical imaging systems, video conference, multimedia entertainment, camera surveillance and etc. However, image and video that are captured by imaging systems are corrupted by noise. As a result, efficient image and video denoising algorithms are required to compensate such data corruption. Over the past 6 decades, numerous research work have investigated image denoising problem from many different points of view that resulted in several significant noise removal algorithms. Though, image and video denoising still is a major challenge and an important job because noise removal leads to blurring and visual quality degradation.
In general, noise reduction methods can be classified into two broad categories: spatial filtering and transform domain filtering. Spatial filtering refers to the approaches that change the value of each image pixel by a function of its neighborhood pixels. Spatial domain methods can be further divided into linear filters (e.g. Mean and Wiener filters) and nonlinear filters such as median, weighted median [1], rank [2] and non-local means (NLM) [3] filters. Generally, nonlinear filters have better performance compared with linear filters at the price of higher complexity.
In transform domain methods, the noisy image is first transferred into intended domain and its transform coefficients are obtained. Then, high-amplitude coefficients that include most of signal energy are kept. Next step is removing of remained coefficients which are originated from noise. Finally, the denoised image is obtained from the reverse transform of highamplitude coefficients.
Transformed domain image denoising algorithms can be categorized based on basis functions. The basics functions can be further divided into data adaptive methods (such as ICA [4], PCA [5,6] and K-SVD [7] algorithms) and non-adaptive approaches like frequency domain and wavelet algorithms [8]. Compared with non-adaptive methods, adaptive algorithms require much more computational complexity since they need to noiseless training samples.
In 2007, K. Dabov et al. introduced blocks matching and 3-D filtering (BM3D) algorithm [9]. By combining the spatial domain and transform domain methods, they increased the efficiency of image denoising process and proposed a new method for image and video denoising. To aim this, group of similar patches in spatial domain (i.e. block matching process) and collaborative filtering as a transform domain method are combined together leading to using of similar patches in filtering process of other patches. Based on the similar idea of Dabov et al., later algorithms such as MSK-SVD [10], LPG-PCA [11], NLM [12] and enhanced ICA [13] were proposed which used both spatial domain filtering and transform domain filtering. However, their higher image denoising efficiency comes at price of higher computational cost.
In this paper, we introduce iterative based fractional block matching transform domain filtering (IFBM) algorithm for image and video denoising which outperforms previous state of art image denoising works. In the proposed algorithm and in the first iteration, each image is divided to N×N blocks and for each block (i.e. current block) fractional block matching is carried out. This process determines several similar blocks for each current block. Then, wavelet domain filtering is done for the current block which includes forward discrete wavelet transform, soft threshold filter and inverse discrete wavelet transform. The result of this step is a denoised current block which is used for replacement of the similar blocks. The above described procedures are done for all current blocks. Then, WAF is used to compute the weighted average of several similar denoised blocks which increases the preserving the image details and edges. To improve the denoisng performance the second and afterward iterations are carried out in the similar way except that we use Wiener filter instead of soft threshold filter. However, higher denoisng performance comes at the price of more iterations and computational cost. The simulation results reveal that even with two iterations, the IFBM algorithm leads to better denoisng results compare with the previous published works including the BM3D, K-SVD and LPG-PCA algorithms. The key process which results in a better denoising performance is fractional block matching which highly increases the block matching accuracy of similar blocks. As discussed in [14], natural images contain regions which are similar to other regions at the same scale/orientation and across scales/orientations. It has shown that there exists significant self-similarity between square blocks of fixed size extracted from a single image which this term is closely related to nonlocal image modeling. So with no surprise, fractional motion estimation with higher accuracy can achieve much better denoising performance in comparison with integer block matching motion estimation.
The rest of this paper is as follows. In Section II, the details of our algorithm and the proposed techniques are illustrated. Section III describes the extension of the proposed algorithm for color images and video. Computational cost analysis, experimental results and performance comparison with the state of art algorithms are presented in Section IV. Finally, we conclude this paper in Section V. This section describes the details of our algorithm. The IFBM algorithm carries out noise removal operation in similar successive stages based on an iterative method, as shown in Figure 1. The performance of our algorithm depends on the number of iterations. The higher the number of iterations is, the better the quality of the obtained denoised image is. This means that we can tradeoff between the computational complexity and the quality of the denoised image. The most parts of first and the other iterations steps are similar. As a result, we first give the details of the building blocks of the first iteration step. Then, we briefly illustrate the next iteration steps with more emphasis on the new blocks. The main blocks of each stage are fractional block-matching process with quarter-pixel accuracy, wavelet filtering (which includes forward 2D discrete wavelet transform, threshold filter, inverse 2D discrete wavelet transform), WAF, estimating of the denoised image and block-matching process.   Fractional block-matching process with quarter pixel accuracy Block-matching motion estimation algorithm with integer-pixel accuracy is widely used for image and video restoration and video compression. In general, each block of size N×N (i.e. 8×8) is matched against all reference blocks within a search area with a range of [-w, w-1], as shown in Figure 2. The matching criterion is Sum of Absolute Differences (SAD), as given in (1).
In (1), (i, j) is the current position (motion vector), C(m, n) is a pixel value of the current block, and R(m+i, n+j) refers to a pixel value of the reference block in the search area. Please note that the search area in our algorithm is equal to the size of a still image. When the size of the still image is 256×256 pixels, it contains of 32 non-overlap blocks with a size of 8×8 pixels. For a still image with a size of 512×512 pixels, the number of 8×8 non-overlap blocks is equal to 64. In order to decrease the computational cost, the block matching is carried out in raster order and only for 32 non-overlap blocks. After matching the current block against all non-overlap blocks, the positions of non-overlap blocks that their SAD values are lower than a block matching threshold (i.e. ), are selected as the best integer matched blocks. The threshold value for each current block is computed as follows. As shown in Figure 3, we first divide an 8×8 current block into two 8×4 sub blocks and calculate the SAD of them (i.e. SAD1). Then, we divide that current block into two 4×8 sub blocks and compute their SAD (i.e. SAD2). The threshold value is equal to the average of Current Block Search Area N N SAD1 and SAD2, as given in (2). Next current block is the previous current block which is shifted n pixels (i.e. n=4) to the right and the same process is repeated for it. λ BM = average(SAD 8×4 , SAD 4×8 ) (2) To improve the performance of integer-pixel block-matching algorithm, recent video coding standards such as H.264 [15] and H.265 [16] use fractional block-matching at price of more computational cost. To the best of our knowledge, block-matching with fractional accuracy has not been used for image and video denoising. Therefore, we use fractional block-matching algorithm to improve the accuracy of block similarity which significantly increases the overall performance of image denoising, as will be shown in Section IV.

Figure 3: Illustration of different partitions of an 8×8 current blocks for calculation the threshold of block matching
After integer-pixel block-matching, first sub-pixel values are calculated using bilinear or bicubic interpolation [17]. Then, fractional motion estimation is carried out for all the best integer matched blocks, which is usually conducted in two steps, as shown in Figure 4 [18]. In the first step, half-pixel refinement is performed by searching eight half-pixel positions around the best integer matches. This means that the search area in this step is equal to [-0.5 , +0.5]. Then, the quarter-pixel refinement is carried out in the same manner around the best half-pixel candidates with a search area of [-0.25, +0.25]. The result of quarter-pixel refinement determines the most similar block to the current block. The current block and its associated motion vectors of similar blocks are categorized and hold to use in the next steps.  It is worth to mention that there are many integer and sub-pixel block-matching algorithms in the literature [19], [20]. Among them all, the full search algorithm results in the best visual performance. However, full search algorithm needs higher computational requirement than other algorithms (i.e. fast algorithms).

 Wavelet filtering
After fractional block-matching, wavelet filtering is carried out. The main idea in this stage is to remove the noise of the image while preserving the perceptual fidelity of the visual information. Wavelet filtering conducted in three steps for each current block of noisy image including forward discrete wavelet transform, linear/nonlinear filtering and inverse discrete wavelet transform which are described here.

 Wavelet Transform
Wavelet transform is widely used for image and video denoising processing [21] because of its multiresolution nature and computational efficiency. Wavelet transform decomposes a signal into a set of basis functions. Wavelets are derived from a single prototype wavelet ψ (t) called mother wavelet by scaling and translation as given in (3): Here, s denotes the scale factor; τ is the translation factor and √ refers to the energy normalization across the different scales. The presented continuous wavelets in (3) are very redundant. Discrete wavelets can solve this problem. Although they are not continuously scalable and translatable, they can only be scaled and translated in discrete steps hence piecewise continuous [22]. The discrete wavelet at level "l" is given in (4) and can be extended easily to 2D case for image processing.
where ( ) is the scaling function and g(.) is the wavelet filter.
Forward discrete wavelet transform of an image is obtained by passing it through a bank filter of high pass and low pass filters followed by the downscale sampling(2↓), as depicted in Figure 5. This process can continue as far as needed. In this manner, the image decomposes to an approximation image and several smaller detail images. The outputs are the details coefficients (from the high pass filters) and approximation coefficients (from the low pass filters). The results suggest that details coefficients have high absolute value and carry more signal information than noise, while the amplitude of approximation coefficients are small and dominated by noise. In our algorithm, we have two levels of decomposition and perform filtering process for all produced subands. In addition, among different basis functions that exist for wavelet decomposition [23], we use bi-orthogonal spline wavelet (bior1.5) in the first iteration and Daubechies wavelet (db8) in the second and third iterations.

 Threshold filter
The main idea behind the filtering process is to keep of high-amplitude coefficients that preserve most of image information and to remove the approximation coefficients (i.e. noisy coefficients). Generally there are different wavelet domain filters which are broadly categorized into linear filters and nonlinear filters. Nonlinear filters are based on thresholding technique which is further divided into hard thresholding and soft thresholding [24]. In hard thresholding method, the coefficients that are smaller than a threshold, are set to zero, otherwise, are kept. The "keep or kill" nature of hard thresholding generates image artifacts due to unsuccessful attempts of removing moderately large noise coefficients [25]. To reduce the image artifact, soft thresholding method is used that shrinks the coefficients above the threshold in absolute value. Soft thresholding improves the performance of image denoising in comparison to hard thresholding because of the continuity of soft thresholding, especially when noise level is significant. In addition, optimal soft thresholding yields a smaller risk than the optimal hard thresholding as discussed in [26].
In the wavelet domain, an observed image that is corrupted by additive white Gaussian noise of zero mean and variance 2  N  can be represented by (5): In (5), Y(i, j) is noisy image, S(i, j) is noiseless image and N(i, j) is additive white Gaussian noise . In (6) and (7), Hard and soft thresholding with a threshold equals to ¸ are defined as follows: The hard thresholding operator is defined as: The soft thresholding operator on the other hand is defined as: (6) and (7), the threshold is calculated from the average of the SAD values of the best matched blocks of each current block and its block matching threshold (i.e. ) as described in the first iteration step, as given in (8): After applying soft thresholding to each current block, we have its filtered version. Now each current block and all its similar blocks are replaced by the filtered version of current block using motion vector information of fractional block matching process.
Inverse discrete wavelet transform is last step in the wavelet filtering process. This process gives the denoised referenced block which is utilized in the next stage.

 Weighted average function (WAF)
In this step, the denoised current block (that is calculated after inverse discrete wavelet transform) is mapped to its original location and other overlapped locations associated blocks that had lowest SAD values in fractional block-matching stage. This process is carried out for all current blocks. The result of this process is different estimations for each block. The final estimate of the denoised image (in each iteration) is constructed from weighted averaging of overlapped blocks which are based on a weighted average function. This weighted average function ( ) maps each denoised current block to locations of its similar blocks using their motion vectors from fractional motion estimation which is given in (9): is final estimate of current block, w(i, j) is a weight function of overlapping blocks and ) is an estimate of each current block which is obtained from denoised overlapped blocks. In first iteration that uses soft threshold filter, w(i, j) is obtained from (10), where N soft is the number of non-zero coefficients of each block after inverse discrete wavelet transform and 2  is variance of the current block.
The main idea behind weighted average function is to use the average of several similar denoised blocks (that have lower SAD values in sub-pixel block matching process) instead of just one denoised block. In this way, the chance of preserving details and edges in the restored image is increased.

 Basic estimate
The outcome of the weighted average function is a first estimate of the noisy image. Although the basic estimate demonstrates acceptable image denoising performance, some of image details may be lost, especially for high level noise scenarios. To mitigate this problem, we use the first estimate as a pilot signal for using in the next iteration which leads to better image denoising results.

b) Second and afterward iterations
To improve the quality of denoised image and preserving more image details, we carry out one or more image denoising iteration at the price of more computational cost. In this way, we can make a good compromise between denoising performance and computational requirements. However, as the number of iterations is increased and becomes greater than three, image denoising performance improvement is reduced and may lead to smoothing the details of denoised image. That is the reason we suggest to use three iterations for the proposed algorithm. The most parts of the second and the next iterations are similar to the first iteration and thus they are not described here again. However, there is a difference between them which is use of Wiener filter instead of soft threshold filter. A Wiener filter is a minimum mean square error filter in the sense of Gaussian noise [27]. It has been used in many image denoising algorithms including spatial and frequency domains. However, denoising performance of Wiener filter decreases in image details and edges. To overcome to this problem, Kazubek applied Wiener filter in Wavelet domain [28]. Yet, his work suffers from poor performance at high level noise. To achieve a good performance, Wiener filter needs to the noiseless (i.e. original) image and noise information which are not accessible in practice. To solve these problems, for each current block of noisy image, we use soft threshold filtering together with fractional block-matching in the first iteration to calculate an estimate of the noiseless image. Then, we utilize the estimate image and Wiener filter along with sub-pixel block-matching which result in much better performance in comparison to previous works, as will be shown in experimental result section.
In the proposed algorithm, Wiener filter is used in the second iteration based on (11) where ̂( ) is the PSD of the denoised image in the first iteration. N(w) is the PSD of the estimated noise in the first iteration. H opt in our algorithm is obtained from (14) where Wiener  is the threshold of Wiener filter which is calculated from (15).
In (15), are the SAD values of similar blocks of current block and is the SAD value of current block in the restored image achieved from first iteration. When performing third iteration, we must use the SAD values that calculated from the restored image of the second iteration. After denoising of each current block using Wiener filter, the resulted denoised block is replaced on its position and the positions of its similar blocks using motion vectors from block matching process. The result of this stage is several estimates for each block. Finally, WAF of Wiener filter is used to calculate the weighted average of each block. Please note that due to use of Weiner filter in the second and next iterations, weighted average function is changed and is calculated from (16).

III. Extending the IFBM algorithm to color image denoising and video denoising a) Color image denoising
The straightforward way for applying the proposed algorithm to color images is to separately apply our algorithm to the Red (R), Green (G) and Blue (B) channels of a noisy color image. While the implementation of this method is simple, it does not consider the strong spectral correlation between the R, G and B channels. In addition, all calculations are independently performed for each channel resulting in three times more computational cost.
To reduce these problems, at first, we perform a color space transform (i.e. YCbCr) on the noisy image to reduce high correlation between the R, G, and B channels. Then, we only perform fractional block-matching for luminance and based on its results, the same positions of similar blocks are considered for chrominance channels. The reset part of our algorithm is similar for gray scale image and color image. In this way, the computational burden of fractional block-matching is reduced and the structural similarities are imposed from the luminance channel to the chrominance channels. The main reason for imposing of structural similarities from the luminance channel to the chrominance channels is that the luminance channel contains the most important parts of image information such as edge and details. In addition, the luminance channel generally has higher PSNR/SNR than chrominance channels [29] and [30].

b) Video noise removal based on the proposed algorithm
Noise removal of video sequences is an attractive and an important research field which has many applications such as digital video recording systems, video archive and medical imaging systems. This subsection describes our video denoising algorithm which is based on our image denoising algorithm. In general, successive frames of videos are very similar. This similarity is called temporal redundancy. Another kind of redundancy is spatial redundancy which is related to the similarities in an image/frame. In fact, the proposed image denoising benefits from the spatial redundancy. By using our image denosing algorithm and taking advantage of temporal redundancy of successive video frames, we can design a high performance video denosing algorithm. To aim this, for each current block of the current video frame, we apply our image denoising algorithm to the current frame and its neighborhood frames, as depicted in Figure 6. As seen in this figure, for each current block in the current frame, we perform block-matching motion estimation with quarter pixel accuracy within current frame, previous frame (i.e. Ref-1) and next frame (i.e. Ref+1). The other parts of the video denoising algorithm are similar to our image denosing algorithm including color video denoisng techniques.

IV. Experimental results and discussion
This section firstly explores the computation cost of the proposed algorithm. Then, quality metrics for image quality assessment are briefly reviewed. Finally, it gives the experiment results of the IFBM algorithm and compares its performance to state-of-the-art algorithms including different gray scale and color images, JPEG coded images [31] and gray scale videos.

a) Computational complexity analysis of the proposed algorithm
Computational complexity of our algorithm in terms of the number of arithmetic operations linearly depends on the size of input noisy image (i.e. M×N) as well as the number of iterations. As shown in Figure 1, each iteration consists of two major parts including spatial domain portion (i.e. block matching process and weight averaging function) and transform domain part (i.e. wavelet filtering). Therefore, we model the total computational cost of the proposed algorithm with (17). In this equation, M×N is the dimensions of input noisy image and i parameter represents the number of iterations. In addition, CC BM , CC WF and CC WAF terms represent the computation cost of the block matching, wavelet filtering and weighted averaging function, respectively.
In (17), CC BM is obtained from:  Here, A 1 is the sub-pixel accuracy parameter and equals to 1, 2 and 4 for integer, halfpixel and quarter pixel accuracies, respectively.  A 2 defines the interpolation method for half and quarter-pixel generation and equal to 8 and 16, correspondingly. Note that for integer case, A 2 =1.  N current_block denotes the size of current block that equals to eight with a power of two.  N similar_block refers to the maximum number of blocks that are similar to current block.
We can define an upper bound (i.e. 32) to reduce the computational requirement. If 32 similar blocks are found, the search is terminated and block matching for next current block is started.  N search is search area of current block within the noisy image. As stated, the whole of search area may not be scanned if the number of similar blocks hits the upper bound.  N shift is the number of pixels that the current block is shifted just before starting a search for next current block.
CC WT is the next term in (17) which denotes the computational cost of the Wavelet filtering stage. It consists of three parts including forward wavelet transform, threshold/Wiener filters and inverse wavelet transform. The properties of these parts depend on many parameters such as decomposition level and basis function of wavelet transform, the value of thresholds (which is different for each block) and etc. Due to above mentioned properties; CC WT is not constant value. Therefore and for simplicity, we consider it as constant value for each iteration. CC WAF is the last term in (17) that represents weighted averaging function which is denoted as: As illustrated in section II, WAF is used for averaging of several denoised similar blocks. The value of WAF depends on the number of estimated overlap denoised blocks (i.e. W), the size of current block and the number of similar blocks. Since W and N similar-blocks are not constant, we approximate WAF with a constant value.

b) Quality metrics for image quality assessment
To evaluate the performance of the proposed algorithm, we use peak signal-to-noise ratio (PSNR) and the Structural Similarity (SSIM) index measures as evaluation metrics [32], [33]. PSNR is a mathematical measure of image quality based on the pixel difference between reconstructed image compared with original image and is defined as in (20):

( )
Where S=255 for an 8-bit image and MSE is Mean Square Error between the original and the distorted images.
Another measure for evaluating the performance of image quality is SSIM that was proposed by Wang et. al. It is calculated as follows: Firstly, the original and distorted images are divided into blocks of size 8× 8 and then the blocks are converted into vectors. Secondly, two means and two standard derivations and one covariance value are computed from the images as in (21), (22), and (23).
Thirdly, luminance, contrast, and structure comparisons based on statistical values are computed. The structural similarity index measure between images x and y is given by (24) where c 1 and c 2 are constants. Note that SSIM is applied locally using sliding window of size B×B that moves pixel by pixel horizontally and vertically covering all the rows and columns of the image, starting from top-left corner of the image.

c) Gray scale and color images denoising
To evaluate the performance of the proposed algorithm, we use a data set of gray scale and color images and use PSNR and SSIM measures as evaluation metrics. For this purpose, we firstly calculate the efficiency of our algorithm for different pixel accuracies including integer, half-pixel and quarter-pixel accuracies with three iterations. Then, we show the experiment results of the proposed algorithm with quarter-pixel accuracy with different level of iterations and different interpolation methods. In addition, we compare denoising performance of the IFBM algorithm with the BM3B, KSVD, LPG-PCA algorithms. The proposed algorithm is an iterative based algorithm and the one must choose the number of iterations how wish to examine. The higher the number of iterations is, the better the image denoising results are, but it will take longer time to calculate the denoised image. Table 1 gives the simulation results of the proposed algorithm with different pixel accuracies for five gray scale images (i.e. Couple(512×512 pixels), Hill(256×256 pixels), Lena(256×256 pixels), Man(1024×1024 pixels) and Monarch(256×256 pixels) and two color images (including Lena(512×512 pixels) and Barbara(512×512 pixels) in terms of dB PSNR and SSIM for different noise levels (i.e. σ = 10, 20, 30 and 40) and three iterations. As seen in this table, the accuracy of block matching process has a significant effect on denoising performance. For example, increasing the accuracy from integer to quarter-pixel for the gray Couple and Lena images with σ = 10 result in 5.2 dB PSNR and 3.7 dB PSNR denoising improvements, correspondingly. Table 2 shows the performance of our algorithm for different iteration numbers and for the same images and noise levels that are used for Table 1. As seen in Table 2, the best performance is when the iteration number is three. That is because the pilot signal for the third iteration is more accurate than the second pilot signal. The higher the number of iterations is, the better the image denoising results are, but it will take longer time to calculate the denoised image.

Table 1: Simulation results of the proposed algorithm for different gray scale and color images at different noise level and for integer, half-pixel and quarter-pixel accuracies of the proposed algorithm
In Table 2, we give the simulation results for bilinear and bicubic filters which are used as interpolation methods for calculating sub-pixel values where the bicubic method outperforms the bilinear version. The reason is that, for calculating the sub-pixels, the bilinear filter uses four neighborhood pixels whereas the bicubic filter needs to sixteen neighborhood pixels. As a result, the bicubic method leads to more accurate sub-pixels at the price of more computational cost.     Table 3 gives the performance comparison results of the IFBM algorithm with three iterations and BM3B, KSVD, LPG-PCA algorithms for the same images and noise levels that are used for Table 1. As seen in Table 3, our algorithm achieves the much better denoising performance relative to BM3B, KSVD, LPG-PCA algorithms in terms of PNSR and SSIM measures even at heavy noise levels. For two iterations and based on Table 2, our algorithm still shows better results compared with previous algorithms. Figures 7 and 8 show the denoised version of the Couple and Barbara images corrupted with Gaussian white noise (i.e. σ ), respectively. As seen in these figures, the denoised images of our algorithm have best visual quality retaining the edges and details. For example, our algorithm preserves the details of faces in the Barbara and Couple denoised images while faces are blurred in the other algorithms. In addition, BM3B, KSVD, LPG-PCA algorithms leads to image artifacts while the proposed algorithm shows no or negligible artifacts as seen in Figures 7 and 8.

d) Denoising of JPEG images
JPEG is a block-transform compression method for digital images where tradeoff between image quality and storage size can be made by determining the degree of compression. While block-transform compression method of JPEG is simple and efficient, it also leads to undesirable artifacts including blocking and ringing artifacts [34]. Due to popularity of JPEG images, we investigate denoising performance of the proposed algorithm for JPEG images. To evaluate the performance of our algorithm, we use the gray Lena (256×256 pixels) and gay Hill (256×256 pixels) images which are encoded with JPEG [35]. For these images different compression ratios and noise levels are used. Figure 9 shows fragments of the gray scale Lena, coded Lena (compression ratio=2.5), noisy version of coded Lena(σ=10), denoised of coded Lena using the proposed bilinear algorithm and denoised of coded Lena with the proposed bicubic algorithm from left to right. Similar example with different compression ratio (i.e. 3.3) and noise level (i.e. σ = 40) is shown in Figure 10.  In addition to Lena, We perform the simulation for the gray Hill image with a compression ratio of 2.9 and σ =10, as given in Figure 11. As seen in figures, the proposed algorithm demonstrates good visual performance for both images with different levels of noise and compression ratios.

(d)Video denoising results
This subsection gives the results of video denoising for our algorithm (i.e. Video IFBM(V-IFBM)) with different pixel accuracies and compares its performance with well-known Video BM3D (V-BM3D) algorithm [36]. Table 4 presents the experimental results of the V-IFBM and V-BM3D algorithm at different noise levels for Coastguard (288×352 and 300 frames), Foreman (288×352 and 300 frames), Football (240×352 and 125frames), Hall monitor (288×352 and 300 frames), Tennis (240×352 and 112 frames), Foreman color (288×352 and 300 frames) and Tennis color (240×352 and 112frame) image sequences in terms of PSNR and SSIM measures. As seen in Table 4, the proposed algorithm results in much better denoising performance compared with V-BM3D algorithm especially with quarter-pixel accuracy in terms of dB PSNR and SSIM Criteria. Figure 12 shows the denoising performance of the proposed and V-BM3D algorithms for 40 frames of Tennis and Football image sequences in terms of dB PSNR. From Figure 12, we can see that our algorithm outperforms the V-BM3D algorithm while the proposed algorithm uses only two reference frames whereas the V-BM3D algorithm four reference frames. This means that with lower computational cost, our algorithm obtains better denoising performance than V-BM3D algorithm.

V. Conclusion
In this paper we introduce the IFBM algorithm which is very effective for gray scale image denoising. The proposed algorithm benefits from spatial domain and transform domain advantages to improving sparsity representation by using several techniques including fractional block-matching with quarter-pixel accuracy, wavelet domain filtering and WAF. Since the IFBM algorithm is iterative, can tradeoff between the computational complexity and the quality of the denoised image. In addition to gray scale images denoising, the proposed algorithm has been extended for color image and video denoising as well. The experimental results show that the IFBM algorithm achieves much better denoising performance compared with the state of the art algorithms in terms of subjective and objective measures.