FILTER CONTROLS: Median Filter: The median filter is an LxL kernel where L = 1 + 2 * N. So if N=1, then L=3 and the median filter is a 3x3 kernel. Trend Filter: A trend filter fits an M x N plane centered at each pixel in the mat5 scan. The plane is fit to the Z coordinates that have quality above the threshold. The center pixel Z value is replaced by the Z coordinate of the center pixel of the plane. The size of the plane is M = 1 + 2 * vert and N = 1 + 2 * horiz. If "parameter" is 2, instead of 1, then a parabolic surface instead of a flat plane will be fit to the surface in question. The virtue of trend filtering is that it is non-linear and preserves some details almost completely while smoothing high frequency noise and such. In another sense, it is a numerically efficient approximation to a "moving least squares" filter.