Edge detection

Introduction

Filtering can be used to detect the edges of objects in images. Such edges correspond to local differences in DN values. This is done using a gradient filter, which calculates the difference between neighbour pixels in some direction. Filters presented below, are called x- and y-gradient filters; they perform detection of vertical and horizontal edges, respectively.

x-gradient filter kernel
0 0 0
-1 0 1
0 0 0
y-gradient filter kernel
0 -1 0
0 0 0
0 1 0

The following filter detects edges in all directions. Edge detection filtering produces small values in homogeneous areas of an image, while edges are represented by large positive or negative values. Edge detection filtering can be easily recognized by examining kernel elements: their sum must be zero.

all-directional filter kernel
-1 -1 -1
-1 8 -1
-1 -1 -1

 

Prior knowledge

Outgoing relations

Learning paths