Engineering Problem and Goal Engineering Problem: Traditional active contour models can not detect edges or convex regions in noisy images. Engineering Goal: The goal of this project is to design an algorithm which accurately detects edges in medical images with convex regions and synthetically added noise.
Background Why is Edge Detection Important? Doctors must analyze medical images to make diagnoses. These images may be difficult to read due to extra signal in the image. Edge detection allows doctors to clearly read images, which enables better diagnoses and patient care. Edge detection has been applied to important problems in the medical field, such as segmentation and object recognition.
Background What approaches have been tried? Snake models assign internal and external energies to regions of the image and minimize that energy to find edges. However, snake models are flawed because they don t work well when the image contains too much noise or has a convex region. Furthermore, snake models require a good guess of the optimal starting position, so they are less robust. Edge following algorithms use information about neighborhoods of pixels to accurately detect the edge even when noise is present.
Background What is Noise? Noise in images is defined as unwanted variations in the image s electric signal. In a medical setting, noise is undesirable because it makes images harder to read. Gaussian noise is statistical noise which follows the bell curve. The pixel intensity values in an image are increased or decreased based on the probability given by the bell curve. Gaussian noise was added to the images using a mean noise of 0 and 0.01, 0.03, and 0.05 of the standard deviation in either direction.
Background Histogram Based Thresholding: Each pixel in a grey scale image can be represented as an intensity value from 0 to 255. A histogram can be created where the x axis are the intensity values from 0 to 255 and the y axis is the frequency each of the intensity values occurs in the image. Thresholding algorithms determine the intensity value which most accurately separates an image into object and background. Some approaches find the threshold which minimizes an error function. Another method is to use thresholding on small regions of the image.
Gaussian Noise Figure 1: A demonstration of how Gaussian noise affects an image
Design Criteria Criteria Weight Histogram Based Thresholding Canny Edge Detection Not Sensitive 5 3 5 9 to Noise Accurately 5 3 8 9 Approximates Edge Reasonable 3 7 9 9 compute time Total Score 51 92 117 Edge Following Algorithm (Somkantha)
Procedure Implement a mathematical technique into image analysis: Read papers about specific techniques Research current implementations/libraries of the technique Evaluate whether the technique can mitigate noise or handle convex regions If the technique can do so, learn how to use current implementation of the technique or begin designing new technique Design a novel implementation of the technique
Procedure Histogram based global thresholding: Convert greyscale image into a histogram of intensity values Set the initial threshold to the mean intensity value Construct region 1 and region 2 using that threshold Get the mean frequency values of region 1 and 2 Find the intensities corresponding to the mean frequencies Get the average of those two intensities and set as the new threshold Repeat Steps 3 6 until the threshold value stops fluctuating Use the threshold value to binarize the input image
Testing and Materials Testing Load all the chest x ray images into MATLAB using Batch Image Processing Toolbox Run the thresholding function on each image at three noise levels: 0.01, 0.03, and 0.05 standard deviations of Gaussian noise. Collect the optimal threshold values determined by the function and the binarized images. Materials: One hundred chest x - ray images were obtained from the National Institute of Health Clinical Center. These images were not labelled with ground truth edges. A Dell Inspiron 15 5000 laptop was used for this project. An educational copy of MATLAB was obtained from WPI. The Image Processing Toolbox was used to develop a global thresholding algorithm.
Results Noise = 0.01 Noise = 0.03 Figure 2: Global Thresholding Algorithm, Noise = 0.01, Thresh = 0.5859 Figure 3: Global Thresholding Algorithm, Noise = 0.35, Thresh = 0.6055
Results Noise = 0.05 Image Histogram Figure 5: Global Thresholding Algorithm, Noise = 0.05, Thresh=0.6172 Figure 6: Image Histogram, Noise = 0.01
Results Canny Edge Detection Figure 7: Canny Edge Detection with pre-smoothing
Abbreviated Data Table Noise = 0.01 Noise = 0.03 Noise = 0.05 n (Image) Thresh Thresh Thresh 1 0.449 0.578 0.594 2 0.586 0.605 0.617 3 0.469 0.559 0.578 4 0.430 0.641 0.633 5 0.633 0.609 0.594 6 0.496 0.613 0.434 7 0.625 0.609 0.559 8 0.527 0.523 0.535 9 0.684 0.695 0.633 10 0.594 0.633 0.602 11 0.496 0.543 0.570 12 0.512 0.570 0.586 13 0.426 0.504 0.504 14 0.461 0.523 0.629 15 0.609 0.449 0.461 16 0.496 0.523 0.457 17 0.434 0.594 0.582 18 0.410 0.582 0.582 19 0.648 0.668 0.488 20 0.625 0.605 0.586... AVG 0.531 0.559 0.561 STDEV 0.080 0.060 0.053 %RSD 14.990 10.736 9.382
Data Analysis The %RSD in the lowest, intermediate, and high noise groups is 14.990%, 10.736%, and 9.382% respectively. The decrease in %RSD indicates that the thresholds values have less spread when noise is higher. In this context, a lower spread of the threshold values when the noise is higher might indicate that the algorithm has less resolution. Since the images vary, the expectation is that each image threshold value will be different. However, when random variation is added to the images, their resolution decreases. Therefore, the threshold value will not vary as much. This might explain why the threshold values at higher noise levels have a lower spread.
Data Analysis The thresholding algorithm output the optimal threshold for each image at three noise levels: 0.01, 0.03, and 0.05 standard deviations of Gaussian noise, and one hundred images were tested. An ANOVA with post hoc Tukey test was used on the three noise groups. The groups are paired, since each image appears in the 0.01, 0.03, and 0.05 noise groups. The null hypothesis is that there is no significant difference between the 0.01, 0.03, and 0.05 noise groups. A vs B A vs C B vs C 0.01 vs 0.03 0.01 vs 0.05 0.03 vs 0.05 p = 0.0056 p = 0.0034 p = 0.899
Data Analysis The null hypothesis is rejected for the A vs B groups comparison and the A vs C groups comparison. However, these p values do not show that the thresholds are accurate for the images at each noise level. Rather, they merely suggest that the thresholds are significantly different when the 0.01 noise is compared to the 0.03 and 0.05 noise groups. However, the null hypothesis fails to be rejected for the B vs C groups comparison. The p value of 0.899 suggests that the thresholds for the 0.03 and 0.05 noise groups are not significantly different. The p - value suggests that the algorithm is not able to distinguish between the 0.03 and 0.05 noise groups. This suggests that the algorithm s performance degrades beyond 0.03 standard deviations of noise.
Future Work The next improvement which can be made to the thresholding algorithm is to apply it locally to each 5x5 pixel region in an image. In turn, the edge determined by the algorithm will be more accurate to individual regions of the image. A more advanced algorithm using image histograms will be implemented. More sophisticated edge detection algorithms will be implemented. Specifically, boundary tracking will be explored due to low sensitivity to noise and generally accurate edges. Other possible implementations are clustering and morphological operators. Clustering may be accurate, but it is also computationally expensive because of the required optimization.
Timeline December 14 th January 14 th : Research and implement a boundary tracking algorithm. Learn how to use Hausdorff distance to measure the distance between two edges Apply the boundary tracking algorithm and compare to Canny and Sobel edge detection Test algorithm on noisy images with expert opinions. Compare accuracy to other implementations January 14 th February 14 th : Implement morphological operators such as texture maps and edge vectors to improve edge detection accuracy. Test the accuracy of the algorithm against other implementations.