using a sobel operator - edge detection
Posted: 2009-08-14T06:10:25-07:00
Hi
I am trying to implement an edge detection by analysing fred's excellent gradient script, but something seems to be missing:
Here is something that should work like a horizontal sobel:
But only one one half of the circle shows up.
I think imagemagick might be ignoring the abs(u)?
Or am I misunderstanding how this operator is supposed to work?
By the way, what sort of operator does the -edge switch use? is (-edge 1) plus (-negate -edge1) the same as a sobel or prewit operator?
I am trying to implement an edge detection by analysing fred's excellent gradient script, but something seems to be missing:
Here is something that should work like a horizontal sobel:
Code: Select all
convert -size 50x50 xc:black -fill white -draw "circle 25,25 20,10" \
-convolve "-1,0,1,-2,0,2,-1,0,1" -fx "abs(u)" test.png
But only one one half of the circle shows up.
I think imagemagick might be ignoring the abs(u)?
Or am I misunderstanding how this operator is supposed to work?
By the way, what sort of operator does the -edge switch use? is (-edge 1) plus (-negate -edge1) the same as a sobel or prewit operator?