Skip to content

Commit ded5447

Browse files
committed
Add exposure/gain concept resolver and docs
Bump version to 0.4.18 and introduce experimental exposure/gain concept resolution. Adds a new MetadataConceptKind::Exposure and roles (exposure_time, aperture, iso_sensitivity, exposure_bias, exposure_program, gain, raw_exposure_adjustment), maps EXIF/XMP/DNG tags and query-backed interpretation records into these roles, and promotes capture exposure facts as safe while marking raw/DNG exposure adjustments rendered-unsafe. Exposes the new kind and roles via the Python bindings, updates interpretation/host-integration/query docs and changelog, and updates tests to cover the new behavior.
1 parent fd73e11 commit ded5447

16 files changed

Lines changed: 565 additions & 112 deletions

CHANGES.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# OpenMeta Changes
22

3+
## 0.4.18 - 2026-05-20
4+
5+
Changes compared with `0.4.17`.
6+
7+
### Added
8+
9+
- Added an experimental exposure/gain concept resolver that maps
10+
query-backed exposure records into exposure time, aperture, ISO sensitivity,
11+
exposure bias, exposure program, gain, and raw exposure-adjustment roles.
12+
- Added conservative transfer hints for exposure concepts: capture exposure
13+
facts remain safe, while raw/DNG exposure adjustment fields are marked
14+
unsafe for rendered-image transfer.
15+
- Exposed the new exposure concept and roles through the Python bindings.
16+
17+
### Changed
18+
19+
- Updated public interpretation and host-integration documentation for
20+
exposure/gain concept coverage and rendered-transfer safety behavior.
21+
322
## 0.4.17 - 2026-05-20
423

524
Changes compared with `0.4.16`.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.17
1+
0.4.18

