Edge Detection Techniques For Lung Image Analysis

Abstract: Edge detection is the Process of finding sharp contrasts in the intensities of an image. It also reduces the amount of data in an image, while preserving important structural features of that image. Most of the medical images suffer from low contrast quality and degradation varies from one region to another region. They are dark images with low visibility and bright spots. This paper deal with CT image of lung, which normally suffers from mid range low contrast. Hence the process of adapting to recognize image details of CT is based on the theory of edge detection. The local image statistics computation for contrast modification is wholly centered about detection of edges within an image. So, choice of edge detector is an important criterion while considering visual perception criterion for contrast modifications. Here we have tested CT lung image with different edge detection techniques that will help the researchers to go for proper choice.

Keywords: CT lung image, Laplacian, Gradient, DWT, Fuzzy logic
Edges represent object boundaries and therefore can be used in image segmentation to subdivide an image into its constituent regions or objects. They are the area of significant change in image intensity. Hence edge detection technique becomes very crucial for further processing. Edge detection is useful for extracting the information of the image such as location of objects, their shape, size, image sharpening and enhancement. There exists many different edge detecting methods each designed to be sensitive to certain types of edges. These methods can be classified into three categories
'Gradient method or First derivative method
'Laplacian method or Second order derivative method
'Optimal Edge detection

i) Gradient method
The gradient method detects the edges by looking for the maximum and minimum in the first derivative of the image. Edge pixels are those where there is a sharp change in grey level values. These are identified by computing the gradient of the image. The gradient is a unit vector which points in the direction of maximum intensity change.
Since the image is digital the gradient is approximated by a gradient mask. First the vertical and horizontal components of the gradient are computed and then the magnitude and direction of the gradient is computed from these. This method of locating an edge is characteristic of the 'gradient filter' family of edge detection filters. A pixel location is declared an edge location if the value of the gradient exceeds some threshold. Edges will have higher pixel intensity values than those surrounding it. So once a threshold is set, you can compare the gradient value to the threshold value and detect an edge whenever the threshold is exceeded. The magnitude and direction of the gradient are computed as follows

The magnitude gives the edge strength at each pixel.

\ii) Laplacian method
When the first derivative is at a maximum, the second derivative is zero. As a result, another alternative to finding the location of an edge is to locate the zeros in the second derivative. This method is known as the Laplacian. It is defined as (3)
iii) Optimal edge detector
It depends on two things, the first is low error rate, which takes care that edges should not be missed and second distance between points marked by the detector and the actual center of the edge should be minimum also called as localization. Advantage is that it gives single response to a single edge.
The gradient method includes Robert, Perwitt and Sobel edge detection. The Laplacian method includes Laplacian of Gaussian (LOG), differential of Gaussian (DOG) and Marr-Hildreth, Whereas Canny edge detection is optimal edge detection. Besides these methods, also DWT and fuzzy logic methods is studied for edge detection. These edge detection techniques will be carried out on grey scale Computer Tomography (CT) of Lung image of size 256*256. The CT image of lung is referred through Radiological Teaching Profile. The algorithm is carried in MATLAB 7.8. Salt and pepper noise with Gaussian filtering is considered for performance analysis.

Figure 1.a) CT Lung image b) CT Lung image affected by salt and pepper noise
a) Sobel Edge Detection
The Kernels Gx and Gy are combined together to find the absolute magnitude of the gradient at each point and the orientation of that gradient. The gradient magnitude is given by

Typically, an approximate magnitude is computed using:

This is much faster to compute. The angle of orientation of the edge (relative to the pixel grid) giving rise to the spatial gradient is given by:

The 3X3 convolution mask smoothes the image by some amount, hence it is less susceptible to noise. But it produces thicker edges. So edge localization is poor, which can be observed from the figure. Sobel operator goes for averaging and emphasizes on the pixel closer to the center of the mask. It is one of the most popular Edge Detectors.

Figure2. Sobel edge detection of CT lung image
b) Robert Edge Detection
The Roberts Cross operator performs a simple, quick to compute, 2-D spatial gradient measurement on an image. Pixel values at each point in the output represent the estimated absolute magnitude of the spatial gradient of the input image at that point. The gradient magnitude is given by:

Although typically, an approximate magnitude is computed using:

This is much faster to compute. The angle of orientation of the edge giving rise to the spatial gradient (relative to the pixel grid orientation) is given by:

Spurious dots indicate that the operator is susceptible to noise

Figure 3.Robert edge detection on CT lung image
c) Perwitt Edge Detection
Prewitt operator is similar to the Sobel operator but uses slightly different masks and is used for detecting vertical and horizontal edges in images.

Figure 4.Perwitt edge detection on CT lung image
d) Laplacian of Gaussian (LOG)
The Laplacian is a 2-D isotropic measure of the 2nd spatial derivative of an image. The Laplacian of an image highlights regions of rapid intensity change and is therefore often used for edge detection. The Laplacian is often applied to an image that has first been smoothed with something approximating a Gaussian Smoothing filter in order to reduce its sensitivity to noise. The operator normally takes a single gray level image as input and produces another gray level image as output.
The Laplacian L(x,y) of an image with pixel intensity values I(x,y) is given by:

