Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
image_exif.h File Reference

Flight, timing, and thermal-analysis metadata writing for captured JPEGs. More...

Include dependency graph for image_exif.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IMAGE_EXIF_ATOMIC_REPLACE   0
 Select sibling-file atomic replacement instead of the default in-place update.

Functions

static bool image_exif_capture_tag (void *context, enum exif_directory directory, uint16_t tag)
 Select additional image evidence, without teaching EXIFite its schemas.
static int image_exif_import (struct exif_document *document, const struct exif_view *view)
 Import standard metadata plus the application's approved capture evidence.
int image_exif_write (const char *filename, const union dc_shot_union *shot)
 Add standard USHER flight metadata to a JPEG.
int image_exif_write_timed (const char *filename, const union dc_shot_union *shot, double capture_delay_s, int compensate)
 Add flight metadata with optional capture-delay motion compensation.
int image_exif_write_hotspots (const char *filename, const char *information)
 Append structured thermal hotspot/geolocation evidence to JPEG EXIF.
int image_exif_write_object_detections (const char *filename, const char *information)
 Append structured object-detection evidence (AICam) to JPEG EXIF.
int image_exif_write_mock_map (const char *filename, double horizontal_fov, double vertical_fov)
 Label a synthetic map fixture with its geometry and provider-neutral XYZ tile scheme.
int image_exif_write_capture (const char *filename, const union dc_shot_union *shot, double capture_delay_s, int compensate, const struct capture_timing *timing)
 Add flight metadata using authoritative capture timing when available.
int image_exif_write_complete (const char *filename, const union dc_shot_union *shot, double delay, int compensate, const struct capture_timing *timing, const union dc_shot_union *request, double uncertainty_m, const char *objects)
 Write flight provenance and an available object-detection result in one metadata transaction.

Variables

static const uint16_t image_exif_capture_tags [] = {SENSOR_CAPTURE_TAG, LOOM_FEATURES_TAG, LOOM_ONNX_FEATURES_TAG}
 Application-owned opaque evidence retained by photo metadata updates.

Detailed Description

Flight, timing, and thermal-analysis metadata writing for captured JPEGs.

Definition in file image_exif.h.

Macro Definition Documentation

◆ IMAGE_EXIF_ATOMIC_REPLACE

#define IMAGE_EXIF_ATOMIC_REPLACE   0

Select sibling-file atomic replacement instead of the default in-place update.

Set to 1 for original-file retention on publication failure. The default 0 avoids temporary files but cannot recover from interrupted block moves or writes. Both methods validate JPEG framing, retain compressed bytes and sync the result. The caller must exclusively own updates to the file and its hard-linked aliases.

Definition at line 70 of file image_exif.h.

Function Documentation

◆ image_exif_capture_tag()

bool image_exif_capture_tag ( void * context,
enum exif_directory directory,
uint16_t tag )
inlinestatic

Select additional image evidence, without teaching EXIFite its schemas.

Parameters
contextUnused; the application policy needs no mutable state.
directoryDirectory containing the field.
tagDirectory-local identifier owned by the producing module.
Returns
True only for the application's relocatable camera evidence records.

Definition at line 42 of file image_exif.h.

◆ image_exif_import()

int image_exif_import ( struct exif_document * document,
const struct exif_view * view )
inlinestatic

Import standard metadata plus the application's approved capture evidence.

Parameters
documentCaller-owned bounded destination.
viewValidated source with nonoverlapping backing storage.
Returns
Zero on success, otherwise -1 with EXIFite's import rollback rules.

A small inline policy wrapper keeps standalone image tools independent of the flight writer's workspaces. Unknown vendor structures remain excluded.

Definition at line 58 of file image_exif.h.

◆ image_exif_write()

int image_exif_write ( const char * filename,
const union dc_shot_union * shot )

Add standard USHER flight metadata to a JPEG.

Parameters
filenameExisting JPEG to update using the selected publication method.
shotFlight-controller shot payload.
Returns
0 on success or -1 on invalid input, JPEG, metadata, or storage failure.

Fresh capture writes replace prior camera EXIF with supported USHER metadata while preserving supported raw capture/LOOM evidence. Thumbnail and manufacturer records are deliberately discarded.

Definition at line 408 of file image_exif.c.

◆ image_exif_write_capture()

