Noise Reduction of OCT Images Based on the External Patch Prior Guided Internal Clustering and Morphological Analysis

: Optical coherence tomography (OCT) is widely used in biomedical imaging. However, noise severely affects diagnosing and identifying diseased tissues on OCT images. Here, a noise reduction method based on the external patch prior guided internal clustering and morphological analysis (E2PGICMA) is developed to remove the noise of OCT images. The external patch prior guided internal clustering algorithm is used to reduce speckle noise. The morphological analysis algorithm is employed to the background for contrast enhancement. OCT images of in vivo normal skin tissues were analyzed to remove noise using the proposed method. The estimated standard deviations of the noise were chosen as different values for evaluating the quantitative metrics. The visual quality improvement includes more textures and ﬁne detail preservation. The denoising effects of different methods were compared. Then, quantitative and qualitative evaluations of this proposed method were conducted. The results demonstrated that the SNR, PSNR, and XCOR were higher than those of the other noise-reduction methods, reaching 15.05 dB, 27.48 dB, and 0.9959, respectively. Furthermore, the presented method’s noise reduction ratio (NRR) reached 0.8999. This proposed method can efﬁciently remove the background and speckle noise. Improving the proposed noise reduction method would outperform existing state-of-the-art OCT despeckling methods.


Introduction
Optical coherence tomography (OCT) [1] is widely used in biomedicine and the clinic, especially in dermatology [2], ophthalmology [3], and cardiology [4]. Noise seriously affects the quality of OCT images for clinical examination. Due to taking advantage of lowcoherence interferometry, OCT images are always corrupted by speckle noise. The noise suppression of OCT images is still a hot topic, especially in intraoperative OCT imaging [5,6]. Hence, reducing speckle and background noise in OCT images is very important to enhance image quality and further improve clinical diagnosis and analysis accuracy.
Two categories of methods were used to reduce noise, including hardware-based and image-processing-based methods. Hardware-based methods include optical chopper [7], angular compounding [8,9], spatial compounding [10,11], and frequency compounding [12], aiming to produce uncorrelated speckle patterns that can be suppressed by the averaging method. These approaches require specially designed acquisition systems and cannot be directly applied to commercial OCT scanners. Currently, many image processing and preprocessing methods have been developed to remove noise, such as wavelet domain compounding [13], A-scan reconstruction [14], the edge-sensitive cGAN-based deep learning method [15], BM3D filtering [16], SBSDI [17], adaptive weighted bilateral filtering [18], and the shearlet-based total variation algorithm [19]. Some noise still existed in the OCT images. Thus, this noise makes the original OCT images unclear and unsharp. In contrast, the self-similarity prior-based nonlocal means method (NLM and PNLM) [20,21] and adaptive basis-based sparse representation methods [17,22,23] can obtain a better speckle noise reduction effect. However, these methods vectorized a local image patch, which destroys the fine structures of the objects. Recently, deep learning methods [15,[24][25][26][27][28][29] have been very useful for image processing, also used to remove speckle noise. These methods require no complicated prior information of the OCT image speckle. However, deep learning-based methods need a large number of OCT images to train, and it is very time consuming. Similarly, an external patch prior to internal clustering [30] for noise has been proposed in natural images. This method is useful for noise reduction. Regarding the speckle noise of medical OCT images, this method would be a good solution for effectively denoising speckles.
Recently, we developed a fixed-pattern noise reduction method based on the Hough transform [31]. The proposed method achieves high-efficiency noise reduction for fixedpattern noise resulting from high-intensity reflection originating from biological tissue surfaces. Similarly, the background severely affects the postprocessing of OCT images to identify diseased lesions. A detection algorithm of the lumen boundary has been developed for delineating the border in intravascular OCT images [32,33]. It can be used to segment the boundary of the intravascular OCT images explicitly and reduce the background. This method can be used in endoscopic OCT imaging of the gastrointestinal tract [34]. Furthermore, reducing the background is important to improving the quality of B-scan OCT images and effective three-dimensional (3-D) visualization. However, there is no excellent solution for noise reduction to provide good preservation of useful information and fine structural characteristics of middle-or low-resolution OCT images.
In this work, we proposed a noise reduction method based on the external patch prior guided internal clustering and morphological analysis (E2PGICMA) to remove the background and speckle noise of OCT images. The preprocessing of OCT images provided the basis of the noise removal method. The external patch prior guided internal clustering method was used to despeckle the original OCT images. The standard deviation of the estimated noise was added to test these OCT images. The morphological analysis-based noise reduction method was used to reduce the background. The upper boundary of biological tissues was searched through the method of gray threshold comparison. Furthermore, the global signal-to-noise ratio (SNR), the peak signal-to-noise ratio (PSNR), the correlation (XCOR), the average equivalent number of looks (ENL), the average contrast-to-noise ratio (CNR), the edge preservation index (EPI), and the noise reduction ratio (NRR) were computed to quantitatively evaluate the proposed method. Qualitative validation experiments were conducted by viewing the enlarged regions and A-scan lines of the denoised OCT images.

Materials and Methods
Noise reduction of OCT images is important, especially background and speckle noise reduction. Image patch space is not a ball-like Euclidean space. Using the Mahalanobis distance to characterize the patch covariance matrix could be a better choice for patch similarity measurement, as described in [30]. The external patch prior guided internal clustering and morphological analysis (E2PGICMA)-based noise removal method was proposed. Some in vivo experiments were conducted to acquire OCT images of normal skin tissues. We computed the quantitative noise removal parameters and visualized the results of denoised OCT images through two-dimensional visualization and denoised A-scan lines.

Biological Tissue Preparation and OCT Imaging
In vivo nude mouse skin was prepared and acquired. The mice were anesthetized by an intraperitoneal injection of 1% sodium pentobarbital solution. The solution was injected into the mice at a dose of 0.1 mm/10 g. After the mice were placed under deep anesthesia, Photonics 2022, 9, 543 3 of 14 a home-built OCT was used for imaging. The OCT module had a scanning scale sufficient to scan the burnt spots with a field of view (FOV) of approximately 10 mm × 10 mm. Its specifications have been described as in ref. [35]. The OCT system had a horizontal resolution of approximately 22 µm and an axial resolution of approximately 12 µm. The imaging speed of this OCT system was approximately 60 frames per second. The same location was scanned to acquire the B-scan OCT images, two locations were scanned, and at least 120 B-scan OCT images were saved at each location. Five B-scan OCT images at each location were randomly chosen and averaged as ground truth. These images of each location can be averaged as ground truth and tested to evaluate the effect of noise reduction. This study used one mouse to acquire OCT images of normal skin tissues. The Beijing Institute of Radiation Medicine Experiment Animal Center-Approved Animal Protocols approved this study. All animal experiments were performed in accordance with the guidelines in IACUC-DWZX-2019-502.

Acquisition and Preprocessing of OCT Images
Experiments were conducted using OCT to scan the normal skin tissue of three mice in vivo. One of these mice was sacrificed to acquire the histology of normal skin tissues. OCT images contained some noise and useful information on biological tissue. Figure 1a,c shows the original OCT images of normal mouse skin, and Figure 1b shows the corresponding histology. The layered structure is clear and obvious including epidermis, dermis, fat, and muscle layers. Preprocessing and background reduction was conducted. We further utilized the HTFPNR method proposed previously in [31] to reduce the fixed mode noise of these OCT images. Then, the proposed method was conducted to reduce the noise. Figure 1d,e shows the denoised OCT images with this E2PGICMA method for removing the background and speckle noise.

Biological Tissue Preparation and OCT Imaging
In vivo nude mouse skin was prepared and acquired. The mice were anesthetized by an intraperitoneal injection of 1% sodium pentobarbital solution. The solution was injected into the mice at a dose of 0.1 mm/10 g. After the mice were placed under deep anesthesia, a home-built OCT was used for imaging. The OCT module had a scanning scale sufficient to scan the burnt spots with a field of view (FOV) of approximately 10 mm × 10 mm. Its specifications have been described as in ref. [35]. The OCT system had a horizontal resolution of approximately 22 µ m and an axial resolution of approximately 12 µ m. The imaging speed of this OCT system was approximately 60 frames per second. The same location was scanned to acquire the B-scan OCT images, two locations were scanned, and at least 120 B-scan OCT images were saved at each location. Five B-scan OCT images at each location were randomly chosen and averaged as ground truth. These images of each location can be averaged as ground truth and tested to evaluate the effect of noise reduction. This study used one mouse to acquire OCT images of normal skin tissues. The Beijing Institute of Radiation Medicine Experiment Animal Center-Approved Animal Protocols approved this study. All animal experiments were performed in accordance with the guidelines in IACUC-DWZX-2019-502.

Acquisition and Preprocessing of OCT Images
Experiments were conducted using OCT to scan the normal skin tissue of three mice in vivo. One of these mice was sacrificed to acquire the histology of normal skin tissues. OCT images contained some noise and useful information on biological tissue. Figure 1a,c shows the original OCT images of normal mouse skin, and Figure 1b shows the corresponding histology. The layered structure is clear and obvious including epidermis, dermis, fat, and muscle layers. Preprocessing and background reduction was conducted. We further utilized the HTFPNR method proposed previously in [31] to reduce the fixed mode noise of these OCT images. Then, the proposed method was conducted to reduce the noise. Figure 1d,e shows the denoised OCT images with this E2PGICMA method for removing the background and speckle noise.

Noise Reduction Algorithm Based on E2PGICMA
The E2PGICMA algorithm was conducted to remove the speckle and background noise of OCT images. The method is developed based on the external patch prior guided internal similarity clustering algorithm [30]. The procedure is as Algorithm 1. The quadratic optimization problem can be solved in closed form (Equation (1)),

Noise Reduction Algorithm Based on E2PGICMA
The E2PGICMA algorithm was conducted to remove the speckle and background noise of OCT images. The method is developed based on the external patch prior guided internal similarity clustering algorithm [30]. The procedure is as Algorithm 1. The quadratic optimization problem can be solved in closed form (Equation (1)), where λ is a positive constant, l is the alternating times, R k is a matrix which extracts the k-th patch from x, Z l k is the low-rank matrixes, and y is a noisy OCT image. After obtaining an improved estimate of the unknown image x l+1 , the noise standard deviation σ can be updated by utilizing the feedback of the filtered noise. The updated σ is Photonics 2022, 9, 543 4 of 14 then used to improve the estimate x l+2 . Such a process is iterated until convergence. The total procedure of the proposed algorithm was as follows: First, a reasonable scaling factor γ was chosen to control the re-estimation of noise variance.
Second, the optimization process was conducted by updating the standard deviation (σ) to improve the unknown image x.
Finally, the despeckled OCT images were output for further processing and were used to remove the background.
The despeckled OCT image was histogram-equalized. The gray threshold for the binarization of a whole OCT image was chosen automatically by the Otsu algorithm. This method was implemented through function 'graythresh' and 'im2bw' in MATLAB. It can acquire the threshold for minimizing the in-class variance of the threshold black and white pixels. The global threshold can be used in conjunction with imbinarize to convert grayscale images into binary images. Then, a 5 × 5 mask was applied to implement the median filtering of an OCT image. The region-filling operation was conducted to fill the hole in the binarized OCT image. This procedure is shown in Figure 2a. The upper surface was searched and saved by comparison with the gray threshold. The gray value of the binarized OCT image ranges from 0 to 255. Here, we chose the 70 as the gray threshold. Then, the upper surface was smoothed through the median filtering method. The pixels located above the upper surface were set as zero. The useful information depth was approximately 1.5 mm; hence, the 150-pixel-depth OCT image below the upper boundary was acquired and flattened. Algorithm 1: Proposed algorithm for denoising of OCT images 1. Input: noisy image y, noise standard deviation σ, learned GMM model parameter Θ' and K.

Beginning the background reduction
(1) Input the speckle-reduced OCT image, (2) Image binarization with Ostu algorithm, where λ is a positive constant, l is the alternating times, Rk is a matrix which extracts the kth patch from x, is the low-rank matrixes, and y is a noisy OCT image. After obtaining an improved estimate of the unknown image x l+1 , the noise standard deviation σ can be updated by utilizing the feedback of the filtered noise. The updated σ is then used to improve the estimate x l+2 . Such a process is iterated until convergence. The total procedure of the proposed algorithm was as follows: First, a reasonable scaling factor γ was chosen to control the re-estimation of noise variance.
Second, the optimization process was conducted by updating the standard deviation (σ) to improve the unknown image x.
Finally, the despeckled OCT images were output for further processing and were used to remove the background.
The despeckled OCT image was histogram-equalized. The gray threshold for the binarization of a whole OCT image was chosen automatically by the Otsu algorithm. This method was implemented through function 'graythresh' and 'im2bw' in MATLAB. It can acquire the threshold for minimizing the in-class variance of the threshold black and white pixels. The global threshold can be used in conjunction with imbinarize to convert grayscale images into binary images. Then, a 5 × 5 mask was applied to implement the median filtering of an OCT image. The region-filling operation was conducted to fill the hole in the binarized OCT image. This procedure is shown in Figure 2a. The upper surface was searched and saved by comparison with the gray threshold. The gray value of the binarized OCT image ranges from 0 to 255. Here, we chose the 70 as the gray threshold. Then, the upper surface was smoothed through the median filtering method. The pixels located above the upper surface were set as zero. The useful information depth was approximately 1.5 mm; hence, the 150-pixel-depth OCT image below the upper boundary was acquired and flattened.  1) Choose a reasonable scaling factor γ for controlling the re-estimation of noise variance; 2) Initialize x 0 = y; σ 0 = σ. The noise reduction procedure was as follows: the involved parameters λ (positive constant) and γ (reasonable scaling factor) in the proposed algorithm were set to 0.18 and Photonics 2022, 9, 543 5 of 14 0.67, respectively. According to experimental experience [36], the patch size was set to 7 × 7, 8 × 8, 9 × 9 and 10 × 10 for σ ≤ 20, 20 < σ ≤ 40, 40 < σ ≤ 60 and σ > 60, respectively.

