Applying Speckle Noise Suppression to Refractive Indices Change Detection in Porous Silicon Microarrays

The gray value method can be used to detect gray value changes of each unit almost parallel to the surface image of PSi (porous silicon) microarrays and indirectly measure the refractive index changes of each unit. However, the speckles of different noise intensities produced by lasers on a porous silicon surface have different effects on the gray value of the measured image. This results in inaccurate results of refractive index changes obtained from the change in gray value. Therefore, it is very important to reduce the influence of speckle noise on measurement results. In this paper, a new algorithm based on the concepts of probability-based nonlocal-means filtering (PNLM), gradient operator, and median filtering is proposed for gray value restoration of porous silicon microarray images. A good linear relationship between gray value change and refractive index change is obtained, which can reduce the influence of speckle noise on the gray value of the PSi microarray image, improving detection accuracy. This means the method based on gray value change detection can be applied to the biological detection of PSi microarray arrays.


Introduction
The biochip (microarray chip) is a new technology developed by research of the human genome project. Because of their excellent characteristics, extensive application prospects, and rapid development, biochips have demonstrated great application value in disease diagnosis, drug development, genetic modification, allergen detection, and environmental protection since they were first proposed in the 1990s [1]. Biochips are an effective means for people to obtain biological information efficiently and on a large scale. So far, commercial bio-microarray chip detection is still based on fluorescence and isotope-labeling methods. However, fluorescent labeling requires sophisticated reagent selection and pairing, in addition to reagent modification including synthesis and purification, which potentially changes the intrinsic properties of the capture probe and/or target molecules [2] and dramatically increases the cost and complexity of the assays. Therefore, non-labeled detection technology has gradually become an important development direction in the field of biological analysis in recent years [3][4][5]. Among many label-free detection technologies, the image gray value detection method of porous silicon photonic crystal bio-microarray is a new parallel quantitative detection technology of bio-array chips that is label-free, has high measurement sensitivity, and is cost-effective [6,7].
Porous silicon is an excellent biomaterial with a large specific surface area, a large interaction area between biological molecules, and high sensitivity for sensing and detection. Porous silicon has very good bioactivity, compatibility, and adsorption, allowing biological molecules to enter the device [8]. Porous silicon photonic devices are used to measure the increase in the refractive index of the device caused by the reaction between the target biological molecules and the probe molecules fixed in the inner wall of the holes, which can detect the target organism quantitatively without labeling. Among all kinds of porous silicon biosensors with photonic structure, the PSi microcavity biosensor based on photonic crystal resonance structure has the high sensitivity and has been used in various kinds of biological reaction detection [9][10][11]. As the reflection or transmission spectrum of the microcavity is very sensitive to the incident angle of incident light, a biological detection method without using a spectrometer was developed, which detects the refractive index change caused by a biological reaction by measuring the change of reflected or transmitted light intensity with the incident angle. The PSi microcavity demonstrates high-sensitivity biological detection based on the reflection angle spectrum and the transmission angle spectrum [12,13]. No spectrophotometer is needed in the detection process; only one laser and an angle measuring instrument are needed in the biological detection. The change of the refractive index can be measured by the gray value changes of reflection or transmission images of the PSi microcavity acquired by CCD (Charge-coupled Device) the on angle spectrum method [14,15]. Although the sensitivity of the detection has somewhat decreased, it can be applied to the parallel detection of the PSi microcavity microarrays.
In order to detect the image gray value easily, the array image is preprocessed, tilt-corrected, and segmented. After such processing, the gray value of each array unit can be calculated automatically by a computer [16].
Due to the rough surface of PSi, interference among the scattered laser rays results in speckle noise on CCD [17]. This noise not only reduces the resolution and contrast of the image, but also causes changes in the image gray values [18]. Before the biological reaction, each unit of the PSi array is modified and probe biomolecules (such as DNA or antibodies) are immobilized in the PSi. After the reaction, the different reactant in each unit formed by the specific binding of different target biological molecules (such as complementary DNA or antigens) with the probe molecules are fixed in the PSi. These different kinds of reactants with different concentrations will result in different morphologies of porous silicon surface, thus, the speckle noise intensity in each unit is different. These different speckle noise intensities will cause different amounts of interference with the gray values of the images. This results in inaccurate refractive index changes based on gray value changes. To solve this problem, the influence of speckle noise on the image gray values is analyzed and a method of reducing the influence of speckle noise on the gray values of PSi microarray images is proposed. The experimental results show that the proposed method can restore the gray value affected by speckle noise very well.

