Hi, I am processing a signal that has two values, i.e. "on" and "off". In its raw form the signal has lots of "flicker"; short sections of "on" between periods of "off"
example_signal = [1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 0 1 1 1 1 1]
I want to filter out the flicker – changing short sequences of less than 4 1s to 0. So the the processed signal would look like this:
processed_signal = [1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1]
Any help would be very appreciated!
Best Answer