Image edge detection refers to methods of identifying points in a digital image where brightness changes sharply. Mathematically speaking we are looking for points of discontinuity of the intensity function of the input image. The purpose of detecting edges in images is to capture changes in real world object properties such as discontinuities in depth, surface orientation, changes in material properties and variations in scene illumination, etc. Image edge detection plays an important role in image processing applications such as computer vision systems. For example these techniques can be used in surveillance systems to automatically identify objects of suspicious nature.
In the ideal case, edges obtained by applying an edge detector to an image are a set of connected curves that describe the boundaries of objects. Unfortunately it is not always possible to obtain such ideal edges from real life images of moderate complexity. Edges obtained from natural images are normally affected by several effects such as blur, shading, inter reflections in the vicinity of object edges, etc. Stating a specific threshold on how large the intensity change between two neighboring pixels must be -in order for us to classify that as an edge- is not an easy problem. This is one of the reasons why image edge detection is not a trivial problem except in the case where objects in the scene are simple and the illumination conditions are well controlled.
Image Edge Detection Techniques
Many image edge detection techniques exist however most of them fall into one of two groups, search based and zero crossing based methods. The search based technique computes a measure of edge strength using a first order derivative expression such as the gradient magnitude then it searches for local directional maxima of the gradient. The zero crossing based technique searches for zero crossings in a second order derivative expression computed from the image. Such expression is usually a Laplacian or a non linear differential expression. A preprocessing smoothing stage typically Gaussian smoothing is almost always applied in order to reduce input image noise.
Wavelet Based Technique
Wavelet analysis can be used to analyze any signal including images by sorting data in terms of frequency. In its simplest forms, wavelet analysis is nothing but averaging and differencing of adjacent horizontal and vertical elements. From a signal analysis perspective, averaging is like applying a low pass filter while the differencing is a high pass filter. This implies that details and noise of the image are included in the high frequency bands which means the image data can be smoothed by such filtering. With that in mind we can exploit this behavior to identify those areas in the image where intensity changes sharply thus detecting edges.
Software Requirements Specification
Wavelet Edge Detector is intended to support the following features
- Process multiple input images
- Tapped page image viewer
- Synchronized image and edge views
- Zoom and stretch view
- Wavelet transform visualization
- Edge detection view
- Simple noise reduction using thresholds
- Progress view
We are going to implement that in C# programming language for the Windows operating system.
Wavelet Edge Detector performs the intended tasks mentioned previously as follows
- Read input image intensity values into memory
- Haar transform rows
- Haar transform columns
- Rescale detail bands for visualization
- Filter out the LL frequency band
- Apply the threshold
- Inverse Haar transform columns
- Inverse Haar transform rows
- Display reconstructed image
We are not going to include the implementation details here however the full source code is attached to the post.
Graphical User Interface
The main GUI of our program consists of a main menu bar, main toolbar, image and edge viewer, threshold dialog and status bar. Here is a snapshot that illustrates that.
Wavelet Edge Detector was tested using images of various noise levels. Edges in low level noise images are easy to recognize but for those images with high noise levels is harder to recognize, however one can set a threshold level to refine image edge detection. The following snapshot illustrates image edge detection functionality
The following snapshot illustrates wavelet transform output
Wavelet Edge Detector was simple enough to demonstrate the concept of edge detection. It needs allot more work to improve but here is two areas where we can add to it.
- Support more wavelet types
- Support multi scale noise reduction
The full source code can be downloaded by clicking the link below
- Wavelet C#
- c# wavelet
- edge detection c#
- C# at the edge
- Wavelet Curb Detector Haar wavelet filter
- menu bar for c#
- c# wavelets
- c# edge detection