IRONSOFTWAREHOME

DeNoise() Amplifies Grain on Colored-Paper Scans

Curtis Chau
Curtis Chau
Updated: September 17, 2026

DeNoise() (aliased internally as Despeckle()) is built to remove small, isolated dark specks on a clean white background. On colored-paper documents scanned as black and white, it makes the image noisier instead of cleaner.

When a colored page is scanned in black and white, it loses its color contrast and turns into a uniform gray-toned grain across the whole page. DeNoise() uses a fixed global threshold, so it misreads that continuous grain as widespread speckle rather than isolated noise, and amplifies the background instead of clearing it. Internal notes treat this as a design limitation of DeNoise() for this input type, not an environment-specific bug.

Solution

1. Replace DeNoise() with AdaptiveThreshold()

Swap DeNoise() for AdaptiveThreshold() on this document type. The adaptive threshold binarizes against a local baseline, so it separates text from a grainy background instead of treating the grain as speckle.

using (var input = new OcrInput())
{
    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);
}
C#

A good tuning range for thresholdLimit is 0.10 to 0.20.

2. Add Contrast() When One Pass Isn't Enough

If AdaptiveThreshold() alone doesn't fully clean up other documents in your batch, run Contrast() 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);
C#

Workarounds That Don't Work

  • DeNoise() alone, with no Deskew or other filter in the pipeline: confirmed ineffective. It worsens the image by amplifying background noise.
Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Ready to Get Started?

Nuget Downloads 6,262,020Version:2026.9just released

Get your free 30-day Trial Key instantly.
No credit card or account creation required
Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

OR
bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried Iron Suite
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required