feat: auto feature detection with filename prefixes on export

Detects QR codes (QR_), barcodes (BC_), faces (FACE_/GROUP_),
and panoramas (PANO_) per photo using OpenCV — no new dependencies.
Opt-in checkboxes in the rename tab; prefixes prepend to filename.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-23 12:50:34 +00:00
parent 433fd93a36
commit 1aded7ff0d
3 changed files with 347 additions and 0 deletions
+19
View File
@@ -224,6 +224,9 @@
.wm-sub { padding: 0.3rem 0.8rem; border-radius: 6px; border: 1.5px solid var(--border); background: transparent; color: var(--muted); font-size: 0.82rem; cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.wm-sub.active { border-color: var(--blue); color: var(--blue); }
.hint-row { font-size: 0.75rem; color: var(--faint); margin-top: 0.2rem; }
.feat-checks { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; margin-top: 0.35rem; }
.feat-check { display: flex; align-items: center; gap: 0.3rem; font-size: 0.82rem; color: var(--text); cursor: pointer; }
.feat-check input[type=checkbox] { accent-color: var(--blue); width: 14px; height: 14px; cursor: pointer; }
/* ── Ordner-Auswahl-Button in Drop-Zone ── */
#folder-picker-btn:hover { border-color: var(--blue); color: var(--blue); }
@@ -445,6 +448,16 @@
<input type="text" id="fav-prefix" value="FAV_" placeholder="FAV_">
<span class="hint-row">Favorisierte Fotos erhalten dieses Präfix im Dateinamen</span>
</div>
<div class="exp-row" style="margin-top:0.75rem; border-top:1px solid var(--border); padding-top:0.75rem;">
<label>Merkmale automatisch erkennen &amp; als Präfix setzen</label>
<div class="feat-checks">
<label class="feat-check"><input type="checkbox" id="feat-qr"> QR_</label>
<label class="feat-check"><input type="checkbox" id="feat-bc"> BC_</label>
<label class="feat-check"><input type="checkbox" id="feat-face"> FACE_ / GROUP_</label>
<label class="feat-check"><input type="checkbox" id="feat-pano"> PANO_</label>
</div>
<span class="hint-row">Wird beim Export pro Foto erkannt — verlangsamt den Export leicht</span>
</div>
</div>
<!-- Tab: Bildeditor -->
@@ -1598,6 +1611,12 @@
opacity: parseFloat(el("wm-image-opacity").value),
scale: parseInt(el("wm-image-scale").value) / 100,
} : {},
feature_detectors: [
...(el("feat-qr").checked ? ["qr"] : []),
...(el("feat-bc").checked ? ["barcode"] : []),
...(el("feat-face").checked ? ["face"] : []),
...(el("feat-pano").checked ? ["pano"] : []),
],
};
try {