The camera already includes a local and a temporal filter for precisely this purpose. They can be parameterized to meet the requirements of the application.