🖼️

Blur Detector

Automatically scan a folder of photos and separate the blurry ones from the sharp ones.

Image ⭐⭐⭐ Advanced ⏱️ 5 minutes

😫 The Pain Point

You shot 1,000 photos at an event. 30% of them are blurry or out of focus because people were moving. You have to squint at the screen, zoom in on each photo to check sharpness before delivering to the client.

🚀 Agentic Solution

Laplacian Variance: A mathematical formula that calculates the “edginess” of an image. High variance = Sharp edges. Low variance = Blurry.

Key Features:

  • Auto Sort: Move blurry photos to a “Review” folder instead of deleting them immediately.
  • Threshold Adjustment: Customize how strict the check is.

⚔️ Phase 1: Commander (Quick Fix)

For filtering a bad photoshoot.

Prompt:

“Scan all images in this folder. Use OpenCV (Laplacian method) to calculate the blur score. If the score is below 100, move the file to a ‘Blurry’ subfolder. Print the score of each image.”

Result: Bad photos are isolated automatically.

🏗️ Phase 2: Architect (Permanent Tool)

For Photographers.

Engineering Prompt:

**Role:** Python CV Developer
**Task:** Create a "Blurry Photo Filter".
**Requirements:**
1.  **GUI:**
    *   Select Scan Folder.
    *   Threshold Slider (Default 100).
    *   "Scan" button.
2.  **Logic:**
    *   Convert image to grayscale.
    *   `score = cv2.Laplacian(image, cv2.CV_64F).var()`.
    *   Display the score next to the filename.
    *   Allow user to delete or move checked files.
3.  **Deliverables:** `blur_check.py`, `run.bat` (Windows), `run.sh` (Mac).

🧠 Prompt Decoding

  • Laplacian: This operator highlights regions of rapid intensity change (edges). A blurry image has few rapid changes, hence a low variance score. This is a classic “Old School AI” trick that is instant and effective.

🛠️ Instructions

  1. Copy Prompt -> Paste -> Run.
  2. Adjust Threshold (Try 100) -> Scan.

Related Workflows

Explore other categories

📬

Get Started with Agentic Working

Subscribe to receive updates from AgenticWorking.io

📖 Free eBook Guide 📦 7 Ready-to-use Scripts 🔔 Weekly Tips

No spam, unsubscribe anytime. Join 1,000+ subscribers.