Is there a name for the following type of filter?
I want to filter a noisy signal $f(x) = f_0(x) + noise(x)$ (where $f_0$ is a noiseless signal), to get a filtered signal $f_\text{F}(x)$ while preserving edges and first derivatives. If all I wanted to do was to preserve edges, I could use a median filter, but if there is a wedge in the signal (the derivative of $f_0$ changes discontinuously from a positive value to a negative value or vice versa), the median filter is going to flatten out that wedge close to the wedge point.
But all the median filter does, effectively, is to fit a constant function $g_x(x')$ by minimizing the mean absolute error between $g_x(x')$ and $f(x')$ for all $x'$ in a small window around $x$ and use $f_\text{F}(x) = g_x(x)$, and the reason why it doesn't preserve first order derivatives close to edges is because it fits a zeroth order polynomial. If $g_x$ could instead be any first-order polynomial, I wouldn't have the median filter anymore, but the filter I would have would then be able to preserve first order derivatives close to edges. And if $g_x$ was an $n$th order polynomial, I presume I would be able to preserve $n$th order derivatives close to edges. I know that the Savitzky–Golay filter and the generalization moving least squares do essentially this, only that they minimize the mean squared error instead of the mean absolute error instead of the mean absolute error.
So, is there some variant of the Savitzky–Golay filter or of moving least squares that minimizes the mean absolute error, the Huber loss, or some other loss function with bounded derivative? I know that I can just define such a filter myself, but I'm looking for a name for such a filter, so that I can read more about it and also reference it.
Edit: this question was closed because it “needs details or clarity.” So I’m asking the people who might want to close it for that reason, or who voted to close it for that reason (so I can improve the question): What details is it that you think are missing? In which way should the question be clarified?