Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Difference of gaussians filter different when applying with script?
I am currently trying to automize a flow to detect drawn graphite lines on paper. I decided to use edge detection for the job, and after alot of experimentation, i found that Edge detection -> difference of gaussians, with radius1 = 4.872, and radius2=0.533 was just perfect. 

The gimp procedural database contains a difference of gaussians (dog) plugin: plug-in-dog(image,drawable,inner,outer,normalize,invert)

Already here we can some differences: no longer are the parameters simply "radius1" and "radius2", but specifically "inner" and "outer". Also, the "normalize" bool-option is nowhere to be found when applying the filter directly from gimp.

More importantly though, this plug-in simply gives different results! And quite alot worse too unfortunately. Not good enough for what i'm trying to do atleast.

Why would the script in the procedural database be different? Does this have anything to do with the shift to GEGL in 2.10 (I don't actually fully understand what that means, other than it having something to do with the ways graphics are dealth with, and most likely being better). 

Is there any way i can acess the filter actually used by gimp?

Have a nice day!
In 2.10, there are two DoG functions, one is the new GEGL tool that you used, and the other one, labelled (legacy)is the one from 2.8. Unfortunately, there is currently no API to call most GEGL tools, and the DoG API you see is just calling the legacy version.

Note that the DoG is what its name implies:

* make two copies of the layer
* apply a blur or Radius 1 to one of them
* apply a blur or Radius 2 to the other
* set top layer to Difference mode
* merge down and normalize the result

So you should be able to roll your own.
Thanks a ton! Especially for the rundown of DoG

Forum Jump: