Let $*$ denote a convolution operation, $G$ denote a kernel, and $I$ is a given image.

The gradient of the image $I$ is equivalent: $\nabla (G*I) = (\nabla G) * I$

The Sobel filter approximtes two dimentions of the gradient as follows:

$$G_x=\nabla_x G= \begin{bmatrix} -1 & 0 & 1 \\ -2 & 0 & 2 \\ -1 & 0 & 1 \\ \end{bmatrix};\\ G_y=\nabla_y G= \begin{bmatrix} -1 & -2 & -1 \\ 0 & 0 & 0 \\ 1 & 2 & 1 \\ \end{bmatrix}; $$

The gradient magnitudes of the image $I$ can be computed as discrete form


where $I_x=G_x*I;I_y=G_y*I$

My question is that can we rewrite the gradient magnitude of $I$ with a continuous form as follows:?

$$|\nabla I|=\sqrt{\left((\nabla_x G * I)^2+(\nabla_y G * I)^2\right)}=\sqrt{(I_x^2+I_y^2)}$$.

The reason is that I want to use the above equation in a continuous form as follows

$$\int_{\Omega} g(|\nabla I(x)|) dx$$

where $g(|\nabla I(x)|)=\frac{1}{|\nabla I(x)|)}$

  • $\begingroup$ Try a derivative of an isotropic smoothing kernel. E.g. the gaussian is very common. What does the continuous function mean? Why only an $x$ derivative? $\endgroup$ – geometrikal Apr 26 '16 at 0:10
  • $\begingroup$ @geometrikal: You are right. The common function which used in above equation is Gaussian filter. However, I want to use Sobel filter in this case. Hence, my equation need to change. The above integrate function often represents for continuous function $f(.)$. So, I think $g(|I|)$ is just discrete function, while $g(|\nabla I|)$ denotes continuous ones. For second question. I updated my question more clear about $x$ $\endgroup$ – Jame Apr 26 '16 at 1:06
  • $\begingroup$ Maybe you can try to make a continuous version based on his definitions in here: researchgate.net/publication/… $\endgroup$ – geometrikal Apr 26 '16 at 1:45
  • $\begingroup$ It means my above expression is wrong, Right? My goal is representing gradient magnitude of Sobel in continuous gradient $\endgroup$ – Jame Apr 26 '16 at 1:55
  • $\begingroup$ What are you trying to achieve? Why is the sobel kernel important? $\endgroup$ – geometrikal Apr 26 '16 at 2:04

Your Answer

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

Browse other questions tagged or ask your own question.