Fix deprecation of canny function
Merge pull request #1206 from tonysyu/fix/canny-deprecation

Fix deprecation of canny function