A Technique for Estimating Degradation Parameters for Medical Images Blind Restoration

Restoration is the main process in many applications. Restoring an original image from a damaged image is the foundation of the restoring operation, either blind or non-blind. One of the main challenges in the restoration process is to estimate the degradation parameters. The degradation parameters include Blurring Function (Point Spread Function, PSF) and Noise Function. The most common causes of image degradation are errors in transmission channels, defects in the optical system, inhomogeneous medium, relative motion between object and camera, etc. In our research, a novel algorithm was adopted based on Circular Hough Transform used to estimate the width (radius, sigma) of the Point Spread Function. This algorithm is based on the PSF, which represents the redistribution of energy in the image plane of a point source located in the object plane. A second novel algorithm was adopted to estimate the variance of the added noise, based on dividing the degraded image into sub homogeneous images. The result shows that these two algorithms give excellent results for estimating the PSF and Noise Variance, and for different values of PSF widths and Noise variances, compared to real PSF widths and Noise Variances values


Introduction
The restoration process aims to reconstruct an image by removing blurring and noise from the degraded image [1].Image restoration is typically a process that starts with a corrupted or degraded image and then tries to estimate the original image.The degradation and restoration phases are shown in Figure (1).The mathematical relation between the degraded (Blurred and Noisy) image, g(x,y), and object (Original image), f(x,y), is given by [2]: g(x, y) = h(x, y)  f(x, y) + n(x, y) Where: n(x,y) represents additive white Gaussian noise, h(x,y) represents the Blurring function, known as Point Spread Function (PSF), and  denotes the convolution process.PSF and noise are two common factors that contribute to the degradation of the original image.Blurring may occur during image production, transmission, and storage, due to transmission channel error, camera defects, atmospheric turbulence, relative motion between object and camera, etc.In our daily lives, the use of medical images has become an essential part of treatment.Medical images such as computed tomography (CT) scans, magnetic resonance imaging (MRI), X-ray images, microscopic images, and ultrasound images can suffer from additive noise and blurring, causing them to be degraded.This degradation hurts image analysis and processing.Medical images with blurred and additive noise may result in a misdiagnosis, especially when tumors or foreign objects are present [5].
Image restoration attempts to reconstruct the original image from a degraded image.The accuracy with which the degraded parameters (the point spread function (PSF) and noise) are estimated is critical to the success of restoring the blurred image.Thus, in the present study, novel algorithms have been suggested to estimate the Point Spread Function (PSF) and the variance of the noise in the degraded images, which have been used in the second stage to restore degraded images, as blind restoration techniques.Figure 1 shows the degradation and restoration phases [2, 3].
The following is how the remainder of the paper is organized: section 2 provides a review of the related works of estimation algorithm and Circular Hough Transform, while section 3 explains the idea and aim of the work.Section 4 gives more details about the Hough transformation (HT) and The Circular Hough transformation (CHT) algorithm.Section 5 describes the system architecture, section 6 includes the performance evaluation and discusses the proposed work.Finally, section 7 presents the Conclusions.

