Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
OpenCV 3.0 Computer Vision with Java

You're reading from  OpenCV 3.0 Computer Vision with Java

Product type Book
Published in Jul 2015
Publisher
ISBN-13 9781783283972
Pages 174 pages
Edition 1st Edition
Languages
Author (1):
Daniel Lelis Baggio Daniel Lelis Baggio
Profile icon Daniel Lelis Baggio

Table of Contents (15) Chapters

OpenCV 3.0 Computer Vision with Java
Credits
About the Author
Acknowledgment
About the Reviewers
www.PacktPub.com
Preface
1. Setting Up OpenCV for Java 2. Handling Matrices, Files, Cameras, and GUIs 3. Image Filters and Morphological Operators 4. Image Transforms 5. Object Detection Using Ada Boost and Haar Cascades 6. Detecting Foreground and Background Regions and Depth with a Kinect Device 7. OpenCV on the Server Side Index

Averaging a background method


The problem with the background subtractor from the previous section is that the background will generally change due to illumination and other effects. Another fact is that the background may not be readily available, or the concept of background can change, for instance, when someone leaves a luggage in a video surveillance application. The luggage might be a foreground object for the first frames, but afterwards, it should be forgotten.

An interesting algorithm to deal with these problems uses the running average concept. Instead of always using the first frame as a clear background, it will update it constantly by calculating a moving average of it. Consider the following equation, which will be executed, updating each pixel from the old average and considering each pixel from the recently acquired image:

Note that is the new pixel value; is the value of the average background at time t-1, which would be the last frame; is the new value for the background...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}