FPGA Implementation of Gauss Gradient Edge Detectors for Medical Images

Boundary recognition plays a vital role in real-world scenarios like medical imaging and surveillance. The classical edge detector fails to preserve minute details in the image. The abdominal CT images were first analyzed using two edge detection techniques based on gauss gradient are proposed here for real-time data processing. The performance of the edge detectors is validated by performance metrics and verified for benchmark dataset images. The results reveal that the gauss gradient edge detector was efficient for the boundary extraction in benchmark and medical images. The VLSI implementation of the proposed gauss gradient edge detectors was done using the Kintex 7-FPGA board, hardware implementation also generates efficient results with reduced execution time.


Introduction
Medical image processing uses edge detectors for tracing the structure of anatomical organs and health disorders like a tumor, cyst. The software implementation of image processing algorithms is ubiquitous, however, there are few publications connected to the implementation of image processing algorithms utilising embedded and VLSI processors. In article [1] TMS320C50 DSP processor was used for the processing of the images using 1 3 wavelet transform. In [2], the authors implemented JPEG, JPEG2000, MPEG4 compression algorithms in FPGA for high-speed cameras with CMOS sensors [3].
The authors implemented wavelet-based image compression techniques in iPaq devices with low power consumption in Linux operating system [4]. In [5] FPGA based Xilinx Virtex E processor embedded in Annapolis microsystem Wild starboard which increased the performance of first-order SPIHT image compression and article [7] image compression is done in XC2V FPGA chip using Set Partitioning In Hierarchical Trees algorithm (SPIHT) is Similarly in [6], wavelet-based JPEG 2000 compression was implemented in FPGA.M. Dyer et al. [8]. proposed a Nios II processor-based Hardware and software co-design of JPEG2000 where in Nios II provides an ample platform for integrating hardware. S.N.Sing et al. [9] attempt to implement a JPEG compression scheme in Xilinx XSA 100 reconfigurable hardware. The literature proposes a medical image application termed PUMA-a domain-specific accelerator for MR image reconstruction with NVIDIA graphics processor [10]. The PUMA architecture achieved double the performance and power efficiency up to 54 times compared to modern GPU architecture.
Albert Lin [11] used real-time satellite photos to develop compression in the Xilinx Virtex-5QV FPGA, XQR5VFX130. The article [12] shows a biometric identification embedded system on a single board chip computer with 32-bit architecture. [13] proposes a dual code compression scheme for embedded systems. It makes use of a multifunctional handheld PDA. The proposed paradigm optimizes both the size and performance of the code. Anitta Vincent et al. [14] used Raspberry Pi for the Binarization and character recognition of document images. Nagaraja L et al. [15] also used Raspberry Pi for vision-based text recognition for the implementation of Otsu thresholding and morphological operations for the text identification. Canny edge detector was found to be efficient for the segmentation of underwater images; FPGA implementation of canny edge detector gives satisfactory results [16]. In [17] also, the FPGA implementation of classical edge detectors reveals that canny is efficient for edge detection. Xilinx platform studio-based EDK code is developed on the FPGA Spartan 3E for the tumor edge detection on the MR brain images [18]. This work highlights gauss gradient approaches for medical image edge detection and VLSI implementation of gauss gradient approaches using Kintex 7-FPGA board.

Data Gathering
The photos from the Berkley database were largely used to test edge detection methods. Metro Scans and Laboratory, Trivandrum, offered real-time medical pictures. In this study, three datasets of abdomen CT scans and three datasets of MR brain pictures were employed. Each dataset has numerous images, which are displayed here as the results of selecting slices.

