4 ms·
Median filtering with large kernel can be pretty ugly as it gives pixels who are far away the same weight. I prefer weighting them (for example with a gaussian)
by ttoinou 2y ago
Median filtering with large kernel can be pretty ugly as it gives pixels who are far away the same weight. I prefer weighting them (for example with a gaussian) and using a weighted histogram, use the weighted median value (interpolated between two values). It gives a result even more interesting (for some uses) than a simple gaussian blur and you can also configure the weights to make it edge preserving like a bilateral blur but better
There is also no way to split up the median computation
What does this mean here ? Seems like we could have a rolling window by adding and subtracting pixels on the way. I’ve coded this before, although it’s not O(1) like the algorithm described at the end
- anonymoushn 2y agoFor example if you are using an "ordinary" kernel where there is some sliding window of nonzero weights contributing to the output value, you can compute the two dimensions in separate passes.
- eru 2y agoYou could combine the benefits of a median with the benefits of an average. Eg you could kick out the top and bottom quartile, and take the average of what's left.