# Wavelet Transforms

This function block applies wavelet-based transformation to a grayscale image to emphasize detail structures (high‑frequency content) and produce a processed grayscale output. It is useful for feature enhancement, edge highlighting, and preparing images for further analysis.

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

Input sockets

* `Grayscale Image` Provide a single-channel (gray/binary) image to be processed.

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

Output sockets

* `Grayscale Image` Processed image after wavelet transform and reconstruction.

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

* `Threshold Type` Choose the wavelet family / transform type to apply. Different selections emphasize different detail characteristics.
* `WaveletLevel` Select the decomposition level (higher values emphasize coarser detail layers).

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

* Adjustable wavelet family selection to change the style of detail extraction.
* Configurable decomposition level to control the scale of details that are emphasized.
* Outputs a single-channel image suitable for further processing (filtering, thresholding, detection).

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

When the block runs it processes the input image according to the selected `Threshold Type` and `WaveletLevel`. The result is a reconstructed grayscale image where detail components are emphasized, ready for downstream blocks.

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

1. Connect a grayscale image source to `Grayscale Image` input.
2. Select desired `Threshold Type` to match the texture/detail characteristics you want to emphasize.
3. Adjust `WaveletLevel` to control the detail scale (start low and increase to see effects).
4. Use the block output with visualization or analysis blocks to inspect or continue processing.

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

* If the input image is very large, use `Image Resizer` before this block to reduce processing time and memory usage.
* To reduce noise before transform, feed the image through `Blur`; this can produce cleaner detail emphasis.
* After wavelet processing, use `Image Threshold` or `Image Adaptive Threshold` to convert enhanced details into a binary form for detection tasks.
* Combine the output with `Find Object` or `Histogram On Line` to detect shapes or analyze line-based features on the enhanced image.
* Use `Show Image` to preview intermediate results quickly during tuning.
* Save examples or debug outputs with `Image Logger` or `Image Write` when building and testing a pipeline.

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

* If the output looks overly noisy or fragmented, try reducing `WaveletLevel` or select a different `Threshold Type`.
* If no visible change occurs, ensure the input is a proper single-channel grayscale image and try increasing the `WaveletLevel` slightly.
* If results are too coarse, decrease `WaveletLevel` to emphasize finer details.


---

# 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/wavelet-transforms.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.
