Trikot-Erkennung verbessert: OCR auf ganzer Person + ganzem Bild, kleinere Nummern (Brust/Hose), Nummern in Text ('HUTH 10'), Teamfarbe direkt um die Nummer; erkannte Nummern ohne Team/Code sichtbar, gemessene Farbe angezeigt; Cache neu

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012bGzgsxrmbBhDzeMV2L57D
This commit is contained in:
Lichtkasten DevandClaude Opus 5.5 committed 2026-11-04 01:26:42 +00:00
1 parent 3aa5bdef0e
commit 43405abd67
4 files changed
+121 -63

No files matched your search

+8 -1
View File
@@ -993,6 +993,12 @@ final class AppState: ObservableObject {
// MARK: - Jersey number recognition
/// Everything that was read for an image, including numbers without team/code (IPTC window).
func allOpenSuggestions(for id: String) -> [JerseySuggestion] {
let done = jerseyDone[id] ?? []
return (jerseySuggestions[id] ?? []).filter { !done.contains($0.id) }
}
func openSuggestions(for id: String) -> [JerseySuggestion] {
let done = jerseyDone[id] ?? []
return (jerseySuggestions[id] ?? []).filter { !done.contains($0.id) && $0.replacement != nil }
@@ -1009,7 +1015,8 @@ final class AppState: ObservableObject {
guard let f = folder else { return nil }
var h: UInt64 = 0xcbf29ce484222325
for b in f.standardizedFileURL.path.utf8 { h = (h ^ UInt64(b)) &* 0x100000001b3 }
return MetadataCache.directory.appendingPathComponent("jersey-" + String(h, radix: 16) + ".json")
// "jersey2": results of the improved recognizer (older caches are ignored → recognized again)
return MetadataCache.directory.appendingPathComponent("jersey2-" + String(h, radix: 16) + ".json")
}
private struct JerseyCache: Codable { var suggestions: [String: [JerseySuggestion]]; var done: [String: Set<String>] }