34
Example: Sobel Operator
            -1   0   1                                 1   2   1
Sx =    -2   0   2                      Sy =    0   0   0
            -1   0   1                                -1  -2  -1
On a pixel of the image
•   let gx be the response to Sx
•   let gy be the response to Sy
Then   g = (gx  + gy  )            is the gradient magnitude.
           q = atan2(gy,gx)         is the gradient direction.
2
2
1/2