Match EXIF lens names by brand and share team calibrations

EXIF folds the brand into the focal range ("EF75-300mm"), so split letters
from digits before scoring, keep the score a pure name score that a caller can
trust, and rank a same-mount-family lens higher without filtering. Auto-match
now declines below 0.75 rather than applying the best of a bad list.

Lenses the bundled database lacks can be measured in-house: /api/lens-profiles
stores calibrations in SQLite, the Optics panel edits them and marks them
"Team", and search treats them as ordinary entries.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2026-11-28 05:49:47 +00:00
parent 16456c3c69
commit 749047ae9e
13 changed files with 1363 additions and 15 deletions
+10 -1
View File
@@ -548,6 +548,10 @@ routes are public and are gated only by the share token.
| GET | `/api/events/:id/tether/file?name=` | owner | Stream one waiting frame to the editor |
| DELETE | `/api/events/:id/tether/file?name=` | owner | Remove a frame after it imported |
| PUT | `/api/presets` | session | Replace the stored preset library |
| GET | `/api/lens-profiles` | session | Team-measured lens calibrations, shared by every member |
| POST | `/api/lens-profiles` | session | Add a calibration; coefficient ranges and sample shapes are validated |
| PUT | `/api/lens-profiles/:id` | author or admin | Replace a calibration |
| DELETE | `/api/lens-profiles/:id` | author or admin | Remove a calibration |
| PUT | `/api/events/:id` | owner | Upsert an event record |
| DELETE | `/api/events/:id` | owner | Delete an event (photos are handled separately) |
| PUT | `/api/photos/:id` | owner | Upsert a photo record; accepts a data-URL thumbnail, which is written to `thumbs/` |
@@ -923,6 +927,10 @@ pins the output against maps captured from the previous implementation.
Luminary adds no profiles of its own.
- **Engine** — `src/lib/lensDb.ts` (loading, matching, camera lookup) and
`src/lib/lensEngine.ts` (maps, auto-scale), both MIT like the rest of the app code.
- **Team calibrations** — lenses the database lacks can be measured in-house and added
from the Optics panel (“Team calibrations”). They are stored in the server's SQLite
database (`lens_profiles`), searched next to the bundled profiles with the same sample
layout, and are Luminary's own data rather than Lensfun content.
- **Bundled files** — `public/lens-db/NOTICE.md` records the attribution and the pin;
`public/lens-db/profiles.json` carries the same provenance in its `source` field.
@@ -930,7 +938,8 @@ See [Third-party attribution and licences](#third-party-attribution-and-licences
redistributing the app or its container image.
Profiles load lazily the first time the Optics panel needs one, so a library that never
uses lens correction does not download the ~5 MB database. A profile is built for the
uses lens correction does not download the ~1.8 MB database. Team calibrations are a
small extra request and are ignored when offline or signed out. A profile is built for the
photo's current focal length and aperture; it is not interpolated between zoom
positions. Camera-lens defaults require both a normalised camera and lens name to match.