# Sobel Filter Operatios

I have an image which has a vertical line which is 2 pixels wide and 4 pixels long and the remaining image is black.

Now I want to find the edges in the vertical direction and for that I use the sobel operator

sobel = { {-1, 0, 1 }, { -2, 0, 2 }, { -1, 0, 1 } }

and get the following thresholded image

but when I use 180 degree rotated version of the above operator such as sobel = { {1, 0, -1 }, { 2, 0, -2 }, { 1, 0, -1 } }

I get the following image

Now my question is

1. Using a 3 * 3 operator, do we get 2 pixels wide edge as in the previous two images? Shouldn't we get 1 pixel wide edge? and what about the edge width in case of 5 * 5 or 7 * 7 operators ?

2. What is the difference between the above said operators i.e normal sobel operator and its 180 degree rotated version. Where is each one used? In this case which of the above should be used?

• Something in what you getting is wrong. The various grey areas should each get you an edge, with various intensities. I expected a two color/grey image. – Moti May 13 '15 at 17:40
• But please tell me that if we use 3 * 3 sobel filter...will we get a 2 pixel wide edge?? and what is the difference between a normal sobel operator and 180 degree rotated version of it. Please explain. – Navdeep May 13 '15 at 18:03
• You are right about the nature of the edge. Why not use just (1,-1)? – Moti May 13 '15 at 18:49