Edge Detection is one of the major problems in digital image processing.
Introduction
Edge Detection is one of the major problems in digital image processing.
A few classic algorithms have been already introduced (by Sobbel, Robberts and others) for extracting the digital image edge. Here we’ll present an original Edge-Detection algorithm for a specific problem that was built especially for a very specific class of digital Ultra Sound images.

The objects in our images are internal tissues and the liquid that lies between them. These images were used by doctors to estimate the volume of the liquid, and have a great influence on the patient’s treatment. This estimation is currently being made by primitive tools and
therefore it lacks accuracy. Our project’s goal is to extract a thick and continuous edge from the images. This will be the first step toward an automatic calculation of the liquid volume.
The algorithm
Our images are characterized by loss of sharpness and homogeneous, and a lot of noise.
The sharpness loss makes it difficult to determine where the edge passes, since the gray level for tissues is very close to the one of the liquid. A common solution to this problem is to use Histogram Stretching. This function stretches the gray level of the tissue pixels toward white and that of the liquid pixels toward the black. The result is very impressive:

Another problem with the Ultra Sound images was the high level of noise. Noise have a great influence on the Edge Detection algorithm. An edge detection algorithm can wrongly treat noisy pixels as an edge .A classic solution to this problem is to use a Gaussian filter which removes the noisy pixels while preserving the important information.
The above functions are classified as image improvement, and are commonly used before the Edge Detection Phase.
The Edge Detection Phase usually includes a Gradient or Laplacian operators. Our algorithms take advantage of the fact that the images include only tissue and liquid and can be easily converted to binary images, where the tissue becomes white and the liquid becomes black.
The major advantage of this converting is that the edge that was extracted from a binary picture is always continuous.
The problem that we encountered here was the loss of the picture homogeneous.
The tissue and the liquid gray scale level vary along the image. One can find a tissue with the low gray level and liquid with the high gray level that has practically the same gray level.
The solution for this problem is to work with two pictures. We’ll take as much as we can from the first picture and intensify the other so we’ll be able to get the edge’s missing part.

Here we get to the next phase of the algorithm. This Phase includes a binary processing using binary operators such as Dilation and Erosion.
The purpose of the Dilation is to remove black holes in the tissue, while the Erosion operator is used to remove white spots from the liquid area. The problem we encountered here was that while the Dilation operator removes a hole in the tissue, it intensifies the spots in the liquid area.
The Erosion operator has the opposite problem.
The solution to the problem is using an operator that removes the holes from the tissue and the spots from the liquid simultaneously – without blurring the color of the other pixels. The Median operator can do the above but it requires great complexity (because of the need of sorting) so we use it in the three stages: Dilation -> Median -> Erosion.
The Dilation and Erosion operators do most of the job and a small Median between them prevents them from messing each other’s work.

The last stage of the algorithm is selecting the desired edge from both pictures, and joining them to one thick and continuous edge picture.
Results
The final result can be seen using the user interface we built:

Acknowledgments
We would like to thank our supervisor Chen Sagiv for her support and guidance throughout this project.
Also we would like to thank the Ollendorff Minerva Center Fund which supported this project.

