Advanced Research Journal of Computer Science | Year 2024 | Volume 1 | Issue 1 | Pages 9-12
An Improved Edge Detection Framework for Digital Images
Romna Saeed 1*1Department of Computer Science, University of Agriculture Faisalabad, Pakistan
View PDF Download XML Download DOI XML DOI: 10.66590/arjcs2024010102
Abstract
Edge detection is an important part of image processing that helps in classifying and finding gaps or break in an image. It also helps recognizing points in digital image where a sharp change in brightness occurs. These points represent curves. In image, these curves also called edges. The quality of edge detection determined by performance of the successive steps performed. Edge detection is very difficult work in automated image analysis as it requires to process large data to extract knowledge. There are no specific techniques for edge detection that works well for all type of images. The objective of this research is to analyze and design a technique in conjunction with the Canny edge detector to better edge detection rate by minimizing the influence of external noise which ultimately leads to detection of false edges. First, we used RGB image as input image and convert this into grayscale image. Second, we convolved the image by gaussian filter. Third, we used Sobel operator to find the gradient of image and then calculate gradient magnitude and direction. Fourth, we used non-maximum suppression to thin the edges. And last we used two threshold values to find the true edges in image and get the edge detected image. The performance of the proposed method is compared with Canny, Roberts, Sobel, and Prewitts by using objective quality assessment metrices including PSNR, SSIM, RMSE, EI, MI, SD, and Variance. The results show that the proposed method is more efficient in detecting edges as compared to other algorithms in the same domain.
INTRODUCTION
Digital image processing technology and digital images is a widespread processing technique because of executing different methods on a digital image. Digital image processing describe two-dimensional image is a fixed set of digital values, called picture elements or pixels. Pixel values characteristically signify gray point, color, height, and opacities [1]. With the improvement in technology, image processing technology is attracting more attention of researchers and has become important research topic [2]. The image processing techniques mostly contains giving image as two-dimensional signal and it apply different signal processing methods to the image. The several techniques of information processing, where input is an image is including in image processing. Image processing procedures are usually resultant from the signal processing procedures application in the area of images such as pictures or videos [3]. Different image processing methods are image segmentation, image enhancement, image registering, object detection and recognition, and edge detection. Edge detection is an important developed field on its own inside in image processing. Edge detection is a process where to find out the set of pixels that describe the boundary of a separate parts in an image. This technique taken the features of an image such as the gaps in the geometrical and physical structures of an object [4]. Hou and Li [5] described the edge detection technique based on B-Spline wavelet. In general, the traditional edge detection methods have the phenomenon of missing recognition and false in edge detection. The proposed method used asymptotic B-spline wavelet transform method to improve the performance of edge detection and decrease the amount of calculation. Different edge detection techniques including Sobel, Roberts, Prewitt, and Canny algorithm developed for extracting the edges from digital images. Canny edge detection technique is a different steps edge detection process that is develop to find out strong edges in the image. This method is developed by John F. Canny. This edge detector technique can decrease a large quantity of data in the image but most of imperative feature still remaining in the image. Xuan and Hong [6] proposed the improved Canny edge detection technique based on adaptive threshold. The traditional canny algorithm cannot adaptively describe the filtering threshold value and it cannot distinctly target from background when the filtering lower contrast image. Then to solve these problems, used improved technique on Canny method. Two adaptive thresholds were found by doing difference operation on amplitude gradient histogram. The results show that the enhanced method was stronger to noise and it can visibly discretely target from background.
Some problems of edge detection methods including Compression, Recognition, Visualization, noise, changes in lighting condition, difficult to detect real edge points and detecting false edge, take more time for execution of algorithms. The solution of problems is to apply different smoothing technique to remove noise in image. Histogram used for brightness problem, high resolution images, also used model-based video compression algorithm to solve compression problem, mapping technique, tracking method to solve the problems. The goal of this study is the accurate detection of edges in image. No false edges in image. Remove the noise in image.
In this study, for improve the performance of canny edge detection algorithm, an improvement on canny edge detection algorithm was made. This improvement on the canny edge detection algorithm was performed using Sobel operator method. This Improved canny method used gaussian filter to smooth the image. Then Sobel operator used to find the gradient in image. Non-maximum suppression finds the thin edges in image. Then used threshold values to find the true edges in image. The results of proposed method give better result than the other methods of edge detection.
MATERIALS AND METHODS
In proposed method, we used RGB input image. First step is smoothing, we used 5x5 Gaussian filter to convolve the image with σ = 1.4. After convolving the gaussian filter, we used 3 x 3 Sobel filter to find out gradient of an image. Then we calculated gradient magnitude and direction of image. Then next step is non-maximum Suppression. Non-maximum suppression is used to find the maximum edge in the image. The result of non-maximum suppression is to get thin edges. After the separation of edges, the last step is Thresholding. In this step we used two values of threshold T high = 1.8 and T low = 0.8 to find the true edges in images. Then at last we get result of edge detection method. The flow chart of proposed method can be described as in (Figure 1). Figure 1 shows the flow to steps which are followed.

