Skip to content

Commit 24a5635

Browse files
committed
Add transfer diagnostics, GPS helper & Phase One
Introduce concept-level transfer diagnostics and GPS altitude-reference helper, plus expanded vendor RAW classification and Python bindings. Adds TransferConceptDiagnostic(s) types, enums for action/reason, transfer_concept_diagnostics_from_store(), and name helpers for actions/reasons and GPS altitude reference; implements conversion to Python dicts and exposes snapshot/document methods. Enhances vendor_raw_processing classification (including Phase One/Leaf handling and broader private/computational/lens/sensor tagging). Updates docs, CHANGES, VERSION, and tests to reflect the new APIs and behavior.
1 parent 13584ce commit 24a5635

20 files changed

Lines changed: 927 additions & 47 deletions

CHANGES.md

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

3+
## 0.4.11 - 2026-05-15
4+
5+
Changes compared with `0.4.10`.
6+
7+
### Added
8+
9+
- Added concept-based transfer diagnostics so host/UI code can preflight
10+
concept candidates as kept, dropped, requiring target image specs, or
11+
conflict-bearing under compatible-file or rendered-image safety modes.
12+
- Added GPS altitude-reference presentation helpers for concept candidates.
13+
14+
### Changed
15+
16+
- Expanded transfer-critical MakerNote/source-processing classification for
17+
Nikon, Canon, Sony, Fujifilm, and Phase One/Leaf-style raw-processing terms.
18+
319
## 0.4.10 - 2026-05-15
420

521
Changes compared with `0.4.9`.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.10
1+
0.4.11

