ScientiaLux
strataquest Glossary Remove Objects
Post-Processing

Remove Objects

Cleaning up detection results by filtering criteria

View
Definition
Detection engines are imperfect — they sometimes find things that aren't real cells. Debris, staining artifacts, folded tissue, and out-of-focus blur can all produce false detections. Remove Objects cleans up the coded image by eliminating objects that fail specific size, shape, or intensity criteria. Think of it as quality control on the detection line: objects that don't meet specifications are rejected before they reach downstream measurements.
Post-Detection Cleanup
Remove false positives
Multi-Criteria Filtering
Filter by size, shape, and intensity
Range-Based Removal
Keep objects within bounds
Coded Image Preservation
Remaining labels stay unchanged

How It Works

Remove Objects acts as a filter on an existing coded image:

  1. Measure — For each object in the coded image, compute the specified properties (area, mean intensity, compactness, Feret ratio, etc.).
  2. Evaluate — Compare each object's properties against the removal criteria. An object is flagged for removal if ANY criterion is violated.
  3. Remove — Flagged objects' pixels are set to zero (background). All other objects are preserved with their original labels.

Multiple criteria can be combined: "remove objects smaller than 30 pixels OR dimmer than intensity 50 OR more elongated than compactness 0.3." Each criterion targets a different class of false positive.

Simplified

Remove Objects measures each detected object's properties (size, brightness, shape) and eliminates any that fall outside your specified criteria. Too small? Probably debris. Too dim? Probably noise. Too elongated? Probably a staining artifact. The remaining objects keep their original labels for downstream analysis.

Science Behind It

Morphological filtering: Remove Objects implements what Gonzalez & Woods call morphological filtering — using object properties to separate real structures from noise. This is conceptually related to morphological opening (erosion followed by dilation), which removes structures smaller than the structuring element. But Remove Objects is more flexible: it can filter on any measurable property, not just size.

The role of shape descriptors: Simple area thresholds can't distinguish a 200-pixel nucleus from a 200-pixel staining streak. Shape descriptors add discriminating power. Compactness (4π × Area / Perimeter²) equals 1 for a perfect circle and approaches 0 for extremely elongated shapes. Most nuclei have compactness between 0.6 and 0.95; most linear artifacts fall below 0.3. Adding a compactness filter catches artifacts that pass area and intensity filters.

Order of operations matters: Remove Objects should typically run before measurements and classification, not after. False detections that survive into the measurement stage introduce outliers that can skew population statistics (mean intensity, coefficient of variation) and confuse classification algorithms. In statistical terms, removing obvious non-cells before analysis is analogous to removing obvious outliers before computing summary statistics — it improves the accuracy of all downstream analysis.

The not-too-aggressive principle: Overzealous removal is as harmful as insufficient removal. If your area filter removes objects below 80 pixels, you might eliminate genuine small lymphocytes (which can be 50-70 pixels in some images). If your intensity filter removes objects below a threshold, you might eliminate real cells in dimly stained regions. The goal is to remove clearly artificial objects while preserving the full biological range of real cells.

Simplified

Remove Objects is quality control — filtering detected objects by measurable properties to separate real cells from artifacts. Shape descriptors like compactness help distinguish round nuclei from elongated staining streaks. The key is finding the right balance: remove obvious false positives without accidentally eliminating real but unusual cells.

Parameters & Settings

ParameterTypeDescription
InputCoded imageThe detection result to filter.
Smaller ThanNumeric (pixels)Remove objects with area below this threshold.
Larger ThanNumeric (pixels)Remove objects with area above this threshold.
Weaker ThanIntensity valueRemove objects with mean intensity below this value.
Stronger ThanIntensity valueRemove objects with mean intensity above this value.
Compactness RangeNumeric (0–1)Remove objects outside the specified compactness range.
Simplified

Set area bounds to catch debris (too small) and merged clumps (too large). Add intensity bounds to remove noise (too dim) and saturated artifacts (too bright). Use compactness to filter out elongated streaks that aren't real cells.

Practical Example

Cleaning up nuclei detection on a tissue section with autofluorescent debris:

  1. Nuclei Detection finds 15,000 objects
  2. Remove Objects: eliminate objects < 40 pixels (sub-nuclear debris) → removes ~800
  3. Remove Objects: eliminate objects > 800 pixels (merged clumps) → removes ~150
  4. Remove Objects: eliminate objects with compactness < 0.3 (elongated artifacts) → removes ~200
  5. Final coded image: ~13,850 validated nuclei ready for measurement

The 1,150 removed objects would have introduced noise into population statistics and potentially been misclassified as rare phenotypes. Removing them before measurement ensures clean, reliable downstream analysis.

Simplified

From 15,000 detected objects, Remove Objects eliminates ~1,150 that are too small (debris), too large (merged clumps), or too elongated (artifacts). The remaining 13,850 validated nuclei proceed to measurement and classification with much cleaner statistics.

Connected Terms

Share This Term
Term Connections