Noise Robust Gradient Operators

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.





Parameters w_1 and w_2 are angular frequencies along horizontal and vertical directions correspondingly. Lower values of w_1 and w_2 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 1 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 {{\partial f}/{\partial x}}:

    \[ \displaystyle{\frac{1}{32}}\left[\begin{matrix} -1&-2&0&2&1\\ -2&-4&0&4&2\\ -1&-2&0&2&1 \end{matrix}\right] \]

    \[ \displaystyle{\frac{1}{512}} \left[\begin{array}{ccccccc} -1&-4&-5&0&5&4&1     \\ \noalign{\medskip} -4&-16&-20&0&20&16&4 \\ \noalign{\medskip} -6&-24&-30&0&30&24&6 \\ \noalign{\medskip} -4&-16&-20&0&20&16&4 \\ \noalign{\medskip} -1&-4&-5&0&5&4&1 \end{array}\right] \]

To calculate {{\partial f}/{\partial y}} 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.






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.

1 Star2 Stars3 Stars4 Stars5 Stars (11 votes, average: 4.91)
Loading ... Loading ...
Print This Page Print This Page


  1. Audrius
    Posted October 2, 2009 at 4:15 am | #

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

    • Posted October 4, 2009 at 8:49 pm | #

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

      • Nicolas Boulant
        Posted March 1, 2012 at 12:44 am | #

        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.


  2. Posted May 18, 2011 at 5:01 am | #

    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?

    • Posted May 18, 2011 at 10:04 am | #

      Thank you for your feedback,

      Please site this webpage in your paper.

      Record in .bib file:

      Author = {Pavel Holoborodko},
      Title = {Noise Robust Gradient Operators.},
      howpublished = {\url{}}
      year = {2009}

      in LaTeX document preamble:

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


  3. Posted May 20, 2011 at 2:12 am | #

    Thanks for the bibTex record.

  4. Jan
    Posted October 24, 2012 at 5:56 pm | #

    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.

Post a Comment

Your email is never published nor shared.

Use native LaTeX syntax to include formulas: $ ... $, \[ ... \], etc. Do not forget to preview comment before posting.

Also you may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting