1 Introduction

Nowadays, massive images in the internet lead a advancement in the image processing, and CUDA parallel processing is introduced into the image processing due to the superior processing capacity. Vision is the main channel for people to obtain external information, so using a variety of different observation systems to obtain the application of video image is very extensive. But due to various factors, the image quality declines, such as the defects of imaging equipment, system defocus, relative motion of object and imaging system, illumination and so on external environment factors interference [19]. The image is always low in contrast and small in dynamic range, polluted by noises, and fuzzy in edge so that the image understanding has been seriously affected. It has an impact on the people’s normal access to information from the digital image, especially the video image obtained from the video surveillance equipment [3].

With the rapid development of communication technology and network technology, the large-scale transmission of image data has become reality, meanwhile, the transmission speed has also been improved [6]. It is common for image data to be transferred from one computer to another, from one plant to another, from one city to another, and even between Earth and spacecraft [4]. Nowadays, in many practical field, people rely on image data even more than before. People also pay more attention to the quality of image quality [17]. Because of the interference within the system itself or come from the external environment, the image data does not always reflect the true information. This situation to the real life, production has brought a lot of inconvenience. To eliminate noise and obtain more accurate image information, many scholars have carried out in-depth study of various denoising models [7].

2 State of the art

The purpose of image denoising is to reduce the noise in the image as much as possible while preserving the original texture feature and details in the image as much as possible. Image denoising method uses a variety of filtering techniques, multi-point smoothing method from the known noise-containing images to remove the noise component. It is often an image that is contaminated by unpredictable noise [16]. The presence of these noises obscures the details of the image and renders the target unrecognizable, which seriously affects the subsequent application of the image. Therefore, the image denoising technique has been paid more and more attention by scholars, and has gradually developed into an important branch of image processing. In the 1940s, N. Wiener et al. Proposed the well-known Wiener filter theory, which illustrates the linear filtering theory under balanced conditions, which are applied in image processing and are also widely used in other fields [13]. However, the linear filtering is for the development of stationary signal processing, and for this non-stationary image signal, the linear filtering method is obviously inappropriate, especially the linear filtering of the multiplicative noise and impulse noise denoising ability is poor [15]. It also causes the edge blur, but has the very good smooth function to the additive noise linear filter. Turkey in 1971 proposed the idea of median filter, this method was later used in image processing to filter out image noise, get a better effect [9]. Since then, non-linear filtering in the international community to rise quickly and widely, from a different point of view a variety of improvements in the median filter and a variety of nonlinear filtering algorithm [8].

Wavelet analysis is a range of window methods that can be used to obtain more accurate low-frequency information at long intervals. It can obtain high-frequency information in short time intervals, thus effectively overcoming the problem of processing non-stationary complex image signals. The limitations of the method still existence [14]. And wavelet transform has the ability of multi-resolution analysis, more adapt to the visual characteristics of the human eye, so in the field of image denoising, wavelet transform plays a very important role. The wavelet transform is a transformation of the signal into a time domain and a scale domain. Different scales correspond to different frequency ranges. Therefore, wavelet transform is a good analysis for time-frequency signals such as image signals tool. Wavelet analysis of the time-frequency localization characteristics of the original image of the low-frequency part of the high-frequency part of the transformed coefficients are more concentrated, and not like the formation of amplitude dispersion. The number of codes to be encoded in the case of keeping the same detailed information is compared [1].

Independent component analysis is a blind source separation method that can directly isolate the source signal by observing the signal. Its development can be traced back to the concept of the first time in the early nineteenth century [18]. The independent component analysis method was applied to blind source separation. It has been widely used in image analysis, noise reduction, signal separation and other fields [12].

The redundant wavelet transform can be regarded as an approximate continuous wavelet transform. Firstly, the decomposition problem of the image was studied under the two-dimensional orthogonal wavelet basis. From the perspective of the digital filter, the discrete wavelet decomposition can be realized by a two-channel filter bank [10]. That is, a digital signal through the low-pass filter and high-pass filter, and then the next two sampling to remove the signal redundancy, making the signal length remains unchanged. However, the redundancy of the signal helps to reduce the sensitivity of the signal to noise and improve the time shift invariance of the transform. Redundant wavelet transform has time-invariant characteristics. Compared with traditional wavelet transform, redundant wavelet transform reduces the upsampling process in the process of down-sampling and reconstruction. At each level of decomposition, the output factor is twice the input factor, while the filter bank needs to be sampled to accommodate the growing data [2].

