IronOCR on Windows: DeNoise() Amplifies Background Noise into Speckle (Colored-Paper Scans)
Overview
DeNoise() (aliased internally as Despeckle()) is built for one job: removing small, isolated dark specks on a clean white background. It doesn't handle continuous texture.
Colored-paper documents scanned as black and white lose their color contrast and turn into a uniform gray grain across the whole page. DeNoise()'s fixed threshold misreads that grain as widespread speckle — so it makes the image noisier, not cleaner.
Fix: use AdaptiveThreshold() instead of DeNoise().
Environment
- OS: Windows 11
- Language/Runtime: C# (.NET 8 WinForms)
Version Metadata
- Version found: 2026.6.1
- Version resolved: Unknown
Cause
DeNoise() is built only for isolated dark specks on an otherwise clean background — it does not adapt to continuous texture. Colored-paper pages scanned as black and white lose their color contrast and become a uniform gray-toned grain across the whole page, which the fixed global threshold misreads as widespread speckle rather than isolated noise. Internal notes treat this as a design limitation of DeNoise() for this input type, not an environment-specific bug.
Solution
- Recommended: Replace
DeNoise()withAdaptiveThreshold()for this document type:using (var input = new OcrInput())
Suggested tuning range for
{
foreach (var imagePath in pageImagePaths)
{
input.LoadImage(imagePath);
}
// Replaces input.DeNoise() for this document type
input.AdaptiveThreshold(0.15f);
var ocrResult = ocr.Read(input);
ocrResult.SaveAsSearchablePdf(outputPath);
}thresholdLimit:0.10–0.20. - If
AdaptiveThreshold()alone doesn't fully clean up other documents in your batch, applyContrast()first to widen the separation between text and background before binarizing:input.Contrast(1.3f); // try a range of 1.3f–1.4f
input.AdaptiveThreshold(0.15f);
Workarounds That Don't Work
- Applying
DeNoise()alone, with no Deskew or other filter in the pipeline — confirmed ineffective; it worsens the image by amplifying background noise.