Learn R Programming

registr (version 1.0.0)

piecewise_parametric_hinv: Create two-parameter piecewise (inverse) warping functions

Description

This function uses a parametric model to calculate inverse warping functions for registration. The parameter beta controls the shape of warping, and the parameter midpoint_percentile control where the warping function crosses the identity line. The designation (inverse) is intended to communicate that these functions take data from the unregistered space to the registered space, consistent with functional data literature on registration.

Usage

piecewise_parametric_hinv(grid, beta = 0.01, midpoint_percentile = 0.5)

Value

A numeric vector containing values for a single warping function.

Arguments

grid

grid of values over which to evaluate the function.

beta

parameter that controls shape of warping. Result approaches identity warp as beta approaches zero.

midpoint_percentile

controls where the result crosses the identity warp. Default is 0.5, which forces result to cross identity line at median of grid.

Author

Julia Wrobel jw3134@cumc.columbia.edu

Examples

Run this code
x = runif(100)
plot(x, type = 'l')
lines(piecewise_parametric_hinv(grid = x, beta = 0.5), col = "red")

Run the code above in your browser using DataLab