• Stars
    star
    174
  • Rank 219,104 (Top 5 %)
  • Language
    Java
  • License
    GNU General Publi...
  • Created about 4 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Android app for synchronized recording of video and IMU data with advanced camera options, useful for 3D reconstruction, SLAM, AR, video stabilization. Supports remote control over network.

OpenCamera Sensors logo

Build Status

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.

Install

Get it on F-Droid

Or get the latest APK from GitHub releases

Description

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.

Usage

screenshot settings

  • Go to preferences, enable Camera2API and press the “Enable sync video IMU recording” switch in "IMU settings..."
  • (Optional) Disable video stabilization in video preferences of OpenCamera Sensors to minimize preprocessing effects
  • (Optional) Enable save frames option if you want to verify recorded data correctness
  • (Optional) Enable flash strobe and specify its frequency in additional sensor settings
  • Switch to video, setup ISO and exposure time
  • Record video
  • Get data from DCIM/OpenCamera:
    • Video file
    • Sensor data and frame timestamps in the directory {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)

Remote recording

  • Connect smartphone to the same network as PC
  • Use scripts provided in ./api_client/ directory to send requests for the application.
    • Note: phase, which is returned by start_recording method, can be used to perform synchronization with external devices remote control methods

Synchronized recording on multiple smartphones (RecSync)

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"). screenshot timestamp source

Leader smartphone setup:

  • Start a Wi-Fi hotspot
  • Open OpenCamera Sensors, go to preferences - "RecSync settings..." and enable the "Use RecSync" switch
  • (Optional) Enable phase alignment option if synchronization precision better than half of a frame duration is required
  • (Optional) Choose which camera settings will be broadcasted to client smartphones in the "Sync settings" section
  • Switch to video, adjust the camera settings as needed and press the settings synchronization button
  • Wait for client smartphones to connect if needed
  • (Optional) If phase alignment was enabled, press the phase alignment button to start the alignment and wait for it to finish ("Phase error" on the preview indicates how much the current phase differs from the targeted one -- when it becomes green, the phase is considered aligned)
  • Start a video recording

screenshot_recsync_buttons

Client smartphones setup:

  • Connect to the leader's Wi-Fi hotspot
  • Open OpenCamera Sensors, go to preferences - "RecSync settings..." and enable the "Use RecSync" switch
  • Adjust the camera settings as needed (the ones that will not be broadcast by the leader) and wait for the leader to start the recording

Note: the phase needs to be re-aligned before every recording.

Good practices for data 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.

Restrictions

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.

Contribution

The project follows AOSP Java Code Style, main principles:

  • Non-public fields should start with m, constants are ALL_CAPS_UNDERSCORES
  • Standard brace style:
if () {
    //...
} else {
    //...
}
  • Limit line length

More Repositories

1

lidar-sync-mimics-gps

Open-Source LiDAR Time Synchronization System by Mimicking GPS-clock
C
78
star
2

Perception-in-Robotics-course-T3-2021-Skoltech

Percepion in Robotics, T3 course 2020-2021 from the Data Science Program at Skoltech
Jupyter Notebook
60
star
3

RecSync-android

Video recording app with sub-millisecond synchronization accuracy for multiple Android smartphones, useful for creating affordable and easy-to-setup multi-view camera systems for robotics, SLAM, 3D-reconstruction, panorama stitching
Java
51
star
4

map-metrics

Pip-package for trajectory benchmarking from "Be your own Benchmark: No-Reference Trajectory Metric on Registered Point Clouds", ECMR'21
Python
37
star
5

3D-plane-segmentation

Collection of dockerized plane extraction methods for 3D data
C++
33
star
6

mrob

Mobile Robotics Lab. A Cpp-Py library for 3D state estimation
C++
22
star
7

twist-n-sync

Android app demonstrating precise time synchronization with several smartphone IMUs
Java
11
star
8

Planning-Algorithms-T2-2021-22

Planning Algorithms in AI and Robotics. MSc course at Skoltech Data Science program
Python
9
star
9

bandeja-platform

SmartDepthSync: Open Source Synchronized Smartphone RGB and Depth Camera Range Video Recording System
8
star
10

bag-extractor

Extracts files from .bag files using ros nodes and rosbag python code API
Python
6
star
11

SmartPortraits-toolkit

Python
5
star
12

Skoltech-Perception-in-Robotics-T3-2019-2020

Course Perception in Robotics, Skoltech, MS in Data Science, during T3, 2020. Topics studied are perception, localization, mapping and SLAM.
Jupyter Notebook
4
star
13

twistnsync-python

Python package for synchronization of data streams or sensor systems employing IMU data
Python
3
star
14

plane-segmentation-research

Jupyter Notebook
2
star
15

multi-azure-recorder

This is a repo that contains tools for setup and record synchronized data streams from multiple Azure Kinect DKs
Python
2
star
16

rgbd-slam-dockers

Ready Docker images for SOTA RGBD SLAM methods
Dockerfile
2
star
17

samsung-avatar-dataset-orb2

Jupyter Notebook
1
star
18

evops

Python
1
star
19

basler_ros2_driver

Pylon based ROS2 Foxy driver for Basler cameras
C++
1
star