Fix deprecation of canny function

Closes #1205