Validation for the Noise Reduction of OCT Images
For qualitative evaluation, the filtered images, and the view of textures in enlarged regions are provided in visual B-scan OCT images, making the comparison more comprehensive and directed. Visual A-scan lines of original, ground truth and denoised OCT images were provided, making the comparison of these methods more comprehensive and purposeful. The execution time was also recorded and compared. Expert observers manually reviewed all denoised single-frame B-scan images.
For quantitative evaluation of the performance of noise reduction, five other metrics were used to quantify the image quality, including the global signal-to-noise ratio (SNR), the peak signal-to-noise ratio (PSNR), the cross-correlation (XCOR), the equivalent number of looks (ENL), and the average contrast-to-noise ratio (CNR). Equations (2) and (3) show that the SNR and PSNR act as indicators of speckle reduction, and higher values indicate better quality. Equation (4) shows that XCOR depicts the similarity between the despeckled image I and the reference image R; a larger value implies that the recovered image is more like the reference image. The ENL measures the smoothness of the filtering results in the homogeneous regions (Equation (5)); higher values indicate better speckle reduction. CNR is a measurement of the contrast between the foreground objects and the noisy background regions (Equation (6)). As an indicator of improving contrast and preserving structures, a higher CNR value means that the image features are more separated from the OCT image background. Since there are no ideal 'noiseless' OCT images available, we use the averaged B-scan images as a noiseless approximation (ground truth). These metrics are, respectively defined as: where I is the recovered image concerning its ground truth image I. N is the total number of pixels, and MAX is the maximum intensity of the images. µ n and σ n are the mean value and variance of the background regions in the linear magnitude image, µ h and σ h are the mean and variance of the hth homogenous regions of interest (ROI), and µ r and σ r are the mean and variance of the rth ROI in the homogenous and nonhomogenous regions, respectively. Furthermore, the structure similarity (SSIM) [37] index was designed by modeling any image distortion as a combination of three factors, namely, the loss of correlation s(I,I), the luminance distortion l(I,I), and the contrast distortion c(I,I). The metric (Equation (7)) measures the similarity between a reference image and a denoised image.

