GoPro-gyro dataset
-------------------------
This dataset consists of a number of video sequences captured by a wide angle rolling shutter camera, with corresponding gyroscope measurements.
It was introduced at ICRA2015 in [1] where it was used for camera-gyroscope calibration.

Overview
--------------------------
The dataset consists of three video sequences accompanied by gyroscope measurements.

Since this is real world data, it means that no real ground truth is available.
Instead, each sequence is accompanied by a set of reference values (see "Data format" below) which is our best estimates of the camera-gyroscope calibration parameters (as used in [1]), and can be used to e.g. stabilize the videos.

Citing
---------------------------
If you use this dataset in a publication, you should reference the paper [1].

Sequences
---------------------------
1. rotation : Scene captured by handheld camera by a person standing still. Large smooth rotations.
2. walk     : Camera starts on the ground and is then picked up and taken for a short walk.
3. rccar    : Camera is attached to an RC-car which travels up a dirt road. Lots of vibrations (high frequency motions) which results in very noticable rolling shutter artefacts. 

Data format
-------------------------
Each sequence consists of three files:

1. video file: <sequence>.mp4
2. gyroscope data file: <sequence>_gyro.csv
3. reference values: <sequence>_reference.csv

The video requires a H.264 codec to be decoded.

The gyroscope data is regularly sampled in time, and the CSV file has one line per gyroscope measurement. Each line has three angular velocity measurements, one for each axis (x, y, z). The angular velocity measurements are expressed in rad/s.

The reference values are the currently best estimates of the calibration parameters, and have been used to generate the stabilized videos shown in the supplemental material.
The parameter names have the following meaning (see [1] for definitions and usage):

- Fg 	  : Time scaling factor / Gyroscope sample rate (Hz)
- offset  : Time offset (s)
- rot_x
- rot_y
- rot_z   : Gyro to camera transformation. r = [rot_x, rot_y, rot_z] = alpha * n, is the axis-angle representation of this rotation.
- gbias_x 
- gbias_y
- gbias_z : Gyroscope bias (rad/s)

The video file is guaranteed to have been captured within the time range measured by the gyroscope.
I.e., video recording was started after, and stopped before, the gyroscope logger.

The time relation between frame number n, and gyroscope sample k can be expressed as

	t_frame = (n / CAMERA_FPS)

	k = Fg * (t_frame + offset)

where we have used CAMERA_FPS = 30.0.
Please note that t_frame corresponds to the start of frame, and that t_frame + readout, where readout is the rolling shutter readout time, corresponds to the end of the frame.


Gyroscope
--------------------------
The data was captured with a STMicroelectronics L3G4200D gyroscope for which the datasheet can be found at the vendor web site: http://www.st.com/web/catalog/sense_power/FM89/SC1288/PF250373

The contents of the control registers were as follows

- CTRL_REG1 = 0xFF
- CTRL_REG2 = 0x00
- CTRL_REG3 = 0x08
- CTRL_REG4 = 0x00
- CTRL_REG5 = 0x00

The gyroscope provides samples at a synchronous data rate, which according to the datasheet is ODR=800 Hz, but which in reality meant a rate of approximately 855 Hz.

Due to hardware issues, the gyroscope data contain a high frequency noise component (at approximately 340 Hz) which can be clearly seen in a spectrogram.
We suggest applying a notch filter to remove this before using the data.

Camera
-------------------------------
Videos were recorded using a GoPro Hero3+ black edition using the 1080p@30Hz (Wide) mode.
All other settings in the camera were left to their default values.

The camera uses a rolling shutter.
For the chosen mode, the readout time, in seconds, has been calibrated to 

	readout = 0.0316734

The camera has been calibrated by us using the FOV-model of Devernay and Faugeras (2001), but using the simplified form in [2]:

	r_d = arctan(r_u * omega) / omega

	r_u = tan(r_d * omega) / omega

The parameters are: 

the internal camera calibration matrix

	K =   [[ 853.12703455,    0.        ,  988.06311256],
	       [   0.        ,  873.54956631,  525.71056312],
	       [   0.        ,    0.        ,    1.        ]])

the distortion parameter

	omega = 0.8894355

and distortion center

	wc = [0.00291108,  0.00041897]


Feedback
----------------------------
Questions, comments and suggestions are welcome to hannes.ovren@liu.se or per-erik.forssen@liu.se.


Hannes Ovrén and Per-Erik Forssén,
Linköping,
May 2015

References
------------------------------
[1] Hannes Ovrén and Per-Erik Forssén. Gyroscope-based Video Stabilisation with Auto-Calibration. ICRA 2015
[2] Johan Hedborg and Björn Johansson. Real time camera ego-motion compensation and lens undistortion on GPU. Technical report, Linköping University, Department of Electrical Engineering, Sweden, 2007.