docs/api_stability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ different status.
2626
| EXIF/TIFF/DNG numeric value names: `exif_tag_numeric_value_name(...)` and focused helpers | `openmeta/exif_value_names.h` | Stable | Small helper contract for common enum-like TIFF/EXIF/DNG numeric values such as compression, photometric interpretation, planar configuration, exposure program, metering mode, light source, flash, color space, white balance, scene capture type, gain control, CFA layout, and DNG calibration illuminants. Unknown values return an empty string and remain lossless numeric metadata. |
2727
| Semantic metadata query: `query_metadata(...)`, `query_crop_metadata(...)`, focused query helpers, and `metadata_query_fuzzy_search_available()` | `openmeta/metadata_query.h` | Experimental | Query contract for inspection matches plus normalized candidates. Current coverage includes crop/active-area/border margins, exposure/gain, white balance, color, lens correction, orientation, and RAW/source-processing metadata across standard tags, selected DNG tags, Fujifilm RAF raw crop/zoom rectangles, Canon aspect/crop metadata, Nikon Capture crop bounds, Sony panorama crop margins, fuzzy XMP paths, and vendor RAW-processing classification. Matches report `exact_match`, `fuzzy_match`, and `fuzzy_score` so tools can label exact results separately from RapidFuzz near-miss hits. `OPENMETA_ENABLE_RAPIDFUZZ=ON` adds optional near-miss XMP/property-path scoring. Grouped candidates include `matrix_set`, `vector_set`, and `table` shapes for related non-crop metadata, including RAW black/white levels, linearization, CFA/sensor layout, source geometry, raw-storage identifiers, source-processing buckets, and per-family vendor MakerNote/RAW white-balance, color, raw-storage, sensor, and source-processing groups. Matrix/vector/table groups are promoted only when the available numeric payloads meet conservative minimum shapes, so malformed color matrices, white-balance vectors, and lens-correction records remain per-entry inspection data instead of becoming normalized groups. Long-tail source color/style aliases such as camera-to-XYZ/RGB matrices, creative/picture style, film simulation, dynamic-range, optical-correction, and raw-development terms are classified for query and transfer-policy inspection. Python `Document` and `TransferSourceSnapshot` mirror this as thin dictionary-returning wrappers. |
2828
| Structured metadata interpretation records: `interpret_metadata(...)`, `interpret_metadata_query(...)` | `openmeta/metadata_interpretation.h` | Experimental | Thin structured projection over semantic query candidates. Records carry query class, semantic kind, normalized shape, confidence, source entry ids, and normalized origin/size/rect/margins/value arrays where available. Current scope covers orientation, geometry/crop/border including Fujifilm RAF, Canon, Nikon Capture, and Sony panorama geometry patterns, exposure/gain, color/white-balance, lens-correction, RAW/source-processing records, and grouped vendor-family table/vector records where classification supports them. Python `Document` and `TransferSourceSnapshot` expose matching dictionary wrappers. |
29-
| Cross-family concept resolution: `resolve_metadata_concepts(...)`, `resolve_metadata_concept(...)` | `openmeta/metadata_concepts.h` | Experimental | First bounded resolver for duplicated host-facing concepts. Current scope reports candidates, candidate source entries, source families, preferred entries, normalized numeric/text keys, full normalized value vectors, transfer hints, normalized date/time fields, date/time precision, timezone kind, normalized geometry fields, and same-role conflicts for orientation, date/time, color/profile, GPS, geometry, lens-correction, and RAW-processing evidence across EXIF, XMP, IPTC, ICC, PNG text, and query-backed interpretation records where applicable. Geometry candidates cover crop, active area, border, and sensor geometry with canonical origin, size, rect, and margin fields when available, including normalized DNG, Phase One/Leaf, Fujifilm RAF, Canon, Nikon Capture, and Sony panorama geometry patterns. Candidate transfer hints distinguish `safe`, `source_bound`, `rendered_unsafe`, and `requires_target_image_spec` evidence, with compatible-file and rendered-image safety booleans. Color/white-balance, lens-correction, and RAW-processing concepts preserve grouped matrix/vector/table values for host inspection; they do not make source-bound values safe to serialize into rendered targets. GPS date/time is combined from `GPSDateStamp` plus `GPSTimeStamp` when both entries exist, and GPS altitude candidates expose altitude-reference code plus below-sea-level state when reference metadata is present; `metadata_concept_gps_altitude_reference_name(...)` provides a stable display token for the reference code. It is intended for inspection UI and host policy decisions; it does not rewrite metadata or hide ambiguity. Python `Document` and `TransferSourceSnapshot` expose matching dictionary wrappers. |
29+
| Cross-family concept resolution: `resolve_metadata_concepts(...)`, `resolve_metadata_concept(...)` | `openmeta/metadata_concepts.h` | Experimental | First bounded resolver for duplicated host-facing concepts. Current scope reports candidates, candidate source entries, source families, preferred entries, normalized numeric/text keys, full normalized value vectors, transfer hints, normalized date/time fields, date/time precision, timezone kind, normalized geometry fields, normalized exposure values, and same-role conflicts for orientation, date/time, exposure/gain, color/profile, GPS, geometry, lens-correction, and RAW-processing evidence across EXIF, XMP, IPTC, ICC, PNG text, and query-backed interpretation records where applicable. Exposure candidates cover exposure time, aperture, ISO sensitivity, exposure bias, exposure program, gain, and raw exposure-adjustment roles; capture exposure facts are safe, while raw/DNG exposure adjustments stay rendered-unsafe. Geometry candidates cover crop, active area, border, and sensor geometry with canonical origin, size, rect, and margin fields when available, including normalized DNG, Phase One/Leaf, Fujifilm RAF, Canon, Nikon Capture, and Sony panorama geometry patterns. Candidate transfer hints distinguish `safe`, `source_bound`, `rendered_unsafe`, and `requires_target_image_spec` evidence, with compatible-file and rendered-image safety booleans. Color/white-balance, lens-correction, and RAW-processing concepts preserve grouped matrix/vector/table values for host inspection; they do not make source-bound values safe to serialize into rendered targets. GPS date/time is combined from `GPSDateStamp` plus `GPSTimeStamp` when both entries exist, and GPS altitude candidates expose altitude-reference code plus below-sea-level state when reference metadata is present; `metadata_concept_gps_altitude_reference_name(...)` provides a stable display token for the reference code. It is intended for inspection UI and host policy decisions; it does not rewrite metadata or hide ambiguity. Python `Document` and `TransferSourceSnapshot` expose matching dictionary wrappers. |
3030
| Transfer concept diagnostics: `transfer_concept_diagnostics_from_store(...)`, `transfer_concept_diagnostic_message(...)` | `openmeta/metadata_transfer.h` | Experimental | Preflight view over concept candidates for `TransferSafetyMode`. Each diagnostic reports concept kind/role, transfer hint, keep/drop/requires-target-image-spec action, reason token, severity token, default message text, conflict flag, source entries, compatible/rendered safety booleans, and GPS altitude-reference presentation fields. Rendered-transfer drop messages distinguish source color transforms, white balance, and lens-correction records from generic source-processing metadata. Intended for UI previews and host policy messages before calling `prepare_metadata_for_target(...)`; it does not replace the actual transfer filter. Python `Document` and `TransferSourceSnapshot` expose `transfer_concept_diagnostics(...)` dictionaries with `severity_name` and `message` fields. |
3131
| Vendor RAW-processing summaries: `vendor_raw_processing_from_store(...)`, `classify_vendor_raw_processing_field(...)` | `openmeta/vendor_raw_processing.h` | Experimental | Conservative grouped source-RAW/source-processing field summaries for decoded Sony, Canon, Nikon, Fujifilm, Pentax, Panasonic, Olympus, Kodak, Minolta, Sigma, Samsung, Ricoh, Apple, DJI, Google, FLIR, Casio, Sanyo, KyoceraRaw, Reconyx, HP, JVC, GE, Motorola, Nintendo, and Microsoft MakerNotes, including vendor-private, computational, thermal, preview, face-geometry, stitch/panorama, Apple computational capture/HDR/motion, DJI pose/thermal, Google HDR+/shot-log, pixel-shift/multi-shot/composite/auto-lighting/source-style processing, and FLIR radiometric/raw-value buckets. Long-tail aliases cover source color/style, camera-to-XYZ/RGB matrix, white-balance gain, optical/lens correction, dynamic-range, and raw-development terms. Direct field classification also recognizes decoded Phase One/Leaf RAW-processing tags; use the dedicated Phase One/Leaf helpers for normalized geometry and processing summaries. Intended for audit/UI and rendered-transfer safety decisions, not for writing vendor RAW/source-processing values into rendered targets. |
3232
| Transfer safety audit: `transfer_safety_audit_from_store(...)` | `openmeta/metadata_transfer.h` | Experimental | Preflight summary of source entries and entries filtered or invalidated by `TransferSafetyMode`, including Sony/Canon/Nikon/Fujifilm/Pentax/Panasonic/Olympus/Kodak/Minolta/Sigma/Samsung/Ricoh/Apple/DJI/Google/FLIR/Casio/Sanyo/KyoceraRaw/Reconyx/HP/JVC/GE/Motorola/Nintendo/Microsoft RAW/source-processing buckets. Intended for diagnostics and host UI before preparing rendered-image transfers. |

