Structure Tensor
Local 2×2 structure tensor of an image, with edge and flow orientation, anisotropy, and the raw tensor.
What it does
Structure Tensor measures the local gradient tensor of an image and reports what it says about each neighbourhood. Orientation is the dominant edge and flow direction. Anisotropy is how strongly the neighbourhood favours that direction, 0 for flat and 1 for a clean edge or ramp. Tensor is the raw result, for anything that wants to do its own maths on it.
When to use it
Finding edge direction rather than edge strength.
Separating textured or directional regions from flat ones: Anisotropy.
Making a downstream filter follow surface curvature instead of image contrast, by feeding a rendered normal pass in rather than the picture.
| Parameter | Type | Default | What it does |
|---|---|---|---|
input | Raster | — | Image, or any Field(Color): feeding a normal buffer makes downstream filters follow surface curvature. |
opacity | Number | 1 | Layer opacity (0 = transparent, 1 = opaque). Editable, wirable, keyframable. |
Gotchas
Orientation is a direction encoded into the red and green channels around a midpoint of 0.5, not an angle in radians. Decode it the way a flow map is decoded.
Input has no bypass and no guard for an unconnected pin, so wire something in before reading the outputs.
Anisotropy is the mask worth gating on. Orientation is defined everywhere, including across flat regions where its direction is arbitrary, so an effect steered by Orientation alone will wander wherever the image has no structure.
Worked example
Wire an image into Input.
Wire Anisotropy into a mask input to isolate the textured regions.
Wire Orientation into Displace in Vector mode to push pixels along the local edge direction.
Feed a rendered normal pass in instead of the picture, and the same result follows surface curvature.