Since the input image is represented as a set of discrete pixels, we have to find a discrete convolution kernel that can approximate the second derivatives in the definition of the Laplacian. Because these kernels are approximating a second derivative measurement on the image, they are very sensitive to noise. To counter this, the image is often Gaussian Smoothed before applying the Laplacian filter. This pre-processing step reduces the high frequency noise components prior to the differentiation step. In fact, since the convolution operation is associative, we can convolve the Gaussian smoothing filter with the Laplacian filter first of all, and then convolve this hybrid filter with the image to achieve the required result.

Figure5.Laplacian edge detection
Doing things this way has two advantages:
' Since both the Gaussian and the Laplacian kernels are usually much smaller than the image, this method usually requires far fewer arithmetic operations.
' The LOG (`Laplacian of Gaussian') kernel can be pre-calculated in advance so only one convolution needs to be performed at run-time on the image.
The 2-D LOG function centered on zero and with Gaussian standard deviation has the form:

Figure 6.Edge detection by LOG
Smooth the image using Gaussian filter, enhance the edges using Laplacian operator and uses linear interpolation to determine the sub-pixel location of the edge. Zero crossings denote the edge location. Too much smoothing may make the detection of edges difficult.
e) Difference of Gaussian(DOG)
LOG requires large computation time for a large edge detector mask. To reduce computational requirements, approximate the LOG by the difference of two LOGS' is the DOG. I t is given by the equation

Figure7.Edge detection by DOG
Advantages of DOG
' Close approximation of LOG
' Less computation effort
' Width of edge can be adjusted by changing 1 and 2

f) Marr-Hildreth Edge Detection
Marr-Hildreth uses the Gaussian smoothing operator to improve the response to noise, and by differentiation the Laplacian of Gaussian.

Edges are at the 'zero crossings' of the LOG, which is where there is a change in gradient

Figure8.Edge detection by Marr-Hildreth with ??=1
g) Canny Edge Detection
It is optimal edge detector. It follows list of criterion first is low error rate. It is important that edges occurring in images should not be missed and that there be NO responses to non-edges. The second criterion is that the edge points be well localized. In other words, the distance between the edge pixels as found by the detector and the actual edge is to be at a minimum. A third criterion is to have only one response to a single edge. This was implemented because the first 2 were not substantial enough to completely eliminate the possibility of multiple responses to an edge. Based on these criteria, the canny edge detector first smoothes the image to eliminate and noise. It then finds the image gradient to highlight regions with high spatial derivatives. The algorithm then tracks along these regions and suppresses any pixel that is not at the maximum (non maximum suppression). The gradient array is now further reduced by hysteresis. Hysteresis is used to track along the remaining pixels that have not been suppressed. Hysteresis uses two thresholds and if the magnitude is below the first threshold, it is set to zero (made a non edge). If the magnitude is above the high threshold, it is made an edge. And if the magnitude is between the 2 thresholds, then it is set to zero unless there is a path from this pixel to a pixel with a gradient above T2.The magnitude, or edge strength, of the gradient is approximated using the formula:
|G| = |Gx| + |Gy|
The formula for finding the edge direction is just
Theta = invtan (Gy / Gx)

Figure9.Canny edge detection
h) Discrete Wavelet Transform(DWT)
DWT decomposes the image into three details and one approximation. Details separate horizontal, vertical and diagonal information whereas approximation looks like original only scaled down to one by four. Preserves slow changing aspects in LPF and quickly changing parts in HPF.DWT exploit self similarity. Use the edges that appear at various levels of resolution (octaves). It indicates where the important edges of the image exist. Differences between pixels produce the maxima and minima. Edges of interest (presence of maxima) are comprised of the largest 10% of values. Magnitude of these maxima indicates the strength (or human-notice ability) of the edges (contrast). The mathematical representation of wavelet is given by

The edges of interest appear more and more clearly, as we analyze the image for additional octaves. Additional octaves do not necessarily add edge information .Edge information is preserved and even highlighted across multiple levels of resolution.

Figure 10.Edge detection by DWT
i) Edge Detection by Fuzzy Logy
An edge is a boundary between two uniform regions. You can detect an edge by comparing the intensity of neighboring pixels. However, because uniform regions are not crisply defined, small intensity differences between two neighboring pixels do not always represent an edge. Instead, the intensity difference might represent a shading effect. The fuzzy logic approach for image processing allows you to use membership functions to define the degree to which a pixel belongs to an edge or a uniform region. The fuzzy logic edge-detection algorithm for this example relies on the image gradient to locate breaks in uniform regions.

Figure11.Edge detection by fuzzy logy without threshold

Figure12.Edge detection by fuzzy logy with threshold=45
The result of edge detection through fuzzy logy is calculated with and without thresholding. Thresholding removes false edge fragments in the non-maximum suppressed gradient image. The Problems is too high threshold leads to some edges being lost and too low threshold leads to false edges.

The performance is analyzed on CT lung image with the help of PSNR and RMSE [6] for various edge detection techniques. The results are also calculated for before and after filtering.
Table 1.Result of PSNR and RMSE before filtering
Edge detection Techniques PSNR RMSE
Perwitt 4.0817 160.0134
Robert 4.0730 160.1738
Sobel 4.0851 159.9505
DOG 4.1179 159.3481
LOG 4.0844 159.9640
Marr-Hildreth with ??=1 4.089 159.8645
Canny 4.0895 159.8693
DWT 4.0803 160.0379
Fuzzy logy without threshold 4.6813 149.3092
Fuzzy logy with threshold 4.2545 156.8603

Table2. Result of PSNR and RMSE after filtering
Edge detection Techniques PSNR RMSE
Perwitt 4.23 157.2865
Robert 4.24 157.0784
Sobel 4.24 157.0367
DOG 4.25 156.8193
LOG 4.24 157.0717
Marr-Hildreth with ??=1 4.25 156.9172
Canny 4.23 157.2347
DWT 4.23 157.1736
Fuzzy logy without threshold 4.63 150.2043
Fuzzy logy with threshold 4.30 155.9558

Table3. A comparative PSNR values before and after filtering
Edge detection Techniques PSNR before filtering PSNR after filtering
Perwitt 4.08 4.23
Robert 4.07 4.24
Sobel 4.09 4.24
DOG 4.12 4.25
LOG 4.08 4.24
Marr-Hildreth with ??=1 4.09 4.25
Canny 4.09 4.23
DWT 4.08 4.23
Fuzzy logy without threshold 4.68 4.63
Fuzzy logy with threshold 4.25 4.3

Graph1 Graphical representation of PSNR values for various edge detection techniques
Table3. A comparative RMSE values before and after filtering
Edge detection Techniques RMSE before filtering RMSE after filtering
Perwitt 160.01 157.29
Robert 160.17 157.08
Sobel 159.95 157.04
DOG 159.35 156.82
LOG 159.96 157.07
Marr-Hildreth with ??=1 159.86 156.92
Canny 159.87 157.23
DWT 160.04 157.17
Fuzzy logy without threshold 149.31 150.20
Fuzzy logy with threshold 156.86 155.96

Graph1 Graphical representation of RMSE values for various edge detection techniques
Various edge detection methods are tested on CT lung image. These methods help us to work on different applications. Few conclusions that can be taken out of results are first the Laplacian mask and Robert edge detection evokes strong response to stray noise pixels. Laplacian of Gaussian (LoG) filter can be one of the suitable candidates for edge detection as against basic (3x3) edge templates of Laplace, Sobel. The implementation of LoG Filter is dealt in extent and results show that it serves to be the best for contrast improvement. The basic (3x3) edge templates Laplace and Sobel edge operators etc., results are not satisfactory in their usage for determining the local edges. Still the result may vary for different images with different pixel intensities.

[1] R. B. Tiwari, A. R. Yardi, MIETE, Walchand College of Engineering, Sangli, 'Dental X-Ray Image Enhancement Based On Human Visual System And Local Image Statistics'
[2] Ravi Kumar , Munish Rattan 'Analysis Of Various Quality Metrics for Medical Image Processing', International Journal of Advanced Research in Computer Science and Software Engineering' Volume 2, Issue 11, November 2012 ISSN: 2277 128X.
[3] E. Brannock and M. Weeks,'Edge detection using wavelets' In Proceedings of the 44th annual ACM Southeast
Regional Conference (ACMSE 2006), pages 649'65 4, Mar 2006.
[4] K. Somasundaram and K. Ezhilarasan,' Edge Detection using Fuzzy Logic and Thresholding '
[5] Suryakant, Neetu Kushwaha,' Edge Detection using Fuzzy Logic in Matlab ', International Journal of Advanced Research in Computer Science and Software Engineering, ISSN: 2277 128X,Volume 2, Issue 4, April 2012
[6] Ravi Kumar, Munish Rattan,' Analysis Of Various Quality Metrics for Medical Image Processing', International Journal of Advanced Research in Computer Science and Software Engineering, Volume 2, Issue 11, November 2012.

Source: Essay UK - http://www.essay.uk.com/free-essays/science/techniques-lung-image-analysis.php

About this resource

This Science essay was submitted to us by a student in order to help you with your studies.

Search our content:

  • Download this page
  • Print this page
  • Search again

  • Word count:

    This page has approximately words.



    If you use part of this page in your own work, you need to provide a citation, as follows:

    Essay UK, Edge Detection Techniques For Lung Image Analysis. Available from: <https://www.essay.uk.com/free-essays/science/techniques-lung-image-analysis.php> [01-06-20].

    More information:

    If you are the original author of this content and no longer wish to have it published on our website then please click on the link below to request removal: