Canny edge detection with Alpha

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
xpda
Posts: 5
Joined: 2015-05-22T14:19:16-07:00
Authentication code: 6789
Location: Pryor, OK

Canny edge detection with Alpha

Post 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.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Canny edge detection with Alpha

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Canny edge detection with Alpha

Post 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.
xpda
Posts: 5
Joined: 2015-05-22T14:19:16-07:00
Authentication code: 6789
Location: Pryor, OK

Re: Canny edge detection with Alpha

Post by xpda »

Thank you!!!
Post Reply