Color Threshold and getThreshold()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Color Threshold and getThreshold()

Thomas Binder
Hello

I use Color Threshold on my Pictures

When I set Threshold with

run("Color Threshold..."); in HSB Color Space
and press "Select"

then

getThreshold(min,max);

  reports -1 and -1

But when after having set the threshold via Color Threshold,

I do convert to HSB stack and

then run

getThreshold(min,max);

the values I had set with Color threshold previously are available!

how to convince Color Threshold to report the settings, so that I do not
have to convert the image to
HSB stack and then back again to RGB, only for getting the threshold limits?

thanks to all helping me

Thomas Binder

--
Dr. med. Thomas Binder
Buchenlandweg 211
89075 Ulm
Tel.: 0731 26 69 59
Tel.: 0171 12 16 755 (mobil)
Fax:  +49 731 7051543
Reply | Threaded
Open this post in threaded view
|

Re: Color Threshold and getThreshold()

Gabriel Landini
On Sunday 01 Apr 2012 09:48:42 you wrote:
> run("Color Threshold..."); in HSB Color Space
> and press "Select"
> then
> getThreshold(min,max);
>   reports -1 and -1

The getThreshold() function is for greyscale images or stacks, not for the
colour threshold plugin in IJ.
There is a macro button that generates the thresholding code for colour images
if you need those values. This is not an autothreshold plugin for colour
images, it just happens that when one runs the plugin, the brightness channel
in the HSB space is autothresholded.

Why do you get the values after conversion to stack: If you look at the
default settings in the panel, it starts by thresholding the brightness
channel (and does not touch the hue or saturation). So if the image is
converted to a stack those were the values set in the brightness channel.
Once you start using the sliders you have 3 sets of min and max thresholds (a
pair per channel) and that function does not return what you expect.

Hope this explains it.
Regards,

Gabriel