Median Filtering on C#