滑动中值滤波边界问题

From Wikipedia, to handle missing window entries at the boundaries of the signal, there are some schemes that have different properties that might be preferred in particular circumstances:

  • The first value is repeated, as with the last value, to obtain enough entries to fill the window.
  • Avoid processing the boundaries, with or without cropping the signal boundaries afterwards.
  • Shrinking the window near the boundaries, so that every window is full.
  • Fetching entries from other places in the signal.
---------- 文结至此 静待下章 ----------