Overview
Auto PhotoEditor takes the grunt-work out of sorting a folder of photos: it automatically flags the bad shots (blurry, over- or under-exposed) and rescues the salvageable ones (hazy, flat), so you only review what matters. Originals are never destroyed — bad photos are moved, enhanced photos are copied.
What it does
- Culling — scores every image for blur and blown-out exposure and moves the
flagged ones to
trash/(recoverable, never deleted). - Dehaze pass — routes each image by haze score: clearly hazy → full dehaze
→
dehazed/; borderline (just under the cutoff) → dehaze + auto contrast/brightness →touched_up/; clear → left alone. - Live GUI review — scan (preview) → review with clickable thumbnails and per-row Keep/Move overrides → apply. Threshold sliders re-evaluate every decision live by re-thresholding cached scores, with no re-scan.
- One-click setup on Windows via
install.bat/run_gui.bat.
Architecture
A single source of truth, photo_core.py, holds all image algorithms —
scoring, filters, and the haze_action() decision helper. Both front-ends
import from it, so the scriptable CLI (cull_photos.py) and the interactive
Tkinter GUI (cull_photos_gui.py) always behave identically. Scan and dehaze
run on daemon worker threads with a stop flag; widget updates marshal back to
the UI thread.
Techniques
- Blur — variance of the Laplacian (low = soft/blurry).
- Blown-out — fraction of near-white (≥250) / near-black (≤5) pixels.
- Haze — normalized low-contrast + low-saturation (0 = clear … 1 = hazy).
- Dehaze — CLAHE on the LAB luminance channel plus a saturation boost.
- Touch-up — dehaze followed by a percentile-clipped contrast/brightness stretch.
Stack
Python 3 (developed on 3.12 / miniconda), OpenCV and NumPy for image
processing, Tkinter + Pillow for the GUI, and threading for concurrency.