Point and Edge Detection

Point Detection

Below is an example of point detection.

(-1-1-1-18-1-1-1-1)

Kernel for point detection

Original image

Edge Detection

Below is an example of edge detection using Sobel, Prewitt, and Roberts filter.

Sobel filter

Sobel filter uses two kernels to calculate derivatives of each pixel: horizontal and vertical. Then, we combine those results to get magnitude.

Horizontal

(10-120-210-1)

Kernel for horizontal Sobel filter

Vertical

(121000-1-2-1)

Kernel for vertical Sobel filter

Magnitude

x2 + y2

Magnitude formula

Prewitt filter

Prewitt filter acts like Sobel filter, but does not focus on the middle.

Horizontal

(10-110-110-1)

Kernel for horizontal Prewitt filter

Vertical

(111000-1-1-1)

Kernel for vertical Prewitt filter

Magnitude

x2 + y2

Magnitude formula

Roberts filter

Roberts filter uses diagonals instead of x and y axis.

45 degrees

(100-1)

Kernel for 45 degrees Roberts filter

135 degrees

(01-10)

Kernel for 135 degrees Roberts filter

Magnitude

x2 + y2

Magnitude formula


Image used: "Valve original (1)" by Simpsons contributor (CC BY-SA 3.0)