Author:Francois Richard

University of Ottawa - Earth Sciences

richard at science.uottawa.caHistory:2001/05/03: First version

2006/07/11: Works with macros

2006/08/08: Works with batch mode macros

2007/02/09: Works with non-rectangular selections

Source:Moment_Calculator.java Installation:Copy Moment_Calculator.class to the plugins folder and restart ImageJ. Description:This plug-in computes spatial moments up to the 4th order for the selected (rectangular) ROI, along with some parameters derived from them. Results are displayed in the main ImageJ window, in addition to those set for ImageJ's Measure command 'Analyze|Set Measurements To export to a text file, use 'File|Save As|Measurements'. or right-click on the table and select 'Save As' Note that spatial moments are a very simple and powerful way to describe the spatial distribution of values, provided they have a sufficiently strong central tendency, that is, a tendency to cluster around some particular value. This implies that "background" pixel values (e.g. zones where the quantity of interest, such as concentration, is zero), are small. Conversely, zones of high concentration (density, etc.) should also have a high pixel values. This can lead to meaningless results, for example, in the case of uncalibrated images, where (white) background pixels are equal to 255 (for an 8-bit greyscale image).

** Interpretation of spatial moments ** * order 0 = TOTAL MASS [units: concentration, density, etc.] * order 1 = location of CENTRE OF MASS in x and y from 0,0 [units: L] * order 2 = VARIANCE around centroid in x and y [units: L^2] * order 3 = coeff. of SKEWNESS (symmetry) in x and y [units: n/a] --> =0 : SYMMETRIC distribution --> <0 : Distribution asymmetric to the LEFT (tail extends left of centre of mass) --> >0 : Distribution asymmetric to the RIGHT (tail extends right of centre of mass) * order 4 = KURTOSIS (flatness) in x and y [units: n/a] --> =0 : Gaussian (NORMAL) distribution --> <0 : Distribution FLATTER than normal --> >0 : Distribution MORE PEAKED than normal --> <-1.2: BIMODAL (or multimodal) distribution ** Parameters derived from 2nd moments ** (from Awcock (1995) "Applied Image Processing") * ELONGATION (ECCENTRICITY) = Ratio of longest to shortest distance vectors rom the object's centroid to its boundaries * ORIENTATION = For elongated objects, describes the orientation (in degrees) of the "long" direction with respect to horizontal (x axis)See Also:Analyze/Set Measurementsdialog in ImageJ 1.34l or later, which has "Skewness" and "Kurtosis" check boxes.