3 Image Denoising algorithm

For comparing purpose, we present the FastICA method in this section. And the improved quasi-Newton method was also proposed in this section.

3.1 FastICA algorithm

The FastICA algorithm can find a weighted vector w t in W, w t satisfy the projection y t  = w T x with maximum Non-Gaussian property. The algorithm can separate a component from the observation signal. The Non-Gaussian property of equation y t  = w T x is measured with negative entropy. The negative entropy value is defined by:

$$ J\left({y}_t\right)={\left[ E\left\{ G\left({y}_t\right)\right\}- E\left\{ G(v)\right\}\right]}^2 $$
(1)

In which G is an arbitrary non-quadratic function, y t is a random variable with zero mean and unit variance. v is a Gaussian random variable with zero mean and unit variable. Substituting y t  = w T x in (1) get:

$$ {J}_G\left({w}_t\right)={\left[ E\left\{ G\left({w}_t^T\right)\right\}- E\left\{ G(v)\right\}\right]}^2 $$
(2)

Concluded from (1) and (2), the iteration method of the FastICA is:

$$ {w}_i\left( k+1\right)= E\left\{ xg\left({w}_i^T x\right)\right\}- E\left\{{xg}^{\hbox{'}}\left({w}_i^T x\right)\right\}{w}_i(k) $$
(3)

In witch k is the number of iteration, each time after iteration, the weighted vector w i (k + 1) is normalized with:

$$ {w}_i\left( k+1\right)=\frac{w_i\left( k+1\right)}{\left\Vert {w}_i\left( k+1\right)\right\Vert } $$
(4)

3.2 Improved Quasi-Newton method

Quasi-Newton method is an important method of solving, simple in steps and wide in application scope, but it requires a lot of computations. And MATLAB is a powerful computing tool, so making use of MATLAB to achieve the calculation of the Quasi-Newton method can greatly save time.

For the geometric meaning of f(x) = 0 Newton method, the point near the root x* is taken. As the approximate value of the equation, make tangent line through the point (×0, f(×0)) on the curve y = f(x), and it is used as the approximation of y = f (x). The intersection point x1 of the tangent and the X axis is taken as the second approximation of the root x*, and continue to do it, then get the iterative (5).

$$ {x}_{n+1}={x}_n-\frac{f\left({x}_n\right)}{f^{\hbox{'}}\left({x}_n\right)}\left( n=0,1,2,\dots \right) $$
(5)

Set x* as the single root of f(x) = 0. There is f(x*) = 0,f(x*) ≠ 0,then \( {g}^{\hbox{'}}\left({x}^{\ast}\right)={x}_n-\frac{f\left({x}^{\ast}\right){f}^{\hbox{'}}\left({x}^{\ast}\right)}{{\left[{f}^{\hbox{'}}\left({x}^{\ast}\right)\right]}^2} \)=0,so near x*, there is |g '(x)| < 1. According to fixed point theorem, the convergence of Quasi-newton method can be obtained.

The improved quasi-newton method was:

$$ \left\{\begin{array}{c}\hfill {w}^{\#}=\lambda E\left\{ xg\left({w}^T x\right)\right\}- E\left\{{g}^{\hbox{'}}\left({w}^T x\right)\right\} w\hfill \\ {}\hfill {w}^{+}= E\left\{ xg\left({w}^T x\right)\right\}-\left\{\left(1-\frac{\lambda}{2}\right) E\left\{{g}^{\hbox{'}}\left({w}^T x\right)\right\}+\frac{\lambda}{2} E\left\{{g}^{\hbox{'}}\left({w}^{\# T} x\right)\right\}\right\} w\hfill \\ {}\hfill {w}^{\ast }=\frac{w^{+}}{\left\Vert {w}^{+}\right\Vert}\hfill \end{array}\right. $$
(6)

In which x is the observed signal, w is the weighted vector, w T x is the projection of vector, wg is a randomly non-polynomial function, λ is an non zero coefficient.

The flowchart of quasi-newton method was shown in Fig. 1.

Fig. 1
figure 1

The flowchart of quasi-newton method

3.3 CB (center to boundary) wave filter

The minimum distance between the center pixel and the field can effectively reflect the noise pixel, and the distance value represents the relationship between the good pixels and the noise pixels. It is assumed that the maximum noise is difficult to affect the surrounding pixels. This paper, taking the Quasi-Newton method as the mathematical basis, proposes two kinds of filters, which are called CB (Center-to-Boundary) filter and BB (Boundary-to-Boundary) filter. In the CB filter, applying Newton iterative formula, viewing the pixels from the center to the edge and adopting (7) to calculate the distance between them:

$$ {C}_j={C}_i-\frac{f\left({C}_i\right)}{f^{\hbox{'}}\left({C}_i\right)} $$
(7)
$$ f\left({C}_i\right)={i}^2- i-1 $$
(8)

Among them, Ci represents the center pixel, and Cj is the neighborhood pixel. It is assumed that the center pixel value is 1, using 4-connectivity and Newton formula to calculate the distance between the center pixel and the neighborhood, and then use the same method to deal with all the pixels, and the processed pixel will not be processed any longer. We assume that (9) showed the 5 × 5 mask CB filter we wanted to calculate.

$$ \left[\begin{array}{ccccc}\hfill {X}_1\hfill & \hfill {X}_2\hfill & \hfill {X}_3\hfill & \hfill {X}_4\hfill & \hfill {X}_5\hfill \\ {}\hfill {X}_6\hfill & \hfill {X}_7\hfill & \hfill {X}_8\hfill & \hfill {X}_9\hfill & \hfill {X}_{10}\hfill \\ {}\hfill {X}_{11}\hfill & \hfill {X}_{12}\hfill & \hfill {X}_{13}\hfill & \hfill {X}_{14}\hfill & \hfill {X}_{15}\hfill \\ {}\hfill {X}_{16}\hfill & \hfill {X}_{117}\hfill & \hfill {X}_{18}\hfill & \hfill {X}_{19}\hfill & \hfill {X}_{20}\hfill \\ {}\hfill {X}_{21}\hfill & \hfill {X}_{22}\hfill & \hfill {X}_{23}\hfill & \hfill {X}_{34}\hfill & \hfill {X}_{35}\hfill \end{array}\right] $$
(9)

According to the (9), the X14, X12, X8, X18 are four neighborhood values of X13. Assuming that C (X13, four neighborhoods center pixels) =1, then according to (6), (7), (8), calculate the values of the four neighborhoods:

$$ f\left({C}_i\right)={X}_{13}^2-{X}_{13}-1={1}^2-1-1=-1 $$
(10)
$$ {f}^{\hbox{'}}\left({C}_i\right)=2{X}_{13}-1=2-1=1 $$
(11)
$$ {X}_{14}={X}_{13}-\frac{f\left({C}_i\right)}{f^{\hbox{'}}\left({C}_i\right)}=1-\frac{-1}{1}=2 $$
(12)

Guided by the same principle, we can get:

$$ {X}_8=2,{X}_{18}=2,{X}_{12}=2 $$

Similarly, we calculate the pixel value (X9, X19, and X15) of X14. Since that X13 is viewed, it is not calculated again.

$$ f\left({C}_i\right)={X}_{14}^2-{X}_{14}-1={2}^2-2-1=1 $$
(13)
$$ {f}^{\hbox{'}}\left({C}_i\right)=2{X}_{14}-1=2\times 2-1=3 $$
(14)
$$ {X}_9={X}_{14}-\frac{f\left({C}_i\right)}{f^{\hbox{'}}\left({C}_i\right)}=2-\frac{1}{3}=1.6667 $$
(15)

Similarly, we can get:

$$ \mathrm{X}9=\mathrm{X}19=\mathrm{X}23=\mathrm{X}17=\mathrm{X}7=\mathrm{X}3=\mathrm{X}15=\mathrm{X}11=1.6667 $$

Calculate the value (X4, X10) of X9 neighborhood. Since that X4 and X8 are viewed, they are not calculated again.

$$ f\left({C}_i\right)={X}_9^2-{X}_9-1={1.6667}^2-1.6667-1=0.1112 $$
$$ {f}^{\hbox{'}}\left({C}_i\right)=2{X}_9-1=2\times 1.6667-1=2.3334 $$
$$ {X}_4={X}_9-\frac{f\left({C}_i\right)}{f^{\hbox{'}}\left({C}_i\right)}=1.6667-\frac{0.1112}{2.3334}=1.6190 $$

Similarly, we can get:

$$ \mathrm{X}4=\mathrm{X}10=\mathrm{X}24=\mathrm{X}20=\mathrm{X}16=\mathrm{X}22=\mathrm{X}6=\mathrm{X}2=1.6190 $$

For 5 × 5 filter, we calculate the neighborhood value X5 of X4. Since that X3 and X9 are viewed, they are not calculated again.

$$ f\left({C}_i\right)={X}_4^2-{X}_4-1={1.6190}^2-1.6190-1=2.619\times {10}^{-3} $$
$$ {f}^{\hbox{'}}\left({C}_i\right)=2{X}_4-1=2\times 1.6190-1=2.238 $$
$$ {X}_5={X}_4-\frac{f\left({C}_i\right)}{f^{\hbox{'}}\left({C}_i\right)}=1.6190-\frac{2.619\times {10}^{-3}}{2.238}=1.6180 $$

In consequence, we can get:

$$ {\mathrm{X}}_5={\mathrm{X}}_{25}={\mathrm{X}}_{21}={\mathrm{X}}_1=1.6180 $$

Applying Newton formula to calculate all the values in 5 × 5 filter, as is shown in (16).

$$ \left[\begin{array}{ccccc}\hfill 1.6180\hfill & \hfill 1.6190\hfill & \hfill 1.6667\hfill & \hfill 1.6190\hfill & \hfill 1.6180\hfill \\ {}\hfill 1.6190\hfill & \hfill 1.6667\hfill & \hfill 2.0000\hfill & \hfill 1.6667\hfill & \hfill 1.6190\hfill \\ {}\hfill 1.6667\hfill & \hfill 2.0000\hfill & \hfill 1.0000\hfill & \hfill 2.0000\hfill & \hfill 1.6667\hfill \\ {}\hfill 1.6190\hfill & \hfill 1.6667\hfill & \hfill 2.0000\hfill & \hfill 1.6667\hfill & \hfill 1.6190\hfill \\ {}\hfill 1.6180\hfill & \hfill 1.6190\hfill & \hfill 1.6667\hfill & \hfill 1.6190\hfill & \hfill 1.6180\hfill \end{array}\right] $$
(16)

For larger images to be processed, it needs for a larger filter. In the following, algorithm is given to calculate the filter, which is based on Newton’s formula, using MATLAB to achieve n × n filter algorithm. Based on this, it is possible to choose filters with different sizes according to requirements. In this study, 3 × 3 filter is mainly selected, as shown in (17).

$$ \left[\begin{array}{ccc}\hfill 1.6667\hfill & \hfill 2.0000\hfill & \hfill 1.6667\hfill \\ {}\hfill 2.0000\hfill & \hfill 1.0000\hfill & \hfill 2.0000\hfill \\ {}\hfill 1.6667\hfill & \hfill 2.0000\hfill & \hfill 1.6667\hfill \end{array}\right] $$
(17)

The specific algorithm is as follows: 1) randomly select n * n matrix; 2) check parity of matrix. If it is even matrix, then quit; otherwise, execute step three; 3) initialize the center pixel of matrix, that is to say, Ci = 1; 4) apply 4-connectivity to view all the pixels from the center to the neighborhood; 5) apply Newton formula (4), on the basis of the fourth step, to calculate the value of the neighborhood \( {C}_j={C}_i-\frac{f\left({C}_i\right)}{f^{\hbox{'}}\left({C}_i\right)} \); 6) repeat the step 4 and step 5, until all the pixels are viewed. (notice: the pixels have been viewed are not viewed again; 7) quit.

3.4 BB (boundary-to-boundary) wave filter

Relatively to CB filter, distance calculation of BB filter is carried out from the left upper edge to the lower right edge, and assuming that the first value on the left edge is “1”, then according to the Newton formula (1), (2), (3), calculate four neighborhood values. Similarly, the values viewed are no longer repeated the calculation. Using the same method, the size of 5 * 5 filter can be calculated, as shown in (18).

$$ \left[\begin{array}{ccccc}\hfill 1.0000\hfill & \hfill 2.0000\hfill & \hfill 1.6667\hfill & \hfill 1.6180\hfill & \hfill 1.6180\hfill \\ {}\hfill 2.0000\hfill & \hfill 1.6667\hfill & \hfill 1.6190\hfill & \hfill 1.6180\hfill & \hfill 1.6180\hfill \\ {}\hfill 1.6667\hfill & \hfill 1.6190\hfill & \hfill 1.6180\hfill & \hfill 1.6180\hfill & \hfill 1.6180\hfill \\ {}\hfill 1.6190\hfill & \hfill 1.6180\hfill & \hfill 1.6180\hfill & \hfill 1.6180\hfill & \hfill 1.6180\hfill \\ {}\hfill 1.6180\hfill & \hfill 1.6180\hfill & \hfill 1.6180\hfill & \hfill 1.6180\hfill & \hfill 1.6180\hfill \end{array}\right] $$
(18)

In practical application, for processing large images, it may require larger filter, which makes the calculation more trouble. Also taking Quasi-Newton method as the foundation, MATLAB is used to realize the calculation of n × n filter, so it is possible to, according to the different needs, choose different size filters for image processing. In this paper, 3 * 3 size filter is still selected, which is shown in (19).

$$ \left[\begin{array}{ccc}\hfill 1.0000\hfill & \hfill 2.0000\hfill & \hfill 1.6667\hfill \\ {}\hfill 2.0000\hfill & \hfill 1.6667\hfill & \hfill 1.6190\hfill \\ {}\hfill 1.6667\hfill & \hfill 1.6190\hfill & \hfill 1.6180\hfill \end{array}\right] $$
(19)

The specific algorithm is as follows: 1) randomly select n * n matrix; 2) check parity of matrix. If it is even matrix, then quit; otherwise, execute step three; 3) initialize the center pixel of matrix, that is to say, Ci = 1; 4) apply 4-connectivity to view all the pixels from the center to the neighborhood; 5) apply (20), on the basis of the fourth step, to calculate the value of the neighborhood

$$ {C}_j={C}_i-\frac{f\left({C}_i\right)}{f^{\hbox{'}}\left({C}_i\right)} $$
(20)

6) repeat step 4 and step 5, until all the pixels are viewed. (Notice: the pixels have been viewed are not viewed again); 7) quit.

3.5 MPI and openMP and CUDA heterogeneous system

In the GPU cluster, in addition to the huge computing power of GPU, there are also multi-core CPU processor resources, MPI + open MP + CUDA system can coordinate through the parallel structure to utilize the full development of these resources. The parallel improved Quasi-Newton algorithm with the MPI + open MP + CUDA system was used to process massive image denoising task. The flow chart is shown in Fig. 2. The heterogeneous system combined the two-level parallel hyperspectral data input in MPI + openMP structure and two-level parallel covariance matrix calculation in MPI + CUDA system. The MPI + openMP + CUDA system can maximize the parallel performance of every single GPU in the GPU cluster.

Fig. 2
figure 2

The flowchart of the MPI + openMP + CUDA system

4 Results and discussion

To illustrating the effectiveness of CB and BB filter in image denoising, we carried out a large number of simulation experiments. We use the RSSCN7 data sets as the remote sensing data sets. We used the Urban100 dataset as the high-resolution dataset [5, 11]. In the following, massive remote sensing images (set A, B, C) and high resolution images (set D, E) are taken as examples, and compared with the image after FastICA algorithm, also quantitatively analyzed by using different indicators. The indicators adopted to evaluate are: Mean Square Error (MSE), Peak Signal-to-Noise Ratio (PSNR) and Quality Measure of Image Enhancement (EME). These algorithms can be applied to n * n mask. In this study, we only use the 3 * 3 mask and the image to carry out the convolution, and the processed results are achieved in MATLAB. Figure 3 shows the image denoising example of image D with different denoising algorithm.

Fig. 3
figure 3

Image denoising result of the images in set D in the parallel image denoising process. (a) Original image (b) denoised image with Quasi-Newton method

4.1 Contrast entropy

In the evaluation of the image, the contrast entropy is an important index. For a random event E, if the probability it appears is P(E), then the information contained in it can be expressed as:

$$ I(E)= \log \frac{1}{P(E)}=-{ \log}_2 P(E) $$
(21)

For the gray image, when the value of the entropy reaches the maximum, it is the moment when all the gray values appear equal probability. According to the theory of entropy, the larger the entropy, the more the information contained in the image, and the more abundant the details of the image. The contrast entropy is to increase the brightness of pixel points that are higher than the average gray value in the image to 10, while the brightness of pixel points that are lower than the average value is decreased by 10, and the image gray is pulled to both sides to make the image contrast degree improved. And the processed image contrast degree is improved. Thus, for measuring the effectiveness of CB and BB filter image processing, select different remote sensing images (set A, B, C) and infrared image (set D, E) to process, choose the optimal evaluation standard contrast entropy to evaluate the image processing results, and compare with the image processed by traditional FastICA. Through calculation, we get the parameters EME values after image applying different filters, as shown in Fig. 4.

Fig. 4
figure 4

CB, BB and FastICA EME value

We can see from Fig. 3 that the processing results of CB Filter and BB Filter are different. The processing results of remote sensing image BB Filter is better than that of FastICA, while the image results after CB Filter and FastICA processing have little difference. According to the definition, the image after BB Filter processing contains the maximum amount of information, and the detail loss is relatively less, so the image contrast after processing is large and the processing effect is good. The infrared image CB Filter processing results are better than that of FastICA processing, while the processing results of BB Filter and FastICA treatment are not very different. However, the image processed by CB Filter contains the maximum amount of information, and the detail loss is relatively less, so the contrast of image after processing is large, and the processing effect is good. Overall, the results of the two filters processing image are better than that of the average filter.

4.2 Mean square error

Mean square error evaluation criteria can reflect the difference between the original image and the restored image in general, and the Fig.5 shows the mean square error after processing the image with different filters.

Fig. 5
figure 5

CB, BB and FastICA ESE value

As can be seen from Fig. 5, the value of the image after BB filter is generally less than the value of the FastICA and CB filter, which shows that the image effect of BB filter is better, and it can also be seen that the results of CB filter processing is the worst.

4.3 Peak signal-to-noise ratio

Fig. 6 is the value of the peak signal-to-noise ratio after processing image with different filters.

Fig. 6
figure 6

CB, BB and FastICA PSNR value

Comparison of image parameters for set A and set B, two set of images after using different filters processing are given in Fig. 6. From the data in the figure, we can see that the peak signal-to-noise ratio of CB Filter is the minimum, whose processing results are not so good as that as BB Filter and FastICA. According to the calculation results of the peak signal-to-noise ratio of the parameters, the effect of BB Filter image processing is the best, followed by FastICA, and the processing effect of CB Filter is the worst. But in the processing, no matter what kinds of filters they are, there are missing details of the original image to a certain extent, in which the CB Filter losses the most information, and BB Filter losses the least information. This will enable the edge and detail of image after being processed becomes smooth and blurred at different degrees.

The objective evaluation method refers to the physical evaluation methods. The results of the evaluation are compared with the prescribed standards. The objective evaluation method is fast, stable and easy to quantify. The common image quality evaluation method always resulted in the great difference of gray value in the standard image and the evaluating image. The image quality evaluation method mainly adopts the error evaluation method that is to calculate the statistical error between the filtered image result and the original “clean” image to realize the denoising. The smaller the error, the smaller the statistical difference is, that means the higher mark of image quality evaluation.

5 Conclusion

Influenced by various factors, the quality of massive remote sensing images and infrared images declined in various observation systems. The massive images show low contrast, small dynamic range, noise pollution effect, fuzzy edge and other problems in general. In consequence, image quality has been seriously affected. To solve the problem, before the target identification and resolution, it requires to carrying out image denoising and enhancement process. On this basis, we adopted Quasi-Newton method, generated CB filter and BB filter, then experimented the filter and massive sensing images and infrared images to carry out convolution to obtain the noise-removed image. At the same time, we evaluate the CB filter and BB filter with contrast entropy, mean square error and peak signal-to-noise ratio. Those two filters were compared with the traditional FastICA denoising methods. The comparison results indicate that the proposed CB filter and BB filter denoising methods are feasible and effective. Compared to the image processed by the FastICA method, CB and BB filter can effectively improve the image quality and enhance the visual effect based big data technologies.