Login  Register

Applying autothreshold in java PlugInFilter

Posted by Gebhard Stopper on Mar 29, 2016; 2:07pm
URL: http://imagej.273.s1.nabble.com/Applying-autothreshold-in-java-PlugInFilter-tp5016020.html

Hi,

I'm currently working on a small plug-in (a PlugInFilter to be more speciffic) , in which the first step of processing needs to be a thresholding operation.
In my run() method I try to do the following:

ip.setAutoThreshold(AutoThresholder.Method.Shanbhag, false, ImageProcessor.BLACK_AND_WHITE_LUT);
ip.autoThreshold();


This indeed produces a binary image. However, the output seems to be the same, no matter which method I use and it is far from what I get, when i apply the same method using the menu (Image->Adjust->Auto Treshold)

Is this the right way to do this kind of thing, or is there a better way to do this?



Thanks,
Gebhard