# Denoising

This function block reduces noise in images using a fast non-local means denoising method. It works for both color and grayscale images and provides sliders to balance noise removal and detail preservation.

## 📥 Inputs <a href="#inputs" id="inputs"></a>

`Image Any` Connect an image (color or grayscale) that you want to denoise.

(hint: this is an input socket)

## 📤 Outputs <a href="#outputs" id="outputs"></a>

`Image Any` The denoised image is provided here.

(hint: this is an output socket)

## 🕹️ Controls <a href="#controls" id="controls"></a>

`Strength` Adjusts the overall denoising strength. Higher values remove more noise but may blur fine details.

`Averaging` Controls the averaging power used for smoothing. Increasing this can reduce noise but may soften edges.

`Blend Noise (Colored)` Adjusts color-channel blending for colored images. Use to control how color noise is treated relative to luminance noise.

(hint: these are interactive sliders visible on the block)

## ⚙️ Running Mechanism <a href="#how-it-works" id="how-it-works"></a>

* When the block receives an image through the `Image Any` input, it applies the selected denoising parameters and updates the output with the processed image.
* Parameters are read from the sliders each run, so changing a slider affects the next evaluation.
* The block handles both single-channel and multi-channel images, selecting the appropriate processing automatically.

## ✨ Features <a href="#features" id="features"></a>

* Works for both grayscale and color images.
* Real-time parameter tuning using sliders for instant visual feedback.
* Balanced noise removal to preserve edges when tuned correctly.

## 📝 Usage Instructions <a href="#usage" id="usage"></a>

1. Connect an image-producing block to the `Image Any` input.
2. Adjust `Strength` to control how aggressively noise is removed.
3. Fine-tune `Averaging` to manage smoothness versus detail.
4. For color images, tweak `Blend Noise (Colored)` to adjust color-specific denoising.
5. Observe the denoised result from the `Image Any` output (connect to a viewer or saver).

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

* For noisy camera captures, try combining this block with `Bilateral Filter` or `Blur` before denoising to reduce impulse noise and make results cleaner.
* Use `Show Image` to preview results live while you tune sliders.
* To save examples for later comparison, connect the output to `Image Logger` or `Image Write`.
* If you want to keep a stable frame for comparison during tweaking, use `Image Memory` to freeze a chosen frame while you adjust controls.
* Crop to the region of interest first with `Image ROI Select` to focus denoising only where it matters and save compute.

(hint: recommended complementary blocks are listed above for common workflows)

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

* If the result looks overly smooth or details are lost: lower the `Strength` and reduce `Averaging`.
* If color artifacts appear after denoising: reduce `Blend Noise (Colored)` or try preprocessing with `Blur`.
* If performance is slow on large images: resize with `Image Resizer` or process smaller ROIs via `Image ROI Select`.

If you need more visual debugging while tuning, connect the output to `Show Image` to inspect changes frame-by-frame.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.augelab.com/function-blocks/image-transformations/transformation-filters/denoising.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
