This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/dotnet/ocr/preprocess/remove-noise-from-image.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Cleaning up noisy images in C# .NET | Nutrient .NET SDK

This guide focuses on a simple image-cleanup workflow. For broader OCR preprocessing techniques, refer to the OCR preprocessing overview guide.

Noise in scanned images can reduce readability and affect downstream tasks such as OCR and archival processing.

This guide shows how to:

  • Load a noisy image
  • Run despeckle processing
  • Save the cleaned result

Prepare the project

Register the SDK license before running image-processing operations. For setup details, refer to the getting started with .NET SDK guide.

using GdPicture14;
LicenseManager licence = new LicenseManager();
licence.RegisterKEY(""); // Set your license key

Load the noisy image

Create a GdPictureImaging instance and load the source image:

using GdPictureImaging imaging = new GdPictureImaging();
int imageId = imaging.CreateGdPictureImageFromFile(@"input_noise.png");

Remove noise

Run despeckle processing on the loaded image:

imaging.FxDespeckle(imageId);

Save the cleaned image

Export the processed image to PNG:

imaging.SaveAsPNG(imageId, @"output.png");

Additional options

Combine despeckling with other enhancement steps, such as:

  • Contrast adjustment
  • Thresholding
  • Morphological cleanup

Tune processing order and parameters based on your document quality targets.

Conclusion

This workflow removes image speckle noise and writes a cleaned output file for viewing, OCR, or archival use.