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:
@@ -46,6 +46,8 @@ import {
|
||||
} from '../lib/lensDefaults';
|
||||
import type { LensProfile } from '../types';
|
||||
import LensDefaultsModal from './LensDefaultsModal';
|
||||
import LensCalibrationModal from './LensCalibrationModal';
|
||||
import { TEAM_PREFIX } from '../lib/lensProfiles';
|
||||
import Slider from './Slider';
|
||||
|
||||
export function Panel({
|
||||
@@ -1874,6 +1876,7 @@ export function OpticsPanel({
|
||||
const [available, setAvailable] = useState<number | null>(null);
|
||||
const [defaultProfile, setDefaultProfile] = useState<CameraLensDefault | null>(null);
|
||||
const [defaultsOpen, setDefaultsOpen] = useState(false);
|
||||
const [calibrationOpen, setCalibrationOpen] = useState(false);
|
||||
const patch = (next: Partial<Edits['geometry']>, label: string) =>
|
||||
set({ geometry: { ...geometry, ...next } }, label);
|
||||
|
||||
@@ -2054,7 +2057,7 @@ export function OpticsPanel({
|
||||
>
|
||||
<span>{result.model}</span>
|
||||
<span className="muted small">
|
||||
{result.maker} · {result.crop}×
|
||||
{result.maker} · {result.crop}×{result.team ? ' · Team' : ''}
|
||||
</span>
|
||||
</button>
|
||||
))}
|
||||
@@ -2082,6 +2085,9 @@ export function OpticsPanel({
|
||||
</div>
|
||||
)}
|
||||
<div className="lens-default-manage">
|
||||
<button className="btn ghost tiny" onClick={() => setCalibrationOpen(true)}>
|
||||
Team calibrations
|
||||
</button>
|
||||
<button className="btn ghost tiny" onClick={() => setDefaultsOpen(true)}>
|
||||
Manage saved defaults
|
||||
</button>
|
||||
@@ -2174,6 +2180,22 @@ export function OpticsPanel({
|
||||
onChanged={refreshDefault}
|
||||
/>
|
||||
)}
|
||||
{calibrationOpen && (
|
||||
<LensCalibrationModal
|
||||
photo={photo}
|
||||
profile={profile}
|
||||
onClose={() => setCalibrationOpen(false)}
|
||||
onUse={(saved) => {
|
||||
applyProfile({
|
||||
id: `${TEAM_PREFIX}${saved.id}`,
|
||||
maker: saved.maker,
|
||||
model: saved.model,
|
||||
crop: saved.crop,
|
||||
});
|
||||
setCalibrationOpen(false);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user