Add m4e pixel patch - #94
Merged
Merged
Conversation
hennels
approved these changes
Jul 21, 2026
hennels
left a comment
Contributor
There was a problem hiding this comment.
Looks good and makes sense to me.
I'm a little scared that images from the other lenses you mention will silently just produce bad data in the current state. It is probably worth setting something up to cause an explicit error for the other lenses of the M4E to be sure that doesn't happen. Or just support all of them at the same time.
hennels
approved these changes
Jul 21, 2026
hennels
left a comment
Contributor
There was a problem hiding this comment.
Looks good! Thanks for adding the error.
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.
M4E Pixel Pitch — Derivation
Value added
DJI_PIXEL_PITCH["M4E"] = {5280: 3.28e-06}(meters), keyed by image width, forthe Wide (mapping) camera only.
Derivation
From the DJI Matrice 4E spec sheet (Wide camera):
The already-supported M3E (Mavic 3 Enterprise) shares the identical sensor
(4/3" CMOS, 20 MP) and image size (5280 × 3956) and is also coded as
3.28e-06.Caveat / scope
This value applies only to the Wide camera. The M4E's Medium Tele (1/1.3"
48 MP, width 8064) and Telephoto (1/1.5" 48 MP, width 8192) lenses report the
same
Image Model(M4E) but have different pixel pitches. Because we have nosample images for those lenses, they are intentionally not supported:
pixel_pitch_meters()resolves the M4E entry by image width and raises aParsingErrorfor any non-Wide width. When sample data is available, add the8064/8192width keys toDJI_PIXEL_PITCH["M4E"]to enable them.Lenses can also be distinguished via
FocalLengthIn35mmFilm(24 = Wide,70 = Medium Tele, 168 = Telephoto).
Why?
parser.focal_length_pixels()fails withKeyError: 'M4E'PR Checklist
Breaking Changes