Skip to contents

Smoothes coordinates using a simple moving average but let the first and last points unchanged. May be useful to remove digitization noise on curves.

Usage

coo_smoothcurve(coo, n)

Arguments

coo

matrix of (x; y) coordinates or any Coo object.

n

integer to specify the number of smoothing iterations

Value

a matrix of (x; y) coordinates, or a Coo object.

Examples

o <- olea[1]
coo_plot(o, border='grey50', points=FALSE)
coo_draw(coo_smooth(o, 24), border='blue', points=FALSE)
coo_draw(coo_smoothcurve(o, 24), border='red', points=FALSE)