docs/development.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ model should stay compact:
1717
| Area | Purpose | Readiness |
1818
| --- | --- | --- |
1919
| Decoding | Find metadata carriers and decode EXIF, XMP, IPTC, ICC, Photoshop IRB, JUMBF/C2PA, EXR, and related blocks into `MetaStore` entries. | High, about 98-100% for the current target scope. |
20-
| Interpretation | Normalize names and values, group entries by meaning, and classify source-bound data such as RAW crop, color, lens-correction, sensor, computational capture state, and vendor-private fields. | Medium-high, about 85%. |
20+
| Interpretation | Normalize names and values, group entries by meaning, and classify source-bound data such as RAW crop, exposure adjustment, color, lens-correction, sensor, computational capture state, and vendor-private fields. | Medium-high, about 86%. |
2121
| Query | Find entries by name, fuzzy term, or semantic group, then expose normalized query candidates, structured interpretation records, bounded cross-family concept resolutions, transfer hints, and conflict flags for crop/border/active-area, exposure/gain, color/WB, orientation, date/time, GPS, lens-correction, and RAW/source-processing fields across standard and vendor metadata. | Medium, about 73-79%. |
2222
| Creation | Build fresh metadata entries from host-provided values. | Medium, about 55-65%. |
2323
| Editing | Modify existing logical metadata entries while preserving valid surrounding structure. | Medium, about 60-70%. |
@@ -52,6 +52,10 @@ form per-family grouped candidates for white balance, color, raw-storage,
5252
sensor, and source-processing records. RAW-processing queries add conservative
5353
groups for black/white levels, linearization tables, CFA/sensor layout, source
5454
geometry, raw-storage identifiers, and source-private processing buckets.
55+
Exposure/gain concept resolution promotes exposure time, aperture, ISO,
56+
exposure bias, exposure program, gain, and raw exposure-adjustment records into
57+
host-visible roles, with raw exposure adjustments kept unsafe for rendered
58+
targets.
5559
Current source-private aliases include camera-to-XYZ/RGB matrices, creative and
5660
picture styles, film simulation, dynamic-range processing, optical/lens
5761
correction, white-balance gains, and raw-development terms.
@@ -74,15 +78,16 @@ into records with query class, semantic kind, normalized shape, confidence,
7478
source entries, and normalized geometry/value arrays where available.
7579

