GrayMorphology

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

GrayMorphology

Dimiter Prodanov
Dear All,
I would like to announce an updated version of the GrayMorphology plugin.
It can be found at:

http://rsb.info.nih.gov/ij/plugins/gray-morphology.html

There are signigicant improvements in the performance of the morphologic
operations. New features:
  -- "fast" versions of the erosion, dilation,
opening and closing operations based on local histograms. Also the
van Herk/Gil-Werman (vHGW)
algorithm for linear SEs was implemented (it is really fast).
  -- Processing of stacks is now enabled
  -- The plugin can handle arbitrary ROIs


best regards

Dimiter
Reply | Threaded
Open this post in threaded view
|

Re: GrayMorphology

Gabriel Landini
On Tuesday 06 June 2006 18:07, Dimiter Prodanov wrote:
> I would like to announce an updated version of the GrayMorphology plugin.

Thanks, very useful.

How does one create a free form SE? If I choose free form I get
java.lang.NullPointerException
        at mmorpho.StructureElement.calcVect(StructureElement.java:467)
        at mmorpho.StructureElement.<init>(StructureElement.java:121)
        at GrayMorphology_.run(GrayMorphology_.java:212)
        at ij.IJ.runFilterPlugIn(IJ.java:196)
        at ij.IJ.runUserPlugIn(IJ.java:264)
        at ij.IJ.runPlugIn(IJ.java:116)
        at ij.Executer.runCommand(Executer.java:95)
        at ij.Executer.run(Executer.java:46)
        at java.lang.Thread.run(Thread.java:619)

Also I get a bit slower processing with the "fast erode" than with "erode". Is
that OK or just the name of the algorithm has been swapped?

t=getTime();
run("Gray Morphology", "radius=10 type=circle operator=erode");
print (getTime-t);
run("Undo");
t=getTime();
run("Gray Morphology", "radius=10 type=circle operator=[fast erode]");
print (getTime-t);
run("Undo");
t=getTime();
run("Minimum...", "radius=10");
print (getTime-t);
run("Undo");

Runing the above macro with the 512x512 lena image produces:

1885
2657
2005

Any ideas?
Cheers,

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: GrayMorphology

Dimiter Prodanov
In reply to this post by Dimiter Prodanov
Dear Gabriel,

Fro the free-form SE - this is a bug. I'll look into it. In principle
it is space delimited
each line ends with the  system newline character: \r\n - MS Win or
\n - UNIX like OS
As for the performance, the fast operations are fast only with large SEs:

>See what the macro does with my favourite blobs image (256 x 254):
>
>Benchmarks Gray Morphology plugin
>Gray Morphology erode r=5 t=991
>Gray Morphology fast erode r=5 t=3365
>Minimum  filter r=5 t=421
>
>Gray Morphology erode r=10 t=3615
>Gray Morphology fast erode r=10 t=4286
>Minimum  filter r=10 t=3625
>
>Gray Morphology erode r=15 t=7691
>Gray Morphology fast erode r=15 t=4877
>Minimum  filter r=15 t=6169
>
>Gray Morphology erode r=20 t=8643
>Gray Morphology fast erode r=20 t=2994
>Minimum  filter r=20 t=7491
>
>Gray Morphology erode r=25 t=8993
>Gray Morphology fast erode r=25 t=3365
>Minimum  filter r=25 t=13539
>
>Gray Morphology erode r=30 t=25427
>Gray Morphology fast erode r=30 t=3695
>Minimum  filter r=30 t=17715
>
>Cheers
>
>Dimiter
Reply | Threaded
Open this post in threaded view
|

Re: GrayMorphology

Gabriel Landini
Hi Dimiter,

> Fro the free-form SE - this is a bug. I'll look into it. In principle
> it is space delimited
> each line ends with the  system newline character: \r\n - MS Win or
> \n - UNIX like OS

Ok, when I choose free form, there is no further dialog opening for
inserting/typing the kernel (I suppose that this is what it does?)

> As for the performance, the fast operations are fast only with large SEs:

I see, thanks for the clarification. This may be useful to add to the plugin
description.

Cheers,

Gabriel