Morphology features
Let \(A\) be a set of \(n\) pixels included in the ROI, \(A_{Xi}\) and \(A_{Yi}\) - \(x\) and \(y\) coordinates of pixel \(i\). Denote \(\mathbb{E}\) the expectation operator.
ROI’s contour calculation
The problem of finding the set of contour pixels based on the ROI point set boils down to the concepts of pixel neighborhood and connectivity. We say that a pixel set \(C\) is connected (or a connected component) if for every pair of pixels \(p_i\), \(p_j\) in \(C\) there exists a sequence of pixels \(p_i,..., p_j\) such that (1) it is contained in \(C\) and (2) every pair of pixels adjacent in the sequence are neighbors of each other. Since we now have two different types of neighbors, we obtain two different types of connectivity. Accordingly, let \(C\) be a set of “black” (i.e. of non-zero intensity) pixels. We say that \(C\) is 4-connected if for every pair of pixels \(p_i\), \(p_j\) in \(C\) there exists a sequence of pixels \(p_i,..., p_j\) such that (1) it is contained in \(C\) and (2) every pair of pixels adjacent in the sequence are 4-neighbors of each other. Similarly, We say that \(C\) is 8-connected (or an 8-connected component) if for every pair of pixels \(p_i\), \(p_j\) in \(C\) there exists a sequence of pixels \(p_i,..., p_j\) such that (1) it is contained in \(C\) and (2) every pair of pixels adjacent in the sequence are 8-neighbors of each other. Obviously a 4-connected pattern is an 8- connected pattern but not vice-versa. One method of finding and analyzing the connected components of image \(T\) is to scan \(T\) in some manner until a border pixel of a component \(C\) is found and subsequently to trace the boundary of \(C\) until the entire boundary is obtained. The boundary thus obtained can be stored as a doublylinked circular list of pixels or as a polygon of the boundary of the pixels in question. Such procedures are generally termed contour tracing.
There are two useful definitions of border points which are related to the boundary. We say that a “black” pixel of \(C\) is a 4-border point if at least one of its 4-neighbors is “white”. We say that a “black” pixel of \(C\) is an 8-border point if at least one of its 8-neighbors is “white”.
More popular modifications of Algorithm Square-Tracing to handle 8-connected patterns discard the left-turn-right-turn rule altogether. One such procedure is known as Moore-neighborhood tracing [1]. The eight neighbors of a pixel shown in the following figure are also referred to in the literature as the Moore neighborhood of a pixel:
In the Moore neighborhood tracing algorithm, when the current pixel \(p\) is “black”, the Moore neighborhood of \(p\) is examined in a clockwise manner starting with the pixel from which p was entered and advancing pixel by pixel until a new “black” pixel in \(C\) is encountered as illustrated in the following figure:
The following figure shows an example of how the square tracing algorithm starting at the pixel marked \(S\) produces a sequence of boundary pixels in the case \(C\) is 8-connected:
The algorithm is presented below:
Note
Nyxus uses the region of interest mask, not intensity, image for contour tracing.
If a region of interest contains multiple contours, the outer contour is recognized with the contour tracing algorithm and used in calculation of contour-dependent features DIAMETER_MIN_ENCLOSING_CIRCLE, DIAMETER_INSCRIBING_CIRCLE, DIAMETER_CIRCUMSCRIBING_CIRCLE, POLYGONALITY_AVE, HEXAGONALITY_AVE, HEXAGONALITY_STDDEV, WEIGHTED_SPAT_MOMENT_pq, WEIGHTED_CENTRAL_MOMENT_pq, WEIGHTED_HU_M1-7, PERCENT_TOUCHING, FRAC_AT_D, MEAN_FRAC, and RADIAL_CV.
Neighbor features
NUM_NEIGHBORS \(\gets n_N=\) the number of neighbor ROIs
Polygonal representation features
POLYGONALITY_AVE = \(5 (r_S + r_A)\) where \(r_S = 1 - \left|1-\frac{\frac{P}{n_N}}{\sqrt{\frac{4S\tan \frac{\pi}{n_N}}{n_N}}} \right|\) - polygonal size \(r_A = 1 - \left| 1 - \frac{S\tan \frac{\pi}{n_N}}{\frac{1}{4} \: n_N \: P^2}\right|\) - polygonal area ratio, \(n_N\) - number of ROI’s neighbors, \(P\) and \(S\) - ROI’s perimeter and area.
References: Nishi O, Hanasaki K. Automated determination of polygonality of corneal endothelial cells. Cornea. 1989;8(1):54-7. PMID: 2924585.
Other features
Let \(l_G\) - geodetic length, \(t_G\) - thickness. Assuming
we can express the following features as:
GEODETIC_LENGTH \(\gets l_G = \frac{P}{4} + \sqrt{\max \left(\frac{P^2}{16}-S, 0\right)}\) THICKNESS \(\gets t_G = \frac{P}{2} - l_G\)
Let \(O=o_X,o_Y\) be the ROI centroid and \(OC_i\) - segment connecting centroid to an edge pixel \(i\). Then
Caliper features
Feret diameter
Statistics of Feret diameter at 0-90 degree rotation angles:
Martin diameter
Statistics of Martin diameter at 0-90 degree rotation angles:
Nassenstein diameter
Statistics of Nassenstein diameter at 0-90 degree rotation angles:
|STAT_NASSENSTEIN_DIAM_MIN | STAT_NASSENSTEIN_DIAM_MAX | STAT_NASSENSTEIN_DIAM_MEAN | STAT_NASSENSTEIN_DIAM_MEDIAN | STAT_NASSENSTEIN_DIAM_STDDEV | STAT_NASSENSTEIN_DIAM_MODE
All-chords features
Max-chord features
References
Rosenfeld, A., “Digital topology,” American Mathematical Monthly, vol. 86, 1979, pp. 621-630.