Figure 1: Flow Chart of Proposed Method
Smoothing
The first step of proposed method is smoothing. Smoothing process is used to reduce the noise within an image (Panicker et al., 2016). Image smoothing is a technique of improving the quality of images. We used gaussian filter to smooth the image. The equation of gaussian function can be described as:
![]()
Here m and n give the standard deviation of the image coordinate information and σ is the probability distribution.
Gradient Operator
In proposed method, we used Sobel kernel operator to determine the gradient used in the Improved Canny technique. After the Gaussian filter step of the proposed method, we apply the Sobel Operator in image. In Sobel Operator, edges are occurred due to a gap in the intensity function in image. In gradient based edge detection techniques, the process of Sobel operator takes the first order derivative of the intensity value across the image [7]. The edges of this method are created by defining gradients of image. The Sobel kernels can be described as:
![]()
Gradient Magnitude and Direction
The next step is to calculate the gradient magnitude and direction. The edge direction angle is smoothed to one of the four angles representative vertical, horizontal and the two diagonals 0°, 45°, 90° and 135° (Ilkin et al., 2017). The edge direction falling in each region will be set to an exact angle value, for instance θ in 0°, 22.5° or 157.5°, 180° maps to 0°. The magnitude and direction of each pixel at (x, y) are calculated through following equation.

Non-Maximum Suppression
Non-maximum suppression is also known as edge thinning method. This process is used to find the maximum edge in the image (Rong et al., 2014). The edges extracted from the gradient step is blurred in the image, after applying gradient calculation. In non-maximum suppression, basically local maxima are marked as an edge and others edges can be suppressed and measured as zero in image. This process can be defined in two steps.
- Edge strong point is associated existing pixel and the pixels in its negative and positive gradient direction
- If existing pixel strong point is appropriate in the evaluation with any other pixels in Gradient direction, we retain the existing pixel value, then it will be suppressed to zero
Thresholding
Thresholding is the last step in proposed method, which is used to remove the false points and those pixels that is not an edge point from the results of non-maximum suppression is given in the image (Sarker and Jothi 2016). The initial image for thresholding has away through image smoothing, computation the edge strong point and edge pixel, and the non-maximum suppression phase to acquire thin edges in the image. The results of this step give the only effective and true edges in the initial image, which is achieved by the two threshold values, T1 (high) and T2 (low), for the edge strong point of the pixel of image. The high threshold value is 1.8 and low threshold value is 0.8 in our algorithm. Edge strong point which is more than T1 is measured as a true edge. Edge strong point which is small than T2, then it considered as non-edge pixel.
RESULTS AND DISCUSSIONS
In this research study, the developed improvements have been tested on the different image datasets to determine the improvement on Canny technique which gives the best result. The image dataset which we used consists of different images. The proposed method of this study is developed by using MATLAB R2016a Software. In the test phase, the improved Canny edge detection algorithm is compared using Prewitt, Sobel, Robert, and Canny edge detection algorithms. The assessment of detecting edge performance includes: Find the probability of false edges. Possibility of those edges that is not found in image are calculated. The true edge of image estimates the mean and square distance of the edge in image. Acceptance to distorted edges and other features such as corners and junctions. The first two measures are relating to edge detection, the third is related to edge localization, and the last is exits from the accurate edge method. The performance of proposed method and other techniques is evaluated from different image quality metrices. We used different quality metrices including SSIM, PSNR, RMSE, Average Gradient, Edge Intensity, Mutual Information, Standard Deviation, Variance. The result of proposed method and different methods including Prewitt, Roberts, Canny, and original image can be described as follow (Figure 2).

Figure 2: Visual Results of Experiments on Image Set 1: (a) Original Image (b) Prewitt Image (c) Sobel Image (d) Robert’s image (e) Canny Image (f) Proposed Method Image