docs/api_stability.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ 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, 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, and source-processing buckets. 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, exposure/gain, color/white-balance, lens-correction, and RAW/source-processing records. 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. 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. 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. |
30-
| 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 processing, and FLIR radiometric/raw-value buckets. Intended for audit/UI and rendered-transfer safety decisions, not for writing vendor RAW/source-processing values into rendered targets. |
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. 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. |
30+
| Transfer concept diagnostics: `transfer_concept_diagnostics_from_store(...)` | `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, conflict flag, source entries, compatible/rendered safety booleans, and GPS altitude-reference presentation fields. 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. |
31+
| 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 processing, and FLIR radiometric/raw-value buckets. 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. |
3132
| 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. |
3233
| Raw-carrier passthrough audit: `raw_carrier_passthrough_audit_from_snapshot(...)` | `openmeta/metadata_transfer.h` | Experimental | Diagnostic preflight for opt-in raw carriers. Reports candidate carriers and primary block reasons such as missing payload, target incompatibility, safety filtering, content-bound C2PA, explicit profile policy, missing decoded-entry links, or unsupported carrier kind. Hosts can call it directly before enabling snapshot passthrough. |
3334
| Source snapshot type and read helpers: `TransferSourceSnapshot`, `read_transfer_source_snapshot_file(...)`, `read_transfer_source_snapshot_bytes(...)`, `build_transfer_source_snapshot(...)` | `openmeta/metadata_transfer.h` | Experimental | Current snapshots are decoded-store-backed by default. Opt-in raw carriers preserve bounded source payload/provenance records and snapshot-local decoded entry ids for host diagnostics and bounded passthrough decisions. Const reuse is safe when callers do not mutate the snapshot and do not share returned result objects across writers. |

docs/host_integration.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,17 @@ value vectors for grouped matrix/vector/table records. Date/time candidates
5959
include parsed date/time fields when the source value is recognizable, plus
6060
precision and timezone-kind fields. GPS timestamps combine `GPSDateStamp` with
6161
`GPSTimeStamp` when both are present, and GPS altitude candidates report
62-
whether `GPSAltitudeRef` marked the height as below sea level. Treat this as an
63-
inspection and policy input rather than an automatic metadata rewrite decision;
64-
source-bound color, lens, and RAW-processing values still need rendered-transfer
65-
safety filtering. Each candidate also carries a transfer hint:
66-
`safe`, `source_bound`, `rendered_unsafe`, or
62+
whether `GPSAltitudeRef` marked the height as below sea level; use
63+
`metadata_concept_gps_altitude_reference_name(...)` for a stable display token.
64+
Treat this as an inspection and policy input rather than an automatic metadata
65+
rewrite decision; source-bound color, lens, and RAW-processing values still need
66+
rendered-transfer safety filtering. Each candidate also carries a transfer
67+
hint: `safe`, `source_bound`, `rendered_unsafe`, or
6768
`requires_target_image_spec`, plus `compatible_file_safe` and
68-
`rendered_image_safe` booleans for host UI and preflight policy.
69+
`rendered_image_safe` booleans for host UI and preflight policy. For transfer
70+
previews, `transfer_concept_diagnostics_from_store(...)` converts those hints
71+
into keep/drop/requires-target-image-spec actions for a selected
72+
`TransferSafetyMode`.
6973

7074
## Adapter Classes
7175

@@ -624,6 +628,21 @@ if (audit.filtered_raw_color_calibration > 0 ||
624628
audit.filtered_makernotes > 0) {
625629
// Show the host/user which source-bound metadata will not be transferred.
626630
}
631+
632+
openmeta::TransferConceptDiagnostics diagnostics =
633+
openmeta::transfer_concept_diagnostics_from_store(
634+
store, openmeta::TransferSafetyMode::RenderedImage);
635+
636+
for (size_t i = 0U; i < diagnostics.diagnostics.size(); ++i) {
637+
const openmeta::TransferConceptDiagnostic& item =
638+
diagnostics.diagnostics[i];
639+
const char* action =
640+
openmeta::transfer_concept_diagnostic_action_name(item.action);
641+
const char* reason =
642+
openmeta::transfer_concept_diagnostic_reason_name(item.reason);
643+
(void)action;
644+
(void)reason;
645+
}
627646
```
628647
629648
Python uses the same family enum:
@@ -635,6 +654,12 @@ if summary["fields_seen"]:
635654
636655
audit = doc.transfer_safety_audit(openmeta.TransferSafetyMode.RenderedImage)
637656
print(audit["filtered_raw_color_calibration"])
657+
658+
diagnostics = doc.transfer_concept_diagnostics(
659+
openmeta.TransferSafetyMode.RenderedImage
660+
)
661+
for item in diagnostics["diagnostics"]:
662+
print(item["kind_name"], item["role_name"], item["action_name"])
638663
```
639664

640665
`metaread` prints

docs/interpretation_status.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ explicit outcome:
3636
| Orientation | EXIF/TIFF orientation query, LibRaw flip mapping, generic orientation helpers for index, rotation degrees, mirrored state, dimension swap, rotation-only fallback, human-readable labels, and EXIF-vs-XMP conflict reporting in the LibRaw bridge. | High, about 90-95%. | Higher-level policy for resolving container and host pixel-orientation state remains host-specific. |
3737
| Geometry, crop, active area, and borders | DNG crop/active-area/masked-area tags, Phase One/Leaf geometry, canonical border margins, vendor RAW-processing geometry buckets, and fuzzy crop/border-style paths are queryable. | Medium-high, about 85-90%. | More vendor-specific normalized rectangles and stronger output contracts for ambiguous multi-tag geometry. |
3838
| Color, white balance, and matrices | DNG color/calibration/reduction/forward matrix groups, white-balance vector groups, ICC metadata, RAW color/source-processing safety buckets, transfer hints, and cross-family concept candidates with full grouped value vectors are identified. | Medium-high, about 79-87%. | Deeper camera/vendor color science interpretation is intentionally conservative, especially for rendered-image transfer. |
39-
| Lens correction and RAW processing | Lens-correction groups, black/white levels, linearization, CFA/sensor layout, raw-storage identifiers, vendor RAW/source-processing buckets, transfer hints, and concept candidates with grouped table/vector values are classified for query and transfer safety. | Medium-high, about 76-84%. | Long-tail per-model correction tables and richer numeric normalization. |
40-
| Vendor MakerNotes | Broad MakerNote naming and source-processing classification exists for common vendors and several live computational/thermal vendors. Unknown entries remain lossless and source-private subgroups distinguish preview, face geometry, computational, thermal, stitch/panorama, pixel-shift, multi-shot, composite, auto-lighting, RAW crop/active-area, source color-transform, lens-correction, and raw-level processing data. | Medium-high, about 79-87%. | ExifTool-style long-tail print conversions, encrypted/custom settings, and per-model private tables. |
39+
| Lens correction and RAW processing | Lens-correction groups, black/white levels, linearization, CFA/sensor layout, raw-storage identifiers, vendor RAW/source-processing buckets, transfer hints, transfer diagnostics, and concept candidates with grouped table/vector values are classified for query and transfer safety. | Medium-high, about 78-85%. | Long-tail per-model correction tables and richer numeric normalization. |
40+
| Vendor MakerNotes | Broad MakerNote naming and source-processing classification exists for common vendors and several live computational/thermal vendors. Unknown entries remain lossless and source-private subgroups distinguish preview, face geometry, computational, thermal, stitch/panorama, pixel-shift, multi-shot, composite, auto-lighting, RAW crop/active-area, source color-transform, lens-correction, raw-level processing data, and Phase One/Leaf RAW-processing fields handled by direct classification plus dedicated normalized helpers. | Medium-high, about 80-88%. | ExifTool-style long-tail print conversions, encrypted/custom settings, and per-model private tables. |
4141
| BMFF item graph, HEIF/AVIF/CR3, JUMBF, and C2PA | BMFF derived fields, item-info rows, bounded relations, primary-linked roles, aux semantics, and draft C2PA/JUMBF structural fields are exposed. | Medium, about 60-70%. | Full BMFF scene modeling and full C2PA manifest/policy semantics. |
4242
| Photoshop IRB | Raw resources are preserved and a bounded interpreted subset is decoded for fixed-layout resources. | Medium, about 60-70%. | Broader resource-specific interpretation. |
43-
| Semantic query/search and records | Query helpers expose raw matches, confidence, provenance, value shapes, normalized candidates, canonical crop/active-area rectangles, border margins, source-processing buckets, optional RapidFuzz near-miss matching, structured interpretation records, and bounded cross-family concept resolution for orientation, date/time, color/profile, GPS, geometry, lens-correction, and RAW-processing with parsed date/time fields, timezone/precision classification, combined GPS timestamps, GPS altitude-reference state, canonical geometry origin/size/rect/margins, full grouped value vectors, transfer hints, rendered/compatible safety booleans, and tolerance-aware GPS/color/geometry conflicts. | Medium, about 66-72%. | More long-tail per-model concept aliases and clearer user-facing policy messages. |
44-
| Transfer-safety classification | Compatible-file versus rendered-image safety policies classify source-specific image geometry, color/profile, RAW-processing, MakerNote, JUMBF/C2PA, and vendor-private data. | High, about 85-90%. | More user-facing diagnostics and additional per-family policy tests. |
43+
| Semantic query/search and records | Query helpers expose raw matches, confidence, provenance, value shapes, normalized candidates, canonical crop/active-area rectangles, border margins, source-processing buckets, optional RapidFuzz near-miss matching, structured interpretation records, and bounded cross-family concept resolution for orientation, date/time, color/profile, GPS, geometry, lens-correction, and RAW-processing with parsed date/time fields, timezone/precision classification, combined GPS timestamps, GPS altitude-reference state and display token, canonical geometry origin/size/rect/margins, full grouped value vectors, transfer hints, rendered/compatible safety booleans, and tolerance-aware GPS/color/geometry conflicts. | Medium, about 68-74%. | More long-tail per-model concept aliases and clearer user-facing policy messages. |
44+
| Transfer-safety classification | Compatible-file versus rendered-image safety policies classify source-specific image geometry, color/profile, RAW-processing, MakerNote, JUMBF/C2PA, and vendor-private data, with concept-level diagnostics that report keep/drop/requires-target-image-spec actions before prepare. | High, about 87-91%. | More per-family policy tests and richer host-authored message text. |
4545

4646
## Competitor Position
4747

@@ -57,10 +57,10 @@ outputs.
5757

5858
## Next Interpretation Priorities
5959

60-
1. Turn concept transfer hints into higher-level user-facing diagnostics for
61-
transfer previews and GUI workflows.
62-
2. Expand GPS policy beyond current coordinate tolerance and altitude-reference
63-
state, including unit/reference presentation and cross-family timestamp
60+
1. Deepen transfer diagnostics into host-authored message templates for GUI
61+
workflows.
62+
2. Expand GPS policy beyond current coordinate tolerance, altitude-reference
63+
display, and EXIF timestamp assembly into broader cross-family
6464
reconciliation.
6565
3. Expand MakerNote meaning depth in vendor order: Nikon, Canon, Sony,
6666
Fujifilm, Phase One/Leaf, then remaining active vendors.

0 commit comments

Comments
 (0)