OpenCamera Sensors is an Android application for synchronized recording of video and IMU data. It records sensor data (accelerometer, gyroscope, magnetometer) and video with frame timestamps synced to the same clock.
<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" alt="Get it on F-Droid" height="80">
Or get the latest APK from GitHub releases
OpenCamera Sensors is an Android application for synchronized recording of video and IMU data. It records IMU data and video with frame timestamps synced to the same clock.
This project is based on Open Camera — a popular open-source camera application with flexibility in camera parameters settings, actively supported by the community. By regular merging of Open Camera updates our app will adapt to new smartphones and APIs — this is an advantage over the other video + IMU recording applications built from scratch for Camera2API.
DCIM/OpenCamera
:
{VIDEO_DATE}
:
-{VIDEO_NAME}_gyro.csv
, data format: X-data, Y-data, Z-data, timestamp (ns)
{VIDEO_NAME}_accel.csv
, data format: X-data, Y-data, Z-data, timestamp (ns)
{VIDEO_NAME}_magnetic.csv
, data format: X-data, Y-data, Z-data, timestamp (ns)
{VIDEO_NAME}_timestamps.csv
, data format: timestamp (ns)
{VIDEO_NAME}_flash.csv
, data format: timestamp (ns)
(timestamps of when the flash fired)./api_client/
directory to send requests for the application.
start_recording
method, can be used to perform synchronization with external devices
Important: smartphones are required to support real-time timestamping to be correctly synchronized. This can be checked on the preview message when RecSync is enabled ("Timestamp source" should be "realtime").
Leader smartphone setup:
Client smartphones setup:
Note: the phase needs to be re-aligned before every recording.
When recording video with audio recording enabled, MediaRecorder adds extra frames to the video to match the sound. Due to this problem, the audio recording feature is disabled in our app by default.
To minimize the amount of preprocessing done by the smartphone, we also disable video stabilization and OIS options.
One important restriction is that our app requires full Camera2API support.
Another restriction of our application is that synchronized timestamping for camera and IMU data isn’t available on all the devices with Camera2API support. You can check whether your device supports this feature in preferences.
The project follows AOSP Java Code Style, main principles:
m
, constants are ALL_CAPS_UNDERSCORES
if () {
//...
} else {
//...
}