Skip to main content

Class: Smoother

PathBuilding.Pipeline.Smoother()

Smoothening filter for path values.Each point is a liner combination of the last several points. Coefficients are produced using multi-pass double exponential smoothing.The default value of movingAverageWindowSize is 15, which is tuned for hand writing data (sequence of xy positions) at 60Hz. If the input is for example 120Hz, set movingAverageWindowSize to 30.

Constructor

new Smoother()

Since:

  • version 3.0

Extends

Methods

configure(dimsCount, movingAverageWindowSizeopt)

Parameters:
NameTypeAttributesDefaultDescription
dimsCountintThe number of dimensions (properties) of a path data point
movingAverageWindowSizeint<optional>15Window size of the smoothing filter.Default value is suitable for input on 60Hz.If the input is for example 120Hz, set movingAverageWindowSize to 30.

process(input, typeopt, lastSegmentopt)

Invokes input processing of particular implementation

Parameters:
NameTypeAttributesDefaultDescription
inputPathBuilding.Pipeline.InputNewly added stroke data that must be processed
typePathBuilding.Pipeline.SegmentType<optional>DataSequenceProcessor.SegmentType.INTEGRALInput type
lastSegmentboolean<optional>trueApplicable for SegmentType.ADDITION only, describe end of the input

Overrides:

reset()

Resets the processor to its initial state

Overrides:

Type Definitions

Input

Smoother input type

Type:
  • Array.<float>

Output

Smoother output type

Type:
  • Array.<float>

PipelineStage

Type:
Properties:
NameTypeAttributesDefaultDescription
indexint<optional>2
previousPathBuilding.Pipeline.PathProducer
nextPathBuilding.Pipeline.SplineProducer

Home