0
$\begingroup$

I have to find the partial derivative of an image with respect to its x dimension. I am using central difference method i.e

$ \partial_x F(x) = \frac{F(x+1,y)-F(x-1,y)}{2} $

Here $F(x,y)$ represents the image and if I want to use spatial filtering for the same then I can use filter mask as

$0.5 \times [0, -1, 0;0, 0, 0;0, 1, 0],$

and then simply do filtering of F with this mask.

Now I want to know:

  1. whether central difference can be applied for finding partial derivative?
  2. whether the filter mask (which I have proposed above) can be used or not for finding partial derivative?
  3. if not, please suggest me a filter mask which can perform it better and also mention how is it performing the required operation.
$\endgroup$
1
$\begingroup$

Computing the image derivatives are very important for a lot of vision tasks. So let me first begin with answering your questions quickly and then get to more details.

  1. Whether central difference can be applied for finding partial derivative? YES
  2. Whether the filter mask (which I have proposed above) can be used or not for finding partial derivative? It can be used, but only the vertical one (in $y$ direction). The horizontal one would be the transpose of that.
  3. If not, please suggest me a filter mask which can perform it better and also mention how is it performing the required operation.

For noisy images computing derivatives this way would not be very helpful. That's why Sobel operator exists (http://en.wikipedia.org/wiki/Sobel_operator). Instead of the mask you proposed, it suggests to use $0.125 \times [1, 0, -1; 2, 0, -2; 1, 0, -1]$. However Sobel lacked the rotational symmetry. So Scharr kernels were proposed (the same wiki page, on the very bottom). These were proven to be better alternatives. Yet, these developments did not stop the further research. Being not so old, Farid and Simoncelli proposed more robust differentiation operators. See the paper:

Hany Farid and Eero Simoncelli "Differentiation of Discrete Multi-Dimensional Signals" IEEE Trans. Image Processing. 13(4): 496-508 (2004)

One implementation of this is presented in Peter's Computer Vision MATLAB functions:

http://www.csse.uwa.edu.au/~pk/research/matlabfns/

Check derivative5 and derivative7 functions.

Reading about Scale Space would also give you more insight on the nature of such linear operators: http://en.wikipedia.org/wiki/Scale_space

Hope these help. Cheers,

$\endgroup$
0
$\begingroup$

Yes, it can. The filter you suggest would give the vertical partial derivative (at least, if I take it to be matlab notation). Its rotation would give the horizontal partial derivative. However, other definitions of partial derivatives are possible, and your filter is of low order.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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