Skip to content

Conversation

@thadwald
Copy link

@thadwald thadwald commented Jan 3, 2026

This PR improves camera orientation handling for DJI drones with oblique or non-standard camera mounts.

When parsing XMP values, Xmp.DJI.GimbalYawDegree (world-referenced) is preferred over Xmp.DJI.FlightYawDegree when available
Flight yaw reflects aircraft heading; gimbal yaw reflects actual camera pointing direction
Critical for flights where the gimbal is rotated independently of aircraft heading

The change also refactors OPK rotation matrix to include camera roll

The refactored cbb reduces to the original [[0,1,0],[1,0,0],[0,0,-1]] when roll=0, so behavior is unchanged for standard configurations.

Tested with DJI M3E and Zenmuse X5S oblique imagery and standard nadir datasets. Nadir datasets produce identical results to the original implementation. Oblique datasets work fine.

Also tested with Sheffield park 1 and Güterweg Ritzing - Helenenschacht datasets. Gimbal positions look correct, and model solves correctly with OpenSFM Algorithm set to triangulation.

…tor YPR rotation matrix for camera orientation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant