Analyzeparticles: Difference between revisions
imported>Donal |
imported>Donal |
||
Line 46: | Line 46: | ||
* '''display''': [ 'off' | {'on'} ], governs level of display to command window, | * '''display''': [ 'off' | {'on'} ], governs level of display to command window, | ||
* '''plots''' [ 'none' | {'final'} ], governs level of plotting, | * '''plots''' [ 'none' | {'final'} ], governs level of plotting, | ||
* ''' | * '''reversemask''': [ {'off'} | 'on'] reverse the particle binary mask? | ||
* '''apply_abs''': [ {'off'} | 'on' ] apply absolute value to data initially? | |||
* ''' | |||
* '''includeholes''': [ 'off' | {'on'} ], holes within particles are included?, | * '''includeholes''': [ 'off' | {'on'} ], holes within particles are included?, | ||
Line 63: | Line 58: | ||
* '''thresholdslab''': Index of dataset slab to use for creating binary image. Default = []. | * '''thresholdslab''': Index of dataset slab to use for creating binary image. Default = []. | ||
* '''thresholdvalue''': Value to use as threshold when creating binary image. | * '''thresholdvalue''': Value to use as threshold when creating binary image. | ||
* ''' | * '''particleminmax''': [ {'off'} | 'on' ] measure particle min and max values. | ||
* ''' | * '''particlemedian''': [ {'off'} | 'on' ] measure particle median value. | ||
* '''particlestddev''': [ {'off'} | 'on' ] measure particle standard deviation value. | |||
* '''particleperimeter''': [ {'off'} | 'on' ] measure length of particle perimeter (pixels). | |||
* '''particleferet''': [ {'off'} | 'on' ] measure Feret diameters of particle (pixels). | |||
===Algorithm=== | ===Algorithm=== |
Revision as of 21:57, 7 February 2011
Purpose
ANALYZEPARTCLES Identify particles (blobs, connected regions), and their properties, in an image dataset.
Synopsis
- [x model] = analyzeparticles(x, options);
- [x model] = analyzeparticles(x);
- [x model] = analyzeparticles(x, model);
Description
The particle analysis functionality is used to automatically identify particle-like areas in an image and to return information about the identified particles’ characteristics such as their area, shape and pixel values. A particle is considered to be an isolated contiguous region of pixels within the image which have similar intensity values or color values. Particles are also known as “connected regions” or “blobs”.
Our image analysis software can analyze Particles in images using either the “analyzeparticles” Matlab function or the “Particle Analysis” GUI, which is a graphical interface to that function. The analyzeparticles function itself is implemented using the ImageJ image analysis package (http://rsb.info.nih.gov/ij/) which is included with our software. Analyzeparticles integrates the ImageJ “Analyze Particles” feature into our software so it can be conveniently used with the Eigenvector dataset object and the other MIA/PLS_Toolbox tools.
Inputs
- x = image dataset object with one or more slabs,
- model = previously generated model of type 'ANALYZEPARTICLES' (when applying model to new data).
Outputs
- model = a standard model structure model with the following fields (see MODELSTRUCT):
- modeltype: 'ANALYZEPARTICLES',
- datasource: structure array with information about input data,
- date: date of creation,
- time: time of creation,
- info: additional model information,
- particletable: A dataset containing the requested particle properties,
- Rows are particles,
- Columns represent properties, identified by particletable.label{2}.
- allparticles: a vector with one entry per pixel, value = 0 if pixel is not a particle pixel, 1 otherwise.
- particles: a vector with one entry per pixel, value = j, where j = 0, 1, ...n if pixel is part of particle number j.
- foreground: a vector with one entry per pixel, value = 0 or 255, showing the binary image representing all possible particle pixels.
- detail: sub-structure with additional model details and results, including:
- model.detail.thresholdValue: the threshold value used in forming the binary image,
- model.detail.height: height of the image (in pixels),
- model.detail.width: width of the image (in pixels),
- model.detail.nparticles: number of identified particles,
- model.detail.ij: contains the Java evri.ij.plugin.ParticlesAnalyzer object.
Options
options = a structure array with the following fields:
- display: [ 'off' | {'on'} ], governs level of display to command window,
- plots [ 'none' | {'final'} ], governs level of plotting,
- reversemask: [ {'off'} | 'on'] reverse the particle binary mask?
- apply_abs: [ {'off'} | 'on' ] apply absolute value to data initially?
- includeholes: [ 'off' | {'on'} ], holes within particles are included?,
- includeedgeparticles: [ {'off'} | 'on' ], include particles intersecting the image's edge?,
- minsize: Lower limit to particle area. Default is 50 pixels.
- maxsize: Upper limit to particle area. Default is infinite.
- mincircularity: Lower limit to particle circularity. Default = 0.0.
- maxcircularity: Upper limit to particle circularity. Default = 1.0.
- thresholdslab: Index of dataset slab to use for creating binary image. Default = [].
- thresholdvalue: Value to use as threshold when creating binary image.
- particleminmax: [ {'off'} | 'on' ] measure particle min and max values.
- particlemedian: [ {'off'} | 'on' ] measure particle median value.
- particlestddev: [ {'off'} | 'on' ] measure particle standard deviation value.
- particleperimeter: [ {'off'} | 'on' ] measure length of particle perimeter (pixels).
- particleferet: [ {'off'} | 'on' ] measure Feret diameters of particle (pixels).
Algorithm
There are two stages to particle analysis of an image dataset object (DSO). The first stage is to obtain a binary image where image pixel values are either 0 or 1 where one value represents non-particle pixels and the other represents potential particle pixels. This is usually accomplished by specifying a threshold level where pixel having values below or above the threshold value are assigned value 0 or 1. If the image DSO has multiple slabs then one slab must be selected to determine the binary image or else the average of all the slabs can be used. A pixel assigned value 1 is not automatically part of a particle because other particle criteria can be specified such as a minimum particle area requirement, or other shape restriction. Once these filters are applied there may remain some particle regions.
The second stage in particle analysis is to calculate the properties of each particle region. Properties include area, perimeter, centroid coordinates, shape properties (circularity, aspect ratio, roundness, and solidity) and Feret’s diameters (Feret diameter, FeretX, FeretY, FeretAngle and MinFeret). There are other particle properties which depend on the particle’s pixel values including mean, median, minimum, maximum, and standard deviation. These are calculated for each slab for each particle.
epsilon-SVR and nu-SVR
There are two commonly used versions of SVM regression, 'epsilon-SVR' and 'nu-SVR'. The original SVM formulations for Classification (SVC) and Regression (SVR) used parameters C [0, inf) and epsilon[0, inf) to apply a penalty to the optimization for points which were not correctly separated by the classifying hyperplane or for prediction errors greater than epsilon. Alternative versions of both SVM classification and regression were later developed where these penalty parameters were replaced by an alternative parameter, nu [0,1], which applies a slightly different penalty. The main motivation for the nu versions of SVM is that it has a has a more meaningful interpretation. This is because nu represents an upper bound on the fraction of training samples which are errors (misclassified, or poorly predicted) and a lower bound on the fraction of samples which are support vectors. Some users feel nu is more intuitive to use than C or epsilon. C/epsilon or nu are just different versions of the penalty parameter. The same optimization problem is solved in either case. Thus it should not matter which form of SVM you use, C versus nu for classification or epsilon versus nu for regression. PLS_Toolbox uses the C and epsilon versions since these were the original formulations and are the most commonly used forms. For more details on 'nu' SVMs see [1]