The Harris matrix is the structure tensor used in image corner detection.
For a real-valued image
,
let
and
be its partial derivatives
and let
be nonnegative weights on a neighborhood
. The Harris matrix is
It is a real symmetric matrix and a positive semidefinite matrix, since it is a nonnegatively weighted sum of outer products of gradient vectors.
Its two eigenvalues measure intensity variation in two perpendicular directions. Two large eigenvalues indicate a corner, one large and one small eigenvalue indicate an edge, and two small eigenvalues indicate a nearly uniform region. Harris and Stephens (1988) use the response
where
is a parameter,
is the determinant, and
is the matrix trace.