7680
For cross-family duplicated concepts, use `openmeta/metadata_concepts.h`.
77-
It currently resolves orientation, date/time, color/profile, GPS, geometry,
78-
lens-correction, and RAW-processing into candidate lists with candidate source
79-
entries, source families, preferred entries, normalized compare keys, parsed
80-
date/time fields, date/time precision, timezone kind, GPS altitude-reference
81-
state, canonical geometry origin/size/rect/margins, full normalized value
82-
vectors for grouped matrix/vector/table records, transfer hints, compatible and
83-
rendered safety booleans, and same-role conflict flags. This is deliberately
84-
an inspection/policy surface; host code still decides whether a conflict should
85-
be shown, ignored, or corrected during editing/transfer.
81+
It currently resolves orientation, date/time, exposure/gain, color/profile,
82+
GPS, geometry, lens-correction, and RAW-processing into candidate lists with
83+
candidate source entries, source families, preferred entries, normalized
84+
compare keys, parsed date/time fields, date/time precision, timezone kind, GPS
85+
altitude-reference state, canonical geometry origin/size/rect/margins,
86+
normalized exposure values, full normalized value vectors for grouped
87+
matrix/vector/table records, transfer hints, compatible and rendered safety
88+
booleans, and same-role conflict flags. This is deliberately an
89+
inspection/policy surface; host code still decides whether a conflict should be
90+
shown, ignored, or corrected during editing/transfer.
8691

8792
## Build Prerequisites
8893

docs/host_integration.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,21 @@ confidence, and normalized geometry/value arrays.
5050

5151
For host code that needs to reconcile duplicated concepts across metadata
5252
families, use `metadata_concepts.h`. It reports orientation, date/time,
53-
color/profile, GPS, geometry, lens-correction, and RAW-processing candidates
54-
with source families, preferred entries, and same-role conflict flags. Geometry
55-
candidates expose crop, active-area, border, and sensor-geometry roles with
56-
canonical origin, size, rect, and margin fields when available, including
57-
known DNG, Phase One/Leaf, Fujifilm RAF, Canon, Nikon Capture, and Sony
58-
panorama geometry patterns. Color/white balance, lens-correction, and
59-
RAW-processing candidates expose full normalized value vectors for grouped
60-
matrix/vector/table records when the source payloads satisfy conservative
61-
numeric shape checks. Malformed or text-only source records remain visible as
62-
individual metadata, but they are not promoted into normalized grouped color,
63-
white-balance, or lens-correction candidates. Date/time candidates
53+
exposure/gain, color/profile, GPS, geometry, lens-correction, and
54+
RAW-processing candidates with source families, preferred entries, and
55+
same-role conflict flags. Exposure candidates expose capture facts such as
56+
exposure time, aperture, ISO, exposure bias, exposure program, and gain as
57+
safe transfer facts, while raw/DNG exposure adjustment fields remain unsafe for
58+
rendered-image transfer. Geometry candidates expose crop, active-area, border,
59+
and sensor-geometry roles with canonical origin, size, rect, and margin fields
60+
when available, including known DNG, Phase One/Leaf, Fujifilm RAF, Canon, Nikon
61+
Capture, and Sony panorama geometry patterns. Color/white balance,
62+
lens-correction, and RAW-processing candidates expose full normalized value
63+
vectors for grouped matrix/vector/table records when the source payloads
64+
satisfy conservative numeric shape checks. Malformed or text-only source
65+
records remain visible as individual metadata, but they are not promoted into
66+
normalized grouped color, white-balance, or lens-correction candidates.
67+
Date/time candidates
6468
include parsed date/time fields when the source value is recognizable, plus
6569
precision and timezone-kind fields. GPS timestamps combine `GPSDateStamp` with
6670
`GPSTimeStamp` when both are present, and GPS altitude candidates report
@@ -103,7 +107,8 @@ OpenMeta splits host integration surfaces deliberately:
103107
`metadata_interpretation.h` for query-backed semantic records
104108
- concept-resolution utility:
105109
`metadata_concepts.h` for cross-family orientation, date/time, color/profile,
106-
GPS, geometry, lens-correction, and RAW-processing conflict inspection
110+
exposure/gain, GPS, geometry, lens-correction, and RAW-processing conflict
111+
inspection
107112

108113
## 1. Read Into `MetaStore`
109114

0 commit comments

Comments
 (0)