π« The Pain Point
After an event shoot, you have 500 photos but 100 are blurry. Reviewing each one to find the bad shots takes hours.
π Agentic Solution
An Automatic Blur Detector that scores each image and separates the sharp from the blurry.
Key Features:
- Laplacian Variance: Mathematical measurement of image sharpness.
- Adjustable Threshold: Customize what counts as βtoo blurryβ.
- Batch Sorting: Automatically move blurry images to a separate folder.
βοΈ Phase 1: Commander (Quick Fix)
For quick sorting.
Prompt:
βI have a folder
event_photoswith mixed quality images. Write a Python script using OpenCV to:
- Blur Detection: Calculate Laplacian variance for each image.
- Threshold: Images with variance < 100 are considered blurry (adjustable).
- Sort: Move blurry images to
blurry/folder, keep sharp insharp/.- Report: Print each image with its blur score.
Handle read errors gracefully. Print summary at end.β
Result: Only sharp photos remain for editing.
ποΈ Phase 2: Architect (Permanent Tool)
For Photographers.
Engineering Prompt:
**Role:** Python Tool Developer
**Task:** Create a "Photo Quality Sorter".
**Requirements:**
1. **GUI:**
* Select folder.
* Threshold slider with preview.
* Show blur score distribution chart.
* Preview borderline images.
* Move or copy options.
* Progress bar.
2. **Logic:**
* Laplacian variance calculation.
* Convert to grayscale first.
* Handle various image formats.
3. **Deliverables:**
* `blur_detector.py`
* `run.bat`, `run.sh`
* `requirements.txt`
π§ Prompt Decoding
- Laplacian Variance: A sharp image has high variation in the Laplacian (edges are clear). A blurry image has low variance (edges are mushy).
π οΈ Instructions
- Install:
pip install opencv-python - Copy Prompt β Run.
- Adjust threshold based on your quality standards.