Skip to content

jefmenegazzo/MPU-9250-Data-Plot-Video-Creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Maintenance License: CC BY-NC-ND 4.0 GitHub tag (latest by date) pypi versions DOI GitHub issues GitHub forks GitHub stars GitHub watchers GitHub contributors HitCount

MPU-9250 Data Plot Video Creator

This is an application that creates videos with data plotted in graph through the libraries matplotlib and ffmpeg. The plotted data correspond to samples from the sensors embedded in the module MPU-9250 (accelerometer, gyroscope and magnetometer) and GPS data (speed).

Table of Contents

Instalation

First, clone this repository:

git clone https://github.com/Intelligent-Vehicle-Perception/MPU-9250-Data-Plot-Video-Creator.git

Next, you need to download ffmpeg and add to environment variables.

How To Use

To generate the videos, first configure the variables in the file settings.py:

  • dataset: dataset to be plotted.
    • folder: folder where the data is.
    • ini: time the plot starts.
    • end: time the plot ends.
  • side: side to be plotted (left or right).

After configuration, run the following command to create the video:

python src/plot_video.py

Or run the following command to show live graph:

python src/plot_show.py

Example

Below, an example of a frame from one of the generated videos.

Sensor Hardware Network

To join videos side by side, we used the following command:

ffmpeg -i video1.mp4 -i video2.mp4 -filter_complex '[0:v]pad=iw*2:ih[int];[int][1:v]overlay=W/2:0[vid]' -map [vid] -c:v libx264 -crf 23 -preset veryfast output.mp4

How To Cite

To cite this repository, use the reference below:

@software{menegazzo3960614,
    author = {Jeferson Menegazzo and Aldo von Wangenheim},
    title = {{MPU-9250 Data Plot Video Creator}},
    month = jul,
    year = 2020,
    publisher = {Zenodo},
    version = {1.0.5},
    doi = {10.5281/zenodo.3960614},
    url = {https://github.com/Intelligent-Vehicle-Perception/MPU-9250-Data-Plot-Video-Creator}
}

License

This project is under Attribution-NonCommercial-NoDerivatives 4.0 International License (CC BY-NC-ND 4.0). Please see License File for more information.