Skip to contents

Smoothes coordinates using a simple moving average. May be useful to remove digitization noise, mainly on outlines and open outlines.

Usage

coo_smooth(coo, n)

Arguments

coo

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

n

integer the number of smoothing iterations

Value

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

Examples

b5 <- slice(bot, 1:5) # for speed sake
stack(b5)

stack(coo_smooth(b5, 10))

coo_plot(b5[1])

coo_plot(coo_smooth(b5[1], 30))