> For the complete documentation index, see [llms.txt](https://docs.augelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.augelab.com/function-blocks/blocks-reference/detections-shapes/detectors/blur-detector.md).

# Blur Detector

This function block evaluates whether an image appears sharp or blurry. It provides a single boolean output that indicates if the input image is considered blurred and a simple readout showing the computed blur score to help you tune sensitivity.

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

`Input Image` Accepts an RGB/BGR image to be evaluated for blurriness.

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

`Is Blurred?` Boolean result indicating whether the provided image is considered blurred (true) or not (false).

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

`Detection Threshold` Slider to adjust how sensitive the blur test is. Lower values make the test stricter (fewer images marked as blurry); higher values make it more permissive.

`Current blur value` Read-only text that displays the most recent numeric blur score so you can compare it against the threshold.

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

* Quick pass/fail blur check suitable for real-time streams or batch image checks.
* Visual numeric feedback via `Current blur value` to help find an appropriate `Detection Threshold`.
* Simple single-socket input and single boolean output for easy integration into larger flows.

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

When a new image arrives, the block analyzes the image content to estimate overall sharpness and produces a numeric blur score. That score is compared with the user-set `Detection Threshold` to produce the boolean `Is Blurred?` output. The block updates the `Current blur value` display so you can adjust the threshold interactively.

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

* Connect an image source (camera, loader, or previous processing block) to `Input Image`.
* Adjust `Detection Threshold` until the `Current blur value` separates acceptable and unacceptable images for your application.
* Use the `Is Blurred?` output to gate downstream logic (for example, to discard frames, trigger re-capture, or log low-quality images).

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

* For live camera checks, pair with `Camera USB` or other image input blocks to monitor incoming frames for focus issues.
* If you need to visualize or save examples of blurry frames, connect the image stream to `Show Image` and/or `Image Logger` so you can review and tune settings.
* Preprocessing can influence the blur score: try using `Image Resize` to normalize image size or `Denoising` to reduce noise that may affect the measurement.
* To simulate blurry inputs during testing, use the `Blur` block upstream.
* Combine with ROI tools like `Image ROI` or `Image ROI Select` to check sharpness only in relevant areas of the frame (for example, the region where the object of interest appears).

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

* If every image is labeled blurry: raise the `Detection Threshold` or ensure your input images are not downscaled too aggressively before evaluation.
* If no images are labeled blurry even when visibly out of focus: lower the `Detection Threshold` and verify the test region matches where blur is occurring (use ROI blocks to limit evaluation to the area of interest).
* If the `Current blur value` display does not update, confirm a valid image is connected to `Input Image` and that the image source is producing frames (try connecting the source to a `Show Image` block to verify visually).
