[WIP][DO NOT MERGE] Soft DOP-weighted GPS + Kalman/RTS smoothing for video frame sampling#820
Draft
caglarpir wants to merge 1 commit into
Draft
[WIP][DO NOT MERGE] Soft DOP-weighted GPS + Kalman/RTS smoothing for video frame sampling#820caglarpir wants to merge 1 commit into
caglarpir wants to merge 1 commit into
Conversation
…r video frame sampling Client-side frame sampling only; does NOT handle the native CAMM video path. Adds an undeclared numpy dependency (graceful fallback to unsmoothed points). Opened as a DRAFT for directional feedback only -- incomplete, NOT for merge. See PR description for scope and limitations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[WIP][DO NOT MERGE] Soft DOP-weighted GPS + Kalman/RTS smoothing for video frame sampling
Summary
Improves the GPS positions written to video frames sampled on the client (
video_process,sample_video, and geotag-images-from-video) for cameras that carry per-sample GPS quality information (GoPro GPMF).Instead of hard-deleting "noisy" GPS points, it:
then samples frames along the smoothed track and records a per-frame horizontal accuracy
(
MAPGPSAccuracyMeters, round-tripped through EXIFGPSHPositioningError).For native video upload, the muxed CAMM GPS track is not improved by this change. In fact this PR
replaces the GoPro extractor's hard noise filter with soft weighting, so the native CAMM path currently
muxes the raw, unsmoothed track. Cleaning the native/CAMM path — and propagating per-point accuracy
into CAMM telemetry — is explicit follow-up work and is intentionally out of scope here.
not currently depend on numpy. The smoother degrades gracefully (falls back to the unsmoothed points)
when numpy is unavailable, but a pure-python port (or adding numpy as a dependency) is needed before this
should merge.
loop-closure correction and corner-aware smoothing were prototyped separately but are not included here.
What changed
gpmf/gps_weigher.py(new)gpmf/gps_smoother.py(new)gpmf/gpmf_gps_filter.pyweight_points()(keeps all points, attaches σ/weights) alongside the existing filtergeotag/video_extractors/native.pyVideoMetadatasample_video.pygeotag/geotag_images_from_video.pyexif_read.py/exif_write.py/geotag/image_extractors/exif.pyGPSHPositioningError↔MAPGPSAccuracyMeters)types.pyVideoMetadatagainspoint_sigma_xys/point_weightsValidation
On a GoPro MAX car-mount clip (a ~700 m closed city-block loop), comparing the GPS track used for frame sampling:
≈ 24× less direction jitter than the raw track and ≈ 9× less than the old filter, at a plausible length.
Follow-ups (not in this PR)