# Is it possible to rewrite gradient magnitude of Sobel in continuous formula?

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

$$|I|=\sqrt{(I_x^2+I_y^2)}$$.

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)|)}$

• 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? – geometrikal Apr 26 '16 at 0:10
• @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$ – Jame Apr 26 '16 at 1:06
• Maybe you can try to make a continuous version based on his definitions in here: researchgate.net/publication/… – geometrikal Apr 26 '16 at 1:45
• It means my above expression is wrong, Right? My goal is representing gradient magnitude of Sobel in continuous gradient – Jame Apr 26 '16 at 1:55
• What are you trying to achieve? Why is the sobel kernel important? – geometrikal Apr 26 '16 at 2:04