Edge detection in a noisy image using adaptive scaling (anisotropic diffusion)

Final project by:

Shai & Miki Koffman (yes, same last name cousins...)

Mail Miki Mail Shai


Introduction

One of the early and fundamental stages in computational vision is edge detection.
In class we saw many edge detectors that are commonly used in most of the computational vision applications and ideas.
Noise, in all its forms is one of the greatest obstacles for the edge detector,
and we saw many examples were the noise almost prevented any detection at all.
Edge detectors are divided into three main categories:
"Optimal operators" - Which is the group we studied like Prewitt and Canny.
"Multiscale detectors" - Whose main idea is to try looking with different scales and choose the best scaling.
"Adaptive methods" - this is the method we are dealing with in this project.
"Optimal detectors" are very efficient, some of them can be implemented by hardware and software very easily,
whereas "Multiscale detectors" are very complicated computationaly.
"Adaptive methods" are somewhat in between (there are some very fast implementations for this problem).
The motivation to this project came from the poor results of the edge detectors showed in class in a noisy signal.
It really strident us that the edge detectors outputted such lousy results with noise presence in the signal, so we searched for the ultimate smoother…


Approach and Method

At first we searched for known good smoothing filters, and we found the adaptive smoothing method.
We tried to accumulate more knowledge of this method, and we found good references for it.
After understanding the method and its advantages we started to implement the method...
After implementing the method we thought how can we analyze it, and we decided to search the web for some pictures,
We found some interesting images and we used the resources from the course and ran a huge batch work.
The computer ran the batch script for more than 5 hours making thousands of image, after that we sat and tried to analyze the results...
In order to implement the adaptive smoothing we used Matlab. (of course...)


Two words on the theory

The theory behind the Adaptive smoothing method surrounds the concept of continuity,
which is a measure describing the continuity of that pixel in the image.
If we knew the continuity of each pixel in the image, we would have been able to solve the problem,
and we could know where the edges are, and smooth only places where there are no edges.
In order to calculate the continuity of each pixel, some suggested using the following function (in a 2D intensity signal):

where:

and after that, calculating the next iteration:



This operation has three main affects:
1. Smoothing of "close" regions- this is a slow process and has an asymptotic affect.
2. The sharpening of edges that survive – because the pixels speculated as edges are less impacted by this operation,
and the "close" regions are smoothed , edges are revealed in a relatively small number of iterations.
Since the edges do not change afterwards it is possible to stop iterating after a small number of iterations
and to use a simple threshold technique later in order to find the different regions (thus making this relatively easy).
3. The discontinuities (edges) of the images are not moved:
This is a very important difference with other smoothing technique (such as the Gaussian method).


Results

Here are some results (out of several thousands images...):
Albert Einstein with noise:

Canny's best result on this noisy disaster (with Tau=0.7):

Adaptive smoothing with 10 iterations and k-scaling = 10, using Soble Edge detector:


For more results please check our project documentation :)


Conclusions

The Adaptive Smoothing technique had mostly very good results,
and does in fact help's detect edges in images in a very quick manner (small number of iterations).
The adaptive smoothing filter has 2 important advantages over the Gaussian Filter.
1. After a large number of iteration's the Gaussian filter smoothes the images edges,
the adaptive smoothing filter actually enhances edges!!!!
2. The edges are sometimes moved it the Gaussian filter, while with the adaptive smoothing technique they stay in place
(very important for some applications as explained earlier).
From the testing:
We learned that the Filter we implemented has tremendous results for salt and pepper noisy images,
much better than even canny edge detector with a Gaussian filter, even if the edge detector used is inferior (Albert example).
There where several examples where Canny's detector showed better results,
maybe because we didn't find the perfect scaling using the adaptive method. (Lenna image).
When the signal (image) very noisy (like in the case of the "plane" and "Einstein" images)
the adaptive smoothing achieved very impressive results!!
We found many implementations of this method in the medicine area,
where the environment is very noisy, and uses in the industry.


Additional Information


References

1: "Bilateral filtering and Anisotropic Diffusion: Towards a Unified Viewpoint"
Danny Barash, HP laboratories, Israel, HPL-2000-18(R.1), August 1st, 2000
2: "Adaptive smoothing: A general tool for early vision."
Philippe Saint-Marc,Jer Sen Chen, and Gerard Medioni
IEEE transaction on pattern analysis and machine intelligence,
vol 13 , no' 6 June 1991