# Corner and Edge Detection

## A Combo

The Moravec detector suffers from a number of problems; these are
listed below, together with appropriate corrective measures:

The response is anisotropic because only a discrete set of shifts at every 45 degrees is considered — all possible small shifts can be covered by
performing an analytic expansion about the shift origin.

The response is noisy because the window is binary and rectangular — use a smooth circular window, for example a Gaussian.

The operator responds too readily to edges because only the minimum of E is taken into account — reformulate the corner measure to make use of the variation of E with the direction of shift.

Note that E is closely related to the local autocorrelation function, with M describing its shape at the origin (explicitly, the quadratic terms in the Taylor expansion). Let alpha, beta be the eigenvalues of M. Alpha and beta will be proportional to the principal curvatures of the local auto-correlation function, and form a rotationally invariant description of M. As before, there are three cases to be considered:

A. If both curvatures are small, so that the local auto-correlation function is flat, then the windowed image region is of approximately constant intensity (ie. arbitrary shifts of the image patch cause little change in E);

B. If one curvature is high and the other low, so that the local auto-correlation function is ridge shaped, then only shifts along the ridge (ie. along the edge) cause little change in E: this indicates an edge;

C. If both curvatures are high, so that the local auto-correlation function is sharply peaked, then shifts in any direction will increase E: this indicates a corner.

Not only do we need corner and edge classification regions, but also a measure of corner and edge quality or response. The size of the response will be used to select isolated corner pixels and to thin the edge pixels.

Let us first consider the measure of corner response, R, which we require to be a function of alpha and beta alone, on grounds of rotational invariance. It is attractive to use Tr(M) and Det(M) in the formulation, as this avoids the explicit eigenvalue decomposition of M, thus

Consider the following inspired formulation for the corner response

R is positive in the corner region, negative in the edge regions, and small in the flat region.

Code can be accessed using this repository.

## More from Talha Hanif Butt

MS Thesis Student, CVGL, LUMS http://pk.linkedin.com/in/talhahanifbutt