Updating bilateral filter for python2