Trainable Weka segmentation - Gaussian blur radius settings incorrect?

Hi, applying a gaussian blur through the Process menu to an image like this ImageJ macro:

run("Clown");
run("32-bit");
run("Gaussian Blur...", "sigma=2");

gives a different image to that produced by the Trainable Weka segmentation plugin in its feature stack:

run("Clown");
run("32-bit");
run("Trainable Weka Segmentation");
selectWindow("Trainable Weka Segmentation v3.2.34");
call("trainableSegmentation.Weka_Segmentation.setFeature", "Sobel_filter=false");
call("trainableSegmentation.Weka_Segmentation.setFeature", "Hessian=false");
call("trainableSegmentation.Weka_Segmentation.setFeature", "Difference_of_gaussians=false");
call("trainableSegmentation.Weka_Segmentation.setFeature", "Membrane_projections=false");
call("trainableSegmentation.Weka_Segmentation.setMinimumSigma", "2.0");
call("trainableSegmentation.Weka_Segmentation.setMaximumSigma", "4.0");
// Note: the setMaximumSigma does not set if it is set to the same value as setMinimumSigma
call("trainableSegmentation.Weka_Segmentation.trainClassifier");
call("trainableSegmentation.Weka_Segmentation.saveFeatureStack", "YOUR DESTINATION FOLDER", "feature-stack.tif");

If you compare the Process menu-generated image to the TWS-generated image in the feature stack (Gaussian_blur_2.0), you will notice that they are different: the TWS implementation seems to use a smaller radius.

Am I doing something incorrect? I am using Fiji with ImageJ 1.53h on MacOS 10.15.7.

Thanks for any help.

Hi @Guy ,

yes, you are right, TWS uses a smaller sigma and you can see this also in the code, sigma is multiplied with 0.4:

Maybe @iarganda can tell us the story behind. I’m also curious :slightly_smiling_face:

Cheers,
Robert

Ah, that explains it. It looks the same for some of the other filters, too.