int image_exif_write_capture ( const char * filename,
const union dc_shot_union * shot,
double capture_delay_s,
int compensate,
const struct capture_timing * timing )

Add flight metadata using authoritative capture timing when available.

Parameters
filenameExisting JPEG to update using the selected publication method.
shotFlight-controller shot payload.
capture_delay_sFallback latency when timing is absent or invalid.
compensateNonzero to apply conservative constant-velocity ground correction.
timingOptional validated server timing evidence; it overrides a supplied delay.

Timing describes request-to-frame arrival, not sensor exposure time; the emitted metadata labels this limitation explicitly.

Definition at line 419 of file image_exif.c.

◆ image_exif_write_complete()

int image_exif_write_complete ( const char * filename,
const union dc_shot_union * shot,
double delay,
int compensate,
const struct capture_timing * timing,
const union dc_shot_union * request,
double uncertainty_m,
const char * objects )

Write flight provenance and an available object-detection result in one metadata transaction.

Parameters
filenameExisting JPEG; the caller exclusively owns metadata updates to this path.
shotPose used for geotags, already exposure-aligned when request is supplied.
delayFallback request-to-arrival latency in seconds; negative means unknown.
compensateNonzero enables the legacy position estimate; use zero for exposure-aligned pose.
timingOptional arrival evidence and shared bounded observation-time pose.
requestOriginal FC request to preserve alongside an aligned pose, or NULL.
uncertainty_mNonnegative ground-position margin recorded when request is supplied.
objectsOptional already-produced object summary, or NULL; no inference runs here.
Returns
Zero on publication, -1 on invalid metadata, JPEG or storage failure.

Compressed image data is copied, not decoded/re-encoded. Combining tags avoids a second full-file rewrite but does not remove the camera's original JPEG write. Validate frame identity before calling. In-place updates retain the inode; optional atomic replacement changes it. In-place I/O failures can damage the file.

Definition at line 473 of file image_exif.c.

◆ image_exif_write_hotspots()

int image_exif_write_hotspots ( const char * filename,
const char * information )

Append structured thermal hotspot/geolocation evidence to JPEG EXIF.

Parameters
filenameExisting JPEG.
informationBounded UTF-8/ASCII analysis record.
Returns
0 on metadata update success, otherwise -1.

Definition at line 372 of file image_exif.c.

◆ image_exif_write_mock_map()

int image_exif_write_mock_map ( const char * filename,
double horizontal_fov,
double vertical_fov )

Label a synthetic map fixture with its geometry and provider-neutral XYZ tile scheme.

Parameters
filenameExisting mock JPEG.
horizontal_fovHorizontal field of view in degrees, strictly between 0 and 179.
vertical_fovVertical field of view in degrees, strictly between 0 and 179.
Returns
Zero on metadata update success, otherwise -1.

Writes Sensoraia-owned geometry only; it does not write a tile-provider attribution.

Definition at line 382 of file image_exif.c.

◆ image_exif_write_object_detections()

int image_exif_write_object_detections ( const char * filename,
const char * information )

Append structured object-detection evidence (AICam) to JPEG EXIF.

Parameters
filenameExisting JPEG.
informationBounded UTF-8/ASCII analysis record.
Returns
0 on metadata update success, otherwise -1.

Definition at line 377 of file image_exif.c.

◆ image_exif_write_timed()

int image_exif_write_timed ( const char * filename,
const union dc_shot_union * shot,
double capture_delay_s,
int compensate )

Add flight metadata with optional capture-delay motion compensation.

Parameters
filenameExisting JPEG to update using the selected publication method.
shotFlight-controller shot payload.
capture_delay_sNonnegative request-to-frame latency, or a negative value when unknown.
compensateNonzero to estimate ground displacement from speed/course and latency.

Original coordinates remain in the textual record so downstream analysis can audit the correction rather than treating the constant-velocity estimate as ground truth.

Definition at line 413 of file image_exif.c.

Variable Documentation

◆ image_exif_capture_tags

const uint16_t image_exif_capture_tags[] = {SENSOR_CAPTURE_TAG, LOOM_FEATURES_TAG, LOOM_ONNX_FEATURES_TAG}
static

Application-owned opaque evidence retained by photo metadata updates.

Definition at line 35 of file image_exif.h.