Classical Edge Detection Methods
Edges represent the boundary of objects and it is one of the classical segmentation algorithms. From the human perception of point of view, edges play a vital role and in medical image processing, they characterize anatomical organs or anomalies like a tumor, cyst.
The edges are characterized by intensity changes and the gradient operator is widely used to determine the magnitude and direction.
The gradient vector of the image is defined as follows The magnitude (M) and direction of gradient vector ( ∇Y ) at the location are determined as The partial derivatives S x and S y are determined at every pixel of the image to compute the gradient vector. The classical edge detectors kernels are depicted in Figs. 1, 2, 3 and 4.
The Roberts, Prewitt, Sobel, and Canny are based on first-order derivatives and the difference is how the computations are carried out. The most commonly used approach for   approximation of the first-order derivative is to apply Taylor's series expansion with a small value of h.
∕h. The first-order derivative of the image in discrete form is The 2D Roberts masks are as follows. The 2D masks are relatively simple. However not symmetrical for central points. The symmetrical edges are a desirable property and can be obtained with odd-sized masks.
The 3 × 3 masks for the Prewitt edge detector are as follows. The x-direction derivative is represented by the difference between the first and third rows. The derivative in the Y direction is represented by the difference between the first and third columns. Image smoothing is improved when the center coefficients are given more weight.
The 3 × 3 masks for the Sobel edge detector are as follows.
There are several edge detection algorithms; nevertheless, among the standard approaches, the canny edge detector was shown to yield the best results. Because the input medical images are prone to noise, preprocessing is required before edge recognition. The steps can be stated as follows: • As a first stage in reducing noise from medical images, a Gaussian filter with a kernel size of 5 is utilized. • The non-maximum suppression method is used to delete pixels that are not part of edges. • The final step that detects the image using two thresholds (t upper and t lower )is hysteresis. It is defined in the pixel when the pixel gradient is greater than the t upper , and the pixel is discarded when the pixel gradient value is smaller than the t lower . If the pixel gradient lies in the range t upper < t < t lower , then pixel is selected if it is linked to pixel greater than t upper . The Laplacian of Gaussian (LOG) is an edge detector based on second-order derivative and is expressed as follows Similar to the Canny edge detector, Gaussian smoothing is performed initially to remove the spurious details in the image. The LOG masks are expressed as follows.

First Order Derivative Based Gauss Gradient Edge Detector
The gauss gradient approach determines the edge of 2D images and 3D volumes using the derivative of the Gaussian function.
The 2D Gaussian function is expressed as Here in the proposed gauss gradient approach, separable filtering is employed. The onedimensional Gaussian kernel is formulated and applied along the x and y directions. The steps in the gauss gradient approach are expressed as follows.
Step 1: Set the value of sigma for the input grayscale or color image. The parameter sigma value is crucial, as the high value will blur the resultant image.
Step 2: The mask is formulated along the x and y direction for convolution with the input image to trace the edges.
The 2D Gaussian function when expressed in 1D function in terms of the variables x and y is expressed as The first-order derivative of the one-dimensional Gaussian function along the x-direction is expressed as follows Similarly, the first-order derivative of the one-dimensional Gaussian function along y-direction is expressed as follows Step 3: the generated masks along the x and y direction are convolved with the input image for tracing the boundary of objects

Second Order Derivative Gauss Gradient (SDGD) Edge Detector
The second-order derivative method is extremely sensitive to spatial changes in the image's edge pixels, such as brightness or zero crossings. The SDGD (Second Order Derivative Gauss Gradient) operator has a nonlinear property.
The Laplacian operator is defined as follows.
where h 2x and h 2y are the second derivative filters.
When combined with Gaussian Where g 0 is the Gaussian low pass filter. The partial derivatives used in the SDGD filter are as follows

VLSI Implementation of Gauss Gradient Edge Detectors
Signal and image processing applications were found to benefit from the Xilinx Kintel-7 FPGA board. The Kintex-7 FPGA DSP Development Kit with High-Speed Analog has the following features. A Xilinx KC705 development board with an XC7K325T FPGA and a 4DSP FMC150 high-speed data converter FMC module was utilized to conduct real-time activities in Simulink.
The Kintel-7 series was also found to be efficient for video processing applications. The Fig. 5 depict the interfacing of Kintel-7 with VGA.
The flow of edge detection proposed in this research paper is depicted in Fig. 6. The hardware implementation of the edge detection algorithms is shown in Fig. 7. Figure 8 depicts the design and implementation flow using FPGA for the implementation of image processing algorithms.

