Reader small image

You're reading from  OpenCV 3.0 Computer Vision with Java

Product typeBook
Published inJul 2015
Reading LevelIntermediate
Publisher
ISBN-139781783283972
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Daniel Lelis Baggio
Daniel Lelis Baggio
author image
Daniel Lelis Baggio

Daniel Lélis Baggio has started his works in computer vision through medical image processing at InCor (Instituto do Coração – Heart Institute) in São Paulo, Brazil, where he worked with intra-vascular ultrasound (IVUS) image segmentation. After that he has focused on GPGPU and ported that algorithm to work with NVidia's Cuda. He has also dived into 6 degrees of freedom head tracking with Natural User Interface group through a project called EHCI (http://code.google.com/p/ehci/ ). He also wrote “Mastering OpenCV with Practical Computer Vision Projects” from Packt Publishing.
Read more about Daniel Lelis Baggio

Right arrow

Capturing a video from a camera


The process of capturing frames from a webcam is very complex and it involves hardware details as well as heavy decoding or decompression algorithms. Fortunately, OpenCV has wrapped it all in a simple, yet powerful class called VideoCapture. This class not only grabs an image from a webcam, but also reads video files. In case more advanced access to a camera is required, you may want to use its specialized drivers.

You can think of a video stream as a series of pictures and you can retrieve each image in Mat and process it as you like. In order to use the VideoCapture class to capture a webcam stream, you need to instantiate it using the VideoCapture(int device) constructor. Note that the constructor parameter refers to the camera index in case you have several cameras. So, if you have one built-in camera and one USB camera and you create a videocapture object, such as new VideoCapture(1), then this object will refer to your built-in camera, while new VideoCapture...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
OpenCV 3.0 Computer Vision with Java
Published in: Jul 2015Publisher: ISBN-13: 9781783283972

Author (1)

author image
Daniel Lelis Baggio

Daniel Lélis Baggio has started his works in computer vision through medical image processing at InCor (Instituto do Coração – Heart Institute) in São Paulo, Brazil, where he worked with intra-vascular ultrasound (IVUS) image segmentation. After that he has focused on GPGPU and ported that algorithm to work with NVidia's Cuda. He has also dived into 6 degrees of freedom head tracking with Natural User Interface group through a project called EHCI (http://code.google.com/p/ehci/ ). He also wrote “Mastering OpenCV with Practical Computer Vision Projects” from Packt Publishing.
Read more about Daniel Lelis Baggio