Denoising Terahertz Image Using Non-Linear Filters

A major challenge in the processing and analysis of images is the presence of noise especially in terahertz images. Denoising techniques are designed to remove noise or distorted images while maintaining the original image quality. In this paper, terahertz image denoising is proposed using different filtering methods. This work provides an algorithm that denotes the terahertz image with a non- linear and spatial function of mean and medium filter. The THz images were transformed using Gaussian and Salt & Pepper noise at different percentage levels from 5% to 50%. Universal Image Quantitative Analysis was utilized specifically the most renowned PSNR, MSE, MAE and IEF were explored in this work. Experimental results show that the mean-median filter outperforms Salt and Pepper in removing the Gaussian noise especially when noise factor is increasing.


Terahertz Technology
The physics of terahertz technology is the electromagnetic (EM) spectrum band between the infrared and the microwave band. Over century now, this particular band has highly been explored and stretched in research because of the numerous benefits humanity and nature has derived through the technology of science and research, though the world's spectrum band is in scarcity. Terahertz domain frequencies of the EM band region ranges from frequencies of about 0.1 to 30 THz, which is a gap of convergence between the electronics band and the photonics band in the EM spectrum [1].

Figure 1. EM wave band
This gap region has laid fallow for longer period until in late 1980 because of lack of technology to deploy its source and its detection generation materials for exploration. This gap region is also known as Terahertz gap.
(1 THz = 10 12 Hz). [2] THz gap shares the same characteristics of both infrared and microwaves region as shown in figure 1 [1]. a. High penetration in non-dielectric materials: Number of non-crystalline materials are transparent for THz rays. For example, cloths, plastic, material, paper, etc. This allows for non-contact detections and imaging applications. b. Frequencies in the THz region have low energies, between 0.41 meV and 124 meV. Thus, THz is a nonionizing frequency. This low energy has no ionizing impact on organic tissues; this means that it cannot damage DNA, making it safe for human applications such as medical imaging. c. Terahertz rays suffer reflection and absorption of metals surface and polar liquids such as water respectively: this particularity highlights the potential of THz rays in specific applications such through mineral exploration and through the skin cancer respectively. d. Compound identification/fingerprints: solid, fluid, gas materials have their own signature after passing through THz rays, which permit their identity. This property is generally verified in THz spectroscopy applications as used in soil compounds and chemical powders.
The key limitations in terahertz rays are the inability to penetrate metal and are strong attenuation in water. Apart from these situations, all other characteristic materials from infrared to microwave can be achieved at mercy of robustness of the THz generation and detection systems available. Notwithstanding the increased knowledge of the science and technology of THz technology and its application system deployments, the primary problem in research and development currently is the low power emitted from the THz sources. Research [3]shows that the output power versus frequency for different terahertz sources and the generated power diminishes significantly with frequency and limits the decisions of available frequencies and its applications. However, researchers proceed with their endeavors to accomplish better exhibitions on THz system. The problem is to develop a robust high output source power and high sensitivity compact detectors, which should also be convenient and cost effective. A THz device system is vital to utilize them in optimal conditions. Along these lines under terahertz region that can deliver high control and can be utilized in security applications and more.

Terahertz Application
The science of Terahertz is an amazing technology which encompasses all spheres of life in the area of medical scanned imagery, security weapons & illicit drug detection, pharmaceutical industry for drugs components analysis, manufactory production line inspections, post office delivery content inspections etc. as shown in Fig. 2.
Terahertz active security on-line denoising imaging is my targeted area of focus. Nevertheless, Terahertz images suffer low resolution due to relative low attenuation of the transmission power at source, consequently making the images blurred and noisy; making it difficult to detect weapons at security checkpoints and other new fields that this THz applied technology is been explored as shown in figure 2. Figure 2. Terahertz application Terahertz images produced by the IMPATT Diode (IMPact ionization Transit Time) [4], power and the detector camera reflect, diffract and scatter singles as normal image digital camera for photography does. These low-resolution images as shown in Fig. 3 are affected by noise and sometime can lead to false detection at security checkpoints.

