This page is about efficient gradient operators which combine isotropic noise suppression and precise partial derivatives estimation. They are targeted for applications where differentiation of discrete 2D surface is required: feature/edge detection in image, coordinate measurement machine data processing, etc.

Gradient operator uses linear combination of neighboring points/pixels to approximate partial derivatives at any given point of the discrete surface. Set of coefficients is called filter.

There are several widely used filters – Sobel, Prewitt, Roberts. All of them are based on forward or central differences. Although these numerical methods have favorable theoretical properties, they can be inaccurate in the presence of noise as shown on central differences page.

Digital data derived from real world signals contain noise inherently. Which means that reliable and robust gradient operator should poses important property of noise suppression. One more desired property is to process 2D data isotropically, i.e. remove noise along all directions identically.

Frequency domain is valuable tool to research properties of discrete filters. Let’s consider frequency response of popular Sobel and Prewitt filters to investigate their noise suppression capabilities.

Sobel3x3 | Prewitt3x3 |

Parameters and are angular frequencies along horizontal and vertical directions correspondingly. Lower values of and represent smooth regions in data. Higher indicate regions with abrupt changes which most likely corrupted by noise. Surface plot shows how filter processes particular frequencies and their combination. To be noise robust filter should set to zero high frequencies and tend to near lowest. To be isotropic frequency response’s contour lines should be close to circle with the center at origin.

From these plots we can see that Prewitt filter doesn’t have noise suppression at all. Whereas Sobel has weak noise suppression and it is not isotropic.

I propose 2D differentiating filters which combine isotropic noise suppression and precise gradient estimation in the same time (analogous filters for 1D explained in smooth noise-robust differentiators article). Here are the masks for :

To calculate just rotate mask by 90 degrees. As you can see these filters have efficient computational structure – they fit perfectly for fixed point arithmetic. Frequency responses are plotted below.

NRIGO5x3 | NRIGO7x5 |

### Disclaimer

You can use materials from this site in any legal activity (research, teaching, engineering, etc.) freely on the basis of respecting my authorship by giving clear statement and reference to my site or particular page on it in your work. Brief description of your project is welcome in the comments below. One point though, if you use my materials in commercial project please consider supporting my site and me by donation.

## 8 Comments

#Very interesting work. How would you extend this result to 3D?

#It is possible to extend this work for 3D data. I’ll explain details via e-mail.

#Hi Pavel,

Regarding the noise-robust gradient operators, I’d be interested in having the masks in 3D as well. Apparently, somebody asked you the question already. You replied that you would explain the details by email.

Thanks for your help.

Nick

#First of all, thank you.

I am using your work in my research. I was wondering if there is any paper that I could cite?

#Thank you for your feedback,

Please site this webpage in your paper.

Record in .bib file:

@misc{NRIGO,

Author = {Pavel Holoborodko},

Title = {Noise Robust Gradient Operators.},

howpublished = {\url{http://www.holoborodko.com/pavel/image-processing/edge-detection/}}

year = {2009}

}

in LaTeX document preamble:

\usepackage{url}

If url package is not acceptable please check this page for other methods on websites referencing:

http://win.ua.ac.be/~nschloe/content/bibtex-how-cite-website

Thanks,

Pavel.

#Thanks for the bibTex record.

#Hi Pavel,

I’m very much interested in your smoothing differentiator techniques. I’ve already implemented them for the central part of my data (image). Can you elaborate on how to treat the edges of the domain? I know you’ve presented some one-sided differentiators, but currently I did not manage to extend these to this 2D mask.

Gr. J.

#Hi Pavel,

Thanks for this beautiful work. Could you tell me how to construct a 2D filter of arbitrary size? As you do for the 1D schemes on your other page.

Best regards,

KG