Commit Graph

7 Commits

Author SHA1 Message Date
noah.kunz 73dbbc35e4 CLAUDE.md gelöscht 2026-06-26 17:14:18 +02:00
NoahC 80f2e92d24 Write camera attitude for Metashape: XMP-Camera YPR + reference CSV
Photogrammetry software (Agisoft Metashape, Pix4D) could not read the
camera orientation, and the pitch convention was wrong.

- Emit attitude as XMP-Camera:Yaw/Pitch/Roll (Pix4D namespace Metashape
  reads) instead of the ignored XMP-GPano:Pose* tags, via a bundled
  firemapper.ExifTool_config (stock exiftool can't write that namespace).
- Add session_map.metashape_ypr(): pitch 0 = nadir, +90 = forward, so
  thermal -> 0, cam25 -> ~25, cam45 -> ~45, with aircraft attitude and the
  platform sweep folded in (decomposed from the shared camera geometry).
- Write a Metashape/Pix4D reference CSV (GPS + YPR per frame) on every
  Embed run, as a robust alternative to the embedded tags.
- Fix camera detection to key off each image's immediate parent dir, so
  embedding a parent folder that groups several sessions no longer mis-tags
  every RGB frame as nadir (dropping the off-nadir mounting angle).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 17:06:41 +02:00
NoahC 90a9059544 Rewrite user-facing text (GUI, manual, CLAUDE.md) in a professional register
Revised the GUI explanations, on-screen labels and dialogs, the HTML user
manual, and CLAUDE.md to a formal, consistent tone: removed casual phrasing
and contractions, standardised terminology, and documented the new parallel
"--workers" option (CLI) and "Parallel workers" control (GUI). Also added a
manual troubleshooting entry for full-disk GPS loss and a parallelism note to
CLAUDE.md. No functional changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 11:54:12 +02:00
NoahC 4f1ae7f7c4 Parallelize embed and thermal stretch (configurable workers)
Both conversion steps ran their hot loops serially. Now they fan out across a
configurable worker pool (default min(cpu, 16); the rig has 20 cores + NVMe):

- embed_metadata: parallel image copy (thread pool) + tagging split across
  several concurrent exiftool processes via new run_exiftool_parallel().
- stretch_thermal: parallel session histogram, parallel render/save, and
  parallel exiftool embedding (reuses run_exiftool_parallel); GPS verify +
  retry preserved.
- CLI: --workers N on both tools. GUI: shared "Parallel workers" spinbox.

Measured on a 135-frame session (270 embed pairs), workers 1 -> 16:
  render+embed 38.9s -> 6.0s (6.5x), embed copy+tag 73.5s -> 13.0s (5.7x),
  histogram 1.7s -> 0.7s. 0 frames missing GPS in every run.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 11:38:59 +02:00
NoahC 6e6b675140 Stretch: carry over source EXIF/XMP when no JSON sidecar is present
Stretching an already-embedded thermal folder (e.g. Streifen_exif/thermal,
which has tagged PNGs but no .json sidecars) produced bare 8-bit PNGs: the
old code skipped frames with no sidecar, so nothing was embedded.

_embed_exif now always copies the source image's EXIF/XMP via -tagsFromFile
and overlays JSON-sidecar tags when available, so metadata transfers whether
you stretch the raw session (sidecars) or already-embedded PNGs (source EXIF).
GPS verification only fires when there was metadata to embed; otherwise it
logs a clear note instead of a false "full disk" error.

Verified: raw session and embedded-no-sidecar both yield 0 frames missing GPS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 10:32:33 +02:00
NoahC 8dadd71f9e Surface exiftool write failures so thermal stretch can't silently drop GPS
On a (near-)full disk, exiftool's temp-copy write partially fails, producing
stretched thermal PNGs with most tags but no GPS. The stretch step was
ignoring exiftool's exit code, so this happened silently.

stretch_thermal._embed_exif now verifies GPS landed (spot-checks first/middle/
last frames), retries once on a transient miss, and otherwise raises a clear
"free up disk space and re-run" error (the pixels are written; only metadata
is missing). embed_metadata.embed_session's exit-code error gets the same hint.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 10:13:07 +02:00
NoahC 9629a07399 Add FireMapper post-processing toolchain
EXIF/GPS embedding, session-wide thermal stretch, and an OpenStreetMap
view of trigger points and image footprints, wrapped in a Tkinter GUI.

- embed_metadata.py: write JSON sidecars into image EXIF/XMP, with true
  camera orientation (aircraft attitude + platform roll + mounting offset)
- stretch_thermal.py: rescale 16-bit thermal frames to a session-wide
  window (8-bit palettes), embedding GPS/orientation EXIF in the output
- session_map.py: shared camera geometry (orientation + oblique footprints)
- firemapper_gui.py: GUI with Embed / Thermal Stretch / Map tabs

Includes CLAUDE.md and an end-user manual (manual.html). Capture data and
derived outputs (tens of GB) are git-ignored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 09:39:54 +02:00