feat: extract IMU from GoPro videos #692
Merged
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.
This pull request introduces significant changes to the
mapillary_tools/geotag/gpmf_parser.py
file, focusing on enhancing telemetry data extraction and handling. The most important changes include the addition of new functions for matrix calibration and telemetry data extraction, as well as updates to existing functions to accommodate these enhancements.Enhancements to telemetry data extraction:
mapillary_tools/geotag/gpmf_parser.py
: Added new functions_is_matrix_calibration
,_build_matrix
,_apply_matrix
,_flatten
,_get_matrix
,_scale_and_calibrate
,_find_first_telemetry_stream
, andextract_telemetry_data
to support telemetry data extraction and processing. [1] [2]mapillary_tools/geotag/gpmf_parser.py
: Updated_extract_points_from_samples
to extract and interpolate accelerometer, gyroscope, and magnetometer data in addition to GPS points.Refactoring and code improvements:
mapillary_tools/geotag/gpmf_parser.py
: Refactored imports and replacedsample_parser
withTrackBoxParser
,MovieBoxParser
, andSample
for better code clarity and structure.mapillary_tools/geotag/gpmf_parser.py
: Modifiedextract_points
to use the new telemetry data extraction functions and addedextract_telemetry_data
for comprehensive telemetry data retrieval.Addition of new data structures:
mapillary_tools/imu.py
: IntroducedGyroscopeData
,AccelerationData
, andMagnetometerData
classes to represent gyroscope, accelerometer, and magnetometer readings respectively.Test updates:
tests/cli/gpmf_parser.py
: Added_parse_samples
function to parse and dump telemetry samples for testing purposes, and updated themain
function to utilize this new function for sample dumping. [1] [2] [3] [4] [5]