A single-file, dependency-free web tool that applies a decorrelation stretch to images and to a live camera feed, entirely in the browser. Nothing is uploaded; no image data leaves the page.
Live: https://shan.mp/decorrelation_stretch/
Decorrelation stretching is the technique behind the vivid false-colour Mars and ASTER images: the three colour bands are rotated into their principal axes, each axis is stretched to equal variance, and the result is rotated back. Subtle colour differences that were hidden by strong band-to-band correlation become clearly separated hues.
Open index.html directly, or use the live link above.
Tol percentile clip; sample stride. Presets for the NASA/ASTER
convention and for MATLAB's default of preserving each band's own mean and sigma.Implements the algorithm in R. E. Alley, Algorithm Theoretical Basis Document for
Decorrelation Stretch (ASTER product AST06), v2.2, Jet Propulsion Laboratory, August 1996:
strided sampling, covariance/correlation statistics, eigen-decomposition (cyclic Jacobi),
stretch vector s = target_sigma / sqrt(lambda), transform T = R diag(s) R^T, and an offset
placing the output at the target mean. Option semantics follow MATLAB's decorrstretch.
decorrstretch: https://www.mathworks.com/help/images/ref/decorrstretch.html4 commits
HTML
100.0%
A single-file, dependency-free web tool that applies a decorrelation stretch to images and to a live camera feed, entirely in the browser. Nothing is uploaded; no image data leaves the page.
Live: https://shan.mp/decorrelation_stretch/
Decorrelation stretching is the technique behind the vivid false-colour Mars and ASTER images: the three colour bands are rotated into their principal axes, each axis is stretched to equal variance, and the result is rotated back. Subtle colour differences that were hidden by strong band-to-band correlation become clearly separated hues.
Open index.html directly, or use the live link above.
Tol percentile clip; sample stride. Presets for the NASA/ASTER
convention and for MATLAB's default of preserving each band's own mean and sigma.Implements the algorithm in R. E. Alley, Algorithm Theoretical Basis Document for
Decorrelation Stretch (ASTER product AST06), v2.2, Jet Propulsion Laboratory, August 1996:
strided sampling, covariance/correlation statistics, eigen-decomposition (cyclic Jacobi),
stretch vector s = target_sigma / sqrt(lambda), transform T = R diag(s) R^T, and an offset
placing the output at the target mean. Option semantics follow MATLAB's decorrstretch.
decorrstretch: https://www.mathworks.com/help/images/ref/decorrstretch.html4 commits
HTML
100.0%