public class OffsetCorrectionFilter extends AbstractFilter
sampleSize, source| Constructor and Description |
|---|
OffsetCorrectionFilter(SampleProvider source)
Constructor for the offset correction filter using default parameters.
|
OffsetCorrectionFilter(SampleProvider source,
float[] reference)
Constructor for the offset correction filter using default window of 200
samples.
|
OffsetCorrectionFilter(SampleProvider source,
float[] reference,
int bufferSize)
Constructor for the offset correction filter.
Constructor |
| Modifier and Type | Method and Description |
|---|---|
void |
fetchSample(float[] sample,
int offset)
Fetches a sample from a sensor or filter.
|
float[] |
getMean()
Returns the mean sample value
|
float[] |
getStandardDeviation()
Returns the standard deviation from the mean sample value
|
void |
reset()
Resets the filter
|
sampleSizepublic OffsetCorrectionFilter(SampleProvider source)
source - source for samplepublic OffsetCorrectionFilter(SampleProvider source, float[] reference)
source - source for samplereference - An array with reference values. The array length should match the
sample size.public OffsetCorrectionFilter(SampleProvider source, float[] reference, int bufferSize)
source - Source for samplereference - An array with reference values. The array length should match the
sample size.bufferSize - Number of samples to use for calculating offset errorpublic void fetchSample(float[] sample,
int offset)
SampleProviderfetchSample in interface SampleProviderfetchSample in class AbstractFiltersample - The array to store the sample in.offset - The elements of the sample are stored in the array starting at the offset position.public void reset()
public float[] getMean()
public float[] getStandardDeviation()