3.1. Centroids Extraction and Nearest Band Centroid Linking and Line Construction (Polyline)
This section presents the first stage of the proposed framework: extracting representative foreground centroids from a binary 2D shape using multi-directional band partitioning. The output is a set of centroid point clouds sampled along rows, columns, and the two principal diagonal orientations (±45°). These centroids act as compact geometric descriptors for subsequent stages (e.g., graph construction, line linking, partitioning, or FLC-driven decisions). Define the input be a binary shape (foreground mask) as:
where
is the row index (vertical axis) and
is the column index (horizontal axis). Foreground pixels satisfy
.
Our goal in this first stage is to obtain a compact, geometry-aware set of representative points (centroids) by partitioning the shape into directional bands and computing the centroid of each connected component inside each band. This produces centroid sets that describe the shape under multiple orientations (horizontal, vertical, and diagonals).
Connected components with 8-connectivity
Within each band-restricted mask, we extract connected components using 8-connectivity (Moore neighborhood). Two foreground pixels
and
are adjacent if:
Using 8-connectivity is important for thin/diagonal structures since a diagonal chain would break under 4-connectivity. Each connected component
is a set of pixels defined as Equation (3):
Each component is a set of foreground pixels that are mutually connected under Equation (2). In MATLAB, bwconncomp (..., 8) returns these components.
Centroid computation (image moments/center of mass)
For each connected component
, the centroid is computed as the geometric centroid (also known as center of mass for uniform density). The centroid is computed assuming uniform density (each pixel contributes equally). Using the discrete mean:
where
is the mean column coordinate of all pixels in the component (x-coordinate),
is the mean row coordinate (y-coordinate), and intuitively, if you treat all pixels as equal masses located at their coordinates, then the centroid is the balance point. Equivalently, using raw spatial moments (named formulation: image moments):
where
is the area in pixels (count of pixels), so
.
and
accumulate coordinate sums. Dividing by
yields the mean coordinate; thus Equations (4) and (6) are equivalent. MATLAB regionprops (CC, ’Centroid’) implements this centroid (internally via moments returns
.)
The shape may be complex (tails/branches). Instead of computing one centroid for the whole object, we compute multiple centroids by restricting the object to bands. Each band produces centroids of local components, giving a structured set of representative points.
- A.
Row bands (horizontal slabs)
Let the number of horizontal bands be . We partition the image height into contiguous, non-overlapping row intervals. Row band boundaries (integer, uniform partition)
For band index
, define the start and end rows:
This creates bands that cover all rows to . The floor operator guarantees integer row indices and ensures no gaps and no overlaps between bands.
Row band index set:
where
is the set of rows belonging to band
. Row band restricted mask:
We keep foreground pixels only inside the current horizontal band; everything else is forced to background. This makes the centroid extraction local rather than global. Connected components inside the row band.
Let
be the set of 8-connected foreground components inside
, where each component is a set of pixels:
is the number of components in band
.
is the number of pixels in component
. Centroid of each component (center of mass/moment centroid)
- B.
Column bands (vertical slabs)
Let the number of vertical bands be . We partition the width into contiguous column intervals.
Column band restricted mask
Centroids inside the column band
Let
be the 8-connected components in
. For each component:
- C.
Diagonal bands (+45° and −45°)
Row/column bands capture horizontal/vertical structure, but tails and branches often lie diagonally. Therefore, we also partition the object by two diagonal coordinates.
+45° diagonal bands (constant )
Define the +45° diagonal coordinate:
Pixels with the same
lie on the same +45° diagonal. This lets us band the shape along that diagonal direction. Let the number of +45° diagonal bands be
. Define the global min/max:
Define integer bin boundaries:
where
is the total count of integer diagonal levels. The formula splits these levels into
contiguous groups.
Compute 8-connected components
and centroids:
Here we do not crop the image; we mask diagonally; therefore, the computed centroid is already in global coordinates (no shift is required).
−45° diagonal bands (constant )
Define the −45° diagonal coordinate:
Let the number of −45° diagonal bands be
(your numDiagN45). Define:
Components
and centroids:
The output of this stage is four centroid families
Row band centroids capture how the object distributes from top to bottom. Column band centroids capture how it distributes from left to right. Diagonal centroids capture oblique structure, which is essential for tails/branches that are not axis-aligned. Together, these multi-directional centroids form a robust set of representative points for the next stages (e.g., linking centroids into curves/graphs, tail partitioning, or fuzzy decision inputs),
Figure 2 shows the resulting centroids for all directions centroids.
The remaining operations of Stage I are summarized in
Figure 3 and Algorithm 1 in the next section. The procedure is applied identically to the four orientations (row, column, +45°, −45°). For one orientation
(e.g., rows), let there be
bands. Band
contains
centroids:
Nearest neighbor linking between consecutive bands
Let the maximum allowed linking distance to be:
For each centroid
, we search for the closest centroid in the next band
using the Euclidean distance (also called the
metric) as:
where Squared distance is used because minimizing
.
3.2. Feature Extraction from Centroid Lines (Stage 1)
As summarized above in
Figure 3 and pseudocode 1 show bellow, after constructing the centroid chains (polylines) in the four orientations (Row, Column, +45°, and −45°), Stage I proceeds with geometric feature extraction and fuzzy line selection. Each centroid line is described by three geometric measures: (i) polyline length, (ii) endpoint-based orientation angle, and (iii) minimum distance to the object boundary. These features provide a compact representation of line saliency, help distinguish core-like structures from boundary-adjacent tails, and supply normalized, shape-consistent inputs for the Stage I fuzzy logic controllers.
| Algorithm 1. Stage I—Multi-orientation centroid-line extraction and fuzzy line selection |
Input: Binary shape BW Output: Retained centroid-lines Lkeep 1: Preprocess BW 2: Fill holes and keep the main connected foreground component 3: Compute boundary image and distance-to-boundary map 4: Partition BW into row, column, +45°, and −45° band families 5: for each band family do 6: Extract 8-connected foreground components in each band 7: Compute the centroid of each component 8: Link each centroid to its nearest centroid in the next band 9: Form centroid polylines 10: end for 11: for each centroid polyline li do 12: Compute normalized length, endpoint angle, and minimum boundary distance 13: end for 14: Build adaptive membership parameters from pooled feature quantiles 15: Evaluate FLCX, FLCY, and FLCANG 16: Keep only lines whose fuzzy score exceeds the acceptance threshold 17: Return retained lines as Lkeep |
To quantify how close each line lies to the object boundary, we compute a distance map using the Euclidean distance transform. Let
denote the boundary pixel set (obtained from a supplied edge map). The distance-to-boundary at pixel
is defined as:
By construction,
on boundary pixels and increases toward the interior. This map provides a robust geometric measure of “interiority” that is invariant to small contour perturbations as shown in
Figure 4.
(i) Polyline length (piecewise-linear arc length)
Given the ordered points of
, the line length in pixels is computed as the sum of Euclidean distances between consecutive points:
where
: polyline length of line
, measured in pixels, and
is the index of the extracted lines in the current orientation
, and
: number of centroid points in line
,
: index of a point along the line,
,
: the coordinates of the
-th centroid point of line
,
,
: the horizontal and vertical displacement between consecutive points,
: Euclidean distance between consecutive points, and
sums all segment lengths to obtain total arc length. This corresponds to the standard arc length of a piecewise-linear curve and is well suited for centroid chains because the band-based ordering ensures that successive vertices are spatially adjacent.
(ii) Endpoint-based orientation angle
To describe the direction of each line using a stable and simple descriptor.
The lower endpoint is selected by:
if , then ;
if , then ;
if , then the leftmost point (smaller ) is chosen as .
Direction components (Cartesian-consistent)
We then define:
where
: horizontal displacement from the chosen origin to the other endpoint,
: vertical displacement with sign flipped so that “up” is positive (Cartesian convention).
This flip is important because in images increases downward, while in standard geometry increases upward.
Angle using the two-argument arctangent
The endpoint angle (in degrees) is:
where
: orientation angle of line
, computed from its endpoints,
: the two-argument arctangent function, which returns the angle of the vector
while handling quadrant correctly (unlike
), Mapping the angle to
(undirected orientation).
To make the angle invariant to reversing endpoints (a line has the same orientation in both directions), we map it to
:
where
corresponds to a horizontal line pointing right (in the standardized coordinate system),
corresponds to a vertical line. Using
means a line at
and the same line reversed are treated as the same orientation.
Degenerate case
If both endpoints coincide ( and ), then the orientation is undefined and is set to NaN (ignored).
To obtain scale-consistent lengths, we normalize by the object bounding-box span.
Shape extents
Let the foreground pixel coordinates be
. Define:
where
: minimum and maximum row indices of foreground pixels,
: minimum and maximum column indices of foreground pixel,
: object height in pixels, and
: object width in pixels.
Maximum reference length (per orientation)
where
: maximum feasible horizontal span,
: maximum feasible vertical span,
: maximum feasible diagonal span (bounding-box diagonal), and max(.,1): avoids division by zero for very small objects.
Normalized length
where
is chosen according to the line orientation (Row/Col/Diag),
: normalized length, approximately in
for typical cases,
: raw polyline length from the first length equation, and
: orientation-specific maximum reference length.
(iii) Minimum boundary distance of a line
For each polyline
, we evaluate the distance map at all its points and take the minimum value:
Rounding is applied because centroid coordinates may be subpixels. The minimum operator yields a conservative indicator: if any segment of the line approaches the boundary, then becomes small. Hence, lines fully embedded in the object tend to produce larger , whereas boundary-adjacent branches and tails tend to produce smaller .
After extracting centroid lines in four orientations (Row, Column, +45°, −45°) and computing their geometric features (normalized length, boundary distance, and endpoint orientation), we introduce an adaptive fuzzy scoring stage that selects the most plausible structural lines while suppressing noisy or spurious chains as described in summarized in
Figure 3. The key idea is to construct the fuzzy membership functions automatically from the current shape using robust percentiles of the observed feature distribution, yielding a self-constructed fuzzy inference system (FIS) that generalizes across shapes without manual retuning.
Global pooling of line features across orientations
Let the four line families be:
corresponding to Row, Column, +45°, and −45° orientations, respectively. For each line we already computed:
Normalized length ,
Minimum distance-to-boundary (pixels),
Endpoint orientation angle degrees.
To ensure a unified decision layer, we concatenate features from all orientations into global vectors:
where
is the total number of lines across all four families.
To keep angular values consistent, we apply:
so that
for all lines.
Interpretation.
This pooling step allows the fuzzy membership functions to be derived from the entire set of candidate lines, rather than from a single orientation, improving robustness to variations in pose and shape topology.
Percentile-driven adaptive membership parameters:
Manual fuzzy membership tuning is often dataset-dependent and not stable across different object sizes and morphologies. Instead, we derive length thresholds directly from the current pooled length distribution using robust percentiles:
Let
. Define:
where
represents the typical boundary between short and moderate lines,
is the median length and reflects the “central tendency” of the shape’s line population, and
separates long lines from the rest and is less sensitive to outliers than using max length. These values are then used as shape-specific breakpoints to define membership functions for line length. As a result, the fuzzy system becomes adaptive by construction: for compact shapes, “long” is defined relative to that shape; for elongated shapes, the membership automatically expands.
Fuzzy inputs and design principle (three interpretable cues)
For each candidate line , we define the following fuzzy inputs:
Orientation angle/orientation compatibility
Boundary proximity (minimum DT distance)
where
measures structural extent (longer chains are typically more reliable),
encodes directionality preference (horizontal/vertical/diagonal depending on the target), and
measures “interiority” using DT; lines closer to the boundary often correspond to thin tails or noisy segments, while core structures lie deeper.
Self-constructed Sugeno FIS for three “main-structure” hypotheses
We construct three Sugeno-type FIS modules as shown in
Figure 1, each representing a different structural hypothesis:
FLCX: favors horizontal/main X-direction connectivity,
FLCY: favors vertical/main Y-direction connectivity,
FLCANG: favors diagonal/angular skeleton hypotheses.
Each FIS produces a scalar score:
implemented as a zero-order Sugeno system (constant consequents), which is stable and computationally efficient for large line sets.
Length membership functions (adaptive)
Using , we define three triangular membership functions:
where Triangular MFs provide smooth transitions and preserve interpretability. The breakpoints are estimated per-shape, making the FIS adaptive.
- b.
Edge-distance membership functions (fixed but interpretable)
We use three membership functions for DT-based proximity:
These ranges reflect a practical geometric interpretation: lines touching the boundary are penalized (“near”), lines moderately inside are preferred (“good”), and lines deeply inside are strongly preferred (“best”).
- c.
Angle-compatibility membership functions (orientation dependent)
The angle memberships differ depending on which “main structure” we want:
In FLCX (horizontal best), the system rewards angles near 0° (and near 180° after symmetry), while penalizing near 90°.
In FLCY (vertical best), the system rewards angles near 90°, and penalizes near 0° and 180°.
In FLCANG (diagonal best), the system rewards angles near 45° and 135°, while penalizing 0°, 90°, and 180°.
This is implemented through multiple triangular MFs over , e.g., for the diagonal case:
with additional MFs to cover non-diagonal angles (e.g., “bad0”, “bad90”, “bad180”) to discourage incompatible lines.
Rule base and scoring (interpretable, orientation-aware decision logic).
Each FIS uses a rule base of the form:
where
,
, and
are linguistic terms (e.g., short/mid/long, good/mid/bad, near/good/best), and
is a constant Sugeno output level.
We use four crisp output levels:
S∈{0.10, 0.30, 0.60, 1.00} (None, Low, Mid, High).
The rule base encodes intuitive geometric reasoning:
Longer lines are generally more trustworthy than short fragments.
Lines that are angle-consistent with the target hypothesis (horizontal/vertical/diagonal) are favored. Lines that remain inside the object core (larger DT distance) are favored over boundary-hugging chains. The final score for each line
is obtained by evaluating the corresponding FIS:
We also identify the best-supported main line under each hypothesis:
To remove weak lines and retain only confident candidates, we apply a score threshold
:
In our implementation, .
Because each orientation is best assessed by a specific hypothesis, we use row lines scored by FLCY (vertical consistency criterion for row band chains), column lines scored by FLCX (horizontal consistency criterion for column band chains), and diagonal lines scored by FLCANG.
Thus, the retained sets are:
In this stage, the fuzzy membership breakpoints are derived from the current shape using pooled feature quantiles rather than fixed global thresholds. This makes the line selection process adaptive to variations in scale and morphology. The three fuzzy inputs—normalized line length, boundary distance, and orientation compatibility—provide an interpretable basis for distinguishing dominant structural lines from weak or noisy candidates. The final retained lines for Shape 1 are illustrated in
Figure 5.
The operations of Stage II are summarized in
Figure 6 and the corresponding Algorithm 2 pseudocode. After Stage I retains the most reliable centroid lines, Stage II assigns each line a semantic role by evaluating whether it behaves more like a peripheral tail segment or a central core segment. To this end, two complementary thickness-aware fuzzy controllers,
and
, are used. Their purpose is to compute interpretable tail-likeness and core-likeness scores from the thickness behavior observed along each retained centroid line. Rather than relying on fixed thresholds, Stage II derives its fuzzy memberships adaptively from shape-specific statistics, which makes the decision process robust to variations in morphology, local irregularities, and junction complexity. The controller inputs are three EDT-derived descriptors: mean thickness, thickness instability, and normalized coverage. Together, these quantities provide complementary evidence about whether a line corresponds to a thin protruding structure or to a stable interior support line. Ambiguous merged tail groups are then refined through iterative midpoint splitting until stable labeling is reached, as summarized in
Figure 6 and illustrated in
Figure 7.
| Algorithm 2. Stage II—Tail/core labeling with iterative midpoint splitting |
Input: Retained centroid-lines Lkeep, binary shape BW Output: Final labeled lines Llabel with labels {TAIL, CORE} 1: Compute the Euclidean distance transform DT inside BW 2: for each retained line li in Lkeep do 3: Sample DT values along li 4: Compute mean thickness 5: Compute thickness instability (robust gradient statistic) 6: Compute coverage (normalized line extent) 7: end for 8: Derive adaptive fuzzy breakpoints from thickness, gradient, and coverage statistics 9: for each retained line li do 10: Evaluate FLCTAIL (mean thickness, instability, coverage) 11: Evaluate FLCCORE(mean thickness, instability, coverage) 12: Assign preliminary label by the larger score 13: end for 14: Merge nearby lines with the same winning label into candidate groups 15: while there exists an active ambiguous group do 16: Split the current line/group at its arc-length midpoint 17: Recompute features for both halves 18: Re-evaluate FLCTAIL and FLCCORE on both halves 19: Keep splitting only the half that remains ambiguous 20: Stop when both halves become stable or no meaningful split exists 21: end while 22: Optionally apply the same splitting logic in two passes: TAIL first, then CORE 23: Return the stable labeled line set Llabel |
Feature 1: Mean thickness along the line (Tail vs. Core “width” cue)
We sample the thickness field along the line using subpixel interpolation:
where
: thickness sample at the line point
, and
: evaluated using interpolation (bilinear in practice).
The mean thickness is then:
where
: set of valid sample indices,
: number of valid samples,
: average thickness along the line (pixels), and
: normalized mean thickness
Interpretation: tails → low , cores → high .
Tails are thin: they lie near the periphery where the inscribed radius is small, so tends to be low. Cores are thick: they pass through the main body of the shape, where thickness is higher, so tends to be high. Normalizing by makes the feature scale-free, allowing consistent fuzzy reasoning across different shapes and sizes.
Feature 2: Thickness instability along the line (Detecting transitions and junctions)
A thin structure is not necessarily a tail if it represents a transition limb or noisy chain. Therefore, we explicitly measure how much thickness changes along the line. First define the local arc-length steps:
where
: spatial step length (pixels).
Then define the discrete thickness change rate:
where
: thickness change per pixel of arclength (units: pixels/pixel = dimensionless). We aggregate this robustly (less sensitive to outliers) using the median and normalize:
where
measures how stable thickness is along the line. Tail structures tend to have smaller thickness fluctuations, whereas tail junctions and irregular limbs can produce larger values.
To obtain a bounded feature suitable for fuzzy membership design, we apply robust percentile scaling:
A true tail typically exhibits a relatively consistent thin profile, i.e., low-to-moderate instability.
Junctions, merges, or noisy line candidates often show abrupt thickness changes (high instability).
Using the median and 90th-percentile scaling makes this feature robust to occasional sampling noise or local boundary irregularities.
This instability cue is critical: it allows Stage II to reject false tails that are thin only locally but unstable overall.
Feature 3: Coverage (Normalized line extent inside the shape)
Finally, we use the line coverage measure (already computed as the normalized length):
where
: how much of the object span the line covers (dimensionless).
A line that spans a meaningful part of the structure (higher ) is more likely to represent a real tail/core path rather than a short fragment. Coverage acts as a reliability cue, strengthening decisions when thickness statistics are ambiguous. The proposed Stage II inputs form a complementary and logically complete description of tail/core behavior:
“How thick is it?”— (mean thickness)
“How stable is that thickness?”— (thickness instability)
“How much of the structure does it cover?”— (coverage)
This triplet is not a generic feature set: it is explicitly designed for centroid-line semantic classification and is extracted from a continuous thickness field (EDT) rather than from fragile skeleton pixels.
with monotonicity enforced via a small
.
Membership functions.
We use triangular membership functions:
where
: triangle support and peak parameters.
- A.
Thickness memberships (on T ∈ [0,1])
“1.1” is used to ensure the triangle fully covers the upper boundary during implementation.
- B.
Instability memberships (on G(01) ∈ [0,1]
- C.
Coverage memberships (on C)
For the tail FLC input range
(implementation choice), the memberships are:
Outputs of Stage II
Using the same three inputs
Each rule outputs one of four constants:
S∈{0.10, 0.36, 0.70, 1.00}. {NoneOut (reject), LowOut, MidOut, HighOut}
Each of the 27 rules in and outputs one of four Sugeno constants: NoneOut (0.10), LowOut (0.36), MidOut (0.70), HighOut (1.00).
The rule bases are deliberately complementary and monotonic:
rewards low mean thickness + low instability + high coverage, while
rewards the opposite. Instability and coverage act as confidence modulators in both controllers, and the results are shown in
Figure 7. These scores are then used in the subsequent iterative midpoint splitting of merged tail groups and in the final corner-aware peeling of Stage III, closing the loop between classification and progressive shape decomposition, as described more in
Figure 8 at the next section.
The tail/core decision layer operates on continuous EDT-derived descriptors rather than directly on discrete skeleton heuristics. By deriving the fuzzy membership breakpoints from shape-specific statistics, the controller adapts to local geometric variation without relying on fixed global thresholds. These scores are then used in the subsequent iterative midpoint splitting stage.
3.3. Adaptive FLC3
The operations of Stage III are summarized in
Figure 8 shown above and the corresponding Algorithm 3 pseudocode block bellow. After Stage II assigns semantic tail/core evidence to the retained centroid lines, Stage III determines where the actual shape cuts should be executed. To this end, a single adaptive Sugeno fuzzy controller,
, is used to rank candidate cutting rays emitted from high-curvature boundary corners. The purpose of this controller is to assign a composite quality score to each candidate cut by jointly considering cut length, tail-side purity, and removed tail area. Rather than relying on fixed global thresholds, Stage III derives its fuzzy memberships adaptively from per-corner and per-iteration statistics. This makes the decision process robust to differences in protrusion size, local geometry, and the progressive topology changes that occur during peeling. After the highest-scoring non-overlapping cuts are executed, the tail-side regions are removed, the shape is updated, and the same corner-detection and fuzzy-ranking procedure is repeated on the reduced shape.
| Algorithm 3. Stage III—Adaptive fuzzy cut ranking and iterative tail peeling |
Input: Current binary shape BW, labeled lines Llabel, maximum peeling iterations T Output: Final partition of BW into core and tail regions 1: Initialize BWcurrent ← BW 2: for t = 1 to T do 3: Extract the outer boundary of BWcurrent 4: Detect high-curvature corners using turning angle, general path, and NMS 5: Compute DT on BWcurrent 6: Estimate the core reference length Lref_core from the minimum diameter 7: Cast candidate green rays from each accepted corner 8: Keep only geometrically valid rays that stay mostly inside the shape 9: for each candidate cut cj do 10: Split BWcurrent exactly along cj 11: Identify the smaller side as the candidate tail side 12: Compute cut length, tail-side purity, and tail area 13: end for 14: Update adaptive per-corner FLC3 memberships from local quantiles 15: Evaluate FLC3 for all candidate cuts 16: Select the highest-scoring non-overlapping cuts 17: if no accepted cut remains then 18: break 19: end if 20: Remove accepted tail-side regions from BWcurrent 21: end for 22: Return the final partition given by the remaining core and removed tails |
In this way, Stage III forms the final adaptive cut-selection layer of the TP-FLN framework. Its role is not only to rank candidate cuts but also to control the progressive, topology-preserving tail-peeling process, as summarized in
Figure 8 and illustrated locally in
Figure 9.
High-curvature points along the object boundary are identified using a turning-angle-based corner detector combined with the general path criterion. Let the ordered boundary sequence extracted from the largest 8-connected contour be denoted by:
where
and
are the row and column coordinates of the
-th boundary pixel, respectively. For each boundary point
, the local corner strength is estimated from the signed turning angle formed by two boundary direction vectors separated by a step size
:
where circular indexing is used to preserve continuity along the closed contour. The signed turning angle at point
is then computed as
where
denotes the 2D determinant and
denotes the transpose. In this form,
preserves both the magnitude and orientation of the local boundary turn.
To isolate meaningful corners, the absolute turning angle
is first thresholded using:
and the surviving candidates are further refined by non-maximum suppression within a local neighborhood. In addition to this local measure, a cumulative turning descriptor, referred to as the general path, is evaluated as
This accumulated angular variation provides a global consistency check and helps suppress isolated fluctuations caused by boundary noise or minor contour irregularities.
Finally, only stable and well-separated corners are retained by enforcing both a minimum circular index spacing and a minimum Euclidean distance between adjacent detections. Specifically, neighboring corners must satisfy a boundary-index separation of at least 12 samples and a spatial separation of at least 4 pixels. The resulting corner sets are evaluated as:
The resulting corner set defines the boundary locations from which the candidate green rays are emitted and later evaluated in Stage III. An example of these rays for one detected corner is shown in
Figure 9.
Stage III Fuzzy Inputs For each candidate cut (green ray from a corner), Stage III computes three interpretable features:
Feature 1: Cut length (smaller is better)
where
is the corner point and
is the opposite boundary intersection.
Feature 2: Tail-side label purity (larger is better) After exact boundary splitting, we measure the fraction of tail-labeled skeleton length that falls inside the smaller (tail) region:
Feature 3: Tail area (larger is better)
(the pixel area of the smaller region created by the exact poly2mask split).
These three inputs form a logically complete decision space:
“How short is the cut?”—
“How pure is the tail side?”—purity
“How large is the removed tail?”—
Reference scales: Lref_core, Lmax and Amax To guarantee full adaptivity at every iteration, the upper bounds of the fuzzy membership functions are derived directly from the current shape geometry.
The core reference length is computed as follows:
Locate the point of maximum inscribed radius (the thickest point of the shape) using the Euclidean distance transform:
From this point, compute the diameter in every direction
and take the minimum diameter:
This value represents the narrowest cross-section through the thickest core region.
We then define the adaptive upper bound for cut length:
Similarly, the upper bound for tail area is taken from the observed tail areas in the current iteration:
These two reference scales ( and ) are recomputed in every iteration and used to set the upper triangles of the “very long” and “large” membership functions, ensuring the fuzzy controller automatically adapts to the shrinking core as tails are progressively peeled.
Adaptive quantiles (per-corner and per-iteration breakpoints) To guarantee full adaptivity at every iteration, we derive corner-specific data-driven anchors directly from the green rays belonging to that corner on the current shape:
L15, L30, L45, L60, L75 (15th to 75th percentiles of clamped lengths at that corner)
A20, A50, A80 (20th, 50th, 80th percentiles of tail areas at that corners)
These quantiles are recomputed in every iteration, so the fuzzy controller automatically adapts to the shrinking and simplifying geometry after each peel.
Membership functions Triangular membership functions whose parameters are set directly from the per-corner, per-iteration quantiles:
- A.
Cut-length memberships (on )
very short: trimf [−0.1, L15, L30], short: trimf [L15, L30, L45], mid: trimf [L30, L45, L60]
long: trimf [L45, L60, L75], very long: trimf [L60, L75, Lmax]
- B.
Purity memberships (on [0, 1])
low: trimf [−0.1, 0, 0.45], mid: trimf [0.25, 0.55, 0.85], high: trimf [0.70, 1, 1.1]
- C.
Tail area memberships (on )
small: trimf [−0.1, 0, A50], mid: trimf [A20, A50, A80], large: trimf [A50, A80, AMAX]
Outputs of Stage III A single composite score:
Each of the 45 rules outputs one of five Sugeno constants: VL = 0.10, L = 0.35, M = 0.60, H = 0.80, VH = 1.00.
The 45 rules are monotonic and deliberately reward very short + high-purity + large-area cuts (up to VH) while heavily penalizing long or impure ones (down to VL). Low purity forces almost all rules to VL; high purity unlocks the full reward spectrum, with length acting as a soft penalty.
Iterative Execution The highest-scoring non-overlapping cuts (after simple tail area overlap merging) are executed in each iteration: the tail-side region is removed, the shape is updated, and stage 3 (corner detection → green rays → adaptive FLC3) is re-run on the new, smaller shape. This closed-loop iteration continues for a user-specified number of steps (or until no high-scoring cuts remain), producing a progressive, topology preserving peeling that converges to a clean core. By integrating per-corner adaptive fuzzy ranking with iterative execution, Stage III updates its decision criteria after each peel and supports progressive topology-preserving tail removal on the evolving shape.
All membership functions and tables for the six Sugeno-type fuzzy logic controllers are detailed in the
Appendix A section.