EDGES

Edges are local features that capture important information of the semantic content of the image. They are defined as the set of pixels laying between two image regions with different light intensity

1 DIMENSIONAL STEP EDGE

In this situation an edge can be seen as a peak of the first derivative of the intensity pixel function

So in order to detect edge in this situation is sufficient to threshold the first derivative

flowchart LR
A["S(x)"]
B["d(S)"]
C[T]
D["e(x)"]
A --> B --> C --> D

2 DIMENSIONAL STEP EDGE

In a 2D image input signal edge is characterized also by direction, In this context the derivative is no more sufficient and the gradient function is used

The gradient direction is the direction where the intensity function show the maximum variation

FIRST DETECTION PIPELINE

GRADIENT APPROXIMATION

In order to compute the gradient efficiently a discrete approximation is needed, multiple choices are possible

backward or forward differences

or central differences

There are also a lot of ways to approximate the gradient intensity

NOISE PROBLEMS

Due to the nature of the derivative operation of amplifying noise the input signal needs to be smoothed out to allow a correct edge detection

the smoothing process and the derivative can be carried out by a single operation using the mean of point in the derivative approximation step

And then the derivative is obtained by the difference of the means

DERIVATIVE VARIANTS

There are some operator with some additional features

  • Prewitt operator which takes into account central differences (better for diagonal edges)
  • Sobel operator which Weights more the point on the center in order to improve isotropy

FINDING MAXIMA TO LOCALIZE EDGES

It’s difficult to localize edge in an image just by thresholding, a too low threshold could result in a poor localization of the edge (e.g. thick edges)

A better way to localize the edges is to find the local maxima of the absolute value of the derivative

NON MAXIMA SUPRESSION (NMS)

The idea is to use the discrete representation of the gradient discussed earlier to compute an algorithm that identifies local maxima points.

So given a point in an image

The gradient in the line from to can be approximated as follows

And with this approximation the NMS can be obtained as follows

FINAL EDGE DETECTOR PIPELINE

With this considerations the final edge detection pipeline looks like this

flowchart LR
A["I"]
B["I_x"]
C["I_y"]
D["|| I ||"]
E["NMS"]
F["T_h"]
G["E"]
A --> B & C --> D --> E --> F --> G

There is a final thresholding step in order to avoid detection of unwanted edges.

PREVIOUS NEXT