f_tf_tensormap, live
Derives a structure tensor from any texture: at each pixel an orientation line, how strong the local gradient is, and how one-directional (coherent) it is.
The cell below steps the NumPy mirror that f_tf_tensormap's tests are written against, in your browser. It is the NumPy mirror, not the Max patch, and it is not claimed to match the patch bit for bit.
Downloads about 15 MB the first time (Python and NumPy).
strengthscales the raw tensor terms and the trace before the display clips; raise it on smooth or coarse textures so the tensor is not all near zero.radiusis the box-smoothing radius (in texels); 0 turns smoothing off, and larger radii average direction over wider neighborhoods.- The input select picks the texture the tensor is computed from: rings shows geometry cleanly, bars show edges between colors, noise shows mixed directions, moving animates the edges.