Figure 3: Visual Results of Experiments on Image Set 2: (a) Original Image (b) Prewitt Image (c) Sobel Image (d) Roberts Image (e) Canny Image (f) Proposed Method Image
Table 1: Quality Values of An Image Set 1
|
Parameters |
SSIM |
PSNR |
RMSE |
AG |
EI |
MI |
SD |
Variable |
|
Prewitt |
-0.009 |
3.687 |
0.682 |
7.752 |
64.127 |
0.109 |
4.109 |
8.628 |
|
Sobel |
-0.006 |
3.686 |
0.682 |
7.798 |
64.348 |
0.091 |
4.143 |
8.479 |
|
Roberts |
-0.004 |
3.657 |
0.685 |
6.353 |
53.955 |
0.091 |
4.677 |
6.682 |
|
Canny |
0.005 |
3.798 |
0.674 |
13.784 |
122.382 |
0.128 |
3.082 |
15.035 |
|
Proposed Method |
0.006 |
3.801 |
0.666 |
13.844 |
134.887 |
0.179 |
5.991 |
16.974 |
.
Table 2: Quality Values of An Image Set 2
|
Parameters |
SSIM |
PSNR |
RMSE |
AG |
EI |
MI |
SD |
Variable |
|
Prewitt |
0.004 |
3.363 |
0.238 |
11.643 |
102.342 |
0.055 |
3.253 |
13.567 |
|
Sobel |
0.004 |
3.363 |
0.238 |
11.918 |
103.274 |
0.056 |
3.236 |
13.688 |
|
Roberts |
0.001 |
3.344 |
0.239 |
8.227 |
73.907 |
0.034 |
3.924 |
9.261 |
|
Canny |
0.004 |
3.273 |
0.238 |
17.429 |
115.857 |
0.059 |
2.063 |
12.336 |
|
Proposed Method |
0.005 |
3.378 |
0.237 |
13.048 |
122.502 |
0.069 |
3.146 |
14.519 |
.
In above Tables, the different image quality metrices value for the results of proposed method and various edge detection techniques on different images can be described. The result of quality metric values show that proposed method gives better result than other method. The values of PSNR and SSIM of proposed method has higher value shows the good performance of edge detection method means get better sharp edge from test image. The value of RMSE of proposed method result give lower value shows the better performance of edge detection method means that operator has high edge detection capability. The value of average gradient is maximum to give better results, the proposed method gives higher value, also edge intensity, MI, Standard deviation, and variance has higher value means proposed method is not affected by noise easily.
CONCLUSIONS
In this study, improve the edge detection method. The improvements were made on canny edge detection algorithms gradient operator step for improve the canny edge detection algorithm performance. For this, the sobel operator used in canny edge detection algorithm. The improved canny edge detection algorithm was compared different edge detection techniques including Prewitt, Roberts, Sobel, and Canny edge detection method. Study was tested using different image datasets. It was determined that improved canny edge detection algorithm gives better result than another algorithm.
REFERENCES
- Mehra, R. et al. “Area efficient FPGA implementation of sobel edge detector for image processing applications.” International Journal of Computer Applications, vol. 56, no. 16, 2012, pp. 7–11.
- Ahmed, S.A. “Comparative study among sobel, prewitt and canny edge detection operators used in image processing.” Journal of Theoretical and Applied Information Technology, vol. 96, no. 19, 2018, pp. 6517–6525.
- Issac, A. et al. “An adaptive threshold based algorithm for optic disc and cup segmentation in fundus images.” Proceedings of the 2nd International Conference on Signal Processing and Integrated Networks, 2015, pp. 145–147.
- Poobathy, D. et al. “Edge detection operators: peak signal to noise ratio based comparison.” International Journal of Computer Science and Information Technology, vol. 10, 2014, pp. 55–61.
- Hou, X. et al. “An edge detection technique based on b-spline wavelet.” Proceedings of the International Conference on Advances in Image Processing, 2018, pp. 15–18.
- Xuan, L. et al. “An improved canny edge detection algorithm.” Proceedings of the 8th IEEE International Conference on Software Engineering and Service Science, 2017, pp. 275–278.
- Tian, D.J. et al. “A fractional-order edge detection operator for medical image structure feature extraction.” Proceedings of the 26th IEEE Control and Decision Conference, 2014, pp. 5173–5176.
