O'Reilly logo

OpenCV 3 Blueprints by Utkarsh Sinha, Quan Hua, Steven Puttemans, Joseph Howse

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Capturing data

First, we need to create an app for a mobile device that can capture both images and gyroscope signals simultaneously. Interestingly, these aren't readily available (at least on Android).

Once we have a video and gyro stream, we'll look at how to use that data.

Create a standard Android application (I use Android Studio). We'll start by creating a blank application. The goal is to create a simple app that starts recording video and gyro signals on touching the screen. On touching again, the recording stops and a video file and a text file are saved on the phone. These two files can then be used by OpenCV to compute the best stabilization.

Note

Code in this section is available in the GitHub repository for this book: https://github.com/OpenCVBlueprints/OpenCVBlueprints/tree/master/chapter_7 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required