It would be nice if the "smooth" node (Sign in to GitHub · GitHub) was supporting a window based median filter.
The approach would be, that for each window, something like the following statements would be excecuted
function median(inputArray) {
const sortedInputArray = inputArray.slice().sort((a, b) => a - b);
const middleIndex = Math.floor(sortedInputArray.length / 2);if (sortedInputArray.length % 2 === 0) { return (sortedInputArray[middleIndex - 1] + sortedInputArray[middleIndex]) / 2; } return sortedInputArray[middleIndex];
}