Edge detection gives different results on different Systems

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
AndreasP
Posts: 3
Joined: 2014-07-17T02:00:12-07:00
Authentication code: 6789

Edge detection gives different results on different Systems

Post by AndreasP » 2014-07-17T02:24:03-07:00

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

Werty
Posts: 68
Joined: 2010-08-06T05:37:36-07:00
Authentication code: 8675308

Re: Edge detection gives different results on different Syst

Post by Werty » 2014-07-17T02:34:09-07:00

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
Windows 7 user

User avatar
fmw42
Posts: 25664
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Edge detection gives different results on different Syst

Post by fmw42 » 2014-07-17T10:03:51-07:00

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

AndreasP
Posts: 3
Joined: 2014-07-17T02:00:12-07:00
Authentication code: 6789

Re: Edge detection gives different results on different Syst

Post by AndreasP » 2014-07-18T01:22:23-07:00

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?

User avatar
fmw42
Posts: 25664
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Edge detection gives different results on different Syst

Post by fmw42 » 2014-07-18T09:45:07-07:00

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

AndreasP
Posts: 3
Joined: 2014-07-17T02:00:12-07:00
Authentication code: 6789

Re: Edge detection gives different results on different Syst

Post by AndreasP » 2014-07-20T23:06:43-07:00

OK, thank You.

Post Reply