NoiseRemoval<T>
Models & Types · AiDotNet.Preprocessing.Document
NoiseRemoval - Document image noise removal with multiple algorithms.
Implements: IDisposable
For Beginners
Scanned documents often have noise (random spots, grain). This tool removes noise while keeping text clear:
- Median: Best for salt-and-pepper noise
- Gaussian: General smoothing
- Bilateral: Edge-preserving smoothing
- Morphological: Removes small artifacts
Key features:
- Multiple noise removal algorithms
- Edge-preserving options
- Configurable filter sizes
- Works with binary and grayscale images
Example usage:
How It Works
NoiseRemoval provides various filtering techniques to clean up document images by reducing noise while preserving important features like text edges.
Constructors
| Constructor | Summary |
|---|---|
NoiseRemoval() |
Creates a new NoiseRemoval instance. |
Methods
| Method | Summary |
|---|---|
Tensor<T> BilateralFilter(Tensor<T> image, int kernelSize, double sigmaSpace, double sigmaColor) |
Applies bilateral filtering for edge-preserving smoothing. |
Tensor<T> Dilate(Tensor<T> image, int kernelSize) |
Applies morphological dilation. |
Tensor<T> Erode(Tensor<T> image, int kernelSize) |
Applies morphological erosion. |
Tensor<T> GaussianBlur(Tensor<T> image, int kernelSize, double sigma) |
Applies Gaussian blur for general noise reduction. |
Tensor<T> MedianFilter(Tensor<T> image, int kernelSize) |
Applies median filtering for salt-and-pepper noise removal. |
Tensor<T> MorphologicalClosing(Tensor<T> image, int kernelSize) |
Applies morphological closing (dilation followed by erosion) for hole filling. |
Tensor<T> MorphologicalOpening(Tensor<T> image, int kernelSize) |
Applies morphological opening (erosion followed by dilation) for artifact removal. |
Tensor<T> Process(Tensor<T> image, NoiseRemovalMethod method) |
Applies noise removal to a document image. |
void Dispose() |