Login  Register

Re: binary texture

Posted by Robert Dougherty on Aug 31, 2005; 1:13am
URL: http://imagej.273.s1.nabble.com/Re-automated-process-tp3704941p3704945.html

Martin,

Here is something totally made up.  It is supposed to give the relative
change in the mean when the Process/Filters/Maximum... filter is applied
with a radius of 0.5 pixel.  Experiments show some interesting properties.
It gives 4/L for collections of particles that all squares of side L pixels.
Lines of thickness T give approximately 2/T. (This is difficult to
demonstrate for diagonal lines with T > 1 because of ambiguities about
jaggies.  ImageJ seems to make diagonal lines that are too fat.  Rotating
horizontal lines and choosing the threshold to minimize the result gives the
expected macro output, but then the line looks too thin....) The macro
produces numbers that are usually in the range of .4 to .47 for subsets of
the particles.gif example.  Running Erode once on the whole image increases
the result from .4357 to .5104.

Bob

run("Set Measurements...", "  mean redirect=None decimal=4");
run("Measure");
mean1 = getResult("Mean", nResults-1);
run("Duplicate...", "title=temp");
run("Maximum...", "radius=.5");
run("Measure");
close();
mean2 = getResult("Mean", nResults-1);
if(mean1 == 0){
      print(0);
}else{
      percentChange = (mean2 - mean1)/mean1;
      print(percentChange);
}



Robert P. Dougherty, Ph.D.
President, OptiNav, Inc.
Phone (425) 467-1118
Fax (425) 467-1119
www.optinav.com
 

> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> Martin du Saire
> Sent: Tuesday, August 30, 2005 2:12 PM
> To: [hidden email]
> Subject: binary texture
>
> Hi,
>
> I am looking for a method for measuring the granularity or clumpiness of a
> binary image.  What I have come across so far (fractal dimension and
> lacunarity, textual entropy, angular moments, inverse difference
> moments...) but they all seem geared to grayscale, and computationally
> expensive.  I will essentially be working with images like the
> Particles.gif sample image ported with ImageJ.
>
> Thanks for any suggestions
>
> Martin