DeNoise() Amplifies Grain on Colored-Paper Scans
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);
}
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);
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 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.