GNOME Bugzilla – Bug 98326
Edge detection plug-in should have more edge detection algorithms
Last modified: 2004-12-22 21:47:04 UTC
Bah! Another bug - bugzilla should reject bugs with no comments. Basically, several edge detection algorithms (Prewitt, Roberts, linear differential, Laplacian, gradient and Sobel at least) have already been implemented in plug-ins that are either distributed with the GIMP or are available in the registry. I think it's reasonable to bring these all into the default edge detector plug-in and have a check-box to allow people to choose whichever one they like. The default could stay Sobel (as it is now), but the others should be available. Since the algorithms are already coded, this would be a fairly trivial improvement. Cheers, Dave.
Created attachment 12257 [details] Plug-in by iccii which includes code for all those edge detection algorithms
Changes at the request of Dave Neary on the developer mailing list. I am changing many of the bugzilla reports that have not specified a target milestone to Future milestone. Hope that is acceptable.
Actually, since there's code attached to this one, I'm fairly confident that someone will implement this before the freeze. It's on my TODO list personally, but if someone else wants to do it, I'd be more than happy to let them. Moving milestone to 1.3.x. Dave.
I'll do this. Dave.
This has gone well, but there's a big I can't figure out - no doubt I'm doing something stupid, but I can't see it right now (I will probably spot it after sending this) - anyway, in case I don't fix this, I'm attaching the diff so that it doesn't get lost. If anyone wants to have a look and see why every algorithm except Sobel behaves incorrectly at tile edges, you're welcome. Cheers, Dave.
Created attachment 18731 [details] [review] Patch to edge.c which uses various convolution kernels from iccii's plug-in
Fixed. Silly. Had to be uninitialised data. It was in code I inherited - data unused by the Sobel kernel was never initialised. Dave.
Fixed in CVS. Perhaps we should remove Laplace since it's in another menu entry. The Sobel plug-in behaves differently (it edge detects alpha too), so it should probably stay. 2003-07-29 Dave Neary <bolsh@gimp.org> * plug-ins/common/edge.c: Added several new edge detection algorithms. There are more complicated ways these could be done (using the rotations of the kernels in the plug-in) but this is a nice mix between speed and complexity. The algorithms, heavily modified, come from iccii's thin_line plug-in.