Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

medianFilter1D returns same array of sensor readings if len < windowSize #1

Open
dcyoung opened this issue Jun 12, 2017 · 0 comments
Open
Labels

Comments

@dcyoung
Copy link

dcyoung commented Jun 12, 2017

The method Processing.Filtering.medianFilter1D() method returns the same array of sensor readings if the array is smaller than the filter window:

if (len < k)
    return sensorReadings;

This is an edge case, but the method is supposed to return a new array of filtered values regardless. If the user's code expects to be able to augment the returned values without disrupting the original array, this could prove problematic. Method should return a newly created or deep copied array instead.

@dcyoung dcyoung added the bug label Jun 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant