Page 1 of 1

Edge detection gives different results on different Systems

Posted: 2014-07-17T02:24:03-07:00
by AndreasP
Hallo,
I'm new with Image Magick, but there is a big Problem on the start.
There is something wrong an my developing-MAC, I can't detect.
I wont to detect the Edges of the car, so the MAC-Result is what I need but didn't get.

Developing Machine:
MAC 10.3, ImageMagick 6.8.5, im4java 1.4

Testing Machines:
Win7-PC, ImageMagic 6.8.9, im4java 1.4
Ubuntu, ImageMagic 6.7.7, im4java 1.4
Ubuntu, ImageMagic 6.8.5, im4java 1.4
Ubuntu, ImageMagic 6.8.9, im4java 1.4

Both: Result of "edge(7)" on the same 5472x3648 Image (jpg from a DSLR)
Lokal = Developing Machine (MAC)
Server = Testing Machines (Ubuntu and Wi7)
Image
from this picture
Image
Original http://pictures.carpresenter.de/test/s1_r10.jpg

Re: Edge detection gives different results on different Syst

Posted: 2014-07-17T02:34:09-07:00
by Werty
How funny (or not), I was just testing "edge" yesterday and got the same weird results, I guessed it was normal and that it was just my source image not being a good image for edging, but seeing you can get good results with Mac I'll wait and hear what the experts have to say.

nevertheless, I'm getting same (bad) result on Win7 with IM 6.8.8 Q8 x86

I was about to upgrade to 6.8.9 because of the new "Canny" edge detector, since "edge" didnt get good result, but I'll wait out a bit, as I cant find a compiled Q8 version, only Q16 :p

Re: Edge detection gives different results on different Syst

Posted: 2014-07-17T10:03:51-07:00
by fmw42
I believe that this is the correct result. I get something similar. -edge is a noisy edge detector for large edge amounts. Since your background is not constant, you will get edges from any 1 graylevel change over the width of the edge you are requesting. It is made more colorful, since you are processing a color image rather than convert to grayscale first.

Rather than something like

Code: Select all

convert s1_r10_small.png -edge 7 -negate result
try something like

Code: Select all

convert s1_r10_small.png -morphology edge octagon:3 -negate result

Re: Edge detection gives different results on different Syst

Posted: 2014-07-18T01:22:23-07:00
by AndreasP
Thank You very much.
It seems that the -morphology.... fit my need (after some further testing)...
But ... can anybody explain the "error" on the MAC-Installation?

Re: Edge detection gives different results on different Syst

Posted: 2014-07-18T09:45:07-07:00
by fmw42
The -edge function has changed several times over a large number of release due to bugs and changes in the base blur function that is used by it.

see for example

viewtopic.php?f=3&t=23274&p=97751&hilit=edge#p97751
viewtopic.php?f=3&t=22650&p=94538&hilit=edge#p94538
viewtopic.php?f=3&t=21584&p=88446&hilit=edge#p88446

Re: Edge detection gives different results on different Syst

Posted: 2014-07-20T23:06:43-07:00
by AndreasP
OK, thank You.