Computer Vision
In progress...
In progress...
The structure tensor provides the orientation of details in the image. Calculating the tensor begins with taking the gradient across the image (e.g. using the Sobel operator) and then calculating a total gradient of (dI/dx)2, (dI/dy)2, and dI/dx*dI/dy across the ROI.
The eigenvectors of the resulting matrix provide the two orthogonal detail directions. The larger the eigenvalue, the larger the gradient in the direction of the associated eigenvector.
Here is a video showing the results of calculating the structure tensor on a sample set of images. The eigenvectors are shown in yellow with lengths set proportional to the associated eigenvalues. I have included noise in the source images to mimic noise in video images. The red box is the ROI used for the structure calculation (the gradient calculation might use a few pixels ouside this box). I used cv2::cornerEigenValsAndVecs to perform the calculations.