applying the bit mask after the rolling average filter using exclusive
or