Edge Detection

 

Laplacian: 

Edge Detection is the emphasizing of pixels that differ by a large amount from surrounding pixels.  This process gives us an outline of the image where we can see where the "edges" of an image are.  The Laplacian filter accomplishes this by summing the four surrounding pixel values, then subtracting four times the pixels values.  If this result is greater than a set value, then we color the pixel white, otherwise we color it black.

 0   1  0

 1  -4  1

 0   1  0


 

 

 

Roberts: 

With the Roberts filter, we compare diagonal pixels to and color when the difference is greater than a set amount.  This is a relatively simple filter

 

 

 

 

 

 


 


Prewiet: 

The Prewiet fileter is basically just a first derivative filter.   It filters two ways.  For horizontal edge detection, it takes into account the 6 values on the left and right of the pixel.  For vertical edge detection we take into account the six values above and below the pixel.

-1 -1 -1

 0   0  0

-1 -1 -1

 


 

 

 

Sobel: 

The Sobel filter is a second derivative filter.  It takes into account the same values as the first derivative filter, but it also doubles the values in the same row as the pixel, like this:

 

-1 -1 -1

 2   2  2

-1 -1 -1