# How Come the Low Pass Filter in Sobel Operator Isn't Normalized?

I am relatively new to the field of computer vision and I have just learnt about the sobel operator. The sobel operator in the x direction is a convolution of the finite difference kernel $$[1,0,-1]$$ and the gaussian smoothing kernel $$[1,2,1]$$. Why is it the case that the smoothing kernel does not need to be normalised ?

For example, the vector below convolved with the image will result in pixel intensities that are higher than the original values. Eg, $$[50,100,50]$$ will result in the middle pixel getting a value of 300 which is not the intended effect of smoothing. If normalisation is applied, then the middle pixel would get a value 75, which blurs the image. $$\begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}$$

I hope my question was clear in the sense that i don't see how applying $$[1,2,1]$$ filter results in blurring without normalisation.

EDIT How the sobel operator is obtained. • Do you have the reference saying it is not normalized?
– Royi
Aug 30 '20 at 3:46
• The sobel operator uses a kernel that is not normalised ? The sobel oeperator just convolves the kernel with the image and does not do any normalisation. Or am I missing something ? Aug 30 '20 at 9:27
• I am asking where did you see this kernel? Usually it appears with its normalization factor next to it.
– Royi
Aug 30 '20 at 9:42
• @Royi I have edited the post to include the kernel Aug 31 '20 at 1:30
– Royi
Aug 31 '20 at 8:25

The answer is simple, the Sobel Filter is a composition of Lows Pass Filter (LPF) and High Pass Filter (HPF). The composition is done by convolution.

Now, indeed the LPF presented above $${\left[ 1, 2, 1 \right]}^{T}$$ has amplification in the DC value (Its sum is 4 so the amplification is 4). Yet it is convolved with an HPF filter which rejects the DC component.
Convolution is multiplication in the Frequency Domain, since we multiply 4 by zero we essentially get zero.

Actually multiplication of LPF and HPF gives a Band Pass Filter (BPF) (In case they have some overlap in Frequency Domain). Hence in the case above, the Sobel Filter is actually a BPF.

• thanks for your reply. However I am not so familiar with signal processing stuff (filters and all) as I have not taken any signal processing courses. Is it possible to explain why there needs to be no normalizing factor without bringing in filters ? Aug 31 '20 at 8:39
• I do not understand why the vector $[1,2,1]$ can be considered a blurring operation without normalising the pixel values Aug 31 '20 at 8:39
• By itself it is a blurring with DC multiplication. Yet since it is not on its own (There is an HPF filter working with it) its DC factor has no meaning. Try yourself. Apply the LPF even in the form of [2, 4, 2] then the HPF and you'll get the same result as with [1, 2, 1] or [0.25, 0.5, 0.25].
– Royi
Aug 31 '20 at 8:46
• What is DC multiplication ? Aug 31 '20 at 8:48
• This is the normalization factor. You're after a normalization for the filter such that it will have sum of 1 because then it won't scale the image. The sum of the elements is the DC factor. What I wrote is in the context of the Sobel Filter the DC Factor of the LPF filter doesn't matter. Hence they chose simple integer numbers. You can multiply them by any number and the Sobel filter we'll have almost the same response.
– Royi
Aug 31 '20 at 9:08

For numerical details, you can check What's Logic Behind the Construction of Sobel's Filter in Image Processing?. Hereafter is an explanation.

For early image preprocessing tasks, normalization is not mandatory, as long as they only add a common multiplication factor for all images. Indeed, one is often mostly interested in the relative "importance" of features, in detection or localization. As much as "integer" pixel values are somewhat arbitrary, multiplying them a constant often does not matter a lot.

Here is an analogy: given an elevation map of some landscape, finding the flattest road, or the two tallest mountains is not very sensitive to measure given in meters or kilometers.

Here, the normalization could be applied to the derivative part as well: to get a correct derivative/slope estimation, one should divide by 2 : $$[1,\,0,\,-1]/2$$, just like you would want to divide the smoothing part by $$4$$. But...

But starting with integer pixel values, normalizing yields floating point. Sobel filters were designed when every operation mattered. Here, you only have integer dyadic values in the filter ($$0$$, $$1$$, $$2$$), the most complicated 2-fold product can be implemented by a left-shift. So, unnormalization is a cheap price of the one of "simplest"-to-implement edge detectors.