SSIM(I,I) = l(I,I)·c(I,I)·s(I,I),
Edge Preservation index (EPI) (Equation (9)) shows the degree of edge blurring inside the ROI based on the methods discussed in [38]. The closer the EPI is to 1, the better the edge preservation.
where, ∇ 2 I 0 and ∇ 2 I represent the Laplacian operator (∇ 2 ) performed on the noisy image (I 0 ) and the filtered image (I) in the eth nonhomogenous ROI, respectively. I 0 , I, ∇ 2 I 0 , and ∇ 2 I are the means of I 0 , I, ∇ 2 I 0 , and ∇ 2 I over 3 × 3 neighborhoods, respectively. Moreover, we calculated the noise-reduction ratio (NRR) (Equation (10)) to compute the noise reduction index to evaluate the noise removal effect of the presented method. The NRR is defined as in Equation (10): where I noise_filtered and I original_image are the intensities of the removed noise and the original image, respectively. This indicator indicates that higher values indicate a better effect of speckle and background reduction.
In vivo normal skin tissues were imaged using an SS-OCT system. Then, 200 B-scan OCT images were denoised, analyzed with the proposed denoised method, and used to validate the performance of NRR and the visual effect of noise reduction. Furthermore, these OCT images were visualized through ray-tracing rendering and the 3-D visualization method. We qualitatively evaluated the effect of noise reduction by viewing the inner structural characteristics of OCT images. This method was processed on a laptop with an Intel (Santa Clara, CA, USA) Core i5-7500 CPU (3.40 GHz).