Related Work
This section presents the research work of some prominent authors in the same field, as well as a brief description of the Circular Hough Transform and PSF estimation.Mayana Shah.et al [7], proposed a comparison technique for the estimation of PSF using the Radon transform.They demonstrated that the radon transform-based method is more accurate across a larger range of blur extent than the Hough transform, despite the latter's flexibility when dealing with broken line segments.
Ruichen Wang et al [8], presented an explanation of a method for calculating the PSF at the profile's vanishing points along the edges using low-resolution (LR) images, straight-line estimation of a 1D-PSF kernel, followed by a robust 2D PSF extraction using least-squares methods and random sample consensus.
Qiang Li et al. [9], introduced an Improved Hough circle detection algorithm based on circular inscribed direct triangles, by using the geometrical properties of circles to reduce the three-dimensional parameter space required by the classical Hough transform to twodimensional parameter space.They demonstrated that the proposed algorithm greatly reduces the algorithm's memory space and time consumption.Simultaneously, the algorithm has good anti-noise performance and noise robustness.However, pre-processing is required for this algorithm.If this is not done, the missing edge of the circle or the interference information is too great, causing the radius to be inaccurate.
Dazhi Zhan et al. [10], proposed a simple-lens camera PSF estimation method that is robust and accurate.The primary goal of estimation is to obtain the blur and clear image pairs required for non-blind deconvolution PSF estimation.They photographed the original clear image displayed on the computer screen to obtain image pairs via corner detection, and color correction was performed to remove color distortion.The experiment results show that the proposed method estimates the space variant PSF better than the compared methods, both qualitatively and quantitatively.Sheyda Ghanbaralizadeh Bahnemiri et al. [11], presented a deep convolutional neural network (CNN)-based method for estimating a map of local, patch-wise noise standard deviations (sigma-map).Noise variance estimation in the case of additive white Gaussian noise when using estimated sigma, the system provides high efficiency and state-of-the-art image denoising quality that is very close to the ideal case.

Idea and Aim of the work
The problem of blind restoration is one of the most complex processes of image restoration since the restoration process needs to determine the degree of the degradation parameters, i.e., the value of the blur function (Point Spread Function, PSF) and the degree of the noise.The concept of the current research is based on the following novel ideas for evaluating the degree of PSF and noise:: First: A degraded image is produced by the convolution process between the original image and PSF.The characteristics of the convolution are linear complex mathematical processes, and it affects each pixel in the image including the pixels that are empty or contain a very low intensity.From the definition of the PSF, which is defined as the Redistribution of energy in the image plane for a point source located in the object plane, this study proposes a novel approach.Which is to perform an estimation of PSF based on the Circular Hough Transform (CHT) to find the minimum radius in the degraded image that represent the estimated value of PSF, i.e., Blurring Function.
Second: the study introduces a new method for estimating the degree of the corrupted noise.The research is based on assuming that the noise is Independent Additive White Gaussian Noise (IAWGN).One of the main characteristics of this noise is homogeneously added to the image.The estimation of the noise is done using a convolution window of a certain size By evaluating the mean and variance of each convolving window, we can find the variance of the noise, which represents the minimum calculated variance.To increase the accuracy we evaluate the average of five minimum values of the calculated variances.Then from image variance and noise variance, we find the Signal to Noise Ratio (SNR) of the image, which represents the Estimated SNR that was added to the original image.

Theoretical Part
Hough transform (HT) is one of the first computer vision algorithms and has drawn a lot of attention because of both the elegance and universality of the Hough framework as well as the ongoing development of applications based on graphics recognition [12].HT is a specific technique for detecting circles that is particularly well known for its resilience to noise and image deterioration as well as its capacity to find shapes like circles, lines, and ellipses [13].The Circular Hough transformation (CHT) algorithm is a modified version of the Hough Transformation Algorithm that is used to detect circular patterns within an image and has a high accuracy rate in the form of a circular object [14].The Image-space feature point collection is converted into a parameter space set of cumulative votes using the CHT.Votes are then tallied for each feature point for all possible parameter combinations and added up in an accumulator array.The highest number of vote-containing array members reveals the shape's presence [9].Each potential circle that would pass through each point in the image is calculated using the equation [15]: Where: (a,b) represent the center of the circle, and R denotes the radius of the circle.Circles tracking's goal is to identify the parameter triplets (a, b, and R) that best describe each circle.This denotes that the accumulator space will be of order three [14].Using the Hough algorithm directly would cost more in terms of computer memory and processing time due to the 3D nature of the parameter space.Searching can be condensed to 2D when the radius R of the circles in an image is known.Finding the centers' (a, b) coordinates is the goal [16].In the parameter space, the locus of the (a,b) points falls on a circle of radius R and a center at (x, y).A Hough accumulation array can be used to find the genuine center point, which will be shared by all parameter circles.
A circle is produced in parameter space for each point in geometric space.The geometric space center (a, b) is where the circles in parameter space intersect [16].As shown in Figure 2.While if the radius is unknown, the locus of points in parameter space will lie on the surface of a cone.In parameter space, a cone surface will be produced by each point (x,y) on the circumference of a circle.The accumulation cell with the most intersecting cone surfaces will correspond to the triplet (a,b,r).The illustration shows how to create a conical surface in parameter space.At each level, r, a circle with a variable radius will be created.A threedimensional accumulation matrix can be used to search for circles with unknown radii [16], as shown in Figure 3.
There are multiple steps when using the CHT model [15]: 1. Scan all the pixels in the image to find a specific value.2. Create a circle in each point with a value, by using that point as the center and a radius of r (radius range).In parametric space, increment the value in the accumulator matrix at the coordinates that are on the circumference of the drawn circle.Vote accumulator collection (cell values).3. Repeat step 2, for all points and all radii, ranges that are defined.4. Confirmation of candidature: For each discovered maximum, compare the maxima of that accumulator to its immediately preceding and following accumulators.5. Found parameters (r, a,b) that correspond to local maxima in step 4, and map these to the 4837 original image.

