Login  Register

Re: macro help please

Posted by Gabriel Landini on Jan 01, 2010; 6:59pm
URL: http://imagej.273.s1.nabble.com/macro-help-please-tp3689867p3689879.html

On Friday 01 January 2010, you wrote:

> After running the macro on a folder with the three files (attached in
> order below):
>
> File 11.jpg      has the sky selected as red, not the foliage; area
> results wrong
> File 61.jpg      appears to be OK with the foliage selected as red and
> the analysis result looking reasonable
> File 1933.jpg  has the sky selected as red, not the foliage; area
> results wrong
>
> i don't understand what's going on.  Is there something possibly
> different with file 11.jpg and 1933.jpg vs. 61.jpg?  How would I
> figure out what it is?

Yes, I get the same results here. There might be some problem, with the
"Default" method while running from a macro. Calling the threshold adjuster
and using the Default method seems to find the right phase but not when
running from the macro.

If you install the Auto_Threshold plugin (which has some extra settings) and
change in your macro:

setAutoThreshold();
for
run("Auto Threshold", "method=Default setthreshold show");

Then the phases seem to be detected properly.
The plugin (and some documentation) is here:
http://www.dentistry.bham.ac.uk/landinig/software/autothreshold/autothreshold.html

Happy 2010 to all

G.