Experimental Results
After preprocessing, noise removal and validation of the proposed method were conducted and implemented. Visualization of OCT images presented the effect of noise reduction with the proposed method. This method was run with the software MATLAB 2020 (Natick, MA, USA).

Results of Speckle Noise Reduction with the E2PGICMA-Based Method
Speckle noise reduction was implemented through the proposed method and validated with directed visual display and visualization. A-scan lines of the original OCT image, the ground truth, and the denoised OCT images were provided directly and evaluated visually.
The A-scan lines of the original OCT images and ground truth are shown in Figure 3a. The results show that the noise can be effectively suppressed in ground truth OCT images. Figure 3b shows the A-scan lines of the denoised OCT images with different estimations of the noisy standard deviation (σ = 5, 10, 20, 30, 40, 50, 70, and 100). The results demonstrated that, as σ increases, the A-scan lines become smoother; when σ = 10, the A-scan line can preserve the fine detail. Figure 3c shows the A-scan lines of the denoised OCT images with the different noise reduction methods. The results demonstrated that the SBSDI and E2PGICMA methods had a better noise reduction effect and superior detail preservation than the other methods. estimations of the noisy standard deviation (σ = 5, 10, 20, 30, 40, 50, 70, and 100). The results demonstrated that, as σ increases, the A-scan lines become smoother; when σ = 10, the A-scan line can preserve the fine detail. Figure 3c shows the A-scan lines of the denoised OCT images with the different noise reduction methods. The results demonstrated that the SBSDI and E2PGICMA methods had a better noise reduction effect and superior detail preservation than the other methods.  Figure 4 shows the effect of speckle noise removal with different estimates of the noisy standard deviation (σ). Figure 4a shows the original OCT image of normal tissues. The red box represents the background ROI, the cyan boxes represent different foreground ROIs, the green box represents the area used to enlarge for direct viewing and evaluating, and the blue box represents the ROIs used to compute the CNR for evaluating the contrast of OCT images. Figure 4b-f shows the denoised OCT images and enlarged ROIs with the proposed method combined with different noise standard deviations (σ = 5, 10, 20, 30, 40, 50, 70, 100). As the noise standard deviation increased, the denoised OCT images became smoother and blurred. When the noise standard deviation σ = 10, the noise was effectively reduced, the fine structural details of OCT images were preserved, and a good visual effect was reached. Therefore, the estimated standard deviation (σ) is set as 10 through comparison with other noise reduction methods in the following research.  Figure 4 shows the effect of speckle noise removal with different estimates of the noisy standard deviation (σ). Figure 4a shows the original OCT image of normal tissues. The red box represents the background ROI, the cyan boxes represent different foreground ROIs, the green box represents the area used to enlarge for direct viewing and evaluating, and the blue box represents the ROIs used to compute the CNR for evaluating the contrast of OCT images. Figure 4b-f shows the denoised OCT images and enlarged ROIs with the proposed method combined with different noise standard deviations (σ = 5, 10, 20, 30, 40, 50, 70, 100). As the noise standard deviation increased, the denoised OCT images became smoother and blurred. When the noise standard deviation σ = 10, the noise was effectively reduced, the fine structural details of OCT images were preserved, and a good visual effect was reached. Therefore, the estimated standard deviation (σ) is set as 10 through comparison with other noise reduction methods in the following research.   Figure 5 shows the effects of speckle noise reduction with different methods. Figure  5a shows the original OCT image. Five OCT images of normal skin tissues at the same location were randomly chosen and averaged as the ground truth (Figure 5b). Figure 5ch shows the denoised OCT images with the PNLM, NLM, WGLRR [39], BM3D, SBSDI, and E2PGICMA methods. We could see that the results of the PNLM, NLM, WGLRR, SBSDI, and E2PGICMA had a better contrast than the BM3D method. The contrast and   Figure 5 shows the effects of speckle noise reduction with different methods. Figure 5a shows the original OCT image. Five OCT images of normal skin tissues at the same location were randomly chosen and averaged as the ground truth (Figure 5b). Figure 5c-h shows the denoised OCT images with the PNLM, NLM, WGLRR [39], BM3D, SBSDI, and E2PGICMA methods. We could see that the results of the PNLM, NLM, WGLRR, SBSDI, and E2PGICMA had a better contrast than the BM3D method. The contrast and detail conservation of E2PGICMA method are better than that of other methods. Furthermore, the result of E2PGICMA method is similar to the ground truth (Figure 5b), which has fine structural details, and a good visual effect was also reached. However, the BM3D method has little effect in the reduction of speckle noise. Comprehensively, the E2PGICMA method is more efficient than the others. This method can preserve more textures and fine details than the other competing methods.  Figure 5 shows the effects of speckle noise reduction with different methods. Figure  5a shows the original OCT image. Five OCT images of normal skin tissues at the same location were randomly chosen and averaged as the ground truth (Figure 5b). Figure 5ch shows the denoised OCT images with the PNLM, NLM, WGLRR [39], BM3D, SBSDI, and E2PGICMA methods. We could see that the results of the PNLM, NLM, WGLRR, SBSDI, and E2PGICMA had a better contrast than the BM3D method. The contrast and detail conservation of E2PGICMA method are better than that of other methods. Furthermore, the result of E2PGICMA method is similar to the ground truth (Figure 5b), which has fine structural details, and a good visual effect was also reached. However, the BM3D method has little effect in the reduction of speckle noise. Comprehensively, the E2PGICMA method is more efficient than the others. This method can preserve more textures and fine details than the other competing methods.

Results of Background Reduction with the Region Filling Algorithm
After speckle noise reduction, the background reduction was useful to enhance the contrast of OCT images and remove the noise above the upper boundary of OCT images. The useful information about the original OCT images presented the features of biological tissues. Hence, we removed the background through morphological analysis. Figure 6 shows the background reduction results of the original OCT image, the ground truth, and the denoised OCT image. Figure 6a,c,e show the original OCT image, the ground truth, and the denoised OCT image, respectively. Figure 6b,d,f show the upper boundary of the original OCT images, the ground truth, and the denoised OCT image, respectively. Figure 6e shows the OCT images without speckle noise reduced by the E2PGICMA method.
tissues. Hence, we removed the background through morphological analysis. Figure 6 shows the background reduction results of the original OCT image, the ground truth, and the denoised OCT image. Figure 6a,c,e show the original OCT image, the ground truth, and the denoised OCT image, respectively. Figure 6b,d,f show the upper boundary of the original OCT images, the ground truth, and the denoised OCT image, respectively. Figure 6e shows the OCT images without speckle noise reduced by the E2PGICMA method.

Quantitative Validation of Noise Reduction
The validation of the proposed method included some quantitative parameters, including SNR, PSNR, CNR, SIMM, EPI, and ENL. The OCT images of normal mouse skin and OCT images of different noise standard deviations (σ) were used to compute these quantitative parameters. The quantitative parameters of the proposed method of different standard deviations (σ = 5, 10, 20, 30, 40, 50, 70, 100) were computed in an orderly manner. Table 1 lists the quantitative parameters. SNR and PSNR reached their maximum when σ = 10; and when σ continued to increase, SNR and PSNR decreased. The results also demonstrated that, when σ increased, the SIMM decreased. However, the CNR gradually increased with increasing standard deviation (σ) until these OCT images became blurred and unclear. Comparing with the reduction results of original OCT images, the reduction result is hardly dependent on the ground truth, and almost completely relied on the level of noise standard deviation (σ).

