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:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
dimsCount | int | The number of dimensions (properties) of a path data point | ||
movingAverageWindowSize | int | <optional> | 15 | Window 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:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
input | PathBuilding.Pipeline.Input | Newly added stroke data that must be processed | ||
type | PathBuilding.Pipeline.SegmentType | <optional> | DataSequenceProcessor.SegmentType.INTEGRAL | Input type |
lastSegment | boolean | <optional> | true | Applicable 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:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
index | int | <optional> | 2 | |
previous | PathBuilding.Pipeline.PathProducer | |||
next | PathBuilding.Pipeline.SplineProducer |