huge speedup in non local mean (17 sec to 10sec on a particular dataset)