Page 1 of 1

Canny edge detection with Alpha

Posted: 2015-05-22T14:37:41-07:00
by xpda
Canny Edge detection doesn't seem to work properly when the image has an alpha channel, either from memory or a file.

I'm a new user, so this could may be my fault, or maybe a mental problem. Here are a couple of files that work and don't work for me, both on the ImageMagic command line and the Magick.net wrapper:

http://xpda.com/canny.jpg

http://xpda.com/canny.png

Invalid results: convert canny.png -canny 0x1+10%+30% tmp.png

Sometimes it repeats half the image horizontally, sometimes it's not recognizable.

Re: Canny edge detection with Alpha

Posted: 2015-05-22T14:58:38-07:00
by dlemstra
I can reproduce the problem and there does seem to be an issue with the alpha channel. The problem is gone when I add -alpha off after canny.png is read. I will take a look at it this weekend.

Re: Canny edge detection with Alpha

Posted: 2015-05-22T16:39:17-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick 6.9.1-3 Beta, available by sometime tomorrow. Thanks.

Re: Canny edge detection with Alpha

Posted: 2015-05-22T17:40:19-07:00
by xpda
Thank you!!!