Advanced Segmentation Editor
19 min
amics v5 2 1 overview the advanced segmentation editor provides direct control over the image segmentation pipeline that transforms bse (backscatter electron) images into labeled grain and particle regions it replaces the legacy grey level factor and area factor sliders with explicit algorithm parameters, algorithm selection, and processing step toggles to open the editor, navigate to measurement settings > segmentation and click the advanced button interface layout the editor is divided into four sections 1\ preset bar control purpose preset dropdown select a saved parameter configuration save as save current settings as a new named preset update overwrite the selected preset with current settings delete remove the selected preset the amics classic preset is always present and read only it mirrors your current grey level factor and area factor settings and cannot be modified or deleted to customize settings, choose a different method and save your own preset 2\ segmentation parameters these sliders control the core image processing that runs before the segmentation algorithm parameter range default what it does grey factor (h) 1 51 8 controls noise suppression strength during gradient smoothing lower values preserve fine detail and small features higher values suppress noise but may merge small grains together smoothing (r) 1 26 26 controls the extent of morphological smoothing lower values preserve sharp boundaries higher values produce broader, smoother regions gradient scales 1 5 3 number of morphological scale levels used to compute the edge strength image 1 = finest detail only; higher values detect edges at coarser scales connectivity 4 or 8 4 how pixels are considered neighbors 4 connectivity treats only horizontal and vertical neighbors as connected (stricter boundaries) 8 connectivity also includes diagonals (smoother region shapes) tip h and r work together when the amics classic preset shows a grey level factor of 0, that corresponds to maximum smoothing (h=51, r=26) a grey level factor of 100 corresponds to minimum smoothing (h=1, r=1) 3\ algorithm options segmentation algorithm — choose how the gradient image is partitioned into regions option description toboggan each pixel "slides downhill" on the gradient surface to its lowest neighbor, then flat regions are flood filled fast and deterministic watershed classical flooding based watershed gradient minima are treated as basins that fill upward; regions meet at ridge lines slightly different boundary placement than toboggan both algorithms accept identical parameters and produce comparable results the differences are subtle — see the technical comparison below gradient calculation — choose how edge strength is computed from the bse image option description multiscale computes gradient at multiple morphological scales (controlled by gradient scales slider) and accumulates them robust to noise and captures edges at different feature sizes sobel classical sobel operator — a single scale 3x3 edge detector faster, but sensitive to noise and only detects edges at one scale 4\ processing options these checkboxes enable or disable post segmentation cleanup steps option default what it does closing by reconstruction on applies morphological noise suppression to the gradient image before segmentation disabling this preserves small features but increases sensitivity to image noise identify gradient segments on attempts to recover small bright features that were lost during gradient smoothing useful when small grains of distinctive bse brightness are present touchup small segments on merges very small segments into their most similar neighbor based on bse grey level controlled by the grey level factor and minimum particle size settings touchup shadow segments on identifies and merges thin, dark segments that appear at grain boundaries due to topographic bse contrast (shadow artifacts) toboggan vs watershed — technical comparison both algorithms solve the same problem given a gradient (edge strength) image, partition the image into regions separated by edges they differ in how they assign pixels to regions toboggan the toboggan algorithm works in two phases sliding phase each pixel follows the steepest descent on the gradient surface, moving to whichever neighbor has the lowest gradient value this continues until the pixel reaches a local minimum or a flat region growing phase flat regions (where multiple pixels share the same gradient value) are resolved by breadth first flooding, assigning all connected flat pixels to the same basin characteristics deterministic and fast tends to produce slightly more compact regions boundaries follow gradient ridges closely watershed the watershed algorithm works by simulated flooding sorting phase all pixels are sorted by gradient value (lowest first) using counting sort flooding phase starting from gradient minima, regions "fill up" one grey level at a time when two rising regions meet, a watershed line (boundary) is placed between them characteristics classical algorithm with well studied mathematical properties boundaries are placed exactly where two rising basins would meet slightly different boundary placement than toboggan in ambiguous areas when to choose which in practice, both algorithms produce very similar results on typical mineralogical bse images the choice is largely one of preference toboggan is the legacy amics default and is what all existing measurements were produced with choose it for backward compatible results watershed is the mathematical standard in image morphology literature choose it for new measurements where you want the classical reference algorithm multiscale gradient vs sobel — technical comparison the gradient calculation determines how edge strength is computed from the raw bse image this gradient image is the input to both toboggan and watershed multiscale gradient computes the morphological gradient (dilation minus erosion) at multiple increasing scales, then sums the results scale 1 3x3 structuring element — detects the finest edges scale 2 5x5 structuring element — detects medium edges scale 3 7x7 structuring element — detects coarse edges (and so on up to the configured gradient scales value) advantages robust to noise because larger scales smooth over pixel level variation captures edges across a range of feature sizes simultaneously produces more uniform edge strength regardless of grain size disadvantages smooths out very small features (especially at gradient scales 3+) slightly slower due to multiple passes sobel gradient applies the classical 3x3 sobel operator, computing horizontal and vertical derivatives separately and combining them as the euclidean magnitude gradient = sqrt(dx^2 + dy^2) advantages fast — single pass preserves the finest detail (single pixel edges) well understood classical operator disadvantages sensitive to image noise (no multi scale averaging) only detects edges at one spatial scale may produce noisy gradient images on specimens with acquisition noise when to choose which multiscale (default) use for most routine work it handles noise well and produces clean segmentation on typical bse images sobel consider when you need maximum sensitivity to very fine features and are working with low noise, high quality bse images best paired with low h values and closing by reconstruction enabled to manage the noisier gradient suggested settings the following are starting points optimal settings depend on your specific specimen, magnification, image resolution, and bse detector characteristics always verify segmentation results visually before committing to a measurement run coarse grained granulated specimens specimens with large grains (typically >50 um) mounted in resin grains are well separated with clear bse contrast between phases parameter suggested value rationale grey factor (h) 8 12 large grains tolerate more smoothing; suppresses noise at grain interiors smoothing (r) 16 26 generous smoothing produces clean, well defined grain boundaries gradient scales 3 4 multi scale gradient captures both grain edges and sub grain features connectivity 8 produces smoother grain outlines appropriate for large features segmentation watershed or toboggan either works well; large grains are not sensitive to algorithm choice gradient calc multiscale noise robustness matters more than fine detail closing by reconstruction on cleans up noise in gradient identify gradient segments on recovers any small bright inclusions within larger grains touchup small segments on merges dust sized artifacts into parent grains touchup shadow segments on removes topographic shadows at grain edges fine grained granulated specimens specimens with small grains (typically <20 um) where preserving small features is critical risk of over smoothing is the primary concern parameter suggested value rationale grey factor (h) 2 6 low values are critical to avoid merging adjacent small grains smoothing (r) 4 12 reduced smoothing preserves fine grain boundaries gradient scales 1 2 keep low — higher scales smooth across small grains entirely connectivity 4 stricter connectivity helps preserve thin boundaries between closely packed grains segmentation toboggan or watershed both acceptable; toboggan may produce marginally tighter boundaries gradient calc multiscale (scales=1 2) or sobel sobel may help detect finest edges; multiscale at low scales is also effective closing by reconstruction on (but consider off) if very fine grains (<5 pixels) are being lost, try disabling this step identify gradient segments on important — helps recover small bright phases lost in smoothing touchup small segments on but verify it is not merging real small grains into neighbors touchup shadow segments on (but consider off) if real small dark phases are being misidentified as shadows, disable warning for very fine grained specimens, aggressive smoothing (high h, high r, high gradient scales) will merge adjacent grains of similar bse brightness into single segments start with conservative (low) values and increase only if noise artifacts are problematic block / thin section specimens polished sections with grain to grain contact (no resin separation) segmentation must resolve boundaries between touching grains of potentially similar bse brightness parameter suggested value rationale grey factor (h) 4 8 moderate — must balance noise suppression with boundary preservation smoothing (r) 8 16 moderate smoothing; too much merges grains with similar bse values across contacts gradient scales 2 3 captures grain boundaries at multiple widths without over smoothing connectivity 4 preferred — tighter connectivity helps maintain boundaries between touching grains segmentation watershed watershed's flooding from minima approach tends to place boundaries more precisely at grain grain contacts gradient calc multiscale more reliable boundary detection across varying contact widths closing by reconstruction on needed to suppress noise in the gradient at grain interiors identify gradient segments on recovers small accessory phases that might be smoothed away touchup small segments on merges spurious micro segments at triple junctions and grain contacts touchup shadow segments on (review carefully) shadow segments are common at grain boundaries in thin sections; but verify real thin phases are not being removed key consideration for blocks the main challenge is resolving grain boundaries where adjacent phases have similar bse values the grey factor (h) is your most important parameter — too high and boundaries between similar phases disappear; too low and noise creates false boundaries within grains start at h=6 and adjust based on visual inspection general tips start from amics classic and note the h and r values it computes from your grey level and area factor settings this gives you a baseline to work from change one parameter at a time to understand its effect before adjusting others h is the most impactful parameter it controls how aggressively small features in the gradient are suppressed if your segmentation is under segmented (missing grain boundaries), lower h if it is over segmented (too many false boundaries from noise), raise h processing options are safe to experiment with disabling a checkbox only skips that cleanup step — it does not alter the underlying segmentation you can toggle them on and off to see their individual contribution save presets for different specimen types once you find settings that work for a particular sample preparation, save them so they can be reused consistently the amics classic preset always reflects your current settings if you change grey level factor or area factor in the main measurement settings, the amics classic preset values update automatically