**MrIMU** plugin, a Meshroom plugin that integrates IMU (Inertial Measurement Unit) data from accelerometers and gyroscopes into photogrammetry workflows. #2942
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.
I have read the contribution guidelines.
I have updated the documentation, if applicable.
I have ensured that the change is tested somewhere.
I have followed the prevailing code style (for history readability and limit conflicts for maintainance).
-->
Description
This PR adds the MrIMU plugin, a Meshroom plugin that integrates IMU (Inertial Measurement Unit) data from accelerometers and gyroscopes into photogrammetry workflows. The plugin enables users to improve camera pose estimation by applying IMU-derived orientation constraints to StructureFromMotion results, particularly useful for maintaining vertical axis stability and correcting drift in camera tracking.
The plugin supports loading IMU data from:
Key capabilities:
Features list
Implementation remarks
Plugin Structure:
plugins/MrIMU/following Meshroom's plugin directory structureplugins/MrIMU/meshroom/nodes/as required by Meshroom's plugin discovery mechanismimu_utils.py) placed inmeshroom/directory to avoid being treated as node classesKey Design Decisions:
Lazy Import Pattern: The
imu_utilsmodule is imported lazily inprocessChunk()methods rather than at module level. This ensures plugin discovery works even if there are import issues, and errors are only raised when nodes are actually executed.Import Compatibility: Multiple import fallback methods are implemented (sys.path, importlib.util, imp) to ensure compatibility across different Python versions and Meshroom environments.
Coordinate Transformations: Android sensor coordinate frame (X=East, Y=North, Z=Up) is transformed to Meshroom's world frame using the standard transformation:
[Y, Z, -X].Butterworth Filter: Gravity vector extraction uses scipy's Butterworth filter with configurable cutoff frequency (default 0.1 Hz) to separate gravity from dynamic acceleration.
IMU Weight Blending: Camera poses are corrected by blending optical SfM results with IMU orientation using a configurable weight parameter, allowing users to balance between pure optical tracking and IMU constraints.
Testing:
Dependencies:
Future Enhancements:
Note: The plugin has been tested in the development Meshroom environment. For the prebuilt Meshroom 2023.3.0, additional configuration may be required as that version appears to have different plugin loading behavior.