Results and Discussion
Edge detection techniques for medical photos are proposed in this paper. The algorithms were created in Matlab 2010 and evaluated on photos from the BSD benchmark. Performance criteria such as Sensitivity, Specificity, and PR measures are used to validate classical edge detectors and gauss gradient edge detectors. Edge detection techniques are part of the initial generation of segmentation algorithms, and they're employed in a variety of applications. The results are shown in this section, and when compared to classical edge detectors, the gauss gradient edge detector outperforms them. The algorithms are initially tested on Berkley database images. The ground truth images are used to validate the edge detector algorithms. In [19], the efficiency of the classical gauss gradient algorithm was stated and here the VLSI implementation is performed and the SDGD algorithm was also proposed for medical images and implemented in VLSI technology. The Kintex 7-FPGA board was utilized in this research work for hardware implementation. The Kintex ® -7 FPGA Connectivity Kit is a 20 Gb/s platform for high-bandwidth and high-performance applications.   The qualitative analysis was performed by visual perception and for quantitative analysis, metrics are required. The accuracy represents the degree of the edge detected correctly by the edge detector. The accuracy is characterized by sensitivity and specificity. The chance of identifying the genuine edge as a pixel is determined by sensitivity. The edge detection algorithm is excellent when the sensitivity is low and the specificity and accuracy are high. True positive (TP), true negative (TN), false positive (FP), and false-negative (FN) values are used to represent sensitivity and specificity. Sensitivity is expressed as follows Specificity represents the probability of identifying an actual non-edge as a non-edge pixel. The specificity is expressed as follows.
The performance metrics plot reveals that the canny edge detector generates efficient results when compared with the other classical edge detectors. The proposed gauss gradient edge detectors are found to be efficient when compared with the other edge detectors. The PR measure is also used as a measure for the validation of edge detector algorithms. The true edges represent the pixels identified as edges and false edges comprise of nonedge pixels identified as edges and edge pixels identified as non-edge pixels The parameter tuning plays a vital role and here the parameters of classical gauss gradient and SDGD algorithms are as follows. The classical gauss gradient algorithm is having  tunable based on the nature of input images. The SDGD filter produces satisfactory results for Berkley database images and real-time medical images for the above-tuned parameters. Figure 9 represents the Berkley database input images and Fig. 10 represents the ground truth images. The classical edge detectors' output is depicted in Fig. 16, (classical gauss gradient) and Fig. 17 (SDGD). The PR plot of edge detector is shown in Fig. 20 and the. The qualitative analysis of results reveals that, for CT brain images, the SDGD outputs are good, which is shown in Fig. 21. Canny edge detector results as shown in Fig. 11    The edge detectors' roles are inevitable in computer vision, medical image processing, and surveillance. This work addresses the classical edge detection algorithms and proposes gauss gradient edge detectors for the medical MR images, which is shown in Fig. 22. The FPGA implementation gives satisfactory results and future work will be developing the edge detection algorithms for real-time video surveillance applications.   In this research work, classical edge detection models like Sobel, Prewitt, Roberts and Canny are used for comparative analysis with the proposed Gauss Gradient approach. The sobel edge detection is sensitive to noise, however the proposed Gauss Gradient approach is robust against noise. In this research work, classical edge detection models like Sobel, Prewitt, Roberts and Canny are used for comparative analysis with the proposed Gauss Gradient approach. The sobel edge detection is sensitive to noise, however the proposed Gauss Gradient approach is robust against noise. The first row represents the input abdomen CT images, the second row represents the classical gauss gradient edge detector output, Third-row represents the SDGD output

Conclusion
This work proposes VLSI implementation of the gauss gradient edge detectors. The classical edge detectors and gauss gradient edge detectors are initially checked on Berkley database images. The first order and second order derivative of Gaussian function termed as gauss gradient approach is utilized in this research work for medical image detection. It was found to be robust against noise and generates proficient results, when compared with the classical edge detection models. The performance of the edge detectors was validated by metrics and gauss gradient edge detectors performance outperforms the classical edge detectors. The algorithms are also checked on medical images and satisfactory results were obtained for classical gauss gradient and SDGD algorithm. The future work will be focusing on the ASIC implementation of Gauss Gradient Approach for edge detection.
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.