Speckle Noise Model
In PSi microarray images, speckle noise is caused by the interaction between a laser light and the roughness of the PSi surface. The existence of speckle noise is inherent to this detection method and it exhibits distinctive characteristics in terms of its certainty and randomness. Speckle noise can be modeled as multiplicative noise, with the obtained signal being a product of the original signal and the speckle noise [19]. Let I(i, j) denote a distorted pixel in an image and let M(i, j) denote the corresponding noiseless image pixel. According to the multiplicative noise model, where N(i, j) represents the speckle noise signal [19]. Speckle noise also affects the gray values of the image itself. The larger the variance of the speckle noise is, the greater its influence on the gray values of the image and the more difficult it is to recover the noiseless image. To better explain the influence of speckle noise, the effects of speckle noise with variances of 0.1 and 0.9 on an image with a gray value of 40 are shown in Figure 1. If the mean values of the N normal speckles participating in the superposition are denoted by I k , K = 1, 2, . . . , N, then the probability density function of the intensity of the kth normal speckle, I k , is an exponential distribution [20], as shown in Formula (2): Because the I k are statistically independent, the probability density function of their sum can be calculated as N-1 reconvolutions of the corresponding function P I (I), as shown in Formula (3): P I (I) = P I 1 (I) ⊗ P I2 (I) ⊗ · · · ⊗ P I k (I). ( If the N, I k are not zero and are not equal to each other, then Formula (2) can be rewritten as follows: The probability density functions of N different independent speckle patterns of equal intensity are shown in Figure 2. As N changes with the average total strength remaining unchanged, the probability density function changes from a negative exponential distribution (N = 1) to a Gaussian density function distribution (N = 10), which is consistent with the central limit theorem.   In research on speckle noise, previous works have evaluated denoising algorithms in two ways [21][22][23]. Subjective evaluations concern how the textural details and visual effect of an image are improved after denoising. Objective evaluations rely on quantitative metrics, such as the speckle index (SI), peak signal-to-noise ratio (PSNR), equivalent number of looks (ENL), and structural similarity index (SSIM).

Influence of Speckle Noise
For the denoising of PSi microarray images, however, the subjective effects and traditional objective indicators are not important. Because the final detection result depends only on the average gray value of each cell in the array, these gray values need to be restored to remove the influence of the noise to enable accurate detection. At present, there are no related works on the restoration of gray values affected by speckle noise. To study the effects of speckle noise on the image gray values, we added speckle noise with variances of 0-1 to 2500 images with a gray value of 40 and obtained the corresponding relationship between the resulting average gray value and the speckle intensity, as shown in Figure 4c. As the speckle intensity increased, the average gray value of the image increased. The same result was found after testing three other sets of 2500 images each, with initial gray values of 20, 30, and 50. To explain the reason for the observed relationship between the speckle intensity and the average gray value, in this paper, 7500 speckle noise images were tested and the relationship between speckle intensity and singular pixel points (bright spots with an abnormal increase in gray value) of the images was drawn, as shown in Figure 5. Each of the curves in Figure 5 represents the relationship between speckle intensity and singular pixel points of an image. By comparing Figures 4 and 5, it can be seen that the variation in the average gray value of the image is related to the number of singular pixels. When the speckle intensity was within the range of 0-0.3, the number of bright spots was very small. Hence, the randomness of the scattered noise became the main factor affecting the average gray value of the image, causing the average gray value to fluctuate around the original gray value. As the speckle intensity increased beyond 0.3, the number of bright spots gradually increased and these bright spots became the main factor affecting the average gray value of the image, resulting in an overall increase in the average gray value. The above conclusions are very important for the detection of biological reactions in PSi microarrays based on digital images. In this image-based detection method, the changes in the refractive index that were caused by biological reactions were determined by measuring the changes in the gray values of the PSi microarray images. Speckle noise produced by laser irradiation will always be present in PSi microarray images obtained directly with digital imaging equipment, but the speckle noise intensities will be different for PSi surface images obtained before and after a reaction. According to the findings reported above, the higher the speckle noise intensity was, the greater its impact on the image gray values. Thus, the changes in the gray values measured in the biological detection experiment were partly due to the true changes in the refractive index of the PSi before and after the reactions and partly due to image speckle noise. Therefore, the ability to remove speckle noise in PSi microarray images is very important for the detection of biological reactions.

Algorithm Description
Many excellent algorithms have emerged from research on speckle noise. The classical algorithms include common Lee filters, Kuan filters, mean filters, and median filters [24][25][26]. Previous works have introduced some improvements to these classical algorithms and have achieved good results [27][28][29][30][31][32]. Recently, scholars have also proposed advanced algorithms, such as probability-based nonlocal means filtering [33], numerical multilook and 3D block-matching filtering [34], adaptive wavelet threshold processing [35], and adaptive anisotropic diffusion [36]. In this paper, a variety of filtering algorithms were experimentally analyzed. Most algorithms show good performance with respect to common evaluation indexes, such as the SI, PSNR, and ENL, but they cannot modify the gray value of an image. Therefore, these algorithms cannot restore the gray value in the presence of speckle noise. The weights in the BM3D and probability-based nonlocal-means filtering (PNLM) algorithms are determined by the distances between similar blocks and the gray value of a target pixel is obtained by weighting the gray values of all the pixels in its neighborhood. A large number of scattered spots and speckle blocks increases the gray value differences between two neighborhood windows and thus affects the accuracy of the weights. The gradients of images with scattered spots and speckle blocks are large and the good edge retention of the PM algorithm results in incorrectly identified edges and a poor denoising effect. Large numbers of scattered spots and speckle blocks similarly affect the selection of the optimal threshold for adaptive wavelet transform, thereby worsening the denoising effect. For the classical median and adaptive median algorithms, large numbers of scattered spots and speckle blocks result in a large difference between the selected median pixel and the original pixel, affecting the denoising process.
Many classical NLM algorithms and some improved NLM algorithms have good effects on the removal of additive Gaussian noise, but they are not suitable for multiplicative speckle noise. In order to solve this problem, Hancheng Yu et al. proposed a probability-based NLM algorithm [33]. NLM filtering algorithm uses a larger search window or a weighted average of the pixels in the whole image to replace the pixels considered, as shown in Formula (5): where u represents the restoration value at the pixel point i and B (i, r) represents the search window with the center of i dimension and the size of (2r + 1) × (2r + 1) pixels. Since NLM filters use non-local self-similarity to preserve the characteristics of the pixels, weights w i,j are used to measure the similarity between the central pixels of the search window. The values of weights w i,j depend on the square Euclidean distance between two pixels. Each pixel value is restored to the average value of the most similar pixel. Considering that the characteristics of these damaged pixels are similar to impulse noise, the method of identifying impulse noise pixels can be used to suppress speckle noise. Define an absolute deviation of pixel strength d i,j , as shown in Formula (6).
where u i and u j are the intensity of pixels i and j respectively. Garnett et al. introduced a local image sorting absolute difference (ROAD) [37] for statistical recognition of impulse noise pixels. The definition of ROAD is shown in Formula (7).
where r m represents the mth minimum value of d i,j . ROAD statistics provide the proximity of a pixel value to its nearest neighbor. The basic idea of this statistic is that the intensity of unnecessary pulses is very different from most or all of their adjacent pixels. For impulsive noise pixels, statistics are used to calculate the probability, Pi, of each pixel not damaged, as in Formula (8).
The calculated probability shows the distance between two pixel blocks. The corresponding pixel points in each pixel block have a high undamaged probability, which is used to calculate a larger weight in the process of calculating the distance between pixel blocks. The distance between pixel blocks based on probability is shown by Formula (9).
where p i+k , j+k denotes the minimum value between p i+k and p j+k . Therefore, the calculated non-damage probability can reduce the impact of pixel damage and can more accurately calculate the similarity between pixel blocks. Then, the probability is used to restore the central pixels, as shown in Formula (10).
In the process of recovery, for each pixel in the search window, the weighted average based on probability will eliminate the severely damaged data.
The existence of small gray deviation affects the good linear relationship between gray value change and refractive index change and affects the measurement of refractive index in the experiment. So, it is very important to restore the correct gray value of speckle noise image in the experiment. The smaller the gray value error of the recovered speckle image, the more accurate the refractive index obtained in the experiment. However, speckle noise is complex and stubborn; it is difficult to suppress speckle noise and restore the gray value of the image. Even for simple texture images such as porous silicon microarray, the process of restoring their accurate gray values is difficult. The residual speckle noise after PNLM treatment cannot be eliminated and it is not feasible to use simple PNLM. Since PNLM removes most of the noise, the remaining speckle noise can be further removed with other algorithms to complete the gray value restoration of speckle noise. Therefore, this paper improves the PNLM algorithm by introducing the concept of a gradient operator into the PNLM algorithm. According to the change of the image gradient, residual speckle noise points were marked. The marked speckle was used as the center of the median filter window and the new center value of the median filter was used to replace the original center value. Repairing only the marked pixels saves a lot of time and achieves efficient and fast gray value recovery. For convenience, we named the algorithm proposed in this paper as PNLM-G.
The gradient magnitudes and directions for 8 neighborhoods in the smoothed gray image were calculated using a 9 × 9 template. Thresholds were applied to identify not only the speckle points but also the edges of speckle blocks based on the first-order partial derivatives at each pixel, which are calculated as follows.
Partial derivative in the X direction: Partial derivatives in the Y direction: G y (x, y) = S(x, y + 1) − S(x, y − 1).
Partial derivatives in the 45 • direction: Partial derivatives in the 135 • direction: The expression of gradient amplitude calculated by second-order Euclidean norm is as follows: The calculation expression of gradient direction is as follows: where G x (x, y) is the gradient at point (x, y) in the X direction, G y (x, y) is the gradient at point (x, y) in the Y direction, G 45 • (x, y) is the gradient at point (x, y) in the 45 • direction, and G 135 • (x, y) is the gradient at point (x, y) in the 135 • direction. Finally, the gray value obtained by median filter with the 9 × 9 window was used to replace the above marked gray value.

Comparison with Other Methods
Five advanced algorithms previously proposed by other scholars, as implemented in MATLAB, were considered for comparison in terms of calculating the average gray value and SI: Probability-based nonlocal means filtering [33], numerical multilook and 3D block-matching filtering [34], adaptive wavelet threshold processing [35], adaptive anisotropic diffusion [36], and Lee filtering. The average gray values (AGL) were processed to two decimal places and the SI was processed to four decimal places. The results reflect the measurement accuracy well, as shown in Table 1. The gray value of an image with a speckle variance of 0.9 was restored, as shown in Figure 6. In order to achieve a better and more intuitive response to the effect of the six algorithms, this paper intercepts the same parts of the gray value images recovered by the six algorithms and the grey value curve is analyzed in Figure 7. The red curve represents the gray value of the original image and the blue one represents the recovery value curve recovered by the five algorithms.   Based on the statistical data from the experimental images, the curves showing the variation in the average gray value with the speckle intensity after the application of the six algorithms were obtained, as shown in Figure 8.
As shown in Figure 6, Figure 8, and Table 1, the algorithm proposed in this paper restored an image contaminated with speckle noise, achieving an SI value close to zero, indicating that the speckle noise was suppressed. Compared with the five previously proposed algorithms, the algorithm proposed in this paper showed a remarkable advantage in terms of recovery ability. To further verify the universality of the proposed algorithm, a restoration test was carried out on 17,500 images containing speckle noise in different formats and with different gray values and the recovery accuracy was 99.97%.
Thus, it is shown that speckle noise can be effectively removed from images in different formats and with different gray values.

Application of PNLM-G to Refractive Index Change Detection of Reflected Light Images in PSi Microcavity Surface
In our previous study, when a laser light interacted with the surface of a PSi microcavity at 0 • (vertical incidence), the reflection spectrum of the PSi microcavity obtained by increasing the incidence angle was the same as that obtained by increasing the refractive index [12]. Therefore, a change in the refractive index of a PSi microcavity can be considered equivalent to a change in the laser incidence angle. For a small angle of incidence, the enhancement of the reflected light intensity on the microcavity surface is proportional to the increase in the incidence angle [15], that is, the gray value of a digital image of the microcavity surface increases with an increasing incidence angle [15]. Here, we applied the proposed algorithm to detect refractive index changes in PSi microcavity images. Each microcavity unit is a circular unit region in the PSi microarray.
The porous silicon microcavities were prepared by the anode electrochemical etching method. The silicon substrate was a P-type crystalline silicon (resistivity of 0.03-0.06 Ω·cm, crystal orientation of <100>). The electrolytic etching solution consisted of hydrogen fluoride acid (concentration of 40%) and anhydrous ethanol (C2H5OH, concentration ≥99%) with a volume ratio of 1:1. The sample electrochemical etching was controlled by Labview software and corroded at room temperature in a dark environment. The microcavity consisted of a defect layer sandwiched between two Bragg layers, an upper layer and a lower layer. The Bragg structures on both sides each contained 6 cycles. A current density of 110 mA/cm2 and an etching duration of 1.0 s were applied to obtain a low refractive index layer (n L = 1.13) with a thickness of 140 nm. A current density of 60 mA/cm2 and an etching duration of 1.2 s were applied to obtain a high refractive index layer (n H = 1.58) with a thickness of 100 nm. The current density and the etching duration were set to 110 mA/cm2 and 2 s to obtain a defect layer with a thickness of 560 nm. A pause of 3 s following each layer corrosion occurred in order to ensure relative uniform corrosion for each layer. A total of 25 dielectric layers was etched and the defect wavelength of PSM was 633 nm.
The structure and measured reflection spectra of a PSi microcavity are illustrated in Figures 9  and 10, respectively.  The gray value detection system based on the PSM surface image is shown in Figure 11. The light source was a He-Ne laser (633 nm, 1.8 mW). A1 and A2 were the apertures and lenses L1 and L2 were produced from a collimation beam expander system. The expanded beam passed through a beam splitter (5:5) onto a PSM microarray sample placed at the center of the goniometer. The sample could be rotated with the goniometer and the incident light was reflected to the digital microscope. CCD (1/3", 5 million pixels, CMOS, SONY) received light reflected from the surface of the PSi microcavity/PSi microcavity arrays. The optical lens magnification in the digital microscope was 0.7×-4.5× and was continuously adjustable. In the detection device, a laser light with a wavelength of 633 nm interacted with the PSi microcavities at different angles and images of the device surface were obtained with a digital imaging device, as shown in Figure 12. First, the RGB image of the light reflected by the PSi microcavity at an incidence angle of 5 • in Figure 12 was transformed into a gray value image and seven methods were used to restore the gray value, as shown in Figure 13. The proposed algorithm is effective for eliminating speckles that obscure the real image, can suppress the influence of speckle noise, and can restore the gray value of the image. We compared the results of our proposed algorithm to the results of five other advanced algorithms, including probability-based nonlocal mean filtering [33], numerical multilook and 3D block matching filtering [34], adaptive wavelet threshold processing [35], adaptive anisotropic diffusion [36], and Lee filtering. We found that the adaptive median filtering algorithm did not achieve the desired effect in removing real speckles. Additionally, it did not restore the true gray value of the original image. Based on the theoretical analysis presented in this paper and the observed effect of real speckle removal, it can be concluded that the proposed algorithm can effectively achieve gray value restoration. Therefore, we applied this algorithm to the images in Figure 12. The correspondence between the different incidence angles and gray values obtained after processing with the proposed algorithm is shown in Figure 14. The fitting formula and judgment coefficient before processing are, respectively, Y = 0.98X + 0.40 and R 2 = 0.958.
The fitting formula and judgment coefficient after processing are, respectively, Y = 1.01X + 0.01 and R 2 = 0.9986.
It can be seen from Figure 14 that the linear fit to the data processed with our denoising algorithm was better than the fit to the unprocessed data. In addition, for the same change in gray value, the change in angle as evaluated with our denoising algorithm was larger than that achieved without processing. From the refractive indexes calculated based on the relationship between the changes in incidence angle and refractive index, the relationship between the changes in the gray value and the refractive index was obtained, as shown in Figure 15. There was a good linear relationship between the change in the refractive index and the change in the gray value. As seen from Figures 14 and 15, after an image was processed with our denoising algorithm, the obtained change in the refractive index was larger than that obtained before processing for the same change in the gray value, demonstrating that the sensitivity of the refractive index detection was improved.
It can be seen from the above experiment that the proposed algorithm is very suitable for recovering the gray values of images affected by speckle noise. The proposed algorithm can effectively reduce the influence of speckle noise in PSi microarray images and improve the detection accuracy achieved based on those images.

Gray-Level Restoration of PSi Microcavity Array Images
A PSi microarray was fabricated on monocrystalline silicon by means of lithography and electrochemical etching technology [15]. Each unit in the array was a microcavity structure and the device parameters were the same as the microcavity parameters. Silicon nitride films with a thickness of 1.5 µm were deposited on silicon substrates by plasma-enhanced chemical vapor deposition (PECVD). Silicon nitride as a masking material has good corrosion resistance in the process of electrochemical etching. In the process of preparing porous silicon, the single crystal silicon below could not be etched within about 4 min. In order to enhance the adhesion between silicon nitride layer and photoresist, a layer of hexamethyldisiloxane (HMDS) was first coated on the silicon nitride film, then a layer of 1.1 m thick photoresist was coated on the HMDS. A mask (9 × 9 array, 300 µm in diameter and 200 µm in spacing) with the surface pattern of the array was used for exposure. Reactive ion etcher was used. After lithography, PSi microcavity arrays were obtained by electrochemical etching under the same conditions as those in Section 4.1. The structure of the PSi microcavity array is shown in Figure 16. Each array unit had a defect-state wavelength of 633 nm. Laser light with a wavelength of 633 nm interacted with the surface of the PSi microarray at different angles and images of the array surfaces were obtained by a digital microscope. Figure 17a shows a microarray image acquired with an incidence angle of 5 • . The theoretical analysis presented above demonstrated that the proposed algorithm has the best ability to restore the gray values of such images. Therefore, the proposed algorithm was applied to an actual PSi microarray image to verify these results. In this experiment, we used previously described methods of preprocessing, tilt-correction, and sample segmentation [16]. Finally, we obtained the image of each PSi microcavity array unit, as shown in Figure 17b. By measuring the average gray value of each PSi microcavity array unit in Figure 17b, we obtained the overall average gray value and the SI of all array units. The measurement results are shown in Tables 2 and 3. Table 2 shows the measurement results before filtering and Table 3 shows the average gray value of each PSi microcavity array unit after the application of the proposed algorithm. It can be seen from the above experiment that, after filtering with the proposed algorithm, the SI is close to zero, indicating that the gray value can be effectively recovered. The proposed algorithm has a better recovery ability than the other advanced algorithms considered. The proposed algorithm can effectively eliminate the influence of speckle noise and improve the detection accuracy of refractive index change in each PSi microcavity array unit.

Conclusions
In order to study the influence of speckle noise on the gray value of the image, speckle noise with intensities of 0 to 1 was added to the gray value image and each group of gray values was experimented with 2500 images, respectively. Through drawing observations and data research, it was found that the image gray value increased with the increase of speckle noise intensity. Then, by further analyzing the gray value data of speckle noise image, it was found that the singular pixel points were the main factor that affected the change in gray value. Based on the above experiments, a new algorithm named PNLM-G is proposed to solve the influence of speckle noise on image gray value. PNLM-G algorithm adds the gradient operator on the basis of the PNLM algorithm. According to the gradient of the gray value of the image, the gray value of the remaining singular pixel points was marked. The gray value of the marked singular pixel points was taken as the center of the window of the median filter and the new central gray value of the median filter was used to replace the original central gray value to remove the influence of the singular pixel points on the gray value of the image. This made up for the shortcoming that the PNLM algorithm could not completely remove the influence of residual singular pixel points on the image gray value. Finally, by comparing this algorithm with other five algorithms, it was proved that the proposed algorithm is advanced and effective in suppressing speckle noise and restoring image gray value. PSi microcavity arrays were prepared and images of the light reflected from the arrays were obtained. The proposed algorithm was applied to the speckle denoising of images of the PSi microcavity and the PSi microcavity arrays, which corrected the gray value of the image and improved the accuracy of the refractive index change detection. At present, we are carrying out research on the detection of many different biological reactions on the same porous silicon PSM array by the gray value method.