Quantitative Validation of Noise Reduction
The validation of the proposed method included some quantitative parameters, including SNR, PSNR, CNR, SIMM, EPI, and ENL. The OCT images of normal mouse skin and OCT images of different noise standard deviations (σ) were used to compute these quantitative parameters. The quantitative parameters of the proposed method of different standard deviations (σ = 5, 10,20,30,40,50,70,100) were computed in an orderly manner. Table 1 lists the quantitative parameters. SNR and PSNR reached their maximum when σ = 10; and when σ continued to increase, SNR and PSNR decreased. The results also demonstrated that, when σ increased, the SIMM decreased. However, the CNR gradually increased with increasing standard deviation (σ) until these OCT images became blurred and unclear. Comparing with the reduction results of original OCT images, the reduction result is hardly dependent on the ground truth, and almost completely relied on the level of noise standard deviation (σ).
We quantitatively compared the proposed noise reduction method with other methods using SNR, PSNR, XCOR, CNR, SIMM, EPI, and ENL. The OCT images of normal mouse skins were utilized to compute these quantitative parameters. Table 2 lists the quantitative metrics with the different reduction methods. The results demonstrated that the SNR, PSNR, and XCOR of the E2PGICMA-based method were higher than those of the other methods. These values reached 15.05 dB, 27.48 dB, and 0.9959, respectively. The CNR of this proposed method was 6.63. It was larger than that of the BM3D and SBSDI methods and was lower than that of the PNLM, NLM, and WGLRR methods. The SSIM of this proposed method reached 249.40, which was only lower than that of the BM3D method (SSIM = 254.04). The EPI was 0.31, which was lower than that of the BM3D method (EPI = 0.49) and higher than other methods. However, the ENL of this method was lower than that of the NLM-based and WGLRR-based methods and higher than that of the BM3Dbased method. Comprehensively, this proposed method had good performance of speckle noise reduction on OCT images. We also acquired the computation times of these noise reduction methods. All the methods were run on the same laptop, implemented in MATLAB for B-scan OCT images, with a size of 250 × 460 pixels from the SS-OCT dataset. Table 3 presents the time cost of the proposed method with different noise standard deviations (σ). As the noise standard deviation increased, the time cost gradually became longer, ranging from 35.74 s to 553.90 s. Table 4 shows the computation time of the five denoising methods. The results demonstrated that the computation time of the E2PGICMA method was 41.27 s, which was larger than that of other methods. The shortest computation time was 3.04 s for the PNLM method. However, we found that these methods were difficult for real-time processing of these OCT images. Therefore, these methods would be a useful postprocessing solution of OCT images for noise suppression and removal.  Figure 6 shows the NRRs of the proposed method and the 3-D visualization of 200 Bscan OCT images before and after noise reduction. Figure 6a shows the range of the  Table 5 lists the NRRs of the proposed method and other methods. The results demonstrated that the NRRs were more than 88% and that the mean NRR of 200 B-scan OCT images was 91.14%. The background was effectively reduced, and the contrast of these OCT images was comprehensively enhanced. The NRR of one B-scan OCT image reached 89.99%, larger than that of BM3D, PNLM, WGLLR and SBSDI and lower than that of NLM. Figure 6b,c shows the 3-D OCT image in C-scan orientation and the top view, and the cardiac cycle of mouse can be viewed on the surface of 3-D image. Figure 6d,e shows the 3-D visualizations of 200 B-scan OCT images in the B-scan orientation before and after noise reduction. Speckle noise was suppressed effectively from the derma and muscle layers, and the deliberate structures were preserved finely.

