From Surf Wiki (app.surf) — the open knowledge base
Deriche edge detector
Edge detection operator
Edge detection operator
Deriche edge detector is an edge detection operator developed by Rachid Deriche in 1987. It is a multistep algorithm used to obtain an optimal result of edge detection in a discrete two-dimensional image. This algorithm is based on John F. Canny's work related to the edge detection (Canny's edge detector) and his criteria for optimal edge detection:
- Detection quality – all existing edges should be marked and no false detection should occur.
- Accuracy - the marked edges should be as close to the edges in the real image as possible.
- Unambiguity - a given edge in the image should only be marked once. No multiple responses to one edge in the real image should occur.
For this reason, this algorithm is often referred to as Canny-Deriche detector.
Differences between Canny and Deriche edge detector
Deriche edge detector, like Canny edge detector, consists of the following 4 steps:
- Smoothing
- Calculation of magnitude and gradient direction
- Non-maximum suppression
- Hysteresis thresholding (using two thresholds)
The essential difference is in the implementation of the first two steps of the algorithm. Unlike the Canny edge detector, Deriche edge detector uses the IIR filter in the form:
: f(x)=\frac{S}{\omega}e^{-\alpha|x|}\sin\omega x
The filter optimizes the Canny criteria. As is evident from the preceding formula, the most effective filter is obtained when the value of \omega approaches 0. Such filter then uses the formula:
: f(x)=Sxe^{-\alpha|x|}
The advantage of such a filter is that it can be adapted to the characteristics of the processed image using only one parameter. If the value of α is small (usually between 0.25 and 0.5), it results in better detection. On the other hand, better localization is achieved when the parameter has a higher value (around 2 or 3). For most of the normal cases parameter value of around 1 is recommended.
| Image | α | ||
|---|---|---|---|
| thumb | center]] | thumb | center]] |
| α = 0.25 | α = 0.5 |
Using the IIR filter makes sense especially in cases where the processed image is noisy or a large amount of smoothing is required (which leads to large convolution kernel for FIR filter). In these cases, the Deriche detector has considerable advantage over the Canny detector, because it is able to process images in a short constant time independent of the desired amount of smoothing.
Deriche detector implementation
It is possible to separate the process of obtaining the value of a two-dimensional Deriche filter into two parts. In first part, image array is passed in the horizontal direction from left to right according to the following formula:
: y_{ij}^1=a_1x_{ij}+a_2x_{ij-1}+b_1y_{ij-1}^1+b_2y_{ij-2}^1
and from right to left according to the formula:
: y_{ij}^2=a_3x_{ij+1}+a_4x_{ij+2}+b_1y_{ij+1}^2+b_2y_{ij+2}^2
The result of the computation is then stored into temporary two-dimensional array:
: \theta_{ij}=c_1(y_{ij}^1+y_{ij}^2)
The second step of the algorithm is very similar to the first one. The two-dimensional array from the previous step is used as the input. It is then passed in the vertical direction from top to bottom and bottom-up according to the following formulas:
: y_{ij}^1=a_5\theta_{ij}+a_6\theta_{i-1j}+b_1y_{i-1j}^1+b_2y_{i-2j}^1
: y_{ij}^2=a_7\theta_{i+1j}+a_8\theta_{i+2j}+b_1y_{i+1j}^2+b_2y_{i+2j}^2
: \Theta_{ij}=c_2(y_{ij}^1+y_{ij}^2)
The description of the algorithm implies that the processed rows and columns are independent of each other. As a result, the solution based on the IIR filter is often employed in embedded systems and architectures which support a high level of parallelization.
| smoothing | x-derivative | y-derivative | k | a_1 | a_2 | a_3 | a_4 | a_5 | a_6 | a_7 | a_8 | b_1 | b_2 | c_1 | c_2 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| \frac | \frac | \frac | |||||||||||||
| k | 0 | k | |||||||||||||
| ke^{-\alpha}(\alpha-1) | 1 | ke^{-\alpha}(\alpha-1) | |||||||||||||
| ke^{-\alpha}(\alpha+1) | -1 | ke^{-\alpha}(\alpha+1) | |||||||||||||
| -ke^{-2\alpha} | 0 | -ke^{-2\alpha} | |||||||||||||
| k | k | 0 | |||||||||||||
| ke^{-\alpha}(\alpha-1) | ke^{-\alpha}(\alpha-1) | 1 | |||||||||||||
| ke^{-\alpha}(\alpha+1) | ke^{-\alpha}(\alpha+1) | -1 | |||||||||||||
| -ke^{-2\alpha} | -ke^{-2\alpha} | 0 | |||||||||||||
| 2e^{-\alpha} | 2e^{-\alpha} | 2e^{-\alpha} | |||||||||||||
| -e^{-2\alpha} | -e^{-2\alpha} | -e^{-2\alpha} | |||||||||||||
| 1 | -{(1-e^{-\alpha})}^2 | 1 | |||||||||||||
| 1 | 1 | -{(1-e^{-\alpha})}^2 |
The mathematical properties of the algorithm are often used in practical implementation of the Deriche detector. It is sufficient to implement only one part of the algorithm, which is then called twice, while performing a transposition of the resulting matrix.
| Source image | Filtered image | Filter parameters | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| [[File:Sunflowers in July.jpg | thumb | center | upright=0.65]] | [[File:Magician artwork.jpg | thumb | center | upright=0.6]] | [[File:F1A glider hook.jpg | thumb | center | upright=0.65]] |
| [[File:Sunflowers image processed by Deriche edge detector.jpg | thumb | center | upright=0.65]] | [[File:Magician processed by Deriche edge detector.jpg | thumb | center | upright=0.6]] | [[File:F1A glider hook processed by Deriche edge detector.jpg | thumb | center | upright=0.65]] |
| α = 1.5 | |||||||||||
| low threshold = 20 | |||||||||||
| high threshold = 40 | α = 4.0 | ||||||||||
| low threshold = 50 | |||||||||||
| high threshold = 90 | α = 0.8 | ||||||||||
| low threshold = 26 | |||||||||||
| high threshold = 41 |
This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page.
Ask Mako anything about Deriche edge detector — get instant answers, deeper analysis, and related topics.
Research with MakoFree with your Surf account
Create a free account to save articles, ask Mako questions, and organize your research.
Sign up freeThis content may have been generated or modified by AI. CloudSurf Software LLC is not responsible for the accuracy, completeness, or reliability of AI-generated content. Always verify important information from primary sources.
Report