Related works and the general noise
Another challenge faced by THz imaging systems is the signal to noise ratio. This is inherently tied to the average power of the THz emitter. In THz time domain spectroscopy systems, a very high SNR on the order of 105 can be achieved. However, in imaging applications, a number of factors combine to dramatically reduce the SNR to the point where it becomes a limiting concern. Some of these factors include the need to accelerate the imaging acquisition speed and the high absorption of many materials. Significant advances are required in the acquisition speed of THz systems in order to achieve real-time imaging. Conventional THz imaging systems rely on scanning the sample in the and dimensions to obtain an image. This places a severe limit on the available acquisition speed. Recently, two-dimensional (2D) electro-optic sampling has been used together with a CCD camera to provide a dramatic increase in imaging speed.
However, a lock-in-amplifier cannot be synchronized to multiple pixels resulting in a significant reduction in SNR as compared to scanned approach [5]. Finally, scattering is a concern for THz systems. Scattering is a common issue that many imaging modalities face. Scattering of X-ray photons induces artifacts in reconstructed images and is the dominant transport phenomenon in optical tomography. The photon propagation is modeled using a diffusive method in optical tomography reconstruction algorithms. Because of their longer wavelength, THz photons undergo less Rayleigh scattering than optical and X-ray photons. Scattering, on the other hand, is still a problem in T-ray imaging, and accurately modeling the scattering process could support future imaging algorithms.
The most challenging aspect of using region-based methods is figuring out how to create acceptable similarity standards for region-based methods. In the application of denoising in imaging techniques, various forms of filters are used. The following are the most popular types of filters: a. By forming an exponentially formed filter kernel, the Frost Filter [6] achieves a balance between averaging and an all-pass filter. The filter's answer varies locally according to the coefficient of variation b. To change the output locally based on the threshold value, an enhanced Lee & Frost filter is used. When the local coefficient of variance falls below a certain threshold, pure averaging is enabled. When the local coefficient of variance exceeds a certain threshold, the filter behaves like a strict all pass filter. A balance between averaging and identity operation is calculated when the coefficient of variance is between the two thresholds. c. Kaun & Lee Filters [7] -The Lee filter produces an output image by calculating a linear combination of the filter window's average intensity and the center pixel intensity. Although the signal model assumption and variations differentiate, the Kaun and Lee filters have the same formulation. These two filters strike a balance between straight forward averaging in time -domain and identity filtering in areas with edges and point features. The coefficient of variance within the moving window determines this balance. d. Mean Filter [8]-has the property of reducing variance locally, thereby reducing SNR, and it only allows the user to define the window size. It does, however, have the potential to blur the image. The speckled image follows a multiplicative model of non-Gaussian noise, while this filter is best for additive Gaussian noise. As a result, the simple mean is not the best option. e. Median Filter-Due to their robustness against impulsive form noise and edge-preserving characteristics, median filters [9] are used for despeckling. The median filter creates images that are less blurry. The mean and median filters are used in the compounding process.
Linear and non-linear models are the two types of noise models. In most cases, linear models are used. The advantages of linear noise removal models are their speed and their disadvantages are that they are unable to effectively retain image edges. The edges, which are known as discontinuities in the image, are smeared out. Non-linear models, on the other hand, can manage edges much better than linear models. The Total Variation (TV)-filter is a common model for nonlinear image denoising.

Noise Reduction using mean and median filter
Image noise may have a number of sources and, as a result, different characteristics. In Gaussian noise, for example, each pixel is assigned a normally distributed random value ( fig. 4a). The opposite is real. The word "salt-and-pepper noise" refers to a situation in which random pixels are replaced by extremely dark or bright values (see Figure 4b). Since an object or surface typically spans several neighboring pixels, the values of neighboring pixels are assumed to be correlated in an uncorrupted image. Noise in adjacent pixels, on the other hand, is often uncorrelated (as in the case of the Gaussian and salt-and-pepper noise introduced in fig. 4a). By "averaging" adjacent pixels, the simplest method of eliminating noise in an image is accomplished. Filtering is a term that is often used to describe such techniques. Grayscale of the noisy image is represented with the noise effect than RGB images (see Figure 4a and 4b).
The mean filter, (also known as a uniform filter), replaces the value of a pixel with the mean value of a region centered on the pixel; the Gaussian filter, which is similar to a mean filter but weighted in favor of pixels closer to the center; and the radial filter, which is similar to a radial filter but weighted in favor of pixels closer to the center.
The median filter replaces the value of a pixel with the median value of neighboring pixels. The effects of these filters on image noise are shown in (Figure 8 and 9). Any of the filters can minimize Gaussian noise, but none of them can fully eradicate it. A Gaussian filter typically produces the smoothest image, whereas a similarsized mean or median filter typically produces blocky traces. A median filter, on the other hand, can fully eliminate salt-and-pepper noise (if it only affects a small fraction of the pixels in each region), but not a mean or Gaussian filter. Applying a mean filter or a Gaussian filter mathematically is equivalent to convolving the image with a window function; in the case of a mean filter, the window function is uniform over a small area, whereas in the case of a Gaussian filter, the window function is uniform over a large area. In the case of a Gaussian filter, the Gaussian function is used. The window functions are usually normalized so that their integrals evaluate to one (1) in order to avoid changing the overall brightness of the image. This work seeks to combine two linear filters (mean and median) to denoised terahertz imaging [10,11].

Experimental Setup
Due to acquisition rate up to 5000 lines per second, teraFAST-256 device can accommodate scan speed up to 15m/s. The sensor has single sensitivity band at 100±10GHz but experimental power source is between 100GHz.

Noise Models
Salt-and-Pepper and additive Gaussian noise are two forms of noise that occur in images. Noise can appear in an image in either an additive or a multiplicative form [12,13], as shown in the equations 1 and 2 as well as figure 6: Additive noise = w (x, y) = s (x, y) + n (x, y) Multiplicative noise = w (x, y) = s (x, y) × n (x, y) . On the other hand, a will appear as a dark circle (pepper). The PDF is called unipolar if either Pa or Pb is zero. This is shown in Fig. 6 and Eqn. 4. (2)

Proposed Work
We perform many experiments with our proposed method on several terahertz images to check the efficacy (qualities and robustness) of the proposed denoising technique. In this project, we use the Image Processing Toolbox in Matlab to load the THz image and apply various filtering techniques to it. The following are the stages of our proposed work: Stage 1: First, we created a excel sheet to compute values as our database sheet. Stage 2: Create a code that allows for the inclusion of noise in the image. Gaussians and, as well as in the proposed function, there is salt and pepper noise. Stage 3: Create mean and median filtering code techniques. We were able to denoise THz image with the aid of this mean -median filters. Because using the filter increases the likelihood of the amount of image corruption should be reduced. Stage 4: After that, we write code for the application of the measurement of various parameters such as PSNR, MSE, MAE, IEF, SSIM RMSE, NMSE, for example. We can use these parameters to help us compare their pixel-to-pixel relationships enhancement against the physical eye and finally draw our conclusion.

Evaluation and Results
The output of the terahertz images is described and discussed using the mean-median spatial filters combined as shown in (figures 8 and 9) by applying the universal image enhancement indices  Figure 9. 7 x7 mean-median filter a =5%, b=10%, c=20%, d=30%, e=40% & f=50% From figure 8 and figure 9, using 5x5 and 7x7 filters respectively as sliding window concept, we induced noise 5%, 10%, 20%, 30%, 40% and 50% to each image and applied mean-median filter as a noise reducer for denoising the terahertz image. We then compute the image quantitative matric such as PSNR, MSE, IEF, MAE. Here, we based our image denoising and enhancement resolutions purely on pixel-to-pixel gray levels. The graphs result for 3x3 filter would have given much difference in the pictorial presentation.
The red line and black line indicate salt & pepper and Gaussian respectively as shown in figures 8 and 9. The higher the peak signal-to-noise ratio (PSNR) value and the lower the mean standard error (MSE) value, the better the image quality hence image enhancement factor (IEF) has increased. Additionally, figure 8(a-b) and figure 9 (a-b) show that as salt & pepper noise increases from 5% to 50% as noise factor, the image quality enhancement decreases. This phenomenon is contrary to Gaussian noise though initially performed worse but as noise increases from 20% to 50%, the PNSR increases whiles the MSE decreases, this turns to improve image quality better than salt & pepper.

Conclusion
This paper represents a comparison of denoising methods for Terahertz images, which are degraded by different types of noise such as salt & pepper and Gaussian noises. The filtering method of mean-median combined at sliding window of 5x5 and 7x7 were used to generate the results. Results grounded on experimentation show that the non-linear denoising method based on mean-median filter is much better at denoising of Gaussian than salt & pepper. This outcome is very a promising future for terahertz security application images.