Discussion
Noise in OCT images results in an incorrect recognition and interpretation of morphological characteristics such as layered structures (derma, fat, and muscle layers) [40]. To suppress noise while preserving and enhancing edges and preserving the geometric properties of the main structures, we developed an E2PGICMA-based noise reduction method to remove background and speckle noise. The noise of in vivo normal skin OCT images was divided into two components. E2PGIC was employed to reduce speckle noise, and morphological analysis was used to remove background noise. The qualitative evaluation was conducted by viewing the denoised OCT images and enlarged ROIs. Quantitative evaluation was also conducted by computing the proposed method's SNR, PSNR, XCOR, CNR, SIMM, ENL, EPI, and NRR. The results demonstrated that the SNR, PSNR and XCOR were higher than those of the other methods (Table 2). This proposed method can effectively reduce the speckle and backgrounds of these normal skin OCT images.
Using the proposed method, we can provide the external patch prior guided internal clustering method for speckle noise reduction. For these normal skin OCT images, we found that, when the estimated standard deviation σ was chosen as 10, SNR and PSNR reached higher results (20.99 and 34.27 dB, respectively) than the other conventional methods, such as NLM and BM3D. As Figs. 4 and 5 shown, the denoised OCT images blur and become unclear, that is, this method let these OCT images inevitably distort. Textures of OCT images are easily deformed and smoothed because they are indistinguishable from noise. We think that, as the noise standard deviation (σ) increases, the distinction between image texture and noise becomes less and less. Speckle is distributed in OCT images as much as possible. Hence, these OCT images become blur after reduction with the increasing noise standard deviation.
Noise reduction enhanced the OCT image quality [41] and visualization effect ( Figure 6). The noise removal ratio of the proposed E2PGICMA method reached more than 0.8999, which also demonstrated that this proposed method could effectively reduce the speckle and background. The quantitative and qualitative evaluations demonstrated that our proposed method provides good performance in the removal of the background. Furthermore, background reduction has not been widely researched compared with speckle noise reduction [42], and we further provided a pilot method to reduce the background ( Figure 6). The NRRs of the OCT image under respiration motion were lower than those of the resting state. We found that the NRRs changed circularly with respiration motion. Such a method would help improve the quality of OCT images to effectively evaluate the detailed structural variations [43] of biological tissues.
The limitation of the proposed E2PGICMA method is the long computation time compared with other methods, which usually reaches more than 40 s under the current image size (250 × 460 pixels) and the estimated standard deviation of speckle noise (σ = 10). This algorithm could be improved by decreasing the time cost. This method was derived from ref. [30], combining with the morphological analysis, hence, the high algorithm complexity would influence the computation cost. A possible improvement would be using a graphic processing unit to accelerate parallel computation and add more OCT images to evaluate the statistically significant difference. Furthermore, this method would be employed for real-time OCT image processing [44] during intraoperative imaging and diagnosis, including different pathological OCT images, to enhance the generalization capability of this proposed method.

Conclusions
In summary, we propose an external patch prior guided internal clustering and morphological analysis (E2PGICMA)-based method for noise reduction of mouse skin OCT images. In vivo experiments are conducted to acquire OCT images, and the proposed method is used to remove the OCT images' noise. The quantitative and qualitative evaluation metrics demonstrated that this method could effectively remove speckle and background to preserve the fine structure and improve the image quality. It can be widely employed in OCT imaging for biological tissues. This proposed method outperforms other popular OCT despeckling methods and has high SNR and fine detail preservation. It has the potential to increase the accuracy of available segmentation methods, especially for automatic identification of abnormalities in 3-D OCT datasets.  Data Availability Statement: Data underlying the results presented in this paper are not publicly available but may be obtained from the authors upon reasonable request.