Property MaxSpeckleArea
MaxSpeckleArea
Gets or sets the maximum foreground pixel count for a connected component to be considered speckle noise. Components with an area at or below this value are candidates for removal.
public int MaxSpeckleArea { get; set; }
Property Value
- int
Maximum pixel area (inclusive) for speckle removal, or 0 for automatic DPI-based calculation.
Remarks
When set to 0 (the default), the threshold is computed automatically from the image resolution:
- At 300 DPI the auto threshold is approximately 25 pixels (a 5 × 5 blob).
- At 150 DPI: ~12 pixels. At 600 DPI: ~50 pixels.
The formula is ceil((DPI / 60)²), which models the
quadratic scaling of speckle area with resolution.