2
$\begingroup$

The Canny edge detector is expressed by the derivative of the Gaussian. Its practical implementation involves the Gaussian filter, then the Sobel filter to calculate the gradient in both directions. It's followed by non-max suppression and thresholding with hysteresis.

The Deriche filter on the other hand is described as seperable into two parts that are applied recursively. But how is this implemented practically?

$\endgroup$
8
  • $\begingroup$ added a link to the Deriche Edge Detector wikipedia article. Is it correct this is what you refer to when you say "Deriche operator" or "Deriche Filter"? $\endgroup$ May 30, 2022 at 14:22
  • $\begingroup$ @MarcusMüller Yes it is. Thanks! $\endgroup$
    – edgeboyy
    May 30, 2022 at 14:23
  • $\begingroup$ The Wikipedia page that Marcus added seems to explain how the recursion works. Is there something unclear about that? $\endgroup$
    – Peter K.
    May 30, 2022 at 16:18
  • 1
    $\begingroup$ “Its practical implementation involves the Gaussian filter, then the Sobel filter” — I’ve seen implementations like this. Why do people think it’s practical to use three filters instead of two? Canny suggested using the derivative of Gaussian filter, as it optimizes some characteristics he proposed. It’s more precise than Sobel (even if combined with a Gaussian), and it only requires applying two filters. $\endgroup$ May 30, 2022 at 17:06
  • $\begingroup$ @PeterK. How efficient is the implementation compared to the Canny operator? $\endgroup$
    – edgeboyy
    May 30, 2022 at 18:58

1 Answer 1

1
$\begingroup$

Let's assume $\boldsymbol{b}$ stands for gaussian blur and $\boldsymbol{s}$ for Sobel filter.

With $\boldsymbol{I}$ being the input image we have the 2 first steps of Canny Edge Detector as:

$$ \boldsymbol{s} \ast \left( \boldsymbol{b} \ast \boldsymbol{I} \right) $$

Namely convolution of the image by a Gaussian Blur followed by a Sobel filter which imitates the gradient.

Since Convolution is associative it can be written as:

$$ \left( \boldsymbol{s} \ast \boldsymbol{b} \right) \ast \boldsymbol{I} $$

Where $ \boldsymbol{s} \ast \boldsymbol{b} $ is basically approximation of the derivative of the Gaussian kernel.

The trick in the Deriche Filter is to apply this in a single step and use IIR / Auto Regressive approximation of it.

As you may see in Recursive Implementation of the Gaussian Filter (1D & 2D) one may approximate the Gaussian Blur filter by an IIR filter.
One could also approximate the derivative of the Gaussian in IIR form which is what used in Deriche Filter.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.