ViSP
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Functions
Variables
Enumerations
Enumerator
Friends
Groups
Pages
manGrab1394-2.cpp
1
/****************************************************************************
2
*
3
* $Id: manGrab1394-2.cpp 4056 2013-01-05 13:04:42Z fspindle $
4
*
5
* This file is part of the ViSP software.
6
* Copyright (C) 2005 - 2013 by INRIA. All rights reserved.
7
*
8
* This software is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU General Public License
10
* ("GPL") version 2 as published by the Free Software Foundation.
11
* See the file LICENSE.txt at the root directory of this source
12
* distribution for additional information about the GNU GPL.
13
*
14
* For using ViSP with software that can not be combined with the GNU
15
* GPL, please contact INRIA about acquiring a ViSP Professional
16
* Edition License.
17
*
18
* See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19
*
20
* This software was developed at:
21
* INRIA Rennes - Bretagne Atlantique
22
* Campus Universitaire de Beaulieu
23
* 35042 Rennes Cedex
24
* France
25
* http://www.irisa.fr/lagadic
26
*
27
* If you have questions regarding the use of this file, please contact
28
* INRIA at visp@inria.fr
29
*
30
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32
*
33
*
34
* Description:
35
* Images grabbing example.
36
*
37
* Authors:
38
* Anthony Saunier
39
* Fabien Spindler
40
*
41
*****************************************************************************/
57
#include <visp/vpImage.h>
58
#include <visp/vp1394TwoGrabber.h>
59
#include <stdlib.h>
60
#include <stdio.h>
61
62
int
main()
63
{
64
#ifdef VISP_HAVE_DC1394_2
65
66
unsigned
int
ncameras;
// Number of cameras on the bus
67
vp1394TwoGrabber
g;
68
g.
getNumCameras
(ncameras);
69
vpImage<unsigned char>
*I =
new
vpImage<unsigned char>
[ncameras];
70
71
// If the first camera supports vpVIDEO_MODE_640x480_YUV422 video mode
72
g.
setCamera
(0);
73
g.
setVideoMode
(
vp1394TwoGrabber::vpVIDEO_MODE_640x480_YUV422
);
74
75
// If all cameras support 30 fps acquisition
76
for
(
unsigned
int
camera=0; camera < ncameras; camera ++) {
77
g.
setCamera
(camera);
78
g.
setFramerate
(
vp1394TwoGrabber::vpFRAMERATE_30
);
79
}
80
81
for
( ; ; ) {
82
for
(
unsigned
int
camera=0; camera < ncameras; camera ++) {
83
// Acquire successively images from the different cameras
84
g.
setCamera
(camera);
85
g.
acquire
(I[camera]);
86
}
87
}
88
delete
[] I;
89
90
#endif
91
92
return
0;
93
}
example
manual
image-manipulation
manGrab1394-2.cpp
Generated on Fri Sep 27 2013 21:09:12 for ViSP by
1.8.4