Add filter to threshold an image