All examples#

Explore the example gallery to see how to use the SplineOps library.

All real-world images used in these examples come from the Kodak image dataset, available at:

https://r0k.us/graphics/kodak/

We gratefully acknowledge the work of the author and curator of this dataset for making these images publicly available.

Spline Interpolation Examples#

Build continuous models from sampled data. Explore spline bases and boundary modes, then compare interpolation and resampling choices.

Class TensorSpline

Class TensorSpline

Build a continuous spline from 2-D samples and evaluate it on a finer grid.

Spline Bases

Spline Bases

Explore B-spline, O-MOMS, and Keys bases, then combine shifted and weighted copies into continuous models.

Extension Modes

Extension Modes

Compare zero, mirror, and periodic coefficient boundaries when evaluating a signal beyond its sampled interval.

Interpolate 1D Samples

Interpolate 1D Samples

Reconstruct a 1-D signal with cubic and linear splines, and compare TensorSpline with Resize.

Resample a 1D Spline

Resample a 1D Spline

Move a continuous spline to a coarser sampling grid and inspect how its representation changes.

Compare Different Splines

Compare Different Splines

Compare spline reconstruction methods by expanding coarse samples and measuring error against the original model.

Resize Examples#

Resize signals and images with standard interpolation or projection antialiasing. Inspect fine detail, compare numerical quality, and measure runtime across zoom factors.

Resize Module 1D

Resize Module 1D

Compare standard cubic resizing and projection antialiasing on a 1-D signal.

Resize Module 2D

Resize Module 2D

Resize an RGB image and use detail views and an animation to inspect aliasing.

Standard Interpolation

Standard Interpolation

Compare SplineOps cubic interpolation with SciPy using matched image roundtrips and detail regions.

Antialiasing

Antialiasing

Compare image detail and reconstruction error after shrinking with and without projection antialiasing.

How Bad Aliasing Can Be

How Bad Aliasing Can Be

Use a deliberately mixed image to reveal how unfiltered downsampling can select misleading visual content.

Benchmarking

Benchmarking

Compare resize methods across several Kodak images using detail views, reconstruction quality, and runtime.

Benchmarking Plot

Benchmarking Plot

Sweep zoom factors and compare the speed and reconstruction quality of linear and cubic resize methods.

Benchmarking Animation

Benchmarking Animation

Animate image detail and reconstruction errors as the zoom factor changes across several test images.

Affine Examples#

Rotate images with spline interpolation. Start with a single transform, then use the animation to explore a full rotation and different spline degrees.

Rotate Image

Rotate Image

Rotate a grayscale image around its center using spline interpolation.

Rotation Animation

Rotation Animation

Animate a full image rotation and explore how spline degree affects interpolation.

Adaptive Regression Splines Examples#

Fit sparse piecewise-linear models to noisy observations. Compare fixed regularization strengths or watch the fit and knot count change in an animation.

Adaptive Regression Splines Module

Adaptive Regression Splines Module

Fit sparse piecewise-linear models and compare how regularization changes the fit and knot count.

Lambda Sweep Animation

Lambda Sweep Animation

Animate the trade-off between data fidelity and knot sparsity while increasing regularization.

Smoothing Splines Examples#

Reduce noise in signals, images, and volumes. Compare fractional, periodic N-D, and recursive smoothers while keeping their different operators and boundaries explicit.

1D Fractional Brownian Motion

1D Fractional Brownian Motion

Generate a noisy fractional Brownian signal and recover its trend with a fractional smoothing spline.

2D Image Smoothing

2D Image Smoothing

Denoise a grayscale image with periodic smoothing and compare image detail and signal-to-noise ratio.

3D Volume Smoothing

3D Volume Smoothing

Smooth a noisy synthetic 3-D volume and compare central slices against its known clean signal.

Recursive Smoothing Spline

Recursive Smoothing Spline

Compare regularization strengths in a recursive first-order smoother for noisy 1-D data.

Differentials Examples#

Turn image intensities into gradients, curvature, and orientation maps. Compare the meaning and appearance of each spline-based differential feature.

Differentials Module

Differentials Module

Visualize image gradients, the Laplacian, and Hessian features using spline-based derivatives.

Multiscale Examples#

Explore coarse-to-fine image representations. Build spline pyramids, inspect wavelet detail bands, and compare reconstruction across several levels.

Pyramid Decomposition

Pyramid Decomposition

Reduce and expand 1-D signals and images, then compare several levels of a spline pyramid.

Wavelet Decomposition

Wavelet Decomposition

Inspect Haar detail bands at several scales and reconstruct the original image.

End-to-end workflows#

Combine reusable operators in complete pipelines. Share saved coefficients across rotations or write selected volume features into explicit output buffers.

Persist one frame and evaluate several affine geometries

Persist one frame and evaluate several affine geometries

Save one frame's spline coefficients and reuse them for several affine geometries.

Warp a volume and write selected differential features

Warp a volume and write selected differential features

Warp a synthetic 3-D volume and compute selected differential features into reusable output buffers.

Gallery generated by Sphinx-Gallery