Are the following sequence of operations the same -

  • Down-sampling filtering followed by gradient filtering with kernel [-1 0 1]
  • Gradient filtering with kernel [-1 0 1] followed by down-sampling

Could you point me to some math which can answer this question.

Intuitively, I am thinking that these operations are the same. That is because down-sampling can be loosely modeled as low-pass filtering and since convolution is associative, I guess they should produce similar results. But I am not able to quantitatively prove this to be a fact.

  • 1
    $\begingroup$ Definitely not the same - the gradient filter kernels are not equivalent as they are being applied at different sample rates. You would need to re-resample the gradient filter kernel in one of the two cases. $\endgroup$
    – Paul R
    Commented Jan 7, 2013 at 12:10
  • $\begingroup$ given that I have a 1080p image, would be easier to resample the signal or the filter? $\endgroup$
    – ssb
    Commented Jan 7, 2013 at 12:54
  • $\begingroup$ It really depends on what you're trying to achieve. You haven't explained the motivation for either the down-sampling or the gradient filter. $\endgroup$
    – Paul R
    Commented Jan 7, 2013 at 13:00

1 Answer 1


As the commenters have stated, this is not the same. The relationships between down/up-sampling and filtering are formally described by the noble identities.

In your case down-sampling followed by filtering with [-1 0 1] is equivalent to filtering with [-1 0 0 0 1] first and than downsampling.

In any case you need to make sure your don't alias before down-sampling the picture.


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.