Fix bilateral filtering