Skip to content

happybono/CSRunningMedianSample

Repository files navigation

CSRunningMedianSample

This sample implements a 5-point running median filter for numeric data entered into a WinForms ListBox.

The AllMedian method applies the filter across every position by mirroring indices at the boundaries, while the MiddleMedian method preserves the first and last two values and only filters the central section.

For each window, values are copied into a temporary array, sorted via a recursive Quicksort routine, and the third element (the median) is selected. Users add source data via the Add button and trigger filtering with the Calculate button, after which results appear in a separate ListBox. Internal data lists are cleared after each run to guarantee consistent behavior on subsequent executions. A simple UI makes it easy to visualize the smoothing effect in real time.

Disclaimer : This implementation uses a plain (equal-weight) median filter. For weighted-median calculations and a wider range of smoothing / correction methods, please refer to the SonataSmooth project.

What's New

Click to Expand

v1.0

February 20, 2022

Initial release.

Features

  • To calibrate and convert original data using the running median method, click on the [Calculate] button.
  • Correcting for outliers in a running median.

Principle Demonstration

Data Calibration Demo Using the Running Median Method.

Known Issues

  • Results may not be accurate when you use less than the 5 numeric data samples.

Copyright

Copyright ⓒ HappyBono 2022 - 2025. All rights Reserved.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Releases

No releases published

Packages

No packages published

Languages