In mathematics, the structure tensor, also referred to as the second-moment matrix, is a matrix derived from the gradient of a function. It describes the distribution of the gradient in a specified neighborhood around a point and makes the information invariant to the observing coordinates. The structure tensor is often used in image processing and computer vision.
The 2D structure tensor
Continuous version For a function I {\displaystyle I} of two variables p = (x, y), the structure tensor is the 2×2 matrix
S w ( p ) = [ ∫ w ( r ) ( I x ( p − r ) ) 2 d r ∫ w ( r ) I x ( p − r ) I y ( p − r ) d r ∫ w ( r ) I x ( p − r ) I y ( p − r ) d r ∫ w ( r ) ( I y ( p − r ) ) 2 d r ] {\displaystyle S_{w}(p)={\begin{bmatrix}\int w(r)(I_{x}(p-r))^{2}\,dr&\int w(r)I_{x}(p-r)I_{y}(p-r)\,dr\\[10pt]\int w(r)I_{x}(p-r)I_{y}(p-r)\,dr&\int w(r)(I_{y}(p-r))^{2}\,dr\end{bmatrix}}}
where I x {\displaystyle I_{x}} and I y {\displaystyle I_{y}} are the partial derivatives of I {\displaystyle I} with respect to x and y; the integrals range over the plane R 2 {\displaystyle \mathbb {R} ^{2}} ; and w is some fixed "window function" (such as a Gaussian blur), a distribution on two variables. Note that the matrix S w {\displaystyle S_{w}} is itself a function of p = (x, y). The formula above can be written also as S w ( p ) = ∫ w ( r ) S 0 ( p − r ) d r {\textstyle S_{w}(p)=\int w(r)S_{0}(p-r)\,dr} , where S 0 {\displaystyle S_{0}} is the matrix-valued function defined by
… excerpt ends here. Continue reading the full article.