6.
Figure 3: CHT of Single Circle with unknown radius R

System Architecture
The system goes through several processes and phases, Figure 4 shows the architecture of the system.The data mining and analysis process includes a stage called data preprocessing, which takes raw data and converts it into a format that can be comprehended and studied.This is done through a few preprocessing steps before the calculating process.These steps are:

Generate degraded image (blurred + noisy image) Figure 4 : Block diagram of the proposed system
Rescaling: The entered image must be converted from a color image (RGB ) to a grayscale representation.It is utilized to reduce the size of data used to represent the image, because greyscale images have one channel while RGB images have three (red, green, blue).The color image, which has three channels, the Y-channel represents light or the gray image's equivalent, while the other two channels represent the color levels of this space.As a result, the processor's performance will improve significantly, and its speed will increase.The conversion is given by [2, 17]: GRAY = 0.30 R + 0.59 G + 0.11 B (3) Normalization: The process of data normalization makes sure that every input parameter has a consistent data distribution for each pixel.As a result, Data is normalized by subtracting the mean from each pixel and dividing the result by the standard deviation.The normalization process can be represented as [18] : x: represents a collection of the observed values in x.   represents the minimum values in x, and   represents the maximum values in x.
Resizing the image.In other words, resizing an image that is, making it bigger or smaller is equivalent to scaling.The image size can be specified manually or by using a The blurred image is produced by convolving the original medical image with Gaussian PSF.Three different values of PSF width (i.e., σ value) were taken: σ =1,2 and 3, as shown in Figure 5 (b-d).To simulate the Noisy image, White Gaussian Noise (WGN) was added to the original image.Three different values of the noise degree were taken, SNR =10, 50, and 100, as shown in Figure 5 (e-g).
As a result, there are nine degraded images resulting from combining both values of σ and SNR as shown in Figure 5 (h-p) the effect of degradation parameters of the x-ray medical image for different values.
First: PSF Estimation: for estimation, the width of PSF, Circular Hough transform (CHT), has been adopted.The process is done by convolving the degraded image, of certain degradation parameters, with CHT.The output of the above convolution process gives different circles that have existed in the degraded image, each detected circle has a certain center (location) and certain radius.And as initial conditions, a relatively small radius range (largest and lowest diameter of the structures to be detected) was used.In addition the backdrop shape (brightnessblackness) and the sensitivity factors must be fixed [19].For high accuracy, small radius ranges should be used, large radius ranges reduce algorithm accuracy and increase computation time.To increase the accuracy, we evaluate the average of five minimum values of the circle's radius, which represent the width of the estimated PSF.Where r is the radius of the circle and a, and b is the center of the circle.Therefore, we must find the x and y of the circle by equations: x = a + r cos t and y = b + r sin t The angle t is evaluated in the range 0 -360.Step5: Compute the accumulator array: foreground pixels of the high gradient are designated as candidate pixels, by generating an infinite number of circles passing through this point with different radii.
Step6: Center estimation, the vote pixels are accumulated at the accumulator array (The maximum voted circle of the Accumulator give the circle.)Step7: Radius estimation, used the Two-stage method to estimate the radius Step8: calculate the estimation of the Point Spread Function (E.PSF) by calculating the average of the minimum 5 values of the circular width in the image.END Second: Noise estimation: It is impossible to know exactly the variance σ 2 of the added Gaussian noise from a single observation of the noisy or degraded image directly.From the definition of the Independent, Additive White Gaussian is homogenous.By homogeneity, we mean that the variance of the noise is a constant for all pixels within the image, and does not change over the position or color intensity of all pixels [20].Therefore, to estimate the noise variance, and from this concept of homogeneity, we segmented the degraded image into different sub-images, using convolution with the template of a certain width, then calculated the mean and the variance of each sub-image.Algorithm (1) and Algorithm (2) show the steps of evaluating the Estimated PSF (E.PSF) and the Estimated Noise variance (E.Noise Variance)

Performance Evaluation
To examine the proposed novel algorithms (the first proposed algorithm to estimate the Blurring function, the second proposed algorithm to estimate the added noise variance, i.e., the estimated SNR.), we adopted X-ray medical images.
First, the degraded images simulated with different cases.For the blurring function the Gaussian function was chosen as the function.Different degrees of blurring, and different standard deviation "width" of PSF, σ = 1,2, and 3, were taken.For the Noise function white Gaussian Noise of different degrees was added, i.e., different degrees of noise variance, different SNR=5, 10, and 100, were taken.Figure 5 shows the original and degraded image of different degradation parameters, i.e., different blurring functions and noise functions.
To measure the degree of similarity between the original image (Object) and the degraded Algorithm (2): template (subimages) algorithm input: LR images {I1} degraded image Output: estimating the signal-to-noise ratio ( E. SNR), the variance of signal, and the variance of the noise BEGIN Step1: change the image format to double, if we don't convert to double, the outcome will be approximate, reducing the accuracy.Step2: Apply template (window) with a size of 5 * 5 pixels and do a scan on all the image to calculate the value of the variance σ and mean in all the pixels of the image.
Step3: Calculate the variance of all pixels within the window (var (blurred and Noisy) image, three different metrics were adopted.These metrics are Peak Signal to Noise Ratio "PSNR", Structural Similarity Index "SSIM", and Root Mean Square Error "RMSE", for the degraded images of different blurring functions and noise functions.where PSNR, SSIM, and RMSE, which help to find the structural similarity between 2 images by measuring the amount of image quality loss brought on by processing, such as data compression or transmission losses, and has a range of (0-1).It is a full reference metric that necessitates the acquisition of a reference image and a processed image from the same image capture  Where: MAX f is the image's highest pixel value.This is 255 when the pixels are represented with 8 bits per sample., and MSE stands for root mean square error.PSNR is the relationship between the maximum possible signal power and noise power that influences signal quality.
Where: x and y are windows of similar size; μ x , μ y are the mean of x and y, respectively.The variance of x, and y are σ x 2 and σ y 2 , respectively.The covariance between  and  is denoted σ XY .To maintain the division's stability, the constants ∁ 1 and ∁ 2 are utilized, L is the pixel values' dynamic range (typically this is 2 # bit per pixel − 1), Where: f(x, y) is the original image (Object), g(x, y) degraded image.N, M: represent the dimensions of the image.To examine the suggested model for estimating the width of the blurring function, in case there is no noise, we apply our algorithm, as shown in Algorithm (1).Table (2) shows the results of the estimation of the width (σ) of the blurring function for different values of real widths.Also, to examine the suggested model for estimating the noise variance, in case there is no blur, we apply our algorithm, as shown in Algorithm (2).Table (3) shows the results of the estimation of the SNR of Additive White Gaussian for different values of Real SNR.Furthermore, to analyze the proposed model for estimating the width of the blurring function and in case there is noise, we apply the algorithms, as shown in Algorithm (1) and Algorithm (2).Table (4) shows the results of the estimation of the width (σ) of the blurring function for different values of real widths and different SNRs.

Conclusions
In this paper, we proposed novel algorithms for estimating the degradation parameters, i.e., degree of a blurring function and the degree of the noise function.The results were evaluated by using 15 images, 3 with different values of PSF with no noise for estimating the width of the blurring function, 3 images with different values of SNR with no blur for estimating the noise variance, and 9 images with several values of PSF and SNR, as shown in the results.The first algorithm uses Circular Hough Transform to estimate the degree of the blurring function (PSF).The second algorithm uses a convolutional window to estimate the variance of the added noise, i.e., SNR.From the results, it can be seen that the calculated (estimated) PSF values and the calculated (estimated) SNR, are very accurate, and very close to the real PSF values and real SNR, respectively.Moreover, the obtained results, which are also excellent, were checked for different values of PSF widths and different values of SNR.The techniques used have proven very efficient in calculating (estimating) the diameter or width of PSF with the presence and absence of noise, as well as high efficiency in estimating the variance of the added noise, i.e., SNR in the case of the presence or absence of the blur function.There did not exist a similar work to calculate the PSF in the presence of noise, and, there was no comparable research to calculate the SNR estimate in the presence of the blur function.
[3].Noise is defined as an unwanted random variation of brightness in a grayscale or color image [4, 5].Noise has different significant types such as Quantization noise, Impulse noise, Multiplicative noise, and Additive noise.Deconvolution techniques are used to restore the original image from the degraded image, and the obtained result represents the original image.Two groups of image deconvolution algorithms are distinguished: The blind technique where both the original sharp image and PSF are unknown and the non-Blind technique in which PSF is known [6].In the case of blind restoration, neither the blurring PSF nor the noise SNR is known beforehand.

Figure 1 :
Figure 1: Represent the degradation and restoration phases

Figure 2 :
Figure 2: CHT of Single Circle with known radius R scaling factor.Image resizing is the process of converting an image of one size to another.There are various algorithms for resizing an image that is stored in compressed form.One such processing algorithm is the resizing operation, which converts an image of size m*m into an image of size k* k, where m is the number of pixels in the original image and k is the number of pixels in a compressed image (k= 256) [2].

Algorithm ( 1 )
: Circle Hough Transform (CHT) • Input: LR images {I1} degraded image.R1, R2 the radius Range [MIN-RADIUS MAX-RADIUS] Sensitivity the sensitivity factor (s)in the range [0 1] for finding circles • Output: centers two-column matrix containing the (x,y) coordinates of the circle centers in the image.radius the estimated radii corresponding to each circle center in centers BEGIN Step1 : Choose the RADIUS_RANGE [ MIN_RADIUS(Rmax), MAX_RADIUS (Rmin)] For high accuracy Step2 : Warn if the radius range is too large using the equation: Rmax < 3*Rmin Step3: Warn if the minimum radius is too small using the equation: (Rmax -Rmin) < 100 Step4: Mathematically equation of a circle in x, y -plane is given by (x -a ) 2 +(y -b ) 2 = r 2

Figure 5 :
results of degraded x-ray image for different values of σ and SNR PSNR =  log 10 (

Table ( 1
) shows the results of the performance evaluation (PSNR, SSIM, RMSE) with different Standard deviations of Gaussian Blur and different SNR of AWGN

Table 1 :
The Metrics of the images with different Gaussian Blur and different SNR of AWGN

Table 2 :
Estimation results for different values of (σ)

Table 3 :
Estimation results for different values of SNR of AWGN

Table 4 :
Estimation of the results of the degradation image as a result of the noise and the blurred