Classes | |
class | SoDataMeasure |
Abstract base class for all ImageViz image data measures. More... | |
class | SoDataMeasureAttributes |
Class for all ImageViz data measure attributes. More... | |
class | SoDataMeasureCustom |
class to define a custom measure. More... | |
class | SoDataMeasurePredefined |
class that define the list of predefined measure that can be used on image data input. More... | |
For instance, a set of measurements has to be selected using SoLabelAnalysisQuantification, SoLabelFilteringAnalysisQuantification or SoGlobalAnalysisQuantification engines. Here are described general priciples that help to understand most of the ImageViz predefined measurements.
The SoDataMeasurePredefined class contains the list of the measurements that are immediately available in ImageViz. Each measurement is identified by a PredefinedMeasure enumerate. The name of these enumerates may end with 2D or 3D:
Enumerates having a name starting with GRAY or INTENSITY are measurements based on the intensity image input.
These measures don't support intensity images with more than one channel. Please use the SoColorGetPlaneProcessing2d engine to extract the required channel before computing the intensity measurement.
Please see section Image Analysis to know how to perform analysis on such measurements.
In the continuous case they are defined as:
and in the discrete case as:
Where is a point of the object X, g its gray level intensity and the area of X.
For gray level images , for binary images just consider .
Note :
The orientation is defined as the direction of its major inertia axis. It is given as the eigenvector of the largest eigenvalue of the covariance matrix.
This is a good measure of the orientation for simple, roughly convex objects.
The result falls between -180 and +180 degree.
The result falls between 0 and 90 degree.
The secondary orientation (or orientation2) is defined as the direction of its minor inertia axis. It is given as the eigenvector of the smallest eigenvalue of the covariance matrix.
The Euler number, or connectivity factor , is related to the number of connected components , and to the number of holes in each of these components. The Euler number is defined as .
For objects with no hole, a very fast algorithm exists to compute the number of objects or components.
The Euler number is a topological parameter, which describes the structure of an object, regardless of its specific geometric shape. Other topological parameters exist, such as the number of branches or of triple points in a skeleton, the hierarchical degree of a tree-like skeleton or the number of neighbours for a cell in a skeleton by zone of influence.
The connectivity number can be interpreted geometrically (Euler-Poincaré). The connectivity numbers , , are computed recursively when the spatial dimension increases. Details of this approach are beyond the scope of this documentation.
The Euler number is obtained as the sum of measures in local neighborhoods. In the continuous case, this measure is null almost everywhere, except on contours. An example illustrates this for polygonal shapes in the figure 1.
In the discrete case, the local measure, a search for specific configurations, is derived from the Euler formula for graph: , where is the number of connected components, the number of holes, the number of vertices, the number of elementary faces, and the number of sides.
On a square grid, one gets:
For example, consider the Euler number in the following continuous case of a polygonal object with no loops, and bounding an object or a hole.
A simple local measure can identify this contour as the boundary of an object or a hole. We define a measure for each point in the plane as:
Two situations may occur: the object points (shaded set) lie in the concavity or in the convexity.
In the first case the measure will be defined as: , and in the second case as: , where is the angle, lying between 0 and , of the and side normals, oriented toward the convexity.
The polygonal measure is then defined as:
One can easily show that:
If several disjointed polygonal contours exist in an image, one can apply this measure on each contour, and obtain:
which gives the Euler formula.
In 3D, the Euler-Poincaré number of the object is an indicator of the connectivity of a complex structure. The components of the Euler number are the three Betti numbers:
Feret's diameter is defined as the distance between two parallel tangents of a particle on a given direction like the measurement by a caliper (see Figure 4). This definition is extended to 3D with the distance between two tangent planes.
By default the distribution of Feret diameter is made up of a sampling of 10 angles from 0 to 162 degree with a step of 18 degree. This distribution can be customized with the Feret 2D angles attributes.
In 3D Feret diameter is a one-dimensional measurement that estimates how "wide" some segmented object is, when projected by a particular angle. The distance between the outermost tangents of the segmented object defines the diameter for that angle:
The 3D distribution is computed to get the predefined number of angles regularly spreaded around the upper part of the unit sphere. By default a sampling of 31 angles. This distribution can be customized with the Feret 3D angles attributes. The orientations are defined by the couple of angles from spherical coordinates
The direction given by the Feret diameters allows to defines four angles:
Where is the number of boundary points which intersect the set of lines . This is equivalent to the sum of the lengths of the projections of the object in the direction.
Note that is symmetric:
The discrete case in 2D translates to the search for specific configurations, as defined in the table below.
The perimeter is then approximated when the above integral is replaced by a discrete summation. In the square grid case, the summation is computed for the four fundamental directions:
Where:
Finally, this formula can be corrected for non square pixels. In such a situation, the diagonals no longer fit the and directions. Let be the four neighbouring pixels on the grid, a be the distance between horizontal lines, b be the distance between vertical lines and c the distance between diagonal lines.
The formula becomes:
Such a quantile value is computed by interpolation between the first bin where the cumulated histogram is higher than the percentage of observations and its previous bin.
The cumulated histogram is given at the center of each bin, counting the half population of the current bin. For instance with a bin size of 1, the cumulated histogram for the bin 3.. 4 is computed adding the total population of the values 0, 1 and 2 to the half population of the value 3. It is assigned to the bin center 3.5.
With the example above, where the bin size is 3, the 25% quantile value of the histogram is:
Where :