Book Image

Mastering OpenCV Android Application Programming

Book Image

Mastering OpenCV Android Application Programming

Overview of this book

Table of Contents (16 chapters)
Mastering OpenCV Android Application Programming
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
6
Working with Image Alignment and Stitching
Index

Global motion estimation


Global motion estimation, as the name suggests, is the detection of motion using all pixels in a frame in its calculation. Some of the applications of global motion estimation include:

  • Video stabilization

  • Video encoding/decoding

  • Object segmentation

This method was proposed by Bergen et.al. (1992). In this method, when the distance between the camera and the background scenes is large, we can approximate the motion of objects as affine transformations. The equations we saw earlier were as follows:

We can rewrite these equations in the matrix form as follows:

This can be written as .

According to the optical flow equation:

We try to estimate the motion in the image such that all the pixels satisfy it. Thus, we sum up the optical flow equation for all the pixels and try to generate an estimate:

should ideally be zero but practically, it is a small value. Thus, the squared error will be small. Hence, we need to minimize